收发货规则修改

This commit is contained in:
qianshijiang
2026-01-08 11:43:58 +08:00
parent dde9805c05
commit 84b297f05f
12 changed files with 241 additions and 30 deletions

View File

@@ -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);

View File

@@ -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 = "区间下限")

View File

@@ -266,23 +266,24 @@ public class ContractRespDTO {
@Schema(description = "乙方税号/社会信用代码")
private String salesTaxNumber;
// 物料信息
@Schema(description = "物料信息")
private List<DetailRespDTO> detail;
// 合同动态表单
//@Schema(description = "合同动态表单")
// private List<TemplateInstanceDataRespDTO> dynamicsFields;
// 合同动态条款
//@Schema(description = "合同动态条款")
// private List<TemplateInstanceItemRespDTO> dynamicsItems;
// 价款结算条款
@Schema(description = "价款结算条款")
private List<FormulaRespDTO> formulas;
// 参数降级规则
@Schema(description = "参数降级规则")
private List<DemoteRespDTO> demotes;
// 品位不计价规则
@Schema(description = "品位不计价规则")
private List<NotRespDTO> nots;
//收发货规则
@Schema(description = "收发货规则")
private List<ContractReceiveSendRespDTO> contractReceiveSends;
}

View File

@@ -59,6 +59,6 @@ public class DetailRespDTO {
@Schema(description = "长度")
private String length;
// 交货计划
@Schema(description = "交货计划")
private List<PlanRespDTO> plans;
}

View File

@@ -45,12 +45,15 @@ public class FormulaRespDTO {
@Schema(description = "结算类型多条使用逗号分隔字典PRCH_STLM_TP")
private String settlementType;
// 基础系数配置
@Schema(description = "基础系数配置")
private List<CoefficientRespDTO> coefficients;
// 品位等级价配置
@Schema(description = "品位等级价配置")
private List<GradeRespDTO> grades;
// 调整价配置
@Schema(description = "调整价配置")
private List<DeductRespDTO> deducts;
// 市场价配置
@Schema(description = "市场价配置")
private List<PriceRespDTO> prices;
}

View File

@@ -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 = "区间下限")

View File

@@ -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 = "区间下限")

View File

@@ -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 = "区间下限")

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;