From 926c9c3d60494bc68e4c7bfd38be85707ba22e73 Mon Sep 17 00:00:00 2001 From: lbwgithub <你的邮箱1002117856@qq.com> Date: Fri, 11 Oct 2019 09:32:55 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=96=B9=E6=B3=95=E7=A7=BB=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/jpa/dao/BaseRepository.java | 2 +- .../pojo/base/jpa/daoimpl/BaseRepositoryImpl.java | 33 ---------------------- 2 files changed, 1 insertion(+), 34 deletions(-) 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 3af7891..5fdefdd 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 @@ -215,7 +215,7 @@ public interface BaseRepository extends JpaReposito List findByProperty(String propertyName, Object value); - List> findByWasProperty(String[] propertyNames, Object[] values); + List findByProperty(String[] propertyNames, Object[] values); 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 7a0e832..6544d05 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 @@ -411,44 +411,11 @@ public class BaseRepositoryImpl extends SimpleJpaRep } return query.setFirstResult(offset).setMaxResults(pageSize).getResultList(); } - @Override public List findByProperty(String propertyName, Object value) { String queryString = "from " + persistentClass.getSimpleName() + " as model where model." + propertyName + "= :" + propertyName; return entityManager.createQuery(queryString).setParameter(propertyName, value).getResultList(); } - - @Override - public List> findByWasProperty(String[] propertyNames, Object[] values) { - if (propertyNames.length != values.length) { - throw new IllegalArgumentException("参数名的数量和参数值不匹配!propertyNames:" + propertyNames.length + ",values:" + values.length); - } - StringBuffer queryString = new StringBuffer(); - queryString.append(" SELECT \n" + - " a.sn_status AS snStatus,\n" + - " a.wh_no AS whNo,\n" + - " a.locate_no AS locateNo,\n" + - " a.part_no AS partNo,\n" + - " a.part_name_rdd AS partNameRdd,\n" + - " a.lot_no AS lotNo,\n" + - " CAST(IFNULL(SUM(a.qty), 0) AS DOUBLE) AS qty \n" + - "FROM\n" + - " `wms_stock_sn` a "); - int size = propertyNames.length; - if (size > 0) { - queryString.append("where 1=1 and a.sn_status in ('"+ WmsEnumUtil.STOCK_SN_STATUS.PRE_INSTOCK.getValue()+"', '"+WmsEnumUtil.STOCK_SN_STATUS.INSTOCKED.getValue()+"','"+WmsEnumUtil.STOCK_SN_STATUS.PICKED.getValue()+"','"+WmsEnumUtil.STOCK_SN_STATUS.QUALITY_CONTROL.getValue()+"') "); - } - - for (int i = 0; i < size; i++) { - if (values[i] != null) { - queryString.append(" and a." + StringCastUtils.upperCharToUnderLine(propertyNames[i]) + "= '" + values[i]+"'"); - } - } - queryString.append(" group by a.lot_no,a.date_code"); - return entityManager.createNativeQuery(queryString.toString()).unwrap(SQLQuery.class).setResultTransformer( - Transformers.ALIAS_TO_ENTITY_MAP).getResultList(); - } - @Override public List findByProperty(String[] propertyNames, Object[] values) { if(propertyNames.length != values.length){ From 3ebf17adb1aaf0bfe071b155d47e41f62d74df09 Mon Sep 17 00:00:00 2001 From: lbwgithub <你的邮箱1002117856@qq.com> Date: Fri, 11 Oct 2019 09:39:15 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/estsh/i3plus/pojo/base/jpa/daoimpl/BaseRepositoryImpl.java | 2 -- 1 file changed, 2 deletions(-) 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 6544d05..936d73e 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 @@ -1550,6 +1550,4 @@ public class BaseRepositoryImpl extends SimpleJpaRep } return num; } - - } From 658b25bd651ce8a75fcee15fb8a09c21a614bf5e Mon Sep 17 00:00:00 2001 From: lbwgithub <你的邮箱1002117856@qq.com> Date: Fri, 11 Oct 2019 09:46:11 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/util/StringCastUtils.java | 29 ++++++++-------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/util/StringCastUtils.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/util/StringCastUtils.java index 2a53a11..7a87e78 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/util/StringCastUtils.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/util/StringCastUtils.java @@ -7,30 +7,21 @@ import java.util.regex.Pattern; * 字符串转大写换成下滑线加小写 */ public class StringCastUtils { - public static String upperCharToUnderLine(String param) { - Pattern p= Pattern.compile("[A-Z]"); - if(param==null ||param.equals("")){ - return ""; - } - StringBuilder builder=new StringBuilder(param); - Matcher mc=p.matcher(param); - int i=0; - while (mc.find()) { - System.out.println(builder.toString()); - System.out.println("mc.start():" + mc.start() + ", i: " + i); - System.out.println("mc.end():" + mc.start() + ", i: " + i); - builder.replace(mc.start()+i, mc.end()+i, "_"+mc.group().toLowerCase()); - i++; + Pattern p= Pattern.compile("[A-Z]"); + if(param==null ||param.equals("")){ + return ""; + } + StringBuilder builder=new StringBuilder(param); + Matcher mc=p.matcher(param); + int i=0; + while (mc.find()) { + builder.replace(mc.start()+i, mc.end()+i, "_"+mc.group().toLowerCase()); + i++; } if('_' == builder.charAt(0)){ builder.deleteCharAt(0); } - System.out.println(builder.toString()); return builder.toString(); } - -// public static void main(String[] args) { -// upperCharToUnderLine("snStatus"); -// } } From abd2321850e29140904730e25c5306e2cfaf19ee Mon Sep 17 00:00:00 2001 From: lbwgithub <你的邮箱1002117856@qq.com> Date: Fri, 11 Oct 2019 10:08:44 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/bean/iotio/WmsCSOrderDetailsModel.java | 61 +++++----------------- 1 file changed, 12 insertions(+), 49 deletions(-) diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/iotio/WmsCSOrderDetailsModel.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/iotio/WmsCSOrderDetailsModel.java index 6e2b61d..56e9dab 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/iotio/WmsCSOrderDetailsModel.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/iotio/WmsCSOrderDetailsModel.java @@ -1,79 +1,42 @@ package cn.estsh.i3plus.pojo.wms.bean.iotio; +import io.swagger.annotations.ApiParam; import lombok.Data; import java.io.Serializable; @Data public class WmsCSOrderDetailsModel implements Serializable { - - - /****** - * - * 工厂代码 - */ + @ApiParam("工厂代码") public String organizeCode; - - /****** - * - * 库位编码 - */ + @ApiParam("库位编码") public String locateNo; - /****** - * - * 订单编码 - */ + @ApiParam("订单编号") public String orderNo; - - /****** - * - * 物料代码 - */ + @ApiParam("物料代码") public String partNo; - /****** - * - * 物料名称 - */ + @ApiParam("物料名称") public String partNameRdd; - /****** - * - * 冻结数量 - */ + @ApiParam("冻结数量") public String qty; - /****** - * - * 实盘数量 - */ + @ApiParam("实盘数量") public String factQty; - /****** - * - * 条码 - */ + @ApiParam("条码编号") public String sn; - - /****** - * - * 仓库编码 - */ + @ApiParam("仓库编码") public String whNo; - /****** - * - * 区域编码 - */ + @ApiParam("区域编码") public String zoneNo; - /****** - * - * 状态 - */ + @ApiParam("状态") public String wmStatus; } From 2a1274df654d9d8b1de684bab7207284aaf11f7d Mon Sep 17 00:00:00 2001 From: "jhforever.wang@estsh.com" Date: Fri, 11 Oct 2019 11:03:58 +0800 Subject: [PATCH 5/5] =?UTF-8?q?mes=E7=BB=84=E7=BB=87=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/mes/model/MesEquipmentModel.java | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/MesEquipmentModel.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/MesEquipmentModel.java index 85c2f18..cfe4f4d 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/MesEquipmentModel.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/MesEquipmentModel.java @@ -31,8 +31,8 @@ public class MesEquipmentModel implements Serializable { @ApiParam(value ="设备工位关联ID") private Long wcId; - @ApiParam(value ="设备代码&工位") - private String equipmentCodeAndworkCellCode; + @ApiParam(value ="设备&工位") + private String equipmentNameAndworkCellName; public MesEquipmentModel() { @@ -49,22 +49,13 @@ public class MesEquipmentModel implements Serializable { this.areaCode = areaCode; } - public MesEquipmentModel(Long wcId, Long id, String equipmentCode, String equipmentName, Integer status, String workCenterCode, String workCellCode) { - this.wcId = wcId; - this.id = id; - this.equipmentCode = equipmentCode; - this.equipmentName = equipmentName; - this.status = status; - this.workCenterCode = workCenterCode; - this.workCellCode = workCellCode; - } - - public MesEquipmentModel(Long id, String equipmentCodeAndworkCellCode, String equipmentCode, String equipmentName, Integer status, String workCenterCode, String workCellCode) { + public MesEquipmentModel(Long id, String equipmentNameAndworkCellName, String equipmentCode, String equipmentName, Integer status, String areaCode, String workCenterCode, String workCellCode) { this.id = id; - this.equipmentCodeAndworkCellCode = equipmentCodeAndworkCellCode; + this.equipmentNameAndworkCellName = equipmentNameAndworkCellName; this.equipmentCode = equipmentCode; this.equipmentName = equipmentName; this.status = status; + this.areaCode = areaCode; this.workCenterCode = workCenterCode; this.workCellCode = workCellCode;