diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/bean/BaseFallBackBean.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/bean/BaseFallBackBean.java index 870b7f7..fecb6e3 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/bean/BaseFallBackBean.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/bean/BaseFallBackBean.java @@ -18,23 +18,45 @@ public class BaseFallBackBean { // LOGGER.error("【微服出错,熔断】{}",cause.getCause()); // cause.printStackTrace(); + /** + * 基本熔断信息封装方法 + * @param cause 错误原因 + * @return 基础结果类 + */ public BaseResultBean makeBaseFallBack(Throwable cause){ - LOGGER.error("【熔断信息】{}",cause.getMessage()); - LOGGER.error("【熔断原因】{}",cause.getCause()); - return makeBaseFallBack("【微服熔断】服务暂停,请稍后再试。",cause); + LOGGER.error("【熔断信息】{}", cause.getMessage()); + LOGGER.error("【熔断原因】{}", cause.getCause()); + cause.printStackTrace(); + return makeBaseFallBack("【微服熔断】服务暂停,请稍后再试。", cause); } - public BaseResultBean makeBaseFallBack(String msg,Throwable cause){ - LOGGER.error("【熔断信息】{}",cause.getMessage()); - LOGGER.error("【熔断原因】{}",cause.getCause()); - return BaseResultBean.buildBaseResultBean(false,cause.getMessage() + ",信息:" + msg); + /** + * 自定义熔断信息封装方法 + * @param msg 错误提示 + * @param cause 错误原因 + * @return 基础结果类 + */ + public BaseResultBean makeBaseFallBack(String msg, Throwable cause){ + LOGGER.error("【熔断信息】{}", cause.getMessage()); + LOGGER.error("【熔断原因】{}", cause.getCause()); + cause.printStackTrace(); + return BaseResultBean.buildBaseResultBean(false, cause.getMessage() + ",信息:" + msg); } + /** + * 简化熔断信息方法 + * @return 基础结果类 + */ public BaseResultBean makeBaseFallBack(){ return makeBaseFallBack("【微服熔断】服务暂停,请稍后再试。"); } + /** + * 自定义简化熔断方法 + * @param msg 自定义信息 + * @return 基础结果类 + */ public BaseResultBean makeBaseFallBack(String msg){ - return BaseResultBean.buildBaseResultBean(false,msg); + return BaseResultBean.buildBaseResultBean(false, msg); } } diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java index 40b894a..580e5f6 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java @@ -1,5 +1,7 @@ package cn.estsh.i3plus.pojo.base.enumutil; +import com.fasterxml.jackson.annotation.JsonFormat; + /** * @Description : * @Reference : @@ -8,4 +10,40 @@ package cn.estsh.i3plus.pojo.base.enumutil; * @Modify: **/ public class MesEnumUtil { + /** + * MesMethod实体对应的methodType值 + * 10. + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum METHOD_TYPE{ + + EXEC(10,"执行方法"), + COMPLETE(20,"完成方法"); + + private int value; + private String description; + + METHOD_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + } } diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java index 5ccdb20..d2088c2 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java @@ -2031,4 +2031,38 @@ public class WmsEnumUtil { return tmp; } } + + /** + * 单据是否指定条码 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum ORDER_IS_SN { + IS_APPOINT_SN(1, "指定条码"), APPOINT_SN(2, "不指定条码"); + + private int value; + private String description; + + ORDER_IS_SN(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return 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; + } + } } diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/jpa/dao/BaseRepository.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/jpa/dao/BaseRepository.java index 6a48fbe..4c07060 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/jpa/dao/BaseRepository.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/jpa/dao/BaseRepository.java @@ -105,6 +105,15 @@ public interface BaseRepository extends JpaReposito int updateByProperties(String conditionName, Object conditionValue, String[] propertyName, Object[] propertyValue); /** + * 通过属性进行多个值更新 + * @param propertyName + * @param propertyValue + */ + int updateByProperties(String propertyName, Object propertyValue,DdlPackBean packBean); + int updateByProperties(String[] propertyName, Object[] propertyValue,DdlPackBean packBean); + + + /** * 通过多个属性进行单个值更新 * @param conditionName * @param conditionValue diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/jpa/daoimpl/BaseMongoRepositoryImpl.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/jpa/daoimpl/BaseMongoRepositoryImpl.java index f81e238..ef58910 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/jpa/daoimpl/BaseMongoRepositoryImpl.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/jpa/daoimpl/BaseMongoRepositoryImpl.java @@ -5,8 +5,10 @@ import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; import cn.estsh.i3plus.pojo.base.jpa.dao.BaseMongoRepository; import cn.estsh.i3plus.pojo.base.codemaker.SnowflakeIdMaker; import com.alibaba.fastjson.JSONObject; +import com.mongodb.BasicDBObject; import com.mongodb.Block; import com.mongodb.client.FindIterable; +import com.mongodb.client.model.CountOptions; import com.mongodb.client.model.Filters; import com.mongodb.client.model.Sorts; import org.apache.commons.lang3.StringUtils; @@ -21,6 +23,7 @@ import org.springframework.data.mapping.context.MappingContext; import org.springframework.data.mongodb.core.MongoOperations; import org.springframework.data.mongodb.core.mapping.MongoPersistentEntity; import org.springframework.data.mongodb.core.mapping.MongoPersistentProperty; +import org.springframework.data.mongodb.core.query.Query; import org.springframework.data.mongodb.repository.query.MongoEntityInformation; import org.springframework.data.mongodb.repository.support.SimpleMongoRepository; @@ -271,13 +274,9 @@ public class BaseMongoRepositoryImpl extends SimpleM FindIterable findIter = null; if(bson == null) { - findIter = mongoOperations.getCollection(this.entityInformation.getCollectionName()).find() - .skip(pager.getStartRow()) - .limit(pager.getPageSize()); + findIter = mongoOperations.getCollection(this.entityInformation.getCollectionName()).find(); }else{ - findIter = mongoOperations.getCollection(this.entityInformation.getCollectionName()).find(bson) - .skip(pager.getStartRow()) - .limit(pager.getPageSize()); + findIter = mongoOperations.getCollection(this.entityInformation.getCollectionName()).find(bson); } if(StringUtils.isNotBlank(orderByParam) && ascOrDesc != 0){ //排序 @@ -286,8 +285,13 @@ public class BaseMongoRepositoryImpl extends SimpleM }else{ findIter.sort(Sorts.descending(orderByParam)); } + }else{ + //根据id排序 + findIter.sort(new BasicDBObject("_id", 1)); } + findIter.skip(pager.getStartRow()).limit(pager.getPageSize()); findIter.forEach(saveBlock); + return packObjectListFromDocument(dList); } @@ -310,9 +314,7 @@ public class BaseMongoRepositoryImpl extends SimpleM dList.add(document); } }; - FindIterable findIter = mongoOperations.getCollection(this.entityInformation.getCollectionName()).find() - .skip(pager.getStartRow()) - .limit(pager.getPageSize()); + FindIterable findIter = mongoOperations.getCollection(this.entityInformation.getCollectionName()).find(); if(StringUtils.isNotBlank(orderByParam) && ascOrDesc != 0){ //排序 if(ascOrDesc == CommonEnumUtil.ASC_OR_DESC.ASC.getValue()){ @@ -320,7 +322,11 @@ public class BaseMongoRepositoryImpl extends SimpleM }else{ findIter.sort(Sorts.descending(orderByParam)); } + }else{ + //根据id排序 + findIter.sort(new BasicDBObject("_id", 1)); } + findIter.skip(pager.getStartRow()).limit(pager.getPageSize()); findIter.forEach(saveBlock); return packObjectListFromDocument(dList); } diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/jpa/daoimpl/BaseRepositoryImpl.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/jpa/daoimpl/BaseRepositoryImpl.java index 4145076..3de0adf 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/jpa/daoimpl/BaseRepositoryImpl.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/jpa/daoimpl/BaseRepositoryImpl.java @@ -222,6 +222,40 @@ public class BaseRepositoryImpl extends SimpleJpaRep } @Override + public int updateByProperties(String propertyName, Object propertyValue,DdlPackBean packBean) { + return updateByProperties(new String[] { propertyName }, new Object[] { propertyValue },packBean); + } + + @Override + public int updateByProperties(String[] propertyName, Object[] propertyValue,DdlPackBean packBean) { + if ((propertyName != null) && (propertyName.length > 0) && (propertyValue != null) + && (propertyValue.length > 0) && (propertyName.length == propertyValue.length)) { + StringBuffer sb = new StringBuffer(); + + sb.append("update " + persistentClass.getName() + " model set "); + for (int i = 0; i < propertyName.length; i++) { + sb.append(propertyName[i] + " = :p_" + propertyName[i] + ","); + } + sb.deleteCharAt(sb.length() - 1); + sb.append(" where 1=1 " + packBean.getWhereAppend()); + + Query query = entityManager.createQuery(sb.toString()); + //更新值 + for (int i = 0; i < propertyName.length; i++) { + query.setParameter("p_" + propertyName[i], propertyValue[i]); + } + //查询条件 + for (String key : packBean.getHqlPreparedMap().keySet()) { + query.setParameter(key,packBean.getHqlPreparedMap().get(key)); + } + + return query.executeUpdate(); + } else { + throw new IllegalArgumentException("参数值错误!,propertyName:" + propertyName + ",propertyValue:" + propertyValue); + } + } + + @Override public int updateByHqlWhere(String hqlWhere, String propertyName, Object propertyValue) { return updateByHqlWhere(hqlWhere, new String[]{propertyName}, new Object[]{propertyValue}); } diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/tool/DdlPreparedPack.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/tool/DdlPreparedPack.java index f74f02f..590ad9a 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/tool/DdlPreparedPack.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/tool/DdlPreparedPack.java @@ -255,7 +255,7 @@ public class DdlPreparedPack { * @param packBean */ public static void getNumEqualPack(Object data, String columnName, DdlPackBean packBean) { - if (data != null) { + if (data != null && Long.parseLong(data.toString()) > 0) { packBean.addColumnQuery(columnName," and model." + columnName + " = :m_" + columnName, data); } } diff --git a/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfIntercept.java b/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfIntercept.java index 4803300..d72ec65 100644 --- a/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfIntercept.java +++ b/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfIntercept.java @@ -41,6 +41,9 @@ public class BfIntercept extends BaseBean { @Column(name="EXECUTE_CONTENT") @ApiParam(value ="执行内容") - @JsonSerialize(using = ToStringSerializer.class) - private Integer executeContent; + private String executeContent; + + @Column(name="INTERCEPT_DESCRIPTION") + @ApiParam(value ="拦截器描述") + private String interceptDescription; } diff --git a/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfInterceptDetail.java b/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfInterceptDetail.java index 900be53..85d797c 100644 --- a/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfInterceptDetail.java +++ b/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfInterceptDetail.java @@ -48,9 +48,9 @@ public class BfInterceptDetail extends BaseBean { @ApiParam(value ="拦截器位置") private Integer interceptPosition; - public Integer getInterceptPosition() { + public int getInterceptPositionVal() { if(this.interceptPosition == null){ - return null; + return 0; } else { return this.interceptPosition.intValue(); } @@ -69,4 +69,22 @@ public class BfInterceptDetail extends BaseBean { @ApiParam(value ="拦截器业务结果处理") private Integer interceptProcessResult; + public int getInterceptProcessResultVal(){ + if(interceptProcessResult == null ){ + return 0; + } + return interceptProcessResult.intValue(); + } + + @Column(name="INTERCEPT_EXECUTE_SORT") + @ApiParam(value ="拦截器业务执行顺序") + private Integer interceptExecuteSort; + + public int getInterceptExecuteSortVal(){ + if(interceptExecuteSort == null ){ + return 0; + } + return interceptExecuteSort.intValue(); + } + } diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesAction.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesAction.java new file mode 100644 index 0000000..4517562 --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesAction.java @@ -0,0 +1,42 @@ +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.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +/** + * @Description :mes系统业务动作 + * @Reference : + * @Author : jack.jia + * @CreateDate : 2019-04-12 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name="MES_ACTION") +@Api("系统业务动作") +public class MesAction extends BaseBean { + @Column(name="ACTION_CODE") + @ApiParam("动作代码") + private String actionCode; + + @Column(name="ACTION_NAME") + @ApiParam("动作名称") + private String actionName; + + @Column(name="ACTION_TYPE") + @ApiParam("动作类型") + private Integer actionType; +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesActionMethod.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesActionMethod.java new file mode 100644 index 0000000..d425bd5 --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesActionMethod.java @@ -0,0 +1,42 @@ +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.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +/** + * @Description :mes系统业务动作方法 + * @Reference : + * @Author : jack.jia + * @CreateDate : 2019-04-12 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name="MES_ACTION_METHOD") +@Api("系统业务动作方法") +public class MesActionMethod extends BaseBean { + @Column(name="ACTION_CODE") + @ApiParam("动作代码") + private String actionCode; + + @Column(name="METHOD_CODE") + @ApiParam("方法代码") + private String methodCode; + + @Column(name="SEQ") + @ApiParam("序号") + private Integer seq; +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesEvent.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesEvent.java new file mode 100644 index 0000000..d45fb6d --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesEvent.java @@ -0,0 +1,42 @@ +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.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +/** + * @Description :mes系统业务事件 + * @Reference : + * @Author : jack.jia + * @CreateDate : 2019-04-12 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name="MES_EVENT") +@Api("系统业务事件") +public class MesEvent extends BaseBean { + @Column(name="EVENT_CODE") + @ApiParam("事件代码") + private String eventCode; + + @Column(name="EVENT_NAME") + @ApiParam("事件名称") + private String eventName; + + @Column(name="EVENT_TYPE") + @ApiParam("事件类型") + private Integer eventType; +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesEventAction.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesEventAction.java new file mode 100644 index 0000000..5b559df --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesEventAction.java @@ -0,0 +1,42 @@ +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.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +/** + * @Description :mes系统业务事件动作 + * @Reference : + * @Author : jack.jia + * @CreateDate : 2019-04-12 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name="MES_EVENT_ACTION") +@Api("系统业务事件动作") +public class MesEventAction extends BaseBean { + @Column(name="EVENT_CODE") + @ApiParam("事件代码") + private String eventCode; + + @Column(name="ACTION_CODE") + @ApiParam("动作代码") + private String actionCode; + + @Column(name="SEQ") + @ApiParam("序号") + private Integer seq; +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesMethod.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesMethod.java new file mode 100644 index 0000000..ef34e81 --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesMethod.java @@ -0,0 +1,46 @@ +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.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +/** + * @Description :mes系统业务方法 + * @Reference : + * @Author : jack.jia + * @CreateDate : 2019-04-12 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name="MES_METHOD") +@Api("系统业务方法") +public class MesMethod extends BaseBean { + @Column(name="METHOD_CODE") + @ApiParam("方法代码") + private String methodCode; + + @Column(name="METHOD_NAME") + @ApiParam("方法名称") + private String methodName; + + @Column(name="CALL_CLASS") + @ApiParam("具体实现类") + private String callClass; + + @Column(name="METHOD_TYPE") + @ApiParam("方法类型") + private Integer methodType; +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/ActionRequestBean.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/ActionRequestBean.java new file mode 100644 index 0000000..2dc63ce --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/ActionRequestBean.java @@ -0,0 +1,31 @@ +package cn.estsh.i3plus.pojo.mes.model; + +import io.swagger.annotations.ApiParam; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; +import java.util.Map; + +/** + * @Description : 动作请求参数 + * @Reference : + * @Author : jack.jia + * @CreateDate : 2019-04-12 + * @Modify: + **/ +@Data +public class ActionRequestBean implements Serializable { + + @ApiParam("事件代码") + public String eventCode; + + @ApiParam("单个结果") + public Obj resultObject; + + @ApiParam("List请求集") + public List resultList; + + @ApiParam("Map请求集") + public Map resultMap; +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesActionMethodRepository.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesActionMethodRepository.java new file mode 100644 index 0000000..fb0248b --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesActionMethodRepository.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.pojo.mes.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.mes.bean.MesActionMethod; +import org.springframework.stereotype.Repository; + +/** + * @Description : + * @Reference : + * @Author : jack.jia + * @CreateDate : 2019-04-02 + * @Modify: + **/ +@Repository +public interface MesActionMethodRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesActionRepository.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesActionRepository.java new file mode 100644 index 0000000..47d0046 --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesActionRepository.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.pojo.mes.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.mes.bean.MesAction; +import org.springframework.stereotype.Repository; + +/** + * @Description : + * @Reference : + * @Author : jack.jia + * @CreateDate : 2019-04-02 + * @Modify: + **/ +@Repository +public interface MesActionRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesEventActionRepository.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesEventActionRepository.java new file mode 100644 index 0000000..0489df8 --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesEventActionRepository.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.pojo.mes.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.mes.bean.MesEventAction; +import org.springframework.stereotype.Repository; + +/** + * @Description : + * @Reference : + * @Author : jack.jia + * @CreateDate : 2019-04-02 + * @Modify: + **/ +@Repository +public interface MesEventActionRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesEventRepository.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesEventRepository.java new file mode 100644 index 0000000..2a90e5c --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesEventRepository.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.pojo.mes.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.mes.bean.MesEvent; +import org.springframework.stereotype.Repository; + +/** + * @Description : + * @Reference : + * @Author : jack.jia + * @CreateDate : 2019-04-02 + * @Modify: + **/ +@Repository +public interface MesEventRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesMethodRepository.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesMethodRepository.java new file mode 100644 index 0000000..ab7b3dd --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesMethodRepository.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.pojo.mes.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.mes.bean.MesMethod; +import org.springframework.stereotype.Repository; + +/** + * @Description : + * @Reference : + * @Author : jack.jia + * @CreateDate : 2019-04-02 + * @Modify: + **/ +@Repository +public interface MesMethodRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementDetails.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementDetails.java index 37e55ee..db7518b 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementDetails.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementDetails.java @@ -160,6 +160,14 @@ public class WmsDocMovementDetails extends BaseBean { @ApiParam("前端表格编辑使用") private Boolean isSet = false; + @Transient + @ApiParam("生产日期") + public String dateCode; + + @ApiParam(value = "散件移库输入移库数量") + @Transient + public Double inputMoveQty; + public String getRecommondLot() { return recommondLot == null ? "无" : this.recommondLot; } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementMaster.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementMaster.java index 7fda75e..fdbeed4 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementMaster.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementMaster.java @@ -126,4 +126,8 @@ public class WmsDocMovementMaster extends BaseBean { @Transient @ApiParam(value = "打印时间") private String printDate; + +// public Integer getIsSn() { +//// return isSn == null ? 0 : this.getIsSn(); +//// } } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsLocate.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsLocate.java index 6b60984..a650262 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsLocate.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsLocate.java @@ -111,4 +111,7 @@ public class WmsLocate extends BaseBean { return this.partQty == null ? 0 : this.partQty.doubleValue(); } + public Integer getLocateType() { + return this.locateType== null ? 0 : this.locateType.intValue(); + } } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPOMaster.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPOMaster.java index 1d95450..79d47dd 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPOMaster.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPOMaster.java @@ -26,11 +26,11 @@ import java.util.List; @DynamicInsert @DynamicUpdate @EqualsAndHashCode(callSuper = true) -@Table(name="WMS_DOC_PO_MASTER") +@Table(name = "WMS_DOC_PO_MASTER") @Api("PO主表信息") public class WmsPOMaster extends BaseBean { - @Column(name="ORDER_NO") + @Column(name = "ORDER_NO") @ApiParam("订单号") public String orderNo; @@ -38,7 +38,7 @@ public class WmsPOMaster extends BaseBean { * 单据类型: * 1 REG=原物料采购,10 SUB=委外采购,20 TAR=多角贸易采购,30 TAP=多角代采购 */ - @Column(name="PO_TYPE") + @Column(name = "PO_TYPE") @ApiParam("单据类型") public String poType; @@ -46,26 +46,26 @@ public class WmsPOMaster extends BaseBean { * 状态:1=新建,10=收货中,20=收货完成, * 30=入库中,40=入库完成,90=已关闭,91=已取消 */ - @Column(name="PO_STATUS") + @Column(name = "PO_STATUS") @ApiParam(value = "状态", example = "1") public Integer poStatus; - @Column(name="VENDOR_NO") + @Column(name = "VENDOR_NO") @ApiParam("供应商编号") public String vendorNo; - @Column(name="VERSION") + @Column(name = "VERSION") @ApiParam("版本") public String version; /** * 单据来源:1 MNU=手工,2 ERP=ERP接口 */ - @Column(name="SRC") + @Column(name = "SRC") @ApiParam("单据来源") public String src; - @Column(name="IS_ASN") + @Column(name = "IS_ASN") @ApiParam("是否有ASN") public String isAsn; @@ -76,11 +76,11 @@ public class WmsPOMaster extends BaseBean { @ApiParam("供应商名称") private String vendorName; - @Column(name="IS_TASK") - @ApiParam(value = "是否生产任务", example = "1") + @Column(name = "IS_TASK") + @ApiParam(value = "是否生成任务", example = "1") public Integer isTask; - @Column(name="IS_PART") + @Column(name = "IS_PART") @ApiParam(value = "是否散件", example = "1") public Integer isPart; @@ -103,4 +103,8 @@ public class WmsPOMaster extends BaseBean { @Transient @ApiParam(value = "发货日期") private String sendDate; + + @Column(name = "IS_SN") + @ApiParam(value = "是否生成条码", example = "1") + public Integer isSn; } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPOMasterDetails.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPOMasterDetails.java index 2a8209b..9d973a8 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPOMasterDetails.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPOMasterDetails.java @@ -105,7 +105,7 @@ public class WmsPOMasterDetails extends BaseBean { @Column(name = "SNP") @ApiParam("标准包装") - public String snp; + public Integer snp; /** * 是否免费:0=计费,1=免费 diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsTaskInfo.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsTaskInfo.java index 20b4193..0bf3187 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsTaskInfo.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsTaskInfo.java @@ -77,4 +77,7 @@ public class WmsTaskInfo extends BaseBean { @Transient public List taskDetailsList; + @Column(name = "IS_CHECK_SN") + @ApiParam("是否校验条码") + public Integer isCheckSn; } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/engine/rule/EngineRulePersistence.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/engine/rule/EngineRulePersistence.java index 41077b8..6f16869 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/engine/rule/EngineRulePersistence.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/engine/rule/EngineRulePersistence.java @@ -5,6 +5,7 @@ import io.swagger.annotations.Api; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicUpdate; @@ -23,6 +24,7 @@ import javax.persistence.Table; @DynamicInsert @DynamicUpdate @AllArgsConstructor +@NoArgsConstructor @EqualsAndHashCode(callSuper = true) @Table(name = "DROOLS_RULE_PERSISTENCE") @Api("系统动态业务规则")