From 84b297f05f65d25989a4d1193fdc36dc9418ea82 Mon Sep 17 00:00:00 2001 From: qianshijiang <1965297290@qq.com> Date: Thu, 8 Jan 2026 11:43:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E5=8F=91=E8=B4=A7=E8=A7=84=E5=88=99?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/contractorder/api/ContractApi.java | 1 - .../contract/ContractReceiveSendRespDTO.java | 8 +-- .../api/dto/contract/ContractRespDTO.java | 15 ++-- .../api/dto/contract/DetailRespDTO.java | 2 +- .../api/dto/contract/FormulaRespDTO.java | 11 +-- .../ContractReceiveSendPageReqVO.java | 6 +- .../contract/ContractReceiveSendRespVO.java | 8 +-- .../ContractReceiveSendSaveReqVO.java | 6 +- .../ContractReceivingShippingAllowEnum.java | 67 +++++++++++++++++ .../ContractReceivingShippingSymbolEnum.java | 71 +++++++++++++++++++ .../ContractReceivingShippingTypeEnum.java | 70 ++++++++++++++++++ .../ContractReceiveSendDO.java | 6 +- 12 files changed, 241 insertions(+), 30 deletions(-) create mode 100644 zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/enums/contractreceivesend/ContractReceivingShippingAllowEnum.java create mode 100644 zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/enums/contractreceivesend/ContractReceivingShippingSymbolEnum.java create mode 100644 zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/enums/contractreceivesend/ContractReceivingShippingTypeEnum.java diff --git a/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/ContractApi.java b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/ContractApi.java index 4a764ffb..0ed64beb 100644 --- a/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/ContractApi.java +++ b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/ContractApi.java @@ -31,7 +31,6 @@ public interface ContractApi { @Operation(summary = "通过合同编号获取对应的合同信息") ContractRespDTO getContractByPaperNumber(@RequestParam("contractPaperNumber") String contractPaperNumber); - @GetMapping(PREFIX + "/get/by-sys-number") @Operation(summary = "通过合同编号获取对应的合同信息") ContractRespDTO getFormulasBySysNumber(@RequestParam("contractSysNumber") String contractSysNumber); diff --git a/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/dto/contract/ContractReceiveSendRespDTO.java b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/dto/contract/ContractReceiveSendRespDTO.java index 8605c798..ebf299ab 100644 --- a/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/dto/contract/ContractReceiveSendRespDTO.java +++ b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/dto/contract/ContractReceiveSendRespDTO.java @@ -33,16 +33,16 @@ public class ContractReceiveSendRespDTO { @ExcelProperty("元素编码") private String elementNumber; - @Schema(description = "类型", example = "2") + @Schema(description = "类型(字典:CONTRACT_RECEIVING_SHIPPING_TYPE_RULES)", example = "2") @ExcelProperty("类型") private String type; - @Schema(description = "规则") + @Schema(description = "规则(字典:CONTRACT_RECEIVING_SHIPPING_ALLOW_RULES)") @ExcelProperty("规则") private String rule; - @Schema(description = "区间方式") - @ExcelProperty("区间方式") + @Schema(description = "符号(字典:CONTRACT_RECEIVING_SHIPPING_SYMBOL_RULES)") + @ExcelProperty("符号") private String rangeWay; @Schema(description = "区间下限") diff --git a/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/dto/contract/ContractRespDTO.java b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/dto/contract/ContractRespDTO.java index 48d6c169..d51186dc 100644 --- a/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/dto/contract/ContractRespDTO.java +++ b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/dto/contract/ContractRespDTO.java @@ -266,23 +266,24 @@ public class ContractRespDTO { @Schema(description = "乙方税号/社会信用代码") private String salesTaxNumber; - // 物料信息 + @Schema(description = "物料信息") private List detail; - // 合同动态表单 + //@Schema(description = "合同动态表单") // private List dynamicsFields; - // 合同动态条款 + //@Schema(description = "合同动态条款") // private List dynamicsItems; - // 价款结算条款 + @Schema(description = "价款结算条款") private List formulas; - // 参数降级规则 + @Schema(description = "参数降级规则") private List demotes; - // 品位不计价规则 + @Schema(description = "品位不计价规则") private List nots; - //收发货规则 + + @Schema(description = "收发货规则") private List contractReceiveSends; } diff --git a/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/dto/contract/DetailRespDTO.java b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/dto/contract/DetailRespDTO.java index ca0c6d73..f927c5a2 100644 --- a/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/dto/contract/DetailRespDTO.java +++ b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/dto/contract/DetailRespDTO.java @@ -59,6 +59,6 @@ public class DetailRespDTO { @Schema(description = "长度") private String length; - // 交货计划 + @Schema(description = "交货计划") private List plans; } diff --git a/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/dto/contract/FormulaRespDTO.java b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/dto/contract/FormulaRespDTO.java index 87c4faf1..7e7ae3b2 100644 --- a/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/dto/contract/FormulaRespDTO.java +++ b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/dto/contract/FormulaRespDTO.java @@ -45,12 +45,15 @@ public class FormulaRespDTO { @Schema(description = "结算类型,多条使用逗号分隔(字典:PRCH_STLM_TP)") private String settlementType; - // 基础系数配置 + @Schema(description = "基础系数配置") private List coefficients; - // 品位等级价配置 + + @Schema(description = "品位等级价配置") private List grades; - // 调整价配置 + + @Schema(description = "调整价配置") private List deducts; - // 市场价配置 + + @Schema(description = "市场价配置") private List prices; } diff --git a/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/vo/contract/ContractReceiveSendPageReqVO.java b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/vo/contract/ContractReceiveSendPageReqVO.java index 34326db6..d63c0171 100644 --- a/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/vo/contract/ContractReceiveSendPageReqVO.java +++ b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/vo/contract/ContractReceiveSendPageReqVO.java @@ -28,13 +28,13 @@ public class ContractReceiveSendPageReqVO extends PageParam { @Schema(description = "元素编码") private String elementNumber; - @Schema(description = "类型", example = "2") + @Schema(description = "类型(字典:CONTRACT_RECEIVING_SHIPPING_TYPE_RULES)", example = "2") private String type; - @Schema(description = "规则") + @Schema(description = "规则(字典:CONTRACT_RECEIVING_SHIPPING_ALLOW_RULES)") private String rule; - @Schema(description = "区间方式") + @Schema(description = "符号(字典:CONTRACT_RECEIVING_SHIPPING_SYMBOL_RULES)") private String rangeWay; @Schema(description = "区间下限") diff --git a/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/vo/contract/ContractReceiveSendRespVO.java b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/vo/contract/ContractReceiveSendRespVO.java index f9eb9247..2501e159 100644 --- a/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/vo/contract/ContractReceiveSendRespVO.java +++ b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/vo/contract/ContractReceiveSendRespVO.java @@ -36,16 +36,16 @@ public class ContractReceiveSendRespVO { @ExcelProperty("元素编码") private String elementNumber; - @Schema(description = "类型", example = "2") + @Schema(description = "类型(字典:CONTRACT_RECEIVING_SHIPPING_TYPE_RULES)", example = "2") @ExcelProperty("类型") private String type; - @Schema(description = "规则") + @Schema(description = "规则(字典:CONTRACT_RECEIVING_SHIPPING_ALLOW_RULES)") @ExcelProperty("规则") private String rule; - @Schema(description = "区间方式") - @ExcelProperty("区间方式") + @Schema(description = "符号(字典:CONTRACT_RECEIVING_SHIPPING_SYMBOL_RULES)") + @ExcelProperty("符号") private String rangeWay; @Schema(description = "区间下限") diff --git a/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/vo/contract/ContractReceiveSendSaveReqVO.java b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/vo/contract/ContractReceiveSendSaveReqVO.java index 86f6a460..3c97dcf9 100644 --- a/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/vo/contract/ContractReceiveSendSaveReqVO.java +++ b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/api/vo/contract/ContractReceiveSendSaveReqVO.java @@ -25,13 +25,13 @@ public class ContractReceiveSendSaveReqVO { @Schema(description = "元素编码") private String elementNumber; - @Schema(description = "类型", example = "2") + @Schema(description = "类型(字典:CONTRACT_RECEIVING_SHIPPING_TYPE_RULES)", example = "2") private String type; - @Schema(description = "规则") + @Schema(description = "规则(字典:CONTRACT_RECEIVING_SHIPPING_ALLOW_RULES)") private String rule; - @Schema(description = "区间方式") + @Schema(description = "符号(字典:CONTRACT_RECEIVING_SHIPPING_SYMBOL_RULES)") private String rangeWay; @Schema(description = "区间下限") diff --git a/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/enums/contractreceivesend/ContractReceivingShippingAllowEnum.java b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/enums/contractreceivesend/ContractReceivingShippingAllowEnum.java new file mode 100644 index 00000000..d9a8fc8f --- /dev/null +++ b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/enums/contractreceivesend/ContractReceivingShippingAllowEnum.java @@ -0,0 +1,67 @@ +package com.zt.plat.module.contractorder.enums.contractreceivesend; + +import org.apache.commons.lang3.StringUtils; + +/** + * 合同收发货允许规则-是否允许收发货(字典:CONTRACT_RECEIVING_SHIPPING_ALLOW_RULES) + * 枚举(字典:CONTRACT_RECEIVING_SHIPPING_ALLOW_RULES) + * + */ +public enum ContractReceivingShippingAllowEnum { + ALLOW_RECEIVING_AND_SHIPPING("ALLOW_RECEIVING_AND_SHIPPING", "允许收发货"), + NOT_ALLOW_RECEIVING_AND_SHIPPING("NOT_ALLOW_RECEIVING_AND_SHIPPING","不允许收发货"), + ; + + + /** + * 编码 + */ + private String code; + + /** + * 名称 + */ + private String name; + + ContractReceivingShippingAllowEnum(String code, String name){ + this.code = code; + this.name = name; + } + + public String getCode() { + return code; + } + + public String getName() { + return name; + } + + public static ContractReceivingShippingAllowEnum getEnumByCode(String code){ + for (ContractReceivingShippingAllowEnum e : ContractReceivingShippingAllowEnum.values()) { + if (e.getCode().equals(code)) { + return e; + } + } + return ALLOW_RECEIVING_AND_SHIPPING; + } + + public static ContractReceivingShippingAllowEnum getEnumByName(String name){ + if (StringUtils.isEmpty(name)) return ALLOW_RECEIVING_AND_SHIPPING; + for (ContractReceivingShippingAllowEnum e : ContractReceivingShippingAllowEnum.values()) { + if (name.equals(e.getName())) { + return e; + } + } + return ALLOW_RECEIVING_AND_SHIPPING; + } + + public static boolean containsCode(String code) { + for (ContractReceivingShippingAllowEnum e : ContractReceivingShippingAllowEnum.values()) { + if (e.getCode().equals(code)) { + return true; + } + } + return false; + } + +} diff --git a/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/enums/contractreceivesend/ContractReceivingShippingSymbolEnum.java b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/enums/contractreceivesend/ContractReceivingShippingSymbolEnum.java new file mode 100644 index 00000000..9ec84936 --- /dev/null +++ b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/enums/contractreceivesend/ContractReceivingShippingSymbolEnum.java @@ -0,0 +1,71 @@ +package com.zt.plat.module.contractorder.enums.contractreceivesend; + +import org.apache.commons.lang3.StringUtils; + +/** + * 合同收发货符号规则-符号比较类型(字典:CONTRACT_RECEIVING_SHIPPING_SYMBOL_RULES) + * 枚举(字典:CONTRACT_RECEIVING_SHIPPING_SYMBOL_RULES) + * + */ +public enum ContractReceivingShippingSymbolEnum { + LESS_THAN("<", "小于"), + LESS_THAN_OR_EQUAL("<=","小于等于"), + GREATER_THAN(">","大于"), + GREATER_THAN_OR_EQUAL(">=","大于等于"), + EQUAL("=","等于"), + NOT_EQUAL("!=","不等于"), + ; + + + /** + * 编码 + */ + private String code; + + /** + * 名称 + */ + private String name; + + ContractReceivingShippingSymbolEnum(String code, String name){ + this.code = code; + this.name = name; + } + + public String getCode() { + return code; + } + + public String getName() { + return name; + } + + public static ContractReceivingShippingSymbolEnum getEnumByCode(String code){ + for (ContractReceivingShippingSymbolEnum e : ContractReceivingShippingSymbolEnum.values()) { + if (e.getCode().equals(code)) { + return e; + } + } + return LESS_THAN; + } + + public static ContractReceivingShippingSymbolEnum getEnumByName(String name){ + if (StringUtils.isEmpty(name)) return LESS_THAN; + for (ContractReceivingShippingSymbolEnum e : ContractReceivingShippingSymbolEnum.values()) { + if (name.equals(e.getName())) { + return e; + } + } + return LESS_THAN; + } + + public static boolean containsCode(String code) { + for (ContractReceivingShippingSymbolEnum e : ContractReceivingShippingSymbolEnum.values()) { + if (e.getCode().equals(code)) { + return true; + } + } + return false; + } + +} diff --git a/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/enums/contractreceivesend/ContractReceivingShippingTypeEnum.java b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/enums/contractreceivesend/ContractReceivingShippingTypeEnum.java new file mode 100644 index 00000000..42e73576 --- /dev/null +++ b/zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/enums/contractreceivesend/ContractReceivingShippingTypeEnum.java @@ -0,0 +1,70 @@ +package com.zt.plat.module.contractorder.enums.contractreceivesend; + +import org.apache.commons.lang3.StringUtils; + +/** + * 合同收发货类型规则-类型(字典:CONTRACT_RECEIVING_SHIPPING_TYPE_RULES) + * 枚举(字典:CONTRACT_RECEIVING_SHIPPING_TYPE_RULES) + * + */ +public enum ContractReceivingShippingTypeEnum { + GRADE("GRADE", "品位"), + METALLICITY_QUANTITY("METALLICITY_QUANTITY","金属量"), + NET_WEIGHT("NET_WEIGHT","净重"), + WET_WEIGHT("WET_WEIGHT","湿重"), + DTY_WEIGHT("DTY_WEIGHT","干重") + ; + + + /** + * 编码 + */ + private String code; + + /** + * 名称 + */ + private String name; + + ContractReceivingShippingTypeEnum(String code, String name){ + this.code = code; + this.name = name; + } + + public String getCode() { + return code; + } + + public String getName() { + return name; + } + + public static ContractReceivingShippingTypeEnum getEnumByCode(String code){ + for (ContractReceivingShippingTypeEnum e : ContractReceivingShippingTypeEnum.values()) { + if (e.getCode().equals(code)) { + return e; + } + } + return GRADE; + } + + public static ContractReceivingShippingTypeEnum getEnumByName(String name){ + if (StringUtils.isEmpty(name)) return GRADE; + for (ContractReceivingShippingTypeEnum e : ContractReceivingShippingTypeEnum.values()) { + if (name.equals(e.getName())) { + return e; + } + } + return GRADE; + } + + public static boolean containsCode(String code) { + for (ContractReceivingShippingTypeEnum e : ContractReceivingShippingTypeEnum.values()) { + if (e.getCode().equals(code)) { + return true; + } + } + return false; + } + +} diff --git a/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/dal/dataobject/contractreceivesend/ContractReceiveSendDO.java b/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/dal/dataobject/contractreceivesend/ContractReceiveSendDO.java index 2880b856..d6a95129 100644 --- a/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/dal/dataobject/contractreceivesend/ContractReceiveSendDO.java +++ b/zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/dal/dataobject/contractreceivesend/ContractReceiveSendDO.java @@ -55,17 +55,17 @@ public class ContractReceiveSendDO extends BusinessBaseDO { @TableField("ELEM_NUM") private String elementNumber; /** - * 类型 + * 类型(字典:CONTRACT_RECEIVING_SHIPPING_TYPE_RULES) */ @TableField("TP") private String type; /** - * 规则 + * 规则(字典:CONTRACT_RECEIVING_SHIPPING_ALLOW_RULES) */ @TableField("RUL") private String rule; /** - * 区间方式 + * 符号(字典:CONTRACT_RECEIVING_SHIPPING_SYMBOL_RULES) */ @TableField("RNG_WY") private String rangeWay;