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

@ -1152,4 +1152,39 @@ public class ImppEnumUtil {
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 io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
@ -24,6 +26,8 @@ import javax.persistence.Table;
@Entity
@DynamicInsert
@DynamicUpdate
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Table(name="MES_EVENT_ACTION")
@Api("系统业务事件动作")

@ -18,8 +18,12 @@ import java.util.Map;
public class ActionRequestBean<Obj> implements Serializable {
@ApiParam("事件代码")
@Deprecated
public String eventCode;
@ApiParam("按钮代码")
public String buttonCode;
@ApiParam("单个结果")
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 org.springframework.stereotype.Repository;
import java.util.List;
/**
* @Description :
* @Reference :
@ -13,4 +15,8 @@ import org.springframework.stereotype.Repository;
**/
@Repository
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 org.springframework.stereotype.Repository;
import java.util.List;
/**
* @Description :
* @Reference :
@ -13,4 +15,5 @@ import org.springframework.stereotype.Repository;
**/
@Repository
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 org.springframework.stereotype.Repository;
import java.util.List;
/**
* @Description :
* @Reference :
@ -13,4 +15,11 @@ import org.springframework.stereotype.Repository;
**/
@Repository
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 org.springframework.stereotype.Repository;
import java.util.List;
/**
* @Description :
* @Reference :
@ -13,4 +15,8 @@ import org.springframework.stereotype.Repository;
**/
@Repository
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
*
* @param mesEquipment
* @return
*/
@ -317,6 +318,7 @@ public class MesHqlPack {
packBean.setOrderByStr(mesRoute.orderBy());
return packBean;
}
/**
*
*
@ -335,6 +337,7 @@ public class MesHqlPack {
/**
* MES
*
* @param shift
* @return
*/
@ -355,6 +358,7 @@ public class MesHqlPack {
/**
* MES
*
* @param shiftRest
* @return
*/
@ -369,7 +373,7 @@ public class MesHqlPack {
return packBean;
}
/******************created by wynne*************/
/**
* MES
* @param mesScrap
@ -433,6 +437,7 @@ public class MesHqlPack {
/**
* MES FastDfs
*
* @param mesESOP
* @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
*
* @param process
* @return
*/
@ -467,6 +582,7 @@ public class MesHqlPack {
/**
* MES
*
* @param step
* @return
*/
@ -487,6 +603,7 @@ public class MesHqlPack {
/**
* MES
*
* @param stepParam
* @return
*/
@ -507,6 +624,7 @@ public class MesHqlPack {
/**
* MES
*
* @param routeProcessCell
* @return
*/
@ -530,6 +648,7 @@ public class MesHqlPack {
/**
* MES BOM
*
* @param bom
* @return
*/
@ -550,6 +669,7 @@ public class MesHqlPack {
/**
* MESBOM
*
* @param processBom
* @return
*/
@ -570,6 +690,7 @@ public class MesHqlPack {
/**
* MES
*
* @param customer
* @return
*/
@ -587,6 +708,7 @@ public class MesHqlPack {
/**
* MES 线
*
* @param custProdLine
* @return
*/
@ -604,6 +726,7 @@ public class MesHqlPack {
/**
* MES
*
* @param customerPart
* @return
*/
@ -624,6 +747,7 @@ public class MesHqlPack {
/**
* MES
*
* @param keyData
* @return
*/
@ -641,6 +765,7 @@ public class MesHqlPack {
/**
* MES
*
* @param kpData
* @return
*/
@ -658,6 +783,7 @@ public class MesHqlPack {
/**
* MES
*
* @param prodCfgType
* @return
*/
@ -675,6 +801,7 @@ public class MesHqlPack {
/**
* MES
*
* @param prodCfg
* @return
*/
@ -695,6 +822,7 @@ public class MesHqlPack {
/**
* MES
*
* @param prodCfgDetail
* @return
*/
@ -712,6 +840,7 @@ public class MesHqlPack {
/**
* MES
*
* @param part
* @return
*/
@ -738,6 +867,7 @@ public class MesHqlPack {
/**
* MES
*
* @param partCategory
* @return
*/
@ -755,6 +885,7 @@ public class MesHqlPack {
/**
* MES
*
* @param packSpec
* @return
*/
@ -775,6 +906,7 @@ public class MesHqlPack {
/**
* MES
*
* @param produceCategory
* @return
*/
@ -792,6 +924,7 @@ public class MesHqlPack {
/**
* MES
*
* @param kpsnRule
* @return
*/
@ -806,6 +939,7 @@ public class MesHqlPack {
/**
* MES
*
* @param partScheduleBom
* @return
*/
@ -823,6 +957,7 @@ public class MesHqlPack {
/**
* MESdao
*
* @param objectDao
* @return
*/
@ -840,6 +975,7 @@ public class MesHqlPack {
/**
* MES-PCN
*
* @param pcnSyncCfg
* @return
*/
@ -860,6 +996,7 @@ public class MesHqlPack {
/**
* MES
*
* @param workCellParamCfg
* @return
*/
@ -877,6 +1014,7 @@ public class MesHqlPack {
/**
* MES
*
* @param workCellPoint
* @return
*/
@ -890,6 +1028,7 @@ public class MesHqlPack {
/**
* PLC
*
* @param plcConfigure
* @return
*/

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

@ -316,24 +316,24 @@ public class CoreHqlPack {
* @param dictionary
* @return
*/
public static String packHqlSysDictionary(SysDictionary dictionary) {
StringBuffer result = new StringBuffer();
public static DdlPackBean packHqlSysDictionaryPage(SysDictionary dictionary) {
DdlPackBean result = new DdlPackBean();
// hql拼接
HqlPack.getStringLikerPack(dictionary.getName(), "name", result);
HqlPack.getStringLikerPack(dictionary.getDictionaryCode(), "dictionaryCode", result);
HqlPack.getNumEqualPack(dictionary.getDictionarySoftType(), "dictionarySoftType", result);
DdlPreparedPack.getStringLikerPack(dictionary.getName(), "name", result);
DdlPreparedPack.getStringLikerPack(dictionary.getDictionaryCode(), "dictionaryCode", result);
DdlPreparedPack.getNumEqualPack(dictionary.getDictionarySoftType(), "dictionarySoftType", result);
// 默认查询非顶级字典
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);
HqlPack.getStringLikerPack(dictionary.getParentCodeRdd(),"parentCodeRdd", result);
DdlPreparedPack.getNumEqualPack(dictionary.getParentId(), "parentId", 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
* @return
*/
public static String packHqlSysDictionaryCode(SysDictionary dictionary){
StringBuffer result = new StringBuffer();
public static DdlPackBean packHqlSysDictionaryCode(SysDictionary dictionary){
DdlPackBean result = new DdlPackBean();
// and
HqlPack.getStringEqualPack(dictionary.getDictionaryCode(),"dictionaryCode",result);
HqlPack.getNumEqualPack(dictionary.getParentId(),"parentId",result);
HqlPack.getNumEqualPack(dictionary.getDictionarySoftType(),"dictionarySoftType",result);
DdlPreparedPack.getStringEqualPack(dictionary.getDictionaryCode(),"dictionaryCode",result);
DdlPreparedPack.getNumEqualPack(dictionary.getParentId(),"parentId",result);
DdlPreparedPack.getNumEqualPack(dictionary.getDictionarySoftType(),"dictionarySoftType",result);
// 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
* @return
*/
public static String packHqlSysDictionaryValue(SysDictionary dictionary){
StringBuffer result = new StringBuffer();
public static DdlPackBean packHqlSysDictionaryValue(SysDictionary dictionary){
DdlPackBean result = new DdlPackBean();
// and
HqlPack.getStringEqualPack(dictionary.getDictionaryValue(),"dictionaryValue",result);
HqlPack.getNumEqualPack(dictionary.getParentId(),"parentId",result);
HqlPack.getNumEqualPack(dictionary.getDictionarySoftType(),"dictionarySoftType",result);
DdlPreparedPack.getStringEqualPack(dictionary.getDictionaryValue(),"dictionaryValue",result);
DdlPreparedPack.getNumEqualPack(dictionary.getParentId(),"parentId",result);
DdlPreparedPack.getNumEqualPack(dictionary.getDictionarySoftType(),"dictionarySoftType",result);
// 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;
}
/**
*
* @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