From 58d6305bd3d31b1c72ec0db47a31c639c279f785 Mon Sep 17 00:00:00 2001 From: wangjie Date: Tue, 10 Sep 2019 16:35:23 +0800 Subject: [PATCH 1/5] =?UTF-8?q?mes=E5=8A=A8=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/estsh/i3plus/pojo/mes/sqlpack/MesHqlPack.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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; + } } From f2e2dd1670c8add51b00360f0def0ce085899b43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=AA=E4=BA=91=E6=98=8A?= Date: Tue, 10 Sep 2019 16:40:38 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E8=BD=AF=E4=BB=B6=E9=80=82=E9=85=8D?= =?UTF-8?q?=E5=99=A8=20=E6=95=B0=E6=8D=AE=E6=BA=90=E9=80=82=E9=85=8D?= =?UTF-8?q?=E5=99=A8=20=E5=8D=95=E5=8F=B7=E7=94=9F=E6=88=90=E9=AB=98?= =?UTF-8?q?=E5=B9=B6=E5=8F=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/common/XStreamFactory.java | 10 ++++++++ .../pojo/model/softswitch/BsSuitCaseModel.java | 5 +++- .../i3plus/pojo/softswitch/bean/BsSuitCase.java | 15 +++++++++-- .../pojo/softswitch/bean/BsSuitCaseDataSource.java | 4 --- ...ry.java => BsSuitCaseDataSourceRepository.java} | 2 +- ...va => BsSuitCaseDataSourceTableRepository.java} | 2 +- .../pojo/softswitch/sqlpack/SoftSwitchHqlPack.java | 30 +++++++++++++++++++++- 7 files changed, 58 insertions(+), 10 deletions(-) rename modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/repository/{BsDataSourceSuitCaseRepository.java => BsSuitCaseDataSourceRepository.java} (86%) rename modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/repository/{BsDataSourceSuitCaseTableRepository.java => BsSuitCaseDataSourceTableRepository.java} (86%) 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-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 cf7567b..abb41bd 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,11 +1,15 @@ package cn.estsh.i3plus.pojo.model.softswitch; +import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn; +import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; import cn.estsh.i3plus.pojo.softswitch.bean.BsSocketSuitCase; import cn.estsh.i3plus.pojo.softswitch.bean.BsSuitCase; import cn.estsh.i3plus.pojo.softswitch.bean.BsSuitCaseDataSource; import io.swagger.annotations.ApiParam; import lombok.Data; +import javax.persistence.Transient; + /** * @Description : 适配器model * @Reference : @@ -24,5 +28,4 @@ public class BsSuitCaseModel { @ApiParam(value = "socket适配套件") BsSocketSuitCase bsSocketSuitCase; - } 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 db8c3a3..fafad2e 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 @@ -49,6 +49,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") @ApiParam(value = "适配类型名称") private String suitTypeName; @@ -115,7 +122,11 @@ 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/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 0190f85..29e0594 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.getSuitTypeName(),"suitTypeName",ddlPackBean); DdlPreparedPack.getNumEqualPack(bsSuitCase.getCaseTypeId(), "caseTypeId", ddlPackBean); ddlPackBean.setOrderByStr(bsSuitCase.orderBy()); @@ -266,4 +265,33 @@ public class SoftSwitchHqlPack { return ddlPackBean; } + /** + * 数据源适配操作查询条件封装 + * @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; + } + } From 8ed0d4d60e34572ed1958dfe101822da67605229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=80=9D=E6=B4=81?= Date: Tue, 10 Sep 2019 16:54:19 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=9E=9A=E4=B8=BE=E7=BB=B4=E6=8A=A4?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=B1=BB=E5=9E=8B=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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..7fe95a1 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; From 07688db53347aa6afb818b7f165ad8d2b3d69402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=AA=E4=BA=91=E6=98=8A?= Date: Tue, 10 Sep 2019 17:01:45 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E8=BD=AF=E9=80=82=E9=85=8D=E5=AE=9E?= =?UTF-8?q?=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LinkedCaseInsensitiveMapConverter.java | 25 ++++++++++++++++++++++ .../base/enumutil/BlockSoftSwitchEnumUtil.java | 10 +++++++++ .../i3plus/pojo/softswitch/bean/BsSuitCase.java | 7 ++++++ 3 files changed, 42 insertions(+) create mode 100644 modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/common/converter/LinkedCaseInsensitiveMapConverter.java 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 e6c7938..d6ad5bc 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 @@ -49,6 +49,16 @@ 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; + } } /** 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 fafad2e..2432c18 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) From 262f7efe05baa1730123375c62eab5873a35ccb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=BF=83=E6=B4=81?= Date: Tue, 10 Sep 2019 17:02:13 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E5=A6=82=E6=9E=9C=E6=9C=89=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E4=BF=A1=E6=81=AF=E9=9C=80=E8=A6=81=E5=8F=A0=E5=8A=A0?= =?UTF-8?q?=E5=9C=A8=E6=8F=90=E7=A4=BA=E4=BF=A1=E6=81=AF=E5=89=8D=E4=B8=80?= =?UTF-8?q?=E8=B5=B7=E8=BF=94=E5=9B=9E=E7=BB=99=E5=89=8D=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../estsh/i3plus/pojo/model/wms/WmsActionResponseBean.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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;