yun-zuoyi
陈思洁 6 years ago
commit 2860edf722

@ -1152,4 +1152,39 @@ public class ImppEnumUtil {
return tmp; return tmp;
} }
} }
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DICTIONARY_GROUP {
SYSTEM(1, "系统字典"),
EXTERNAL(2, "外部人员");
private int value;
private String description;
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
private DICTIONARY_GROUP(int value, String description) {
this.value = value;
this.description = description;
}
public static String valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
} }

@ -4,8 +4,10 @@ package cn.estsh.i3plus.pojo.mes.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean; import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate; import org.hibernate.annotations.DynamicUpdate;
@ -24,6 +26,8 @@ import javax.persistence.Table;
@Entity @Entity
@DynamicInsert @DynamicInsert
@DynamicUpdate @DynamicUpdate
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Table(name="MES_EVENT_ACTION") @Table(name="MES_EVENT_ACTION")
@Api("系统业务事件动作") @Api("系统业务事件动作")

@ -18,8 +18,12 @@ import java.util.Map;
public class ActionRequestBean<Obj> implements Serializable { public class ActionRequestBean<Obj> implements Serializable {
@ApiParam("事件代码") @ApiParam("事件代码")
@Deprecated
public String eventCode; public String eventCode;
@ApiParam("按钮代码")
public String buttonCode;
@ApiParam("单个结果") @ApiParam("单个结果")
public Obj resultObject; public Obj resultObject;

@ -0,0 +1,37 @@
package cn.estsh.i3plus.pojo.mes.model;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/8/6 9:19 AM
* @Description:
**/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Api("动作函数关系model")
public class MesActionMethodModel implements Serializable {
@ApiParam("id")
private Long id;
@ApiParam("动作名称")
private String actionName;
@ApiParam("动作代码")
private String actionCode;
@ApiParam("函数代码")
private String methodCode;
@ApiParam("序号")
private Integer seq;
}

@ -0,0 +1,44 @@
package cn.estsh.i3plus.pojo.mes.model;
import cn.estsh.i3plus.pojo.mes.bean.MesEventAction;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/8/6 9:19 AM
* @Description:
**/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Api("事件动作关系model")
public class MesEventActionModel implements Serializable {
@ApiParam("id")
private Long id;
@ApiParam("动作名称")
private String actionName;
@ApiParam("事件名称")
private String eventName;
@ApiParam("动作代码")
private String actionCode;
@ApiParam("事件代码")
private String eventCode;
@ApiParam("序号")
private Integer seq;
}

@ -4,6 +4,8 @@ import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesAction; import cn.estsh.i3plus.pojo.mes.bean.MesAction;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List;
/** /**
* @Description : * @Description :
* @Reference : * @Reference :
@ -13,4 +15,8 @@ import org.springframework.stereotype.Repository;
**/ **/
@Repository @Repository
public interface MesActionRepository extends BaseRepository<MesAction, Long> { public interface MesActionRepository extends BaseRepository<MesAction, Long> {
List<MesAction> findByOrganizeCodeAndIsDeleted(String organizeCode,Integer isDeleted);
List<MesAction> findByActionCodeAndIsValidAndIsDeleted(String actionCode,Integer isValid,Integer isDeleted);
} }

@ -4,6 +4,8 @@ import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesEventAction; import cn.estsh.i3plus.pojo.mes.bean.MesEventAction;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List;
/** /**
* @Description : * @Description :
* @Reference : * @Reference :
@ -13,4 +15,5 @@ import org.springframework.stereotype.Repository;
**/ **/
@Repository @Repository
public interface MesEventActionRepository extends BaseRepository<MesEventAction, Long> { public interface MesEventActionRepository extends BaseRepository<MesEventAction, Long> {
} }

@ -4,6 +4,8 @@ import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesEvent; import cn.estsh.i3plus.pojo.mes.bean.MesEvent;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List;
/** /**
* @Description : * @Description :
* @Reference : * @Reference :
@ -13,4 +15,11 @@ import org.springframework.stereotype.Repository;
**/ **/
@Repository @Repository
public interface MesEventRepository extends BaseRepository<MesEvent, Long> { public interface MesEventRepository extends BaseRepository<MesEvent, Long> {
List<MesEvent> findByOrganizeCodeAndIsDeleted(String organizeCode,Integer isDeleted);
List<MesEvent> findByButtonCodeAndIsValidAndIsDeleted(String buttonCode,Integer isValid,Integer isDeleted);
List<MesEvent> findByEventCodeAndIsValidAndIsDeleted(String eventCode,Integer isValid,Integer isDeleted);
} }

@ -4,6 +4,8 @@ import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesMethod; import cn.estsh.i3plus.pojo.mes.bean.MesMethod;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List;
/** /**
* @Description : * @Description :
* @Reference : * @Reference :
@ -13,4 +15,8 @@ import org.springframework.stereotype.Repository;
**/ **/
@Repository @Repository
public interface MesMethodRepository extends BaseRepository<MesMethod, Long> { public interface MesMethodRepository extends BaseRepository<MesMethod, Long> {
List<MesMethod> findByMethodCodeAndIsValidAndIsDeleted(String methodCode, Integer isValid, Integer isDeleted);
List<MesMethod> findByOrganizeCodeAndIsDeleted(String organizeCode, int value);
} }

@ -289,6 +289,7 @@ public class MesHqlPack {
/** /**
* MES * MES
*
* @param mesEquipment * @param mesEquipment
* @return * @return
*/ */
@ -317,6 +318,7 @@ public class MesHqlPack {
packBean.setOrderByStr(mesRoute.orderBy()); packBean.setOrderByStr(mesRoute.orderBy());
return packBean; return packBean;
} }
/** /**
* *
* *
@ -335,6 +337,7 @@ public class MesHqlPack {
/** /**
* MES * MES
*
* @param shift * @param shift
* @return * @return
*/ */
@ -355,6 +358,7 @@ public class MesHqlPack {
/** /**
* MES * MES
*
* @param shiftRest * @param shiftRest
* @return * @return
*/ */
@ -369,7 +373,7 @@ public class MesHqlPack {
return packBean; return packBean;
} }
/******************created by wynne*************/
/** /**
* MES * MES
* @param mesScrap * @param mesScrap
@ -433,6 +437,7 @@ public class MesHqlPack {
/** /**
* MES FastDfs * MES FastDfs
*
* @param mesESOP * @param mesESOP
* @return * @return
*/ */
@ -449,7 +454,117 @@ public class MesHqlPack {
} }
/** /**
*
*
* @param mesEvent
* @param organizeCode
* @return
*/
public static DdlPackBean getMesEvent(MesEvent mesEvent, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesEvent, organizeCode);
if (StringUtils.isNotEmpty(mesEvent.getButtonCode())) {
DdlPreparedPack.getStringLikerPack(mesEvent.getButtonCode(), "buttonCode", packBean);
}
if (StringUtils.isNotEmpty(mesEvent.getEventCode())) {
DdlPreparedPack.getStringLikerPack(mesEvent.getEventCode(), "eventCode", packBean);
}
if (StringUtils.isNotEmpty(mesEvent.getEventName())) {
DdlPreparedPack.getStringLikerPack(mesEvent.getEventName(), "eventName", packBean);
}
return packBean;
}
/**
*
*
* @param mesAction
* @param organizeCode
* @return
*/
public static DdlPackBean getMesAction(MesAction mesAction, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesAction, organizeCode);
if (StringUtils.isNotEmpty(mesAction.getActionCode())) {
DdlPreparedPack.getStringRightLikerPack(mesAction.getActionCode(), "actionCode", packBean);
}
if (StringUtils.isNotEmpty(mesAction.getActionName())) {
DdlPreparedPack.getStringLikerPack(mesAction.getActionName(), "actionName", packBean);
}
if (mesAction.getActionType() != null && StringUtils.isNotEmpty(mesAction.getActionType() + "")) {
DdlPreparedPack.getStringEqualPack(mesAction.getActionType() + "", "actionType", packBean);
}
return packBean;
}
/**
*
*
* @param mesMethod
* @param organizeCode
* @return
*/
public static DdlPackBean getMesMethod(MesMethod mesMethod, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesMethod, organizeCode);
if (StringUtils.isNotEmpty(mesMethod.getMethodCode())) {
DdlPreparedPack.getStringRightLikerPack(mesMethod.getMethodCode(), "methodCode", packBean);
}
if (StringUtils.isNotEmpty(mesMethod.getMethodName())) {
DdlPreparedPack.getStringLikerPack(mesMethod.getMethodName(), "methodName", packBean);
}
if (StringUtils.isNotEmpty(mesMethod.getCallClass())) {
DdlPreparedPack.getStringRightLikerPack(mesMethod.getCallClass(), "callClass", packBean);
}
if (mesMethod.getMethodType() != null && StringUtils.isNotEmpty(mesMethod.getMethodType() + "")) {
DdlPreparedPack.getStringEqualPack(mesMethod.getMethodType() + "", "methodType", packBean);
}
return packBean;
}
/**
*
*
* @param mesActionMethod
* @param organizeCode
* @return
*/
public static DdlPackBean getMesActionMethod(MesActionMethod mesActionMethod, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesActionMethod, organizeCode);
if (StringUtils.isNotEmpty(mesActionMethod.getActionCode())) {
DdlPreparedPack.getStringLikerPack(mesActionMethod.getActionCode(), "actionCode", packBean);
}
if (StringUtils.isNotEmpty(mesActionMethod.getMethodCode())) {
DdlPreparedPack.getStringLikerPack(mesActionMethod.getMethodCode(), "methodCode", packBean);
}
return packBean;
}
/**
*
*
* @param mesEventAction
* @param organizeCode
* @return
*/
public static DdlPackBean getMesEventAction(MesEventAction mesEventAction, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesEventAction, organizeCode);
if (StringUtils.isNotEmpty(mesEventAction.getOrganizeCode())) {
DdlPreparedPack.getStringEqualPack(mesEventAction.getOrganizeCode(), "organizeCode", packBean);
}
if (StringUtils.isNotEmpty(mesEventAction.getEventCode())) {
DdlPreparedPack.getStringLikerPack(mesEventAction.getEventCode(), "eventCode", packBean);
}
if (StringUtils.isNotEmpty(mesEventAction.getActionCode())) {
DdlPreparedPack.getStringLikerPack(mesEventAction.getActionCode(), "actionCode", packBean);
}
return packBean;
}
/******************created by wynne*************/
/**
* MES * MES
*
* @param process * @param process
* @return * @return
*/ */
@ -467,6 +582,7 @@ public class MesHqlPack {
/** /**
* MES * MES
*
* @param step * @param step
* @return * @return
*/ */
@ -487,6 +603,7 @@ public class MesHqlPack {
/** /**
* MES * MES
*
* @param stepParam * @param stepParam
* @return * @return
*/ */
@ -507,6 +624,7 @@ public class MesHqlPack {
/** /**
* MES * MES
*
* @param routeProcessCell * @param routeProcessCell
* @return * @return
*/ */
@ -530,6 +648,7 @@ public class MesHqlPack {
/** /**
* MES BOM * MES BOM
*
* @param bom * @param bom
* @return * @return
*/ */
@ -550,6 +669,7 @@ public class MesHqlPack {
/** /**
* MESBOM * MESBOM
*
* @param processBom * @param processBom
* @return * @return
*/ */
@ -570,6 +690,7 @@ public class MesHqlPack {
/** /**
* MES * MES
*
* @param customer * @param customer
* @return * @return
*/ */
@ -587,6 +708,7 @@ public class MesHqlPack {
/** /**
* MES 线 * MES 线
*
* @param custProdLine * @param custProdLine
* @return * @return
*/ */
@ -604,6 +726,7 @@ public class MesHqlPack {
/** /**
* MES * MES
*
* @param customerPart * @param customerPart
* @return * @return
*/ */
@ -624,6 +747,7 @@ public class MesHqlPack {
/** /**
* MES * MES
*
* @param keyData * @param keyData
* @return * @return
*/ */
@ -641,6 +765,7 @@ public class MesHqlPack {
/** /**
* MES * MES
*
* @param kpData * @param kpData
* @return * @return
*/ */
@ -658,6 +783,7 @@ public class MesHqlPack {
/** /**
* MES * MES
*
* @param prodCfgType * @param prodCfgType
* @return * @return
*/ */
@ -675,6 +801,7 @@ public class MesHqlPack {
/** /**
* MES * MES
*
* @param prodCfg * @param prodCfg
* @return * @return
*/ */
@ -695,6 +822,7 @@ public class MesHqlPack {
/** /**
* MES * MES
*
* @param prodCfgDetail * @param prodCfgDetail
* @return * @return
*/ */
@ -712,6 +840,7 @@ public class MesHqlPack {
/** /**
* MES * MES
*
* @param part * @param part
* @return * @return
*/ */
@ -738,6 +867,7 @@ public class MesHqlPack {
/** /**
* MES * MES
*
* @param partCategory * @param partCategory
* @return * @return
*/ */
@ -755,6 +885,7 @@ public class MesHqlPack {
/** /**
* MES * MES
*
* @param packSpec * @param packSpec
* @return * @return
*/ */
@ -775,6 +906,7 @@ public class MesHqlPack {
/** /**
* MES * MES
*
* @param produceCategory * @param produceCategory
* @return * @return
*/ */
@ -792,6 +924,7 @@ public class MesHqlPack {
/** /**
* MES * MES
*
* @param kpsnRule * @param kpsnRule
* @return * @return
*/ */
@ -806,6 +939,7 @@ public class MesHqlPack {
/** /**
* MES * MES
*
* @param partScheduleBom * @param partScheduleBom
* @return * @return
*/ */
@ -823,6 +957,7 @@ public class MesHqlPack {
/** /**
* MESdao * MESdao
*
* @param objectDao * @param objectDao
* @return * @return
*/ */
@ -840,6 +975,7 @@ public class MesHqlPack {
/** /**
* MES-PCN * MES-PCN
*
* @param pcnSyncCfg * @param pcnSyncCfg
* @return * @return
*/ */
@ -860,6 +996,7 @@ public class MesHqlPack {
/** /**
* MES * MES
*
* @param workCellParamCfg * @param workCellParamCfg
* @return * @return
*/ */
@ -877,6 +1014,7 @@ public class MesHqlPack {
/** /**
* MES * MES
*
* @param workCellPoint * @param workCellPoint
* @return * @return
*/ */
@ -890,6 +1028,7 @@ public class MesHqlPack {
/** /**
* PLC * PLC
*
* @param plcConfigure * @param plcConfigure
* @return * @return
*/ */

@ -45,6 +45,11 @@ public class SysDictionary extends BaseBean {
@ApiParam(value ="字典所属模块") @ApiParam(value ="字典所属模块")
private Integer dictionarySoftType; private Integer dictionarySoftType;
//枚举 ImppEnumUtil.DICTIONARY_GROUP
@Column(name="DICTIONARY_GROUP")
@ApiParam(value ="字典分组")
private Integer dictionaryGroup;
// 根节点-1 // 根节点-1
@Column(name="PARENT_ID") @Column(name="PARENT_ID")
@ApiParam(value ="父节点" , example = "-1") @ApiParam(value ="父节点" , example = "-1")

@ -316,24 +316,24 @@ public class CoreHqlPack {
* @param dictionary * @param dictionary
* @return * @return
*/ */
public static String packHqlSysDictionary(SysDictionary dictionary) { public static DdlPackBean packHqlSysDictionaryPage(SysDictionary dictionary) {
StringBuffer result = new StringBuffer(); DdlPackBean result = new DdlPackBean();
// hql拼接 // hql拼接
HqlPack.getStringLikerPack(dictionary.getName(), "name", result); DdlPreparedPack.getStringLikerPack(dictionary.getName(), "name", result);
HqlPack.getStringLikerPack(dictionary.getDictionaryCode(), "dictionaryCode", result); DdlPreparedPack.getStringLikerPack(dictionary.getDictionaryCode(), "dictionaryCode", result);
HqlPack.getNumEqualPack(dictionary.getDictionarySoftType(), "dictionarySoftType", result); DdlPreparedPack.getNumEqualPack(dictionary.getDictionarySoftType(), "dictionarySoftType", result);
// 默认查询非顶级字典 // 默认查询非顶级字典
if (dictionary.getParentId() == null || dictionary.getParentId() < 1){ if (dictionary.getParentId() == null || dictionary.getParentId() < 1){
HqlPack.getNumNOEqualPack(CommonEnumUtil.PARENT.DEFAULT.getValue(), "parentId", result); DdlPreparedPack.getNumNOEqualPack(CommonEnumUtil.PARENT.DEFAULT.getValue(), "parentId", result);
} }
HqlPack.getNumEqualPack(dictionary.getParentId(), "parentId", result); DdlPreparedPack.getNumEqualPack(dictionary.getParentId(), "parentId", result);
HqlPack.getStringLikerPack(dictionary.getParentCodeRdd(),"parentCodeRdd", result); DdlPreparedPack.getStringLikerPack(dictionary.getParentCodeRdd(),"parentCodeRdd", result);
// 添加默认排序 // 添加默认排序
HqlPack.getOrderDefault(dictionary); DdlPreparedPack.getOrderDefault(dictionary);
return result.toString(); return result;
} }
/** /**
@ -550,20 +550,20 @@ public class CoreHqlPack {
* @param dictionary * @param dictionary
* @return * @return
*/ */
public static String packHqlSysDictionaryCode(SysDictionary dictionary){ public static DdlPackBean packHqlSysDictionaryCode(SysDictionary dictionary){
StringBuffer result = new StringBuffer(); DdlPackBean result = new DdlPackBean();
// and // and
HqlPack.getStringEqualPack(dictionary.getDictionaryCode(),"dictionaryCode",result); DdlPreparedPack.getStringEqualPack(dictionary.getDictionaryCode(),"dictionaryCode",result);
HqlPack.getNumEqualPack(dictionary.getParentId(),"parentId",result); DdlPreparedPack.getNumEqualPack(dictionary.getParentId(),"parentId",result);
HqlPack.getNumEqualPack(dictionary.getDictionarySoftType(),"dictionarySoftType",result); DdlPreparedPack.getNumEqualPack(dictionary.getDictionarySoftType(),"dictionarySoftType",result);
// not // not
HqlPack.getNumNOEqualPack(dictionary.getId(),"id",result); DdlPreparedPack.getNumNOEqualPack(dictionary.getId(),"id",result);
// 添加默认排序 // 添加默认排序
HqlPack.getOrderDefault(dictionary); DdlPreparedPack.getOrderDefault(dictionary);
return result.toString(); return result;
} }
/** /**
@ -571,20 +571,20 @@ public class CoreHqlPack {
* @param dictionary * @param dictionary
* @return * @return
*/ */
public static String packHqlSysDictionaryValue(SysDictionary dictionary){ public static DdlPackBean packHqlSysDictionaryValue(SysDictionary dictionary){
StringBuffer result = new StringBuffer(); DdlPackBean result = new DdlPackBean();
// and // and
HqlPack.getStringEqualPack(dictionary.getDictionaryValue(),"dictionaryValue",result); DdlPreparedPack.getStringEqualPack(dictionary.getDictionaryValue(),"dictionaryValue",result);
HqlPack.getNumEqualPack(dictionary.getParentId(),"parentId",result); DdlPreparedPack.getNumEqualPack(dictionary.getParentId(),"parentId",result);
HqlPack.getNumEqualPack(dictionary.getDictionarySoftType(),"dictionarySoftType",result); DdlPreparedPack.getNumEqualPack(dictionary.getDictionarySoftType(),"dictionarySoftType",result);
// not // not
HqlPack.getNumNOEqualPack(dictionary.getId(),"id",result); DdlPreparedPack.getNumNOEqualPack(dictionary.getId(),"id",result);
// 添加默认排序 // 添加默认排序
HqlPack.getOrderDefault(dictionary); DdlPreparedPack.getOrderDefault(dictionary);
return result.toString(); return result;
} }
/** /**
@ -932,4 +932,22 @@ public class CoreHqlPack {
return packBean; return packBean;
} }
/**
*
* @param sysDictionary
* @return
*/
public static DdlPackBean packHqlSysDictionary(SysDictionary sysDictionary){
DdlPackBean packBean = new DdlPackBean();
DdlPreparedPack.getStringEqualPack(sysDictionary.getName(), "name", packBean);
DdlPreparedPack.getStringEqualPack(sysDictionary.getDictionaryCode(), "dictionaryCode", packBean);
DdlPreparedPack.getStringEqualPack(sysDictionary.getParentCodeRdd(), "parentCodeRdd", packBean);
DdlPreparedPack.getNumEqualPack(sysDictionary.getParentId(),"parentId",packBean);
DdlPreparedPack.getNumEqualPack(sysDictionary.getDictionarySoftType(), "dictionarySoftType", packBean);
DdlPreparedPack.getNumEqualPack(sysDictionary.getDictionaryGroup(),"dictionaryGroup",packBean);
return packBean;
}
} }
Loading…
Cancel
Save