From f9db132861acda07d57feea80d613b71bc344900 Mon Sep 17 00:00:00 2001 From: Jason Date: Thu, 17 Sep 2020 10:24:42 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=9D=A4=E6=B3=B0SWEBU9=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/estsh/i3plus/pojo/wms/dbinterface/WmsInterfaceEnumUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/dbinterface/WmsInterfaceEnumUtil.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/dbinterface/WmsInterfaceEnumUtil.java index 691defd..6e210ce 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/dbinterface/WmsInterfaceEnumUtil.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/dbinterface/WmsInterfaceEnumUtil.java @@ -11,7 +11,8 @@ public class WmsInterfaceEnumUtil { MES2WMS(30, "MES2WMS", "MES --> WMS"), WMS2MES(40, "WMS2MES", "WMS --> MES"), SWEB2WMS(50, "SWEB2WMS", "SWEB --> WMS"), - WMS2SWEB(50, "WMS2SWEB", "WMS --> SWEB"); + WMS2SWEB(50, "WMS2SWEB", "WMS --> SWEB"), + SAP2SWEB(50, "SAP2SWEB", "SAP --> SWEB"); private int value; private String name; From ea875c1a3bb3a286d6f78c83a753f2a23c367844 Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 18 Sep 2020 20:50:39 +0800 Subject: [PATCH 2/2] =?UTF-8?q?SWEB=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/enumutil/WmsEnumUtil.java | 1 + .../i3plus/pojo/sweb/bean/SwebPurchaseOrder.java | 4 + .../pojo/sweb/bean/SwebPurchaseOrderDetails.java | 4 +- .../i3plus/pojo/sweb/bean/SwebRequireAlarm.java | 75 ++++++++++++++++++ .../i3plus/pojo/sweb/bean/SwebVendorStock.java | 75 ++++++++++++++++++ .../pojo/sweb/bean/SwebVendorSupplierCapcity.java | 92 ++++++++++++++++++++++ .../repository/SwebRequireAlarmRepository.java | 16 ++++ .../sweb/repository/SwebVendorStockRepository.java | 16 ++++ .../SwebVendorSupplierCapcityRepository.java | 16 ++++ .../i3plus/pojo/sweb/sqlpack/SwebHqlPack.java | 43 ++++++++++ 10 files changed, 340 insertions(+), 2 deletions(-) create mode 100644 modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebRequireAlarm.java create mode 100644 modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebVendorStock.java create mode 100644 modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebVendorSupplierCapcity.java create mode 100644 modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/repository/SwebRequireAlarmRepository.java create mode 100644 modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/repository/SwebVendorStockRepository.java create mode 100644 modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/repository/SwebVendorSupplierCapcityRepository.java 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 24d3342..df92d67 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 @@ -263,6 +263,7 @@ public class WmsEnumUtil { this.description = description; } + public int getValue() { return value; } diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebPurchaseOrder.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebPurchaseOrder.java index 723d9cb..8ea25cf 100644 --- a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebPurchaseOrder.java +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebPurchaseOrder.java @@ -109,6 +109,10 @@ public class SwebPurchaseOrder extends BaseBean { @ApiParam(value = "订单来源") private Integer orderSource; + @Column(name = "IS_EXT_ADD") + @ApiParam(value = "是否追加") + private Integer isExtAdd; + @Transient @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @ApiParam(value = "预计到货时间 开始时间") diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebPurchaseOrderDetails.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebPurchaseOrderDetails.java index 80833fe..6037326 100644 --- a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebPurchaseOrderDetails.java +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebPurchaseOrderDetails.java @@ -55,9 +55,9 @@ public class SwebPurchaseOrderDetails extends BaseBean { @ApiParam(value = "零件名称") private String partName; - /*@ApiParam(value = "订单类型", example = "1") + @ApiParam(value = "订单类型", example = "1") @Column(name = "ORDER_TYPE") - public Integer orderType;*/ + public Integer orderType; @ApiParam("零件类型") @Column(name = "PART_TYPE") diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebRequireAlarm.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebRequireAlarm.java new file mode 100644 index 0000000..accc6b4 --- /dev/null +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebRequireAlarm.java @@ -0,0 +1,75 @@ +package cn.estsh.i3plus.pojo.sweb.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; +import javax.persistence.Transient; + +/** + * @Description : 库存需求报警 + * @Reference : + * @Author : jason.niu + * @CreateDate : 2020-09-17 + * @Modify: + **/ +@Data +@Table(name = "SWEB_REQUIRE_ALARM") +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Api("库存需求报警") +public class SwebRequireAlarm extends BaseBean { + + @Column(name = "PART_NO") + @ApiParam("物料代码") + private String partNo; + + @Column(name = "PART_NAME") + @ApiParam("物料名称") + private String partName; + + @Column(name = "VENDOR_CODE") + @ApiParam("供应商代码") + private String vendorCode; + + @Column(name = "VENDOR_NAME") + @ApiParam("供应商名称") + private String vendorName; + + @Column(name = "START_QTY") + @ApiParam("开班库存") + private Double startQty; + + @Column(name = "ALARM_LEVEL") + @ApiParam("报警级别") + private String alarmLevel; + + @Column(name = "REASON") + @ApiParam("原因分析") + private String reason; + + @Column(name = "TRACK_REMARK") + @ApiParam("跟踪情况") + private String trackRemark; + + @Column(name = "COUNT_DATE") + @ApiParam("日期") + private Double countDate; + + @Transient + @ApiParam("日期") + private String dateStart; + + @Transient + @ApiParam("日期") + private String dateEnd; +} diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebVendorStock.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebVendorStock.java new file mode 100644 index 0000000..3e8547b --- /dev/null +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebVendorStock.java @@ -0,0 +1,75 @@ +package cn.estsh.i3plus.pojo.sweb.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; +import javax.persistence.Transient; + +/** + * @Description : 供应商安全库存 + * @Reference : + * @Author : jason.niu + * @CreateDate : 2020-09-17 + * @Modify: + **/ +@Data +@Table(name = "SWEB_VENDOR_STOCK") +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Api("供应商安全库存") +public class SwebVendorStock extends BaseBean { + + @Column(name = "PART_NO") + @ApiParam("物料代码") + private String partNo; + + @Column(name = "PART_NAME") + @ApiParam("物料名称") + private String partName; + + @Column(name = "VENDOR_CODE") + @ApiParam("供应商代码") + private String vendorCode; + + @Column(name = "VENDOR_NAME") + @ApiParam("供应商名称") + private String vendorName; + + @Column(name = "SAFE_TYPE") + @ApiParam("安全库存计算类型") + private Integer safeType; + + @Column(name = "SAFE_VALUE") + @ApiParam("计数值") + private String safeValue; + + @Column(name = "QTY") + @ApiParam("库存数量") + private Double qty; + + @Column(name = "COUNT_MONTH") + @ApiParam("月份") + private String countMonth; + + @Column(name = "COUNT_WEEK") + @ApiParam("周") + private String countWeek; + + @Transient + @ApiParam("日期") + private String dateStart; + + @Transient + @ApiParam("日期") + private String dateEnd; +} diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebVendorSupplierCapcity.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebVendorSupplierCapcity.java new file mode 100644 index 0000000..f0f2d7e --- /dev/null +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebVendorSupplierCapcity.java @@ -0,0 +1,92 @@ +package cn.estsh.i3plus.pojo.sweb.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; +import javax.persistence.Transient; + +/** + * @Description : 供应商供货能力 + * @Reference : + * @Author : jason.niu + * @CreateDate : 2020-09-16 + * @Modify: + **/ +@Data +@Table(name = "SWEB_VENDOR_SUPPLIER_CAPCITY") +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Api("供应商供货能力") +public class SwebVendorSupplierCapcity extends BaseBean { + private static final long serialVersionUID = 2327910806789997252L; + + @Column(name = "VENDOR_CODE") + @ApiParam("供应商代码") + private String vendorCode; + + @Column(name = "VENDOR_NAME") + @ApiParam("供应商名称") + private String vendorName; + + @Column(name = "PART_NO") + @ApiParam("物料编码") + private String partNo; + + @Column(name = "PART_NAME") + @ApiParam("物料名称") + private String partName; + + @Column(name = "CURRENT_QTY") + @ApiParam("当前库存") + private Double currentQty; + + @Column(name = "PLAN_PRODUCT_QTY") + @ApiParam("计划生产或到货") + private Double planProductQty; + + @Column(name = "PLAN_REQUEST_QTY") + @ApiParam("计划需求数量") + private Double planRequestQty; + + @Column(name = "END_QTY") + @ApiParam("期末库存") + private Double endQty; + + @Column(name = "IS_DANGER") + @ApiParam("是否存在风险") + private Integer isDanger; + + @Column(name = "DANGER_SPEC") + @ApiParam("风险描述") + private String dangerSpec; + + @Column(name = "STATUS") + @ApiParam("状态") + private String status; + + @Column(name = "REMARK") + @ApiParam("备注") + private String remark; + + @Column(name = "TRACK_DATE") + @ApiParam("日期") + private String trackDate; + + @Transient + @ApiParam("日期") + private String dateStart; + + @Transient + @ApiParam("日期") + private String dateEnd; +} diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/repository/SwebRequireAlarmRepository.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/repository/SwebRequireAlarmRepository.java new file mode 100644 index 0000000..e9397f8 --- /dev/null +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/repository/SwebRequireAlarmRepository.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.pojo.sweb.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.sweb.bean.SwebRequireAlarm; +import org.springframework.stereotype.Repository; + +/** + * @Description : 库存需求报警 + * @Reference : + * @Author : jason.niu + * @CreateDate : 2020-09-17 + * @Modify: + **/ +@Repository +public interface SwebRequireAlarmRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/repository/SwebVendorStockRepository.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/repository/SwebVendorStockRepository.java new file mode 100644 index 0000000..1616b4b --- /dev/null +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/repository/SwebVendorStockRepository.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.pojo.sweb.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.sweb.bean.SwebVendorStock; +import org.springframework.stereotype.Repository; + +/** + * @Description : 供应商安全库存 + * @Reference : + * @Author : jason.niu + * @CreateDate : 2020-09-17 + * @Modify: + **/ +@Repository +public interface SwebVendorStockRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/repository/SwebVendorSupplierCapcityRepository.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/repository/SwebVendorSupplierCapcityRepository.java new file mode 100644 index 0000000..653d469 --- /dev/null +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/repository/SwebVendorSupplierCapcityRepository.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.pojo.sweb.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.sweb.bean.SwebVendorSupplierCapcity; +import org.springframework.stereotype.Repository; + +/** + * @Description :供应商供货能力 + * @Reference : + * @Author : jason.niu + * @CreateDate : 2020-09-17 + * @Modify: + **/ +@Repository +public interface SwebVendorSupplierCapcityRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/sqlpack/SwebHqlPack.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/sqlpack/SwebHqlPack.java index 276b52b..e81e51b 100644 --- a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/sqlpack/SwebHqlPack.java +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/sqlpack/SwebHqlPack.java @@ -203,4 +203,47 @@ public class SwebHqlPack { DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"modifyDatetime"}, result); return buildHql(details, result); } + + public static DdlPackBean getVendorSupplierCapcity(SwebVendorSupplierCapcity capcity) { + DdlPackBean result = new DdlPackBean(); + DdlPreparedPack.getStringLikerPack(capcity.getVendorCode(), "vendorCode", result); + DdlPreparedPack.getStringLikerPack(capcity.getPartNo(), "partNo", result); + DdlPreparedPack.getNumEqualPack(capcity.getStatus(), "status", result); + if (!StringUtil.isEmpty(capcity.getDateStart())) { + DdlPreparedPack.getStringBiggerPack(capcity.getDateStart(), "trackDate", result); + } + if (!StringUtil.isEmpty(capcity.getDateEnd())) { + DdlPreparedPack.getStringSmallerPack(capcity.getDateEnd(), "trackDate", result); + } + DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"modifyDatetime"}, result); + return buildHql(capcity, result); + } + + public static DdlPackBean getSwebRequireAlarm(SwebRequireAlarm alarm) { + DdlPackBean result = new DdlPackBean(); + DdlPreparedPack.getStringLikerPack(alarm.getVendorCode(), "vendorCode", result); + DdlPreparedPack.getStringLikerPack(alarm.getPartNo(), "partNo", result); + if (!StringUtil.isEmpty(alarm.getDateStart())) { + DdlPreparedPack.getStringBiggerPack(alarm.getDateStart(), "countDate", result); + } + if (!StringUtil.isEmpty(alarm.getDateEnd())) { + DdlPreparedPack.getStringSmallerPack(alarm.getDateEnd(), "countDate", result); + } + DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"modifyDatetime"}, result); + return buildHql(alarm, result); + } + + public static DdlPackBean getSwebVendorStock(SwebVendorStock stock) { + DdlPackBean result = new DdlPackBean(); + DdlPreparedPack.getStringLikerPack(stock.getVendorCode(), "vendorCode", result); + DdlPreparedPack.getStringLikerPack(stock.getPartNo(), "partNo", result); +// if (!StringUtil.isEmpty(alarm.getDateStart())) { +// DdlPreparedPack.getStringBiggerPack(alarm.getDateStart(), "countDate", result); +// } +// if (!StringUtil.isEmpty(alarm.getDateEnd())) { +// DdlPreparedPack.getStringSmallerPack(alarm.getDateEnd(), "countDate", result); +// } + DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"modifyDatetime"}, result); + return buildHql(stock, result); + } }