From e1618942392b82fd65a533909f64d1ae89fcd62d Mon Sep 17 00:00:00 2001 From: crish <570360737@qq.com> Date: Fri, 19 Apr 2019 10:02:28 +0800 Subject: [PATCH 1/4] =?UTF-8?q?Mes=E7=94=9F=E4=BA=A7=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E6=9E=9A=E4=B8=BE=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/enumutil/MesEnumUtil.java | 108 +++++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java index 97ea123..1d1ebfe 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java @@ -161,4 +161,112 @@ public class MesEnumUtil { return tmp; } } + + /** + * MesPlanOrder实体对应的planType值 计划类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum PALN_ORDER_TYPE{ + + ATTEMPT_ORDER(10,"标准"); + + private int value; + private String description; + + PALN_ORDER_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** + * MesPlanOrder实体对应的source值 计划来源 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum PALN_ORDER_SOURCE{ + + MES("MES","来源于MES"), + SAP("SAP","来源于SAP"); + + private String value; + private String description; + + PALN_ORDER_SOURCE(String value, String description) { + this.value = value; + this.description = description; + } + + public String 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.equals(val) ) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** + * MesPlanOrder实体对应的source值 计划来源 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum WORK_ORDER_SOURCE{ + + MES("MES","来源于MES"), + AMES("AMES","来源于AMES"), + SAP("SAP","来源于SAP"); + + private String value; + private String description; + + WORK_ORDER_SOURCE(String value, String description) { + this.value = value; + this.description = description; + } + + public String 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.equals(val) ) { + tmp = values()[i].description; + } + } + return tmp; + } + } } From 9418373b4dbecf2c8d0abbde13af8ff39b32f5d5 Mon Sep 17 00:00:00 2001 From: alwaysfrin <39822157+alwaysfrin@users.noreply.github.com> Date: Fri, 19 Apr 2019 10:26:00 +0800 Subject: [PATCH 2/4] =?UTF-8?q?DdlPack=EF=BC=8C=E5=B0=81=E8=A3=85bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/estsh/i3plus/pojo/base/jpa/daoimpl/BaseRepositoryImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 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 3de0adf..5a28202 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 @@ -246,7 +246,7 @@ public class BaseRepositoryImpl extends SimpleJpaRep } //查询条件 for (String key : packBean.getHqlPreparedMap().keySet()) { - query.setParameter(key,packBean.getHqlPreparedMap().get(key)); + query.setParameter("m_" + key,packBean.getHqlPreparedMap().get(key)); } return query.executeUpdate(); @@ -328,7 +328,7 @@ public class BaseRepositoryImpl extends SimpleJpaRep } for (String key : packBean.getHqlPreparedMap().keySet()) { - query.setParameter(key,packBean.getHqlPreparedMap().get(key)); + query.setParameter("m_" + key,packBean.getHqlPreparedMap().get(key)); } return query.setFirstResult(offset) From 5f13bf7f1db7e49f6be95170055f23d8b146b872 Mon Sep 17 00:00:00 2001 From: crish <570360737@qq.com> Date: Fri, 19 Apr 2019 11:12:04 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=AE=9E=E4=BD=93=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesPlanOrder.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesPlanOrder.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesPlanOrder.java index e02cf88..b017d0b 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesPlanOrder.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesPlanOrder.java @@ -31,9 +31,9 @@ public class MesPlanOrder extends BaseBean { @ApiParam("生产计划单号") private String orderNo; - @Column(name="ORDER_TYPE") + @Column(name="PO_TYPE") @ApiParam("计划类型") - private Integer orderType; + private Integer planType; @Column(name="PROD_CFG_CODE") @ApiParam("产品配置代码") @@ -96,6 +96,6 @@ public class MesPlanOrder extends BaseBean { } public int getOrderTypeVal() { - return this.orderType == null ? 0 : this.orderType; + return this.planType == null ? 0 : this.planType; } } From 6916ae20de8c4c26789be75e50b996cda44ab02c Mon Sep 17 00:00:00 2001 From: crish <570360737@qq.com> Date: Fri, 19 Apr 2019 11:16:51 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E4=BA=A7=E7=BA=BF?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=AE=9E=E4=BD=93=E5=92=8CRepository?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/mes/bean/MesCustProdLine.java | 38 ++++++++++++++++++++++ .../mes/repository/MesCustProdLineRepository.java | 16 +++++++++ 2 files changed, 54 insertions(+) create mode 100644 modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesCustProdLine.java create mode 100644 modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesCustProdLineRepository.java diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesCustProdLine.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesCustProdLine.java new file mode 100644 index 0000000..bd3711b --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesCustProdLine.java @@ -0,0 +1,38 @@ +package cn.estsh.i3plus.pojo.mes.bean; + + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +/** + * @Description :mes系统业务动作 + * @Reference : + * @Author : jack.jia + * @CreateDate : 2019-04-12 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name="MES_CUST_PROD_LINE") +@Api("客户产线代码") +public class MesCustProdLine extends BaseBean { + @Column(name="CUST_PROD_LINE_CODE") + @ApiParam("客户产线代码") + private String custProdLineCode; + + @Column(name="CUST_PROD_LINE_NAME") + @ApiParam("客户产线名称") + private String custProdLineName; +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesCustProdLineRepository.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesCustProdLineRepository.java new file mode 100644 index 0000000..b8c4290 --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesCustProdLineRepository.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.pojo.mes.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.mes.bean.MesCustProdLine; +import org.springframework.stereotype.Repository; + +/** + * @Description: + * @Reference: + * @Author: Crish + * @CreateDate:2019-04-19-11:15 + * @Modify: + **/ +@Repository +public interface MesCustProdLineRepository extends BaseRepository { +}