From 14cfa5fa47637153ba01cec7b3603a41309c85c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E6=B4=A5=E5=93=B2?= Date: Mon, 30 Mar 2020 14:59:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=B3=A2=E6=AC=A1=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E8=A7=84=E5=88=99=E5=AE=9E=E4=BD=93=E7=B1=BB=E5=92=8C?= =?UTF-8?q?=E8=A7=84=E5=88=99=E6=98=8E=E7=BB=86=E5=AE=9E=E4=BD=93=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/enumutil/WmsEnumUtil.java | 189 +++++++++++++++++++++ .../cn/estsh/i3plus/pojo/wms/bean/WmsWaveRule.java | 109 ++++++++++++ .../i3plus/pojo/wms/bean/WmsWaveRuleDetails.java | 56 ++++++ .../pojo/wms/modelbean/WmsDocMovementModel.java | 84 +++++++++ .../repository/WmsWaveRuleDetailsRepository.java | 16 ++ .../pojo/wms/repository/WmsWaveRuleRepository.java | 16 ++ 6 files changed, 470 insertions(+) create mode 100644 modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsWaveRule.java create mode 100644 modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsWaveRuleDetails.java create mode 100644 modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/modelbean/WmsDocMovementModel.java create mode 100644 modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsWaveRuleDetailsRepository.java create mode 100644 modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsWaveRuleRepository.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 4fd1ad6..41728f0 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 @@ -5301,4 +5301,193 @@ public class WmsEnumUtil { return tmp; } } + + /** + * 波次合并规则 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum WAVE_MERGE_RULE { + IS_SAME_CUSTOMER("同客户", "isSameCustomer", 2, 10), + IS_SAME_WAREHOUSE("同仓库", "isSameWareHouse", 1, 10), + IS_SAME_PRIORITY("同优先级", "isSamePriority", 1, 10), + IS_SAME_SRC_ZONE("同来源存储区", "isSameSrcZone", 2, 10), + IS_SAME_DEST_ZONE("同目标存储区", "isSameDestZone", 2, 10), + IS_SAME_PART("同物料", "isSamePart", 2, 10), + IS_SAME_PART_GROUP("同物料组", "isSamePartGroup", 2, 10), + IS_SAME_DELIVERY_TIME("同发货时间", "isSameDeliveryTime", 2, 10), + IS_SAME_BUSI_TYPE("同业务类型", "isSameBusiType", 1, 10), + IS_SAME_ORDER_STATUS("同单据状态", "isSameOrderStatus", 1, 10), + IS_CROSS_AREA("允许跨区", "isCrossArea", 2, 10), + IS_COLLECTION("物料整箱归集", "isCollection", 2, 10); + + private String chName; + + private String enName; + + private int waveMergeType; + + private int value; + + WAVE_MERGE_RULE(String chName, String enName, int value, int waveMergeType) { + this.chName = chName; + this.enName = enName; + this.value = value; + this.waveMergeType = waveMergeType; + } + + public String getChName() { + return chName; + } + + public String getEnName() { + return enName; + } + + public int getValue() { + return value; + } + + public int getWaveMergeType() { + return waveMergeType; + } + } + + /** + * 波次合并规则 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum WAVE_MERGE_RANGE { + CUST_NO("客户代码", "custNo", "cn.estsh.i3plus.pojo.wms.bean.BasCustomer", + "custNo, custName", "custNo, custName", "custNo", 20), + WAREHOUSE_CODE("仓库代码", "srcWhNo", "cn.estsh.i3plus.pojo.wms.bean.WareHouse", + "code, name", "code, name", "code", 20), + PRIORITY("优先级", "priority", "PRIORITY_NEW", "", + "", "", 20), + SRC_ZONE_NO("来源存储区代码", "srcZoneNo", "cn.estsh.i3plus.pojo.wms.bean.WmsZones", + "zoneNo, zoneName", "zoneNo", "zoneNo", 20), + DEST_ZONE_NO("目标存储区代码", "destZoneNo", "cn.estsh.i3plus.pojo.wms.bean.WmsZones", + "zoneNo, zoneName", "zoneNo", "zoneNo", 20), + PART_NO("物料号", "partNo", "cn.estsh.i3plus.pojo.wms.bean.WmsPart", + "partNo, partName", "partNo", "partNo", 20), + PART_GROUP_NO("物料组代码", "partGroupNo", "", "", + "", "", 20), + BUSI_TYPE("业务类型", "busiType", "OUT_MOVEMENT_BUSI_TYPE", "", + "", "", 20), + ORDER_STATUS("单据状态", "orderStatus", "MASTER_ORDER_STATUS", "", + "", "", 20); + + // 中文名称 + String chName; + // 英文名称 + String enName; + // 下拉枚举名称 + String entityName; + // 下拉列表显示列名称,多个列名需要根据逗号分隔 + String listColumnName; + // 下拉搜索列名称,多个列名需要根据逗号分隔 + String searchColumnName; + // 回显列名 + String explicitColumnName; + // 合并操作类型 + private int waveMergeType; + + WAVE_MERGE_RANGE(String chName, String enName, String entityName, String listColumnName, + String searchColumnName, String explicitColumnName, int waveMergeType) { + this.chName = chName; + this.enName = enName; + this.entityName = entityName; + this.listColumnName = listColumnName; + this.searchColumnName = searchColumnName; + this.explicitColumnName = explicitColumnName; + this.waveMergeType = waveMergeType; + } + + public String getChName() { + return chName; + } + + public String getEnName() { + return enName; + } + + public String getEntityName() { + return entityName; + } + + public String getListColumnName() { + return listColumnName; + } + + public String getSearchColumnName() { + return searchColumnName; + } + + public String getExplicitColumnName() { + return explicitColumnName; + } + + public int getWaveMergeType() { + return waveMergeType; + } + } + + /** + * 插件类型 10-合并规则,20-合并范围 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum WAVE_MERGE_TYPE { + WAVE_MERGE_RULE(10, "WAVE_MERGE_RULE", "合并规则"), + WAVE_MERGE_RANGE(20, "WAVE_MERGE_RANGE", "合并范围"); + + private int value; + private String code; + private String description; + + WAVE_MERGE_TYPE(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public String getCode() { + return code; + } + + public static WAVE_MERGE_TYPE codeOf(int value) { + for (int i = 0; i < values().length; i++) { + if (values()[i].value == value) { + return values()[i]; + } + } + return null; + } + + public static String valueOf(int 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 int descOf(String desc) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(desc)) { + tmp = values()[i].value; + } + } + return tmp; + } + } } \ No newline at end of file diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsWaveRule.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsWaveRule.java new file mode 100644 index 0000000..a9b02e2 --- /dev/null +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsWaveRule.java @@ -0,0 +1,109 @@ +package cn.estsh.i3plus.pojo.wms.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; +import java.util.List; + +/** + * @Description : 波次规则数据 + * @Reference : + * @Author : siliter.yuan + * @CreateDate : 2020-03-25 10:10 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name = "WMS_WAVE_RULE") +@Api(value = "波次规则数据表") +public class WmsWaveRule extends BaseBean { + + private static final long serialVersionUID = 8664373854844368961L; + + @Column(name = "RULE_CODE") + @ApiParam(value = "波次规则代码") + public String ruleCode; + + @Column(name = "RULE_DESC") + @ApiParam(value = "波次规则描述") + public String ruleDesc; + + /** + * 分配规则 2-不分配(默认) 1-分配到责任区 + */ + @Column(name = "ALLOCATE_RULE") + @ApiParam(value = "分配规则", example = "1") + public Integer allocateRule; + + @Column(name = "EXTEND_SQL") + @ApiParam(value = "扩展脚本") + public String extendSql; + + @Column(name = "START_EFFECT_DATE") + @ApiParam(value = "开始生效时间") + public String startEffectDate; + + @Column(name = "END_EFFECT_DATE") + @ApiParam(value = "结束生效时间") + public String endEffectDate; + + @Column(name = "SORT_CONDITIONS") + @ApiParam(value = "单据排序条件") + public String sortConditions; + + @Column(name = "ORDER_CONTROL_TIME") + @ApiParam(value = "单据控制时间") + public String orderControlTime; + + @Column(name = "FIXED_ORDER_QTY") + @ApiParam(value = "固定单据数量", example = "0") + public Integer fixedOrderQty; + + @Column(name = "FIXED_PART_QTY") + @ApiParam(value = "固定物料箱数", example = "0") + public Integer fixedPartQty; + + @Column(name = "WAVE_QTY") + @ApiParam(value = "波次数量", example = "0") + public Integer waveQty; + + @Column(name = "ORDER_MAX_QTY") + @ApiParam(value = "最大单据数量", example = "0") + public Integer orderMaxQty; + + @Column(name = "PART_MAX_QTY") + @ApiParam(value = "最大物料数量", example = "0") + public Double partMaxQty; + + @Column(name = "ORDER_TIMEOUT_TIME") + @ApiParam(value = "单据等待时间", example = "0") + public Integer orderTimeOutTime; + + @Column(name = "NEXT_WAVE_TIME") + @ApiParam(value = "下次波次时间") + public String nextWaveTime; + + @Column(name = "IS_CROSS_AREA") + @ApiParam(value = "允许跨区", example = "0") + public Integer isCrossArea; + + @Column(name = "IS_COLLECTION") + @ApiParam(value = "允许整箱归集") + public Integer isCollection; + + @Transient + @ApiParam(value = "波次规则明细信息") + private List waveRuleDetailsList; +} diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsWaveRuleDetails.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsWaveRuleDetails.java new file mode 100644 index 0000000..f2e7cf7 --- /dev/null +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsWaveRuleDetails.java @@ -0,0 +1,56 @@ +package cn.estsh.i3plus.pojo.wms.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 : 波次规则明细数据 + * @Reference : + * @Author : siliter.yuan + * @CreateDate : 2020-03-25 10:10 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name = "WMS_WAVE_RULE_DETAILS") +@Api(value = "波次规则明细数据表") +public class WmsWaveRuleDetails extends BaseBean { + + private static final long serialVersionUID = 8664373954844368961L; + + @Column(name = "RULE_ID") + @ApiParam(value = "波次规则编号", example = "0") + public Long ruleId; + + @Column(name = "FIELD_CH_NAME") + @ApiParam(value = "字段中文名称") + public String fieldChName; + + @Column(name = "FIELD_EN_NAME") + @ApiParam(value = "字段英文名称") + public String fieldEnName; + + @Column(name = "MERGE_OPERATOR_TYPE") + @ApiParam(value = "合并操作类型", example = "0") + public Integer mergeOperatorType; + + @Column(name = "FILED_VALUE") + @ApiParam(value = "字段值") + public String fieldValue; + + public Long getRuleId() { + return ruleId == null ? 0L : ruleId.longValue(); + } +} diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/modelbean/WmsDocMovementModel.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/modelbean/WmsDocMovementModel.java new file mode 100644 index 0000000..f59bc69 --- /dev/null +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/modelbean/WmsDocMovementModel.java @@ -0,0 +1,84 @@ +package cn.estsh.i3plus.pojo.wms.modelbean; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.AllArgsConstructor; +import lombok.Data; +import org.hibernate.annotations.ColumnDefault; + +/** + * @Description : 移库单数据模型Model + * @Reference : + * @Author : siliter.yuan + * @CreateDate : 2020-03-26 11:18 + * @Modify: + **/ +@Data +@AllArgsConstructor +@Api("移库单数据模型") +public class WmsDocMovementModel { + + @ApiParam("订单号") + private String orderNo; + + @ApiParam(value = "业务类型", example = "1") + private Integer busiType; + + @ApiParam("客户代码") + private String custNo; + + @ApiParam("来源仓库代码") + private String srcWhNo; + + @ApiParam("来源存储区代码") + private String srcZoneNo; + + @ApiParam("目标仓库代码") + private String destWhNo; + + @ApiParam("目标存储区代码") + private String destZoneNo; + + @ApiParam("物料组代码") + private String partGroupNo; + + @ApiParam("订单状态") + private String orderStatus; + + @ApiParam(value = "优先级", example = "1") + public Integer priority; + + @ApiParam("物料号") + private String partNo; + + @ColumnDefault("0") + @ApiParam(value = "已拣货数量", example = "1") + private Double pickQty; + + @ColumnDefault("0") + @ApiParam(value = "已出库数量", example = "1") + private Double outQty; + + @ColumnDefault("0") + @ApiParam(value = "已移库数量", example = "1") + private Double moveQty; + + @ColumnDefault("0") + @ApiParam(value = "需求数量", example = "0") + public Double qty; + + @ApiParam("源单行号") + public String srcItem; + + @ApiParam(value = "源单号") + private String srcNo; + + @ApiParam("物料号") + private String partNameRdd; + + @ApiParam("单位") + private String unit; + + @ApiParam(value = "标准包装", example = "1") + private Double snp; +} diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsWaveRuleDetailsRepository.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsWaveRuleDetailsRepository.java new file mode 100644 index 0000000..75e9542 --- /dev/null +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsWaveRuleDetailsRepository.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.pojo.wms.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.wms.bean.WmsWaveRuleDetails; +import org.springframework.stereotype.Repository; + +/** + * @Description : + * @Reference : + * @Author : siliter.yuan + * @CreateDate : 2020-03-25 11:29 + * @Modify: + **/ +@Repository +public interface WmsWaveRuleDetailsRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsWaveRuleRepository.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsWaveRuleRepository.java new file mode 100644 index 0000000..44d5332 --- /dev/null +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsWaveRuleRepository.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.pojo.wms.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.wms.bean.WmsWaveRule; +import org.springframework.stereotype.Repository; + +/** + * @Description : + * @Reference : + * @Author : siliter.yuan + * @CreateDate : 2020-03-25 11:29 + * @Modify: + **/ +@Repository +public interface WmsWaveRuleRepository extends BaseRepository { +}