diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/common/XStreamFactory.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/common/XStreamFactory.java index 85dbd40..23f4dc5 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/common/XStreamFactory.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/common/XStreamFactory.java @@ -123,6 +123,16 @@ public class XStreamFactory { } /** + * Javabean 转XML + * @param + * @return xml字符串 + */ + public static String toXmlNoHeadLine(T t) { + xStream.processAnnotations(t.getClass()); + return xStream.toXML(t); + } + + /** * XML字符串转javabean * * @param xmlStr xml字符串 diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/common/converter/LinkedCaseInsensitiveMapConverter.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/common/converter/LinkedCaseInsensitiveMapConverter.java new file mode 100644 index 0000000..4a604b4 --- /dev/null +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/common/converter/LinkedCaseInsensitiveMapConverter.java @@ -0,0 +1,25 @@ +package cn.estsh.i3plus.pojo.base.common.converter; + +import com.thoughtworks.xstream.converters.Converter; +import com.thoughtworks.xstream.converters.collections.MapConverter; +import com.thoughtworks.xstream.mapper.Mapper; +import org.springframework.util.LinkedCaseInsensitiveMap; + +/** + * @Description : + * @Reference : + * @Author : yunhao + * @CreateDate : 2019-09-09 14:35 + * @Modify: + **/ +public class LinkedCaseInsensitiveMapConverter extends MapConverter implements Converter { + + public LinkedCaseInsensitiveMapConverter(Mapper mapper) { + super(mapper); + } + + @Override + public boolean canConvert(Class aClass) { + return aClass.equals(LinkedCaseInsensitiveMap.class); + } +} diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockSoftSwitchEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockSoftSwitchEnumUtil.java index 66e1dfc..5fe61aa 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockSoftSwitchEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockSoftSwitchEnumUtil.java @@ -3,6 +3,9 @@ package cn.estsh.i3plus.pojo.base.enumutil; import com.fasterxml.jackson.annotation.JsonFormat; import org.apache.commons.lang3.StringUtils; +import java.util.ArrayList; +import java.util.List; + /** * @Description : 软适配 枚举接口 * @Reference : @@ -20,9 +23,9 @@ public class BlockSoftSwitchEnumUtil { SOCKET(10,"SOCKET"), RESTFUL(20,"RESTFUL"), DATASOURCE(30,"数据源"), - WEBSERVICE(40,"WebService"), + WEB_SERVICE(40,"WebService"), MQ(50,"消息队列"), - WebSocket(60,"WebSocket"); + WEB_SOCKET(60,"WebSocket"); private int value; private String description; @@ -49,6 +52,137 @@ public class BlockSoftSwitchEnumUtil { } return tmp; } + + public static CASE_TYPE valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + } + + /** + * 适配模式 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum SUIT_MODE{ + CLIENT(1,"客户端"), + SERVER(2,"服务端"); + + private int value; + private String description; + + SUIT_MODE(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; + } + } + + /** + * 软适配命令集合 + * + *
ID 编号规则 + *
第一位 服务端或者客户端 1 或者 2 + *
第二至三位 适配类型编号 + *
后三位 适配器ID升序 + *
+ */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum SOFTS_WITCH_ACTION{ + /* WebService */ + SERVER_WEB_SERVICE_SEND_EMAIL(SUIT_MODE.SERVER,CASE_TYPE.WEB_SERVICE,240001,"serverWebServiceSendEmail","软适配服务邮件服务"), + CLIENT_WEB_SERVICE_HELLO(SUIT_MODE.CLIENT,CASE_TYPE.WEB_SERVICE,140002,"serverWebServiceSendEmail","软适配服务邮件服务"), + + /* 数据源 */ + CLIENT_DATA_SOURCE_IMPP(SUIT_MODE.CLIENT,CASE_TYPE.DATASOURCE,130001,"imppDataSourceClient","软适配服务邮件服务"), + + /* Restful */ + CLIENT_RESTFUL_IMPP(SUIT_MODE.CLIENT,CASE_TYPE.RESTFUL,120001,"imppHttpRestfulClient","Restful Client Impp Test"); + + private int value; + private String description; + private String clazzName; + private SUIT_MODE mode; + private CASE_TYPE type; + + SOFTS_WITCH_ACTION(SUIT_MODE mode, CASE_TYPE type,int value, String clazzName, String description) { + this.value = value; + this.description = description; + this.clazzName = clazzName; + this.mode = mode; + this.type = type; + } + + public static SOFTS_WITCH_ACTION valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + public static SOFTS_WITCH_ACTION[] valueOfCaseType(CASE_TYPE type) { + List result = new ArrayList<>(); + for (int i = 0; i < values().length; i++) { + if (values()[i].type.equals(type)) { + result.add(values()[i]); + } + } + return result.toArray(new SOFTS_WITCH_ACTION[result.size()]); + } + + public static SOFTS_WITCH_ACTION[] valueOfMode(SUIT_MODE mode) { + List result = new ArrayList<>(); + for (int i = 0; i < values().length; i++) { + if (values()[i].mode.equals(mode)) { + result.add(values()[i]); + } + } + return result.toArray(new SOFTS_WITCH_ACTION[result.size()]); + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public String getClazzName() { + return clazzName; + } + + public SUIT_MODE getMode() { + return mode; + } + + public CASE_TYPE getType() { + return type; + } } /** @@ -58,7 +192,9 @@ public class BlockSoftSwitchEnumUtil { public enum REQUEST_SOURCE{ ACTIVE(1,"主动请求"), SCHEDULE(2,"定时调度"), - RABBITMQ(3,"MQ 调用"); + RABBITMQ(3,"MQ 调用"), + HTTP(4,"接口调用"), + CLOUD(5,"Cloud调用"); private int value; private String description; @@ -375,41 +511,6 @@ public class BlockSoftSwitchEnumUtil { } /** - * 适配模式 - */ - @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum SUIT_MODE{ - ACTIVE(1,"客户端"), - PASSIVE(2,"服务端"); - - private int value; - private String description; - - SUIT_MODE(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; - } - } - - /** * 适配方式 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) @@ -479,41 +580,4 @@ public class BlockSoftSwitchEnumUtil { } } - /** - * 适配方式 - */ - @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum SUIT_SERVER_WEB_SERVICE{ - ACTIVE(40001,"serverWebServiceHello","hello"), - SCHEDULE(40002,"serverWebServiceSendEmail","邮件测试"); - - private int value; - private String description; - private String clazzName; - - SUIT_SERVER_WEB_SERVICE(int value, String clazzName,String description) { - this.value = value; - this.clazzName = clazzName; - 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 1eae9c3..4b8c2ce 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 @@ -717,7 +717,9 @@ public class WmsEnumUtil { OUTSTOCK("OUTSTOCK", "出库"), INSTOCK("INSTOCK", "入库"), MOVESTOCK("MOVESTOCK", "移库"), - CS("CS", "盘点"); + CS("CS", "盘点"), + VDARC("VDARC", "VDA收货"); + private String value; private String description; @@ -3339,4 +3341,57 @@ public class WmsEnumUtil { } } + /** + * 收货状态 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum REC_STATUS{ + UNRECEIVED("UNRECEIVED", "未收货"), + COMPLETE_RECEIPT("COMPLETE_RECEIPT", "完成收货"), + PARTIAL_RECEIPT("PARTIAL_RECEIPT", "部分收货"), + OVER_RECEIVED_GOODS("OVER_RECEIVED_GOODS", "超量收货"), + OTHER("ELSE", "其他"),; + + private String value; + private String description; + + REC_STATUS(String value, String description) { + this.value = value; + this.description = description; + } + + public String getDescription() { + return description; + } + + public String getCode() { + return value; + } + + public String getValue() { + return value; + } + + + public static String getDes(String val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + + public static String valueOfDescription(String val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value.equals(val) ) { + tmp = values()[i].description; + } + } + return tmp; + } + } + } \ No newline at end of file diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/sqlpack/MesHqlPack.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/sqlpack/MesHqlPack.java index 9c3a317..0fa4064 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/sqlpack/MesHqlPack.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/sqlpack/MesHqlPack.java @@ -542,7 +542,7 @@ public class MesHqlPack { * @return */ public static DdlPackBean getMesAction(MesAction mesAction) { - DdlPackBean packBean = getAllBaseDataByNormalPro(mesAction.getOrganizeCode()); + DdlPackBean packBean = getAllBaseDataByNormalPro(mesAction, mesAction.getOrganizeCode()); DdlPreparedPack.getStringRightLikerPack(mesAction.getActionCode(), "actionCode", packBean); DdlPreparedPack.getStringLikerPack(mesAction.getActionName(), "actionName", packBean); DdlPreparedPack.getNumEqualPack(mesAction.getActionType(), "actionType", packBean); @@ -1182,4 +1182,17 @@ public class MesHqlPack { } return packBean; } + + /** + * 系统业务动作 + * @param organizeCode + * @return + */ + public static DdlPackBean getMesActionAllData(String organizeCode) { + DdlPackBean packBean = new DdlPackBean(); + DdlPreparedPack.getStringEqualPack(organizeCode, "organizeCode", packBean); + DdlPreparedPack.getNumEqualPack(CommonEnumUtil.IS_DEAL.NO.getValue(), "isDeleted", packBean); + DdlPreparedPack.getNumEqualPack(CommonEnumUtil.IS_VAILD.VAILD.getValue(), "isValid", packBean); + return packBean; + } } diff --git a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/softswitch/BsSuitCaseModel.java b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/softswitch/BsSuitCaseModel.java index 508888d..77b0134 100644 --- a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/softswitch/BsSuitCaseModel.java +++ b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/softswitch/BsSuitCaseModel.java @@ -1,5 +1,6 @@ package cn.estsh.i3plus.pojo.model.softswitch; +import cn.estsh.i3plus.pojo.base.common.Pager; import cn.estsh.i3plus.pojo.softswitch.bean.BsSocketSuitCase; import cn.estsh.i3plus.pojo.softswitch.bean.BsSuitCase; import cn.estsh.i3plus.pojo.softswitch.bean.BsSuitCaseDataSource; @@ -7,6 +8,8 @@ import cn.estsh.i3plus.pojo.softswitch.bean.BsSuitCaseWebService; import io.swagger.annotations.ApiParam; import lombok.Data; +import java.io.Serializable; + /** * @Description : 适配器model * @Reference : @@ -15,13 +18,14 @@ import lombok.Data; * @Modify: **/ @Data -public class BsSuitCaseModel { +public class BsSuitCaseModel implements Serializable { + private static final long serialVersionUID = -7420782744192475445L; @ApiParam(value = "适配器") private BsSuitCase bsSuitCase; @ApiParam(value = "数据源适配套件") - private BsSuitCaseDataSource bsDataSourceSuitCase; + private BsSuitCaseDataSource bsSuitCaseDataSource; @ApiParam(value = "socket适配套件") private BsSocketSuitCase bsSocketSuitCase; @@ -29,4 +33,13 @@ public class BsSuitCaseModel { @ApiParam(value = "Web Service 适配套件") private BsSuitCaseWebService webService; + @ApiParam(value = "分页数据") + private Pager pager; + + public BsSuitCaseModel() { + } + + public BsSuitCaseModel(BsSuitCase bsSuitCase) { + this.bsSuitCase = bsSuitCase; + } } diff --git a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/softswitch/SuitCoreModel.java b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/softswitch/SuitClientModel.java similarity index 56% rename from modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/softswitch/SuitCoreModel.java rename to modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/softswitch/SuitClientModel.java index 2283d83..b668b4f 100644 --- a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/softswitch/SuitCoreModel.java +++ b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/softswitch/SuitClientModel.java @@ -1,17 +1,14 @@ package cn.estsh.i3plus.pojo.model.softswitch; import cn.estsh.i3plus.pojo.base.annotation.XStreamCDATA; +import cn.estsh.i3plus.pojo.base.enumutil.BlockSoftSwitchEnumUtil; import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil; -import cn.estsh.i3plus.pojo.softswitch.bean.BsSslKey; -import cn.estsh.i3plus.pojo.softswitch.bean.BsSuitCase; import com.thoughtworks.xstream.annotations.XStreamAlias; import com.thoughtworks.xstream.annotations.XStreamAsAttribute; -import com.thoughtworks.xstream.annotations.XStreamOmitField; +import io.swagger.annotations.ApiParam; import lombok.Data; -import javax.persistence.Transient; - /** * @Description : * @Reference : @@ -21,89 +18,74 @@ import javax.persistence.Transient; **/ @Data @XStreamAlias("model") -public class SuitCoreModel { +public class SuitClientModel { /** * 适配套件代码 */ @XStreamAsAttribute - private String suitCaseCode;// adapterId + private String suitCaseCode; + + @ApiParam(value = "套件类型(枚举)") + @XStreamAsAttribute + private Integer caseTypeId; + + @ApiParam(value = "适配命令(枚举)") + private Integer suitServerActionId; /** - * 套件类型 + * 适配器信息 */ - @XStreamAsAttribute - private Integer caseType; + private BsSuitCaseModel suitCaseModel; /** * 适配结果信息 */ private String suitMessage; - /** * 请求来源 */ private Integer requestSource; - - private String suitCaseStatusCode; - /** - * 适配认证 + * 适配状态码 */ - private BsSslKey sslKey; - + private String suitCaseStatusCode; /** * 认证令牌 */ private String token; - - /** - * 适配器套件 - */ - private BsSuitCase bsSuitCase; - - private Object bsSuitCaseDetail; - /** * 认证结果 */ private Integer suitSslKeyResult; - /** * 认证信息 */ private String suitSslKeyResultMessage; - /** * 适配结果 */ private Integer suitResult; - /** * 适配报文 */ @XStreamCDATA private String suitResultMessage; - /** - * @param requestSource 请求来源 - * @param sslKey 适配认证对象 - * @param bsSuitCase 适配器信息 - */ - public SuitCoreModel(Integer requestSource, BsSslKey sslKey, BsSuitCase bsSuitCase){ - this(requestSource,sslKey, bsSuitCase,null); + public SuitClientModel() { } - public SuitCoreModel(Integer requestSource,BsSslKey sslKey, BsSuitCase bsSuitCase,Object bsSuitCaseDetail) { - this.sslKey = sslKey; - this.bsSuitCase = bsSuitCase; + public SuitClientModel(BlockSoftSwitchEnumUtil.REQUEST_SOURCE source, BsSuitCaseModel suitCaseModel) { + new SuitClientModel(source.getValue(),suitCaseModel); + } + + public SuitClientModel(Integer requestSource,BsSuitCaseModel suitCaseModel) { this.requestSource = requestSource; - this.bsSuitCaseDetail = bsSuitCaseDetail; - // 设置套件类型 - this.caseType = bsSuitCase.getCaseTypeId(); - // 设置套件代码 - this.suitCaseCode = bsSuitCase.getSuitCaseCode(); + this.caseTypeId = suitCaseModel.getBsSuitCase().getCaseTypeId(); + this.suitServerActionId = suitCaseModel.getBsSuitCase().getSuitServerActionId(); + this.suitCaseModel = suitCaseModel; + // 设置默认 this.suitCaseStatusCode = ResourceEnumUtil.MESSAGE.SUCCESS.getCode(); // 设置默认 @@ -111,7 +93,4 @@ public class SuitCoreModel { // 设置默认 this.suitResult = CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue(); } -} - - - +} \ No newline at end of file diff --git a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/softswitch/SuitServerModel.java b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/softswitch/SuitServerModel.java index b78b66f..d0a336e 100644 --- a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/softswitch/SuitServerModel.java +++ b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/softswitch/SuitServerModel.java @@ -19,8 +19,6 @@ public class SuitServerModel { // 执行方法命令 private String action; - // 执行类型固定类型(SoftSwitchEnumUtil.CASE_TYPE) - private Integer caseType; /* 认证使用 以后使用 */ private String token; // 传输单对象 diff --git a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/wms/WmsActionResponseBean.java b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/wms/WmsActionResponseBean.java index 9ef9648..40edbf5 100644 --- a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/wms/WmsActionResponseBean.java +++ b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/wms/WmsActionResponseBean.java @@ -41,6 +41,9 @@ public class WmsActionResponseBean implements Serializable { @ApiParam("总步数") public int totalStep; + @ApiParam("错误提示信息") + public String errorMsg; + @ApiParam("提示信息") public String message; @@ -49,14 +52,16 @@ public class WmsActionResponseBean implements Serializable { @ApiParam("可选项") public List options; - public List getOptions(){ - if(options == null){ + + public List getOptions() { + if (options == null) { options = new ArrayList<>(); } return options; } - public void setOptions(List opt){ - if(opt == null){ + + public void setOptions(List opt) { + if (opt == null) { opt = new ArrayList<>(); } options = opt; diff --git a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitCase.java b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitCase.java index fe70272..61e7853 100644 --- a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitCase.java +++ b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitCase.java @@ -39,6 +39,13 @@ public class BsSuitCase extends BaseBean { @ApiParam(value = "套件类型id(枚举)") private Integer caseTypeId; + public int getCaseTypeIdVal(){ + if(caseTypeId == null) { + return -1; + } + return caseTypeId.intValue(); + } + @Column(name = "CASE_DETAIL_ID") @ApiParam(value = "适配器明细id") @JsonSerialize(using = ToStringSerializer.class) @@ -49,6 +56,13 @@ public class BsSuitCase extends BaseBean { @JsonSerialize(using = ToStringSerializer.class) private Long suitTypeId; + public long getSuitTypeIdVal(){ + if(suitTypeId != null){ + return -1; + } + return suitTypeId.longValue(); + } + @Column(name = "SUIT_TYPE_NAME_RDD") @ApiParam(value = "适配类型名称") private String suitTypeNameRdd; @@ -119,7 +133,12 @@ public class BsSuitCase extends BaseBean { private List bsSuitCaseParamList; @Transient - @ApiParam(value = "参数转换") - private List bsParamAdapterList; + @ApiParam(value = "入参转换") + private List bsInParamAdapterList; + + @Transient + @ApiParam(value = "出参转换") + private List bsOutParamAdapterList; } + diff --git a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitCaseDataSource.java b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitCaseDataSource.java index 7ffc6d1..a4631b7 100644 --- a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitCaseDataSource.java +++ b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitCaseDataSource.java @@ -36,10 +36,6 @@ public class BsSuitCaseDataSource extends BaseBean { @JsonSerialize(using = ToStringSerializer.class) private Long suitCaseId; - @Column(name = "DATA_SOURCE_MODE_ID") - @ApiParam(value = "数据源套件模式(枚举,被动读,主动写)") - private Integer dataSourceModeId; - @Column(name = "DATA_SOURCE_CODE") @ApiParam(value = "数据源编码") private String dataSourceCode; diff --git a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitCaseParam.java b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitCaseParam.java index 148494f..b3e6ce1 100644 --- a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitCaseParam.java +++ b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitCaseParam.java @@ -47,10 +47,18 @@ public class BsSuitCaseParam extends BaseBean { @ApiParam(value = "参数名称)") private String paramName; + @Column(name = "PARENT_PARAM_NAME") + @ApiParam(value = "上级参数名称)") + private String parentParamName; + @Column(name = "PARAM_VAL_TYPE_ID") @ApiParam(value = "参数值类型") private Integer paramValTypeId; + @Column(name = "PARAM_SORT") + @ApiParam(value = "参数参数排序") + private Integer paramSort; + @Column(name = "PARAM_DEFAULT_VALUE") @ApiParam(value = "参数默认值") private String paramDefaultValue; diff --git a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/repository/BsDataSourceSuitCaseRepository.java b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/repository/BsSuitCaseDataSourceRepository.java similarity index 86% rename from modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/repository/BsDataSourceSuitCaseRepository.java rename to modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/repository/BsSuitCaseDataSourceRepository.java index 2ef87e4..c884383 100644 --- a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/repository/BsDataSourceSuitCaseRepository.java +++ b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/repository/BsSuitCaseDataSourceRepository.java @@ -12,7 +12,7 @@ import org.springframework.stereotype.Repository; * @Modify: */ @Repository -public interface BsDataSourceSuitCaseRepository extends BaseRepository { +public interface BsSuitCaseDataSourceRepository extends BaseRepository { } diff --git a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/repository/BsDataSourceSuitCaseTableRepository.java b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/repository/BsSuitCaseDataSourceTableRepository.java similarity index 86% rename from modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/repository/BsDataSourceSuitCaseTableRepository.java rename to modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/repository/BsSuitCaseDataSourceTableRepository.java index 750f45a..4e08bf5 100644 --- a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/repository/BsDataSourceSuitCaseTableRepository.java +++ b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/repository/BsSuitCaseDataSourceTableRepository.java @@ -12,7 +12,7 @@ import org.springframework.stereotype.Repository; * @Modify: */ @Repository -public interface BsDataSourceSuitCaseTableRepository extends BaseRepository { +public interface BsSuitCaseDataSourceTableRepository extends BaseRepository { } diff --git a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/sqlpack/SoftSwitchHqlPack.java b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/sqlpack/SoftSwitchHqlPack.java index 362bc5b..9377c97 100644 --- a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/sqlpack/SoftSwitchHqlPack.java +++ b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/sqlpack/SoftSwitchHqlPack.java @@ -85,7 +85,6 @@ public class SoftSwitchHqlPack { DdlPreparedPack.getStringLikerPack(bsSuitCase.getSuitCaseName(),"suitCaseName",ddlPackBean); DdlPreparedPack.getStringLikerPack(bsSuitCase.getSuitCaseCode(),"suitCaseCode",ddlPackBean); DdlPreparedPack.getNumEqualPack(bsSuitCase.getSuitTypeId(), "suitTypeId", ddlPackBean); - DdlPreparedPack.getStringLikerPack(bsSuitCase.getSuitTypeNameRdd(),"suitTypeNameRdd",ddlPackBean); DdlPreparedPack.getNumEqualPack(bsSuitCase.getCaseTypeId(), "caseTypeId", ddlPackBean); ddlPackBean.setOrderByStr(bsSuitCase.orderBy()); @@ -117,8 +116,8 @@ public class SoftSwitchHqlPack { DdlPreparedPack.getNumEqualPack(bsParamAdapter.getSuitCaseId(),"suitCaseId",ddlPackBean); DdlPreparedPack.getStringEqualPack(bsParamAdapter.getSuitCaseCode(),"suitCaseCode",ddlPackBean); - DdlPreparedPack.getStringLikerPack(bsParamAdapter.getSuitCaseNameRdd(),"suitCaseNameRdd",ddlPackBean); DdlPreparedPack.getStringLikerPack(bsParamAdapter.getSuitParamNameRdd(), "suitParamNameRdd", ddlPackBean); + DdlPreparedPack.getNumEqualPack(bsParamAdapter.getSuitParamTypeId(), "suitParamTypeId", ddlPackBean); ddlPackBean.setOrderByStr(bsParamAdapter.orderBy()); @@ -267,6 +266,35 @@ public class SoftSwitchHqlPack { } /** + * 数据源适配操作查询条件封装 + * @param bsSuitCaseDataSourceTable + * @return + */ + public static DdlPackBean packHqlBsSuitCaseDataSourceTable(BsSuitCaseDataSourceTable bsSuitCaseDataSourceTable){ + DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(); + + DdlPreparedPack.getNumEqualPack(bsSuitCaseDataSourceTable.getSuitCaseId(),"suitCaseId",ddlPackBean); + DdlPreparedPack.getStringLikerPack(bsSuitCaseDataSourceTable.getOperateName(),"operateName",ddlPackBean); + + return ddlPackBean; + } + + /** + * 数据适配操作操作唯一校验 + * @param bsSuitCaseDataSourceTable + * @return + */ + public static DdlPackBean packHqlCheckBsSuitCaseDataSourceTableOnly(BsSuitCaseDataSourceTable bsSuitCaseDataSourceTable){ + DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(); + + DdlPreparedPack.getNumEqualPack(bsSuitCaseDataSourceTable.getId(), "id", ddlPackBean); + DdlPreparedPack.getNumEqualPack(bsSuitCaseDataSourceTable.getSuitCaseId(), "suitCaseId", ddlPackBean); + DdlPreparedPack.getStringLikerPack(bsSuitCaseDataSourceTable.getOperateName(), "operateName", ddlPackBean); + + return ddlPackBean; + } + + /** * WebService 唯一校验 * @param webService * @return diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/iotio/SwebProcurementPlanOrder.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/SwebProcurementPlanOrder.java similarity index 89% rename from modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/iotio/SwebProcurementPlanOrder.java rename to modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/SwebProcurementPlanOrder.java index 1b43c58..34116e8 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/iotio/SwebProcurementPlanOrder.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/SwebProcurementPlanOrder.java @@ -1,4 +1,4 @@ -package cn.estsh.i3plus.pojo.wms.bean.iotio; +package cn.estsh.i3plus.pojo.wms.bean; import cn.estsh.i3plus.pojo.base.bean.BaseBean; import io.swagger.annotations.Api; @@ -49,4 +49,8 @@ public class SwebProcurementPlanOrder extends BaseBean { @ApiParam(value = "物料名称") private String partName; + @Column(name = "CONSIGNMENT") + @ApiParam(value = "是否寄售") + private Integer consignment; + } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsASNMaster.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsASNMaster.java index a4e4142..2fb7868 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsASNMaster.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsASNMaster.java @@ -1,6 +1,8 @@ package cn.estsh.i3plus.pojo.wms.bean; +import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn; import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiParam; import lombok.Data; @@ -41,6 +43,7 @@ public class WmsASNMaster extends BaseBean { @Column(name = "ASN_STATUS") @ApiParam(value = "状态", example = "0") + @AnnoOutputColumn(refClass = WmsEnumUtil.MASTER_ORDER_STATUS.class,refForeignKey = "value",value = "description") public Integer asnStatus; @Column(name = "VENDOR_NO") @@ -65,6 +68,7 @@ public class WmsASNMaster extends BaseBean { @Column(name = "IS_TASK") @ApiParam(value = "是否生产任务", example = "1") + @AnnoOutputColumn(refClass = WmsEnumUtil.IS_GENERAL_TASK.class,refForeignKey = "value",value = "description") public Integer isTask; @ApiParam("ASN详情列表") @@ -124,12 +128,12 @@ public class WmsASNMaster extends BaseBean { private String vendorPhone; @Transient - @ApiParam("物料代码") + @ApiParam("物料编码") private String partNo; @Transient @ApiParam("物料名称") - private String partNoNameRdd; + private String partNameRdd; @Transient @ApiParam("收货数量") @@ -165,15 +169,16 @@ public class WmsASNMaster extends BaseBean { @Transient @ApiParam("收货状态") + @AnnoOutputColumn(refClass = WmsEnumUtil.REC_STATUS.class,refForeignKey = "value",value = "description") private String recStatus; @Transient - @ApiParam("项目代码") + @ApiParam("项目") private String prodCfgTypeCode; public WmsASNMaster(){} - public WmsASNMaster(String orderNo,Integer asnStatus,String vendorNo,String partNo,String partNoNameRdd, + public WmsASNMaster(String orderNo,Integer asnStatus,String vendorNo,String partNo,String partNameRdd, Double sumQty,Double sumRecQty,String planDate,String planTime,Double diffQty,String orderType, String recStatus){ @@ -181,7 +186,7 @@ public class WmsASNMaster extends BaseBean { this.asnStatus = asnStatus; this.vendorNo = vendorNo; this.partNo = partNo; - this.partNoNameRdd = partNoNameRdd; + this.partNameRdd = partNameRdd; this.sumQty = sumQty; this.sumRecQty = sumRecQty; this.planDate = planDate; diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPart.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPart.java index 1c1dbdc..20705ab 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPart.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPart.java @@ -143,6 +143,10 @@ public class WmsPart extends BaseBean { @ApiParam("结算供应商") private String outCloseVendor; + @Column(name = "QUALITY_DAYS") + @ApiParam("保质期天数") + private Integer qualityDays; + @Transient @ApiParam("总数量") private Double qty; diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/snapshot/WmsCheckPoint.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/snapshot/WmsCheckPoint.java new file mode 100644 index 0000000..738ffbc --- /dev/null +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/snapshot/WmsCheckPoint.java @@ -0,0 +1,27 @@ +package cn.estsh.i3plus.pojo.wms.bean.snapshot; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +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; + +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name="WMS_CHECK_POINT") +public class WmsCheckPoint extends BaseBean { + + private static final long serialVersionUID = 5589497687871639189L; + + @Column(name="SNAPSHOT_TIME") + @ApiParam("快照时间") + public String snapshotTime; +} diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/snapshot/WmsMoveDetailsSnapshot.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/snapshot/WmsMoveDetailsSnapshot.java new file mode 100644 index 0000000..01b8aa1 --- /dev/null +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/snapshot/WmsMoveDetailsSnapshot.java @@ -0,0 +1,268 @@ +package cn.estsh.i3plus.pojo.wms.bean.snapshot; + +import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn; +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil; +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.*; + +/** + * @Description : 库存移动单明细信息 + * @Reference : + * @Author : silliter.yuan + * @CreateDate : 2018-11-06 15:58 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name="WMS_MOVE_DETAILS_SNAPSHOT", indexes = { + @Index(columnList = "PART_NO"), + @Index(columnList = "ORDER_NO"), + @Index(columnList = "ORGANIZE_CODE"), + @Index(columnList = "SNAPSHOT_TIME") +}) +@Api("库存移动单明细信息") +public class WmsMoveDetailsSnapshot extends BaseBean { + + private static final long serialVersionUID = -4095410692227226944L; + + @Column(name="SNAPSHOT_TIME") + @ApiParam("快照时间") + public String snapshotTime; + + @Column(name="ORDER_NO") + @ApiParam("单号") + public String orderNo; + + @Column(name="ITEM") + @ApiParam(value = "行号", example = "0") + public Integer item; + + @Column(name="PART_NO") + @ApiParam("物料编码") + public String partNo; + + @Column(name="PART_NAME_RDD") + @ApiParam("物料名称") + public String partNameRdd; + + @Column(name="VENDOR_NO") + @ApiParam("供应商编号") + public String vendorNo; + + @Column(name="CUST_NO") + @ApiParam("客户编号") + public String custNo; + + @Column(name="TRANS_QTY") + @ApiParam(value = "处理数量", example = "0") + public Double transQty; + + public Double getTransQty(){ + return this.transQty == null ? 0 : this.transQty.doubleValue(); + } + + @Column(name="REJECT_QTY") + @ApiParam(value = "不合格处理数量", example = "0") + public Double rejectQty; + + public Double getRejectQty(){ + return this.rejectQty == null ? 0 : this.rejectQty.doubleValue(); + } + + @Column(name="UNIT") + @ApiParam("单位") + public String unit; + + @Column(name="SRC_WH_NO") + @ApiParam("源仓库代码") + public String srcWhNo; + + @Column(name="SRC_ZONE_NO") + @ApiParam("源存储区代码") + public String srcZoneNo; + + @Column(name="SRC_LOCATE_NO") + @ApiParam("源库位代码") + public String srcLocateNo; + + @Column(name="DEST_WH_NO") + @ApiParam("目标仓库代码") + public String destWhNo; + + @Column(name="DEST_ZONE_NO") + @ApiParam("目标存储区代码") + public String destZoneNo; + + @Column(name="DEST_LOCATE_NO") + @ApiParam("目标库位代码") + public String destLocateNo; + + /** + * 状态:1=创建,10=待处理,20=已处理 + */ + @Column(name="ITEM_STATUS") + @ApiParam(value = "状态", example = "0") + @AnnoOutputColumn(refClass = WmsEnumUtil.MOVE_ORDER_STATUS.class,refForeignKey = "value",value = "description") + public Integer itemStatus; + + @Column(name="REF_ITEM") + @ApiParam("关联单据行号") + public String refItem; + + /** + * ASN,PO,SO + */ + @Column(name="REF_TYPE") + @ApiParam("关联单据类型") + public String refType; + + @Column(name="REF_SRC") + @ApiParam("关联单号") + public String refSrc; + + @ApiParam(value = "待出库数量", example = "0") + @Transient + private Long waitingCounts; + + @ApiParam(value = "已出库数量", example = "0") + @Transient + private Long finishedCounts; + + @Transient + @ApiParam("交易类型") + private String transTypeCode; + + @Transient + @ApiParam("erp库存地") + private String ZoneNo; + + @Transient + @ApiParam("条码") + private String sn; + + @Transient + @ApiParam("交易类型名称") + private String transTypeName; + + @Transient + @ApiParam("业务类型编码") + @AnnoOutputColumn(refClass = WmsEnumUtil.OUT_MOVEMENT_BUSI_TYPE.class,refForeignKey = "value",value = "description") + private Integer busiTypeCode; + + @Transient + @ApiParam("生产线") + private String workCenterCode; + + @Transient + @ApiParam("父物料编码") + private String fpartNo; + + @Transient + @ApiParam("父物料名称") + private String fpartName; + + @Transient + @ApiParam("数量") + private Double qty; + + @Transient + @ApiParam("创建时间") + private String createDateTime; + + @Version + @Column(name = "LOCK_VERSION") + @ApiParam(value = "乐观锁", example = "1") + public transient Integer lockVersion; + /* @JSONField(name="fPartNo") + public String getfPartNo() { + return fPartNo; + } + + @JSONField(name="fPartName") + public String getfPartName() { + return fPartName; + }*/ + + public WmsMoveDetailsSnapshot(){} + + public WmsMoveDetailsSnapshot(String partNo, Long waitingCounts , Long finishedCounts){ + this.partNo = partNo; + this.waitingCounts = waitingCounts; + this.finishedCounts = finishedCounts; + } + + public WmsMoveDetailsSnapshot(String partNo, double transQty){ + this.partNo = partNo; + this.transQty = transQty; + } + + public WmsMoveDetailsSnapshot(String orderNo){ + this.orderNo = orderNo; + } + + public Long getWaitingCounts() { + return waitingCounts == null ? 0L : this.waitingCounts; + } + + public Long getFinishedCounts() { + return finishedCounts == null ? 0L : this.finishedCounts; + } + + public WmsMoveDetailsSnapshot(String organizeCode, String partNo, String partNameRdd, String workCenterCode, String fPartNo, String fPartName, String unit, Double qty, + String createDateTime, String sn, String srcZoneNo){ + this.organizeCode = organizeCode; + this.partNo = partNo; + this.partNameRdd = partNameRdd; + this.workCenterCode = workCenterCode; + this.fpartNo = fPartNo; + this.fpartName = fPartName; + this.unit = unit; + this.qty = qty; + this.createDateTime = createDateTime; + this.sn = sn; + this.srcZoneNo = srcZoneNo; + + } + + public WmsMoveDetailsSnapshot(String organizeCode, String orderNo, Integer item, String partNo, String partNameRdd, String transTypeCode + , String transTypeName, Integer itemStatus, String unit, String srcWhNo, String destWhNo, + String srcZoneNo, String destZoneNo, String srcLocateNo, String destLocateNo, + Double transQty, Double rejectQty, String refSrc, String vendorNo, String custNo, Integer busiTypeCode, + String createUser, String createDatetime, String modifyUser, String modifyDatetime){ + this.organizeCode = organizeCode; + this.partNo = partNo; + this.orderNo = orderNo; + this.item = item; + this.partNameRdd = partNameRdd; + this.transTypeCode = transTypeCode; + this.transTypeName = transTypeName; + this.itemStatus = itemStatus; + this.unit = unit; + this.srcWhNo = srcWhNo; + this.destWhNo = destWhNo; + this.srcZoneNo = srcZoneNo; + this.destZoneNo = destZoneNo; + this.srcLocateNo = srcLocateNo; + this.destLocateNo = destLocateNo; + this.transQty = transQty; + this.rejectQty = rejectQty; + this.refSrc = refSrc; + this.vendorNo = vendorNo; + this.custNo = custNo; + this.busiTypeCode = busiTypeCode; + this.createUser = createUser; + this.createDatetime = createDatetime; + this.modifyDatetime =modifyDatetime; + this.modifyUser =modifyUser; + } +} diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/snapshot/WmsMoveMasterSnapshot.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/snapshot/WmsMoveMasterSnapshot.java new file mode 100644 index 0000000..06890f3 --- /dev/null +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/snapshot/WmsMoveMasterSnapshot.java @@ -0,0 +1,209 @@ +package cn.estsh.i3plus.pojo.wms.bean.snapshot; + +import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn; +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil; +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.*; + +/** + * @Description : 库存移动单主表信息 + * @Reference : + * @Author : silliter.yuan + * @CreateDate : 2018-11-06 15:58 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name = "WMS_MOVE_MASTER_SNAPSHOT", indexes = { + @Index(columnList = "TRANS_TYPE_CODE"), + @Index(columnList = "ORDER_NO"), + @Index(columnList = "ORGANIZE_CODE"), + @Index(columnList = "SNAPSHOT_TIME") +}) +@Api("库存移动单主表信息") +public class WmsMoveMasterSnapshot extends BaseBean { + + private static final long serialVersionUID = 3569874772643448726L; + + @Column(name="SNAPSHOT_TIME") + @ApiParam("快照时间") + public String snapshotTime; + + @Column(name = "ORDER_NO") + @ApiParam("单号") + public String orderNo; + + /** + * 状态:1=创建,10=待处理,20=已处理 + */ + @Column(name = "ORDER_STATUS") + @ApiParam(value = "状态", example = "0") + @AnnoOutputColumn(refClass = WmsEnumUtil.MOVE_ORDER_STATUS.class,refForeignKey = "value",value = "description") + public Integer orderStatus; + + @Column(name = "REMARK") + @ApiParam("备注") + public String remark; + + @Column(name = "TRANS_TYPE_CODE") + @ApiParam(value = "交易类型代码") + private String transTypeCode; + + @Lob + @Column(name = "ERROR_MESSAGE") + @ApiParam(value = "错误信息") + private String errorMessage; + + @Column(name="IS_URGENT") + @ApiParam(value = "是否紧急", example = "0") + public Integer isUrgent; + + @Column(name = "CAR_NO") + @ApiParam(value = "车牌号") + private String carNo; + + @Column(name = "BUSI_TYPE_CODE") + @ApiParam(value = "业务类型编码") + @AnnoOutputColumn(refClass = WmsEnumUtil.OUT_MOVEMENT_BUSI_TYPE.class,refForeignKey = "value",value = "description") + private Integer busiTypeCode; + + @Column(name = "REF_ORDER_NO") + @ApiParam("关联移动单号") + public String refOrderNo; + + @Transient + @ApiParam("物料编码") + private String partNo; + + @Transient + @ApiParam("状态") + @AnnoOutputColumn(refClass = WmsEnumUtil.MOVE_ORDER_STATUS.class,refForeignKey = "value",value = "description") + private Integer itemStatus; + + @Transient + @ApiParam("erp库存地") + private String ZoneNo; + + @Transient + @ApiParam("关联单号") + private String refSrc; + + @Transient + @ApiParam("目标仓库") + private String destWhNo; + + @Transient + @ApiParam("存储区") + private String destZoneNo; + + @Transient + @ApiParam("供应商编码") + private String vendorNo; + + @Transient + @ApiParam("条码") + private String sn; + + @Transient + @ApiParam("物料名称") + private String partNameRdd; + + @Transient + @ApiParam("单位") + private String unit; + + @Transient + @ApiParam("源仓库") + private String srcWhNo; + + @Transient + @ApiParam("源存储区代码") + private String srcZoneNo; + + @Transient + @ApiParam("处理数量") + private Double transQty; + + @Transient + @ApiParam("不合格处理数量") + private Double rejectQty; + + @Transient + @ApiParam("库位") + private String destLocateNo; + + @Transient + @ApiParam("交易类型名称") + private String transTypeName; + + @Column(name="FIX_ID") + @ApiParam(value = "设备编号") + public String fixId; + + @Version + @Column(name = "LOCK_VERSION") + @ApiParam(value = "乐观锁", example = "1") + public transient Integer lockVersion; + + public WmsMoveMasterSnapshot(){}; + + public WmsMoveMasterSnapshot(String orderNo, Integer orderStatus, String transTypeCode, String errorMessage, + Integer isUrgent, String carNo, Integer busiTypeCode, String refOrderNo, String refSrc, String partNo, Integer itemStatus, String remark, + String organizeCode, String createDatetime, String createUser, String modifyDatetime, String modifyUser, String fixId) { + this.orderNo = orderNo; + this.orderStatus = orderStatus; + this.remark = remark; + this.isUrgent=isUrgent; + this.transTypeCode = transTypeCode; + this.errorMessage = errorMessage; + this.busiTypeCode = busiTypeCode; + this.partNo = partNo; + this.itemStatus = itemStatus; + this.refOrderNo = refOrderNo; + this.carNo = carNo; + this.refSrc = refSrc; + this.organizeCode =organizeCode; + this.createDatetime= createDatetime; + this.createUser = createUser; + this.modifyDatetime =modifyDatetime; + this.modifyUser =modifyUser; + this.fixId = fixId; + } + + public WmsMoveMasterSnapshot(Long id, String orderNo, String organizeCode, String partNo, String partNameRdd, String transTypeCode, String transTypeName, Integer itemStatus, + String unit, String srcWhNo, String srcZoneNo, String destWhNo, String destZoneNo, Double transQty, Double rejectQty, String fixId, Integer busiTypeCode, String refSrc, + String createDatetime, String createUser, String modifyUser, String modifyDatetime) { + this.id = id; + this.orderNo = orderNo; + this.organizeCode = organizeCode; + this.partNo = partNo; + this.partNameRdd = partNameRdd; + this.transTypeCode = transTypeCode; + this.transTypeName = transTypeName; + this.itemStatus = itemStatus; + this.unit = unit; + this.srcWhNo = srcWhNo; + this.srcZoneNo = srcZoneNo; + this.destWhNo = destWhNo; + this.destZoneNo = destZoneNo; + this.transQty = transQty; + this.rejectQty = rejectQty; + this.fixId = fixId; + this.busiTypeCode = busiTypeCode; + this.refSrc = refSrc; + this.createDatetime= createDatetime; + this.createUser = createUser; + this.modifyUser =modifyUser; + this.modifyDatetime =modifyDatetime; + } +} diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/snapshot/WmsMoveSnSnapshot.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/snapshot/WmsMoveSnSnapshot.java new file mode 100644 index 0000000..6f781aa --- /dev/null +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/snapshot/WmsMoveSnSnapshot.java @@ -0,0 +1,265 @@ +package cn.estsh.i3plus.pojo.wms.bean.snapshot; + +import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn; +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.ColumnDefault; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.*; + +/** + * @Description : 库存移动单条码信息 + * @Reference : + * @Author : silliter.yuan + * @CreateDate : 2018-11-06 15:58 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name = "WMS_MOVE_SN_SNAPSHOT", indexes = { + @Index(columnList = "PART_NO"), + @Index(columnList = "ORDER_NO"), + @Index(columnList = "SN"), + @Index(columnList = "ORGANIZE_CODE"), + @Index(columnList = "SNAPSHOT_TIME") +}) +@Api("库存移动单条码信息") +public class WmsMoveSnSnapshot extends BaseBean { + + private static final long serialVersionUID = 2588101374261238353L; + + @Column(name="SNAPSHOT_TIME") + @ApiParam("快照时间") + public String snapshotTime; + + @Column(name = "ORDER_NO") + @ApiParam("单号") + public String orderNo; + + @Column(name = "ITEM") + @ApiParam("行号") + public Integer item; + + @Column(name = "PART_NO") + @ApiParam("物料编码") + public String partNo; + + @Column(name = "PART_NAME_RDD") + @ApiParam("物料名称") + public String partNameRdd; + + @Column(name = "UNIT") + @ApiParam(value = "单位") + public String unit; + + @Column(name = "SN") + @ApiParam("条码") + public String sn; + + @Column(name = "CSN") + @ApiParam("客户条码") + public String csn; + + /** + * 状态:1=创建,10=待处理,20=已处理 + */ + @Column(name = "ITEM_STATUS") + @ApiParam(value = "状态", example = "1") + @AnnoOutputColumn(refClass = WmsEnumUtil.MOVE_ORDER_STATUS.class, refForeignKey = "value", value = "description") + public Integer itemStatus; + + @Column(name = "REMARK") + @ApiParam("备注") + public String remark; + + @Column(name = "LOT_NO") + @ApiParam("批次编号") + public String lotNo; + + @Column(name = "PACKAGE_NO") + @ApiParam("容器编号") + public String packAgeNo; + + @Column(name = "SRC_QTY") + @ColumnDefault("0") + @ApiParam(value = "源数量", example = "0") + public Double srcQty; + + @Column(name = "SRC_WH_NO") + @ApiParam("源仓库代码") + public String srcWhNo; + + @Column(name = "SRC_ZONE_NO") + @ApiParam("源存储区代码") + public String srcZoneNo; + + @Column(name = "SRC_LOCATE_NO") + @ApiParam("源库位代码") + public String srcLocateNo; + + @Column(name = "DEST_WH_NO") + @ApiParam("目标仓库代码") + public String destWhNo; + + @Column(name = "DEST_ZONE_NO") + @ApiParam("目标存储区代码") + public String destZoneNo; + + @Column(name = "DEST_LOCATE_NO") + @ApiParam("目标库位代码") + public String destLocateNo; + + @ApiParam("待上架箱数") + @Transient + private Long waitingCounts; + + @ApiParam("已上架箱数") + @Transient + private Long finishedCounts; + + @Column(name = "DEST_QTY") + @ColumnDefault("0") + @ApiParam(value = "目标数量", example = "0") + public Double destQty; + + @Column(name = "QTY") + @ColumnDefault("0") + @ApiParam(value = "数量", example = "0") + public Double qty; + + @Column(name = "SRC_QC_STATUS") + @ApiParam(value = "源质量状态", example = "1") + @AnnoOutputColumn(refClass = WmsEnumUtil.STOCK_SN_QC_STATUS.class, refForeignKey = "value", value = "description") + public Integer srcQcStatus; + + @Column(name = "SRC_SN_STATUS") + @ApiParam(value = "源条码状态", example = "1") + @AnnoOutputColumn(refClass = WmsEnumUtil.STOCK_SN_STATUS.class, refForeignKey = "value", value = "description") + public Integer srcSnStatus; + + @Column(name = "DEST_QC_STATUS") + @ApiParam(value = "目的质量状态", example = "1") + @AnnoOutputColumn(refClass = WmsEnumUtil.STOCK_SN_QC_STATUS.class, refForeignKey = "value", value = "description") + public Integer descQcStatus; + + @Column(name = "DEST_SN_STATUS") + @ApiParam(value = "目的条码状态", example = "1") + @AnnoOutputColumn(refClass = WmsEnumUtil.STOCK_SN_STATUS.class, refForeignKey = "value", value = "description") + public Integer destSnStatus; + + @Column(name = "DATE_CODE") + @ApiParam("生产日期") + public String dateCode; + + @Column(name = "FIX_LOT_NO") + @ApiParam("特殊批次") + public String fixLotNo; + + @Column(name = "VENDOR_NO") + @ApiParam("供应商编号") + private String vendorNo; + + @Transient + @ApiParam("业务类型编码") + @AnnoOutputColumn(refClass = WmsEnumUtil.OUT_MOVEMENT_BUSI_TYPE.class, refForeignKey = "value", value = "description") + private Integer busiTypeCode; + + @Transient + @ApiParam(value = "交易类型代码") + private String transTypeCode; + + @Transient + @ApiParam("关联单号") + public String refSrc; + + @Transient + @ApiParam("erp库存地") + private String ZoneNo; + + @Transient + @ApiParam("交易类型名称") + private String transTypeName; + + @Version + @Column(name = "LOCK_VERSION") + @ApiParam(value = "乐观锁", example = "1") + public transient Integer lockVersion; + + public WmsMoveSnSnapshot() { + } + + public WmsMoveSnSnapshot(String partNo, Long finishedCounts, Long waitingCounts) { + this.partNo = partNo; + this.waitingCounts = waitingCounts; + this.finishedCounts = finishedCounts; + } + + public Long getWaitingCounts() { + return waitingCounts == null ? 0L : this.waitingCounts; + } + + public Long getFinishedCounts() { + return finishedCounts == null ? 0L : this.finishedCounts; + } + + public WmsMoveSnSnapshot(String partNo, String partNameRdd, Double destQty, Integer busiTypeCode, String transTypeCode, String refSrc) { + this.partNo = partNo; + this.partNameRdd = partNameRdd; + this.destQty = destQty; + this.busiTypeCode = busiTypeCode; + this.transTypeCode = transTypeCode; + this.refSrc = refSrc; + } + + public WmsMoveSnSnapshot(String partNo, String partNameRdd, Double destQty, String transTypeCode, String refSrc) { + this.partNo = partNo; + this.partNameRdd = partNameRdd; + this.destQty = destQty; + this.transTypeCode = transTypeCode; + this.refSrc = refSrc; + } + + public WmsMoveSnSnapshot(String organizeCode, String orderNo, Integer item, String partNo, String partNameRdd, + String transTypeCode, String transTypeName, Integer itemStatus, String unit, String srcLocateNo, String destLocateNo, Double srcQty, Double destQty, Integer srcQcStatus, Integer descQcStatus, Integer srcSnStatus, + Integer destSnStatus, String lotNo, String dateCode, String refSrc, String destZoneNo, String destWhNo, Integer busiTypeCode, String sn, + String createUser, String createDatetime, String modifyDatetime, String modifyUser) { + this.organizeCode = organizeCode; + this.orderNo = orderNo; + this.item = item; + this.partNo = partNo; + this.partNameRdd = partNameRdd; + this.transTypeCode = transTypeCode; + this.transTypeName = transTypeName; + this.itemStatus = itemStatus; + this.unit = unit; + this.srcLocateNo = srcLocateNo; + this.destLocateNo = destLocateNo; + this.srcQty = srcQty; + this.srcQty = srcQty; + this.destQty = destQty; + this.srcQcStatus = srcQcStatus; + this.descQcStatus = descQcStatus; + this.srcSnStatus = srcSnStatus; + this.destSnStatus = destSnStatus; + this.lotNo = lotNo; + this.dateCode = dateCode; + this.refSrc = refSrc; + this.destZoneNo = destZoneNo; + this.destWhNo = destWhNo; + this.busiTypeCode = busiTypeCode; + this.sn = sn; + this.createUser = createUser; + this.createDatetime = createDatetime; + this.modifyDatetime = modifyDatetime; + this.modifyUser = modifyUser; + } +} diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/snapshot/WmsStockQuanSnapshot.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/snapshot/WmsStockQuanSnapshot.java new file mode 100644 index 0000000..dddfab4 --- /dev/null +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/snapshot/WmsStockQuanSnapshot.java @@ -0,0 +1,292 @@ +package cn.estsh.i3plus.pojo.wms.bean.snapshot; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import cn.estsh.i3plus.pojo.wms.bean.WmsLocate; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.ColumnDefault; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.*; +import java.util.List; + +/** + * @Description : 库存信息 + * @Reference : + * @Author : jessica.chen + * @CreateDate : 2018-11-02 11:06 + * @Modify: + **/ +@Data +@Entity +@Table(name = "WMS_STOCK_QUAN_SNAPSHOT", indexes = { + @Index(columnList = "WH_NO"), + @Index(columnList = "ZONE_NO"), + @Index(columnList = "LOCATE_NO"), + @Index(columnList = "ORGANIZE_CODE"), + @Index(columnList = "SNAPSHOT_TIME") +}) +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Api(value = "库存信息", description = "库存信息") +public class WmsStockQuanSnapshot extends BaseBean { + + private static final long serialVersionUID = 8335719859185712904L; + + @Column(name="SNAPSHOT_TIME") + @ApiParam("快照时间") + public String snapshotTime; + + @Column(name = "WH_NO") + @ApiParam(value = "仓库代码") + private String whNo; + + @Column(name = "ZONE_NO") + @ApiParam(value = "存储区编号") + private String zoneNo; + + @Column(name = "LOCATE_NO") + @ApiParam(value = "库位代码") + private String locateNo; + + @Column(name = "PART_NO") + @ApiParam(value = "物料编号") + private String partNo; + + @Column(name = "PART_NAME_RDD") + @ApiParam(value = "物料名称") + private String partNameRdd; + + @Column(name = "UNIT") + @ApiParam("单位") + public String unit; + + @Column(name = "CUST_NO") + @ApiParam(value = "客户编码") + private String custNo; + + @Transient + @ApiParam(value = "项目代码") + private String prodCfgTypeCode; + + @Transient + @ApiParam(value = "含0库存显示") + private Boolean includeZeroStock = false; + + @Transient + @ColumnDefault("0") + @ApiParam(value = "库存数量总和") + private Double sumQty; + + @Transient + @ApiParam(value = "库位信息") + private WmsLocate wmsLocate; + + + @Column(name = "QTY") + @ColumnDefault("0") + @ApiParam(value = "可用数量", example = "0") + public Double qty; + + @Column(name = "FAIL_QTY") + @ColumnDefault("0") + @ApiParam(value = "不合格数量", example = "0") + private Double failQty; + + @Column(name = "HOLD_QTY") + @ColumnDefault("0") + @ApiParam(value = "隔离数量", example = "0") + private Double holdQty; + + @Column(name = "QC_QTY") + @ColumnDefault("0") + @ApiParam(value = "质检中数量", example = "0") + private Double qcQty; + + @Column(name = "RIN_QTY") + @ColumnDefault("0") + @ApiParam(value = "待入库数量", example = "0") + private Double rinQty; + + @Column(name = "FREEZE_QTY") + @ColumnDefault("0") + @ApiParam(value = "冻结数量", example = "0") + private Double freezeQty; + + @Column(name = "CONSIGN_QTY") + @ColumnDefault("0") + @ApiParam(value = "寄售数量", example = "0") + private Double consignQty; + + @Column(name = "LOCK_QTY") + @ColumnDefault("0") + @ApiParam(value = "锁定数量", example = "0") + private Double lockQty; + + @Column(name = "SCRAP_QTY") + @ColumnDefault("0") + @ApiParam(value = "报废数量", example = "0") + private Double scrapQty; + + @Transient + @ApiParam(value = "总数量") + private Double totalQty; + + @Transient + @ApiParam(value = "项目名称") + private String prodCfgTypeName; + + @Transient + @ApiParam(value = "箱数", example = "-1") + private Integer boxQty; + + @Transient + @ApiParam(value = "零件数", example = "-1") + private Double partQty; + + @Transient + @ApiParam(value = "ERP库存地") + private String areaNo; + + @Transient + @ApiParam(value = "存储区集合") + private List zoneList; + + @Transient + @ApiParam(value = "移动单条码集合") + private List wmsMoveSnList; + + + public String getAreaNo() { + return areaNo; + } + + public Double getQtyVal() { + return this.qty == null ? 0 : this.qty; + } + + public Double getFailQtyVal() { + return this.failQty == null ? 0 : this.failQty; + } + + public Double getHoldQtyVal() { + return this.holdQty == null ? 0 : this.holdQty; + } + + public Double getQcQtyVal() { + return this.qcQty == null ? 0 : this.qcQty; + } + + public Double getRinQtyVal() { + return this.rinQty == null ? 0 : this.rinQty; + } + + public Double getFreezeQtyVal() { + return this.freezeQty == null ? 0 : this.freezeQty; + } + + public Double getConsignQtyVal() { + return this.consignQty == null ? 0 : this.consignQty; + } + + public Double getLockQtyVal() { + return this.lockQty == null ? 0 : this.lockQty; + } + + public Double getScrapQtyVal() { + return this.scrapQty == null ? 0 : this.scrapQty; + } + + public Double getTotalVal() { + return this.totalQty == null ? 0 : this.totalQty; + } + + public Double getPartQtyVal() { + return this.partQty == null ? 0 : this.partQty; + } + + public Integer getBoxQtyVal() { + return this.boxQty == null ? 0 : this.boxQty; + } + + public WmsStockQuanSnapshot() { + } + + public WmsStockQuanSnapshot(String whNo, String zoneNo, String unit, String partNo, String partName, + Double qty, Double failQty, Double holdQty, Double qcQty, Double rinQty, Double freezeQty, + Double consignQty, Double lockQty, Double sumQty, String prodCfgTypeCode, String prodCfgTypeName, Double scrapQty) { + this.whNo = whNo; + this.zoneNo = zoneNo; + this.partNo = partNo; + this.partNameRdd = partName; + this.unit = unit; + this.qty = qty; + this.failQty = failQty; + this.holdQty = holdQty; + this.qcQty = qcQty; + this.rinQty = rinQty; + this.freezeQty = freezeQty; + this.consignQty = consignQty; + this.lockQty = lockQty; + this.prodCfgTypeCode = prodCfgTypeCode; + this.prodCfgTypeName = prodCfgTypeName; + this.scrapQty = scrapQty; + } + + public WmsStockQuanSnapshot(Double qty, Double failQty, Double holdQty, Double qcQty, Double rinQty, Double freezeQty, Double consignQty, Double lockQty, Double scrapQty) { + this.qty = qty; + this.failQty = failQty; + this.holdQty = holdQty; + this.qcQty = qcQty; + this.rinQty = rinQty; + this.freezeQty = freezeQty; + this.consignQty = consignQty; + this.lockQty = lockQty; + this.scrapQty = scrapQty; + } + + public WmsStockQuanSnapshot(String locateNo, Integer boxQty, Double partQty, String partNo, String partNameRdd, String unit, + Double sumQty, Double qty, Double failQty, Double holdQty, Double qcQty, Double rinQty, Double freezeQty, Double consignQty, Double lockQty, Double scrapQty) { + this.locateNo = locateNo; + this.boxQty = boxQty; + this.partQty = partQty; + this.partNo = partNo; + this.partNameRdd = partNameRdd; + this.unit = unit; + this.sumQty = sumQty; + this.qty = qty; + this.failQty = failQty; + this.holdQty = holdQty; + this.qcQty = qcQty; + this.rinQty = rinQty; + this.freezeQty = freezeQty; + this.consignQty = consignQty; + this.lockQty = lockQty; + this.scrapQty = scrapQty; + } + + public WmsStockQuanSnapshot(String whNo, String zoneNo, String locateNo, Integer boxQty, Double partQty, String partNo, String partNameRdd, String unit, + Double qty, Double failQty, Double holdQty, Double qcQty, Double rinQty, Double freezeQty, Double consignQty, Double lockQty, Double scrapQty) { + this.whNo = whNo; + this.zoneNo = zoneNo; + this.locateNo = locateNo; + this.boxQty = boxQty; + this.partQty = partQty; + this.partNo = partNo; + this.partNameRdd = partNameRdd; + this.unit = unit; + this.qty = qty; + this.failQty = failQty; + this.holdQty = holdQty; + this.qcQty = qcQty; + this.rinQty = rinQty; + this.freezeQty = freezeQty; + this.consignQty = consignQty; + this.lockQty = lockQty; + this.scrapQty = scrapQty; + } +} diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/snapshot/WmsStockSnSnapshot.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/snapshot/WmsStockSnSnapshot.java new file mode 100644 index 0000000..436d126 --- /dev/null +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/snapshot/WmsStockSnSnapshot.java @@ -0,0 +1,268 @@ +package cn.estsh.i3plus.pojo.wms.bean.snapshot; + +import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn; +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil; +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 org.springframework.format.annotation.DateTimeFormat; + +import javax.persistence.*; +import java.util.Date; +import java.util.List; + +/** + * @Description : 库存条码信息 + * @Reference : + * @Author : dragon.xu + * @CreateDate : 2018-11-17 14:50 + * @Modify: + **/ +@Data +@Entity +@Table(name = "WMS_STOCK_SN_SNAPSHOT", indexes = { + @Index(columnList = "PACKAGE_NO"), + @Index(columnList = "PART_NO"), + @Index(columnList = "REF_SRC"), + @Index(columnList = "SN"), + @Index(columnList = "SN_2D"), + @Index(columnList = "WH_NO"), + @Index(columnList = "ZONE_NO"), + @Index(columnList = "LOCATE_NO"), + @Index(columnList = "LOT_NO"), + @Index(columnList = "FIX_LOT_NO"), + @Index(columnList = "DATE_CODE"), + @Index(columnList = "VENDOR_NO"), + @Index(columnList = "ORGANIZE_CODE"), + @Index(columnList = "SNAPSHOT_TIME") + }) +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Api(value = "库存条码信息", description = "库存条码信息") +public class WmsStockSnSnapshot extends BaseBean { + + private static final long serialVersionUID = 8641922373097608315L; + + @Column(name="SNAPSHOT_TIME") + @ApiParam("快照时间") + public String snapshotTime; + + @Column(name = "WH_NO") + @ApiParam(value = "仓库代码") + private String whNo; + + @Column(name = "ZONE_NO") + @ApiParam(value = "存储区编号") + private String zoneNo; + + @Column(name = "LOCATE_NO") + @ApiParam(value = "库位代码") + private String locateNo; + + @Column(name = "PART_NO") + @ApiParam(value = "物料编号") + private String partNo; + + @Column(name = "PART_NAME_RDD") + @ApiParam(value = "物料名称") + private String partNameRdd; + + @Column(name = "LOT_NO", nullable = false) + @ApiParam("收货日期(批次编码)") + public String lotNo = ""; + + @Column(name = "DATE_CODE", nullable = false) + @ApiParam(value = "生产日期") + public String dateCode = ""; + + @Column(name = "LEFT_CODE", nullable = false) + @ApiParam(value = "有效期") + private String leftCode = ""; + + @Column(name = "VENDOR_NO") + @ApiParam(value = "供应商编码") + public String vendorNo; + + @Column(name = "FIX_LOT_NO", nullable = false) + @ApiParam(value = "特殊批次") + private String fixLotNo = ""; + + @Column(name = "CUST_NO") + @ApiParam(value = "客户编码") + private String custNo; + + @Column(name = "SHIPPING_FLAG") + @ApiParam(value = "发往地") + private String shippingFlag; + + @Column(name = "SN") + @ApiParam(value = "条码") + private String sn; + + @Column(name = "SN_2D") + @ApiParam(value = "二维码") + private String sn2d; + + @Column(name = "PACKAGE_NO") + @ApiParam(value = "包装编号") + private String packageNo; + + @Column(name = "UNIT") + @ApiParam(value = "单位") + private String unit; + + @Column(name = "QTY") + @ApiParam(value = "数量", example = "0") + private Double qty = 0d; + + /** + * 质量状态:10=合格,20=不合格,30=隔离 + */ + @Column(name = "QC_STATUS") + @ApiParam(value = "质检状态", example = "0") + @AnnoOutputColumn(refClass = WmsEnumUtil.STOCK_SN_QC_STATUS.class,refForeignKey = "value",value = "description") + private Integer qcStatus; + /** + * 条码状态:1=创建,10=质检中,20=待入库,30=入库,40=配料,50=出库,60=报废,70=在途 + */ + @Column(name = "SN_STATUS") + @ApiParam(value = "条码状态", example = "0") + @AnnoOutputColumn(refClass = WmsEnumUtil.STOCK_SN_STATUS.class,refForeignKey = "value",value = "description") + private Integer snStatus; + /** + * 1:已打印;2:未打印 + */ + @Column(name = "PRINTED") + @ApiParam(value = "是否打印", example = "0") + @AnnoOutputColumn(refClass = WmsEnumUtil.TRUE_OR_FALSE.class,refForeignKey = "value",value = "description") + private Integer printed; + + @Column(name = "PDATE") + @ApiParam(value = "打印时间") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private Date pdate; + /** + * 1=ASN,10=PO,20=SO + */ + @Column(name = "REF_TYPE") + @ApiParam(value = "关联单据类型") + private String refType; + + @Column(name = "REF_SRC") + @ApiParam(value = "关联单号") + private String refSrc; + + @Column(name = "CUST_SN") + @ApiParam(value = "客户条码") + private String custSn; + + @Column(name = "WORK_CENTER_CODE") + @ApiParam(value = "工作中心代码") + private String workCenterCode; + + @Column(name = "SN_TYPE") + @ApiParam(value = "条码类型", example = "10") + @AnnoOutputColumn(refClass = WmsEnumUtil.WMS_STOCK_TYPE.class,refForeignKey = "value",value = "description") + private Integer snType = 10; + + @ApiParam(value = "仓库名称") + @Transient + public String whNameRdd; + + @ApiParam(value = "存储区名称") + @Transient + public String zoneNameRdd; + + @ApiParam(value = "库位名称") + @Transient + public String locateNameRdd; + + @ApiParam(value = "物料类型描述") + @Transient + public String partTypeDesc; + + @ApiParam(value = "客户名称") + @Transient + public String custNameRdd; + + @ApiParam(value = "供应商名称") + @Transient + public String vendorNameRdd; + + @ApiParam(value = "二维码内容") + @Transient + public String barCode; + + @ApiParam(value = "散件质检输入不良数量") + @Transient + public Double inputNCQty; + + @ApiParam(value = "前端散件表格是否编辑") + @Transient + public Boolean isSet = false; + + @ApiParam(value = "加减库容标志") + @Transient + public Boolean isAdd; + + @ApiParam(value = "项目名称") + @Transient + public String prodCfgTypeName; + + @ApiParam(value = "标签编号") + @Transient + public String labelNo; + + @Transient + @ApiParam(value = "工厂名称") + public String organizeName; + + @Transient + @ApiParam(value = "物料数量总和") + public Double sumPartQty; + + @Transient + @ApiParam(value = "条码数量总和") + public Long snCount; + + @Transient + @ApiParam(value = "物料编码集合") + public List partNoList; + + @Transient + @ApiParam(value = "ERP库存地集合") + public List erpZoneNoList; + + @Transient + @ApiParam(value = "ERP库存地") + public String erpZoneNo; + + @Transient + @ApiParam(value = "目标数量") + public Double destQty; + + public WmsStockSnSnapshot(){} + + public WmsStockSnSnapshot(String partNo){ + this.partNo = partNo; + } + + public Integer getSnType() { return snType == null ? 0 : snType.intValue();} + + public Double getQty() { + return qty == null ? 0L : qty.doubleValue(); + } + + public Double getInputNCQty(){return inputNCQty == null ? 0L : this.inputNCQty.doubleValue();} + + public WmsStockSnSnapshot(Long snCount, Double sumPartQty, String locateNo) { + this.snCount = snCount; + this.sumPartQty = sumPartQty; + this.locateNo = locateNo; + } +} diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/SwebProcurementPlanOrderRepository.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/SwebProcurementPlanOrderRepository.java index 130a355..6b6a05e 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/SwebProcurementPlanOrderRepository.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/SwebProcurementPlanOrderRepository.java @@ -1,7 +1,7 @@ package cn.estsh.i3plus.pojo.wms.repository; import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; -import cn.estsh.i3plus.pojo.wms.bean.iotio.SwebProcurementPlanOrder; +import cn.estsh.i3plus.pojo.wms.bean.SwebProcurementPlanOrder; import org.springframework.stereotype.Repository; /**