新增合同收发货规则
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
package com.zt.plat.module.contractorder.api.dto.contract;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 收发货规则 Response VO")
|
||||
@Data
|
||||
public class ContractReceiveSendRespDTO {
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26349")
|
||||
@ExcelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "物料名称", example = "ZT")
|
||||
@ExcelProperty("物料名称")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
@ExcelProperty("物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "元素缩写")
|
||||
@ExcelProperty("元素缩写")
|
||||
private String elementAbbreviation;
|
||||
|
||||
@Schema(description = "元素名称", example = "张三")
|
||||
@ExcelProperty("元素名称")
|
||||
private String elementName;
|
||||
|
||||
@Schema(description = "元素编码")
|
||||
@ExcelProperty("元素编码")
|
||||
private String elementNumber;
|
||||
|
||||
@Schema(description = "类型", example = "2")
|
||||
@ExcelProperty("类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "规则")
|
||||
@ExcelProperty("规则")
|
||||
private String rule;
|
||||
|
||||
@Schema(description = "区间方式")
|
||||
@ExcelProperty("区间方式")
|
||||
private String rangeWay;
|
||||
|
||||
@Schema(description = "区间下限")
|
||||
@ExcelProperty("区间下限")
|
||||
private String gradeDown;
|
||||
|
||||
@Schema(description = "区间上限")
|
||||
@ExcelProperty("区间上限")
|
||||
private String gradeUp;
|
||||
|
||||
@Schema(description = "合同id", example = "22162")
|
||||
@ExcelProperty("合同id")
|
||||
private Long contractId;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
@@ -283,4 +283,6 @@ public class ContractRespDTO {
|
||||
|
||||
// 品位不计价规则
|
||||
private List<NotRespDTO> nots;
|
||||
//收发货规则
|
||||
private List<ContractReceiveSendRespDTO> contractReceiveSends;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.zt.plat.module.contractorder.api.vo.contract;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 收发货规则分页 Request VO")
|
||||
@Data
|
||||
public class ContractReceiveSendPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "物料名称", example = "ZT")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "元素缩写")
|
||||
private String elementAbbreviation;
|
||||
|
||||
@Schema(description = "元素名称", example = "张三")
|
||||
private String elementName;
|
||||
|
||||
@Schema(description = "元素编码")
|
||||
private String elementNumber;
|
||||
|
||||
@Schema(description = "类型", example = "2")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "规则")
|
||||
private String rule;
|
||||
|
||||
@Schema(description = "区间方式")
|
||||
private String rangeWay;
|
||||
|
||||
@Schema(description = "区间下限")
|
||||
private String gradeDown;
|
||||
|
||||
@Schema(description = "区间上限")
|
||||
private String gradeUp;
|
||||
|
||||
@Schema(description = "合同id", example = "22162")
|
||||
private Long contractId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.zt.plat.module.contractorder.api.vo.contract;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 收发货规则 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ContractReceiveSendRespVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26349")
|
||||
@ExcelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "物料名称", example = "ZT")
|
||||
@ExcelProperty("物料名称")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
@ExcelProperty("物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "元素缩写")
|
||||
@ExcelProperty("元素缩写")
|
||||
private String elementAbbreviation;
|
||||
|
||||
@Schema(description = "元素名称", example = "张三")
|
||||
@ExcelProperty("元素名称")
|
||||
private String elementName;
|
||||
|
||||
@Schema(description = "元素编码")
|
||||
@ExcelProperty("元素编码")
|
||||
private String elementNumber;
|
||||
|
||||
@Schema(description = "类型", example = "2")
|
||||
@ExcelProperty("类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "规则")
|
||||
@ExcelProperty("规则")
|
||||
private String rule;
|
||||
|
||||
@Schema(description = "区间方式")
|
||||
@ExcelProperty("区间方式")
|
||||
private String rangeWay;
|
||||
|
||||
@Schema(description = "区间下限")
|
||||
@ExcelProperty("区间下限")
|
||||
private String gradeDown;
|
||||
|
||||
@Schema(description = "区间上限")
|
||||
@ExcelProperty("区间上限")
|
||||
private String gradeUp;
|
||||
|
||||
@Schema(description = "合同id", example = "22162")
|
||||
@ExcelProperty("合同id")
|
||||
private Long contractId;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.zt.plat.module.contractorder.api.vo.contract;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 收发货规则新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContractReceiveSendSaveReqVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26349")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "物料名称", example = "ZT")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "元素缩写")
|
||||
private String elementAbbreviation;
|
||||
|
||||
@Schema(description = "元素名称", example = "张三")
|
||||
private String elementName;
|
||||
|
||||
@Schema(description = "元素编码")
|
||||
private String elementNumber;
|
||||
|
||||
@Schema(description = "类型", example = "2")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "规则")
|
||||
private String rule;
|
||||
|
||||
@Schema(description = "区间方式")
|
||||
private String rangeWay;
|
||||
|
||||
@Schema(description = "区间下限")
|
||||
private String gradeDown;
|
||||
|
||||
@Schema(description = "区间上限")
|
||||
private String gradeUp;
|
||||
|
||||
@Schema(description = "合同id", example = "22162")
|
||||
private Long contractId;
|
||||
|
||||
}
|
||||
@@ -272,6 +272,9 @@ public class ContractRespVO {
|
||||
@Schema(description = "乙方税号/社会信用代码")
|
||||
private String salesTaxNumber;
|
||||
|
||||
@Schema(description = "是否信用", example = "1")
|
||||
private String hasCredit;
|
||||
|
||||
// 物料信息
|
||||
private List<DetailRespVO> detail;
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@@ -241,6 +242,10 @@ public class ContractSaveReqVO {
|
||||
|
||||
@Schema(description = "乙方税号/社会信用代码")
|
||||
private String salesTaxNumber;
|
||||
@Schema(description = "是否信用", example = "1")
|
||||
private String hasCredit;
|
||||
// 收发货规则
|
||||
private List<ContractReceiveSendSaveReqVO> contractReceiveSends;
|
||||
|
||||
// 物料信息
|
||||
private List<DetailSaveReqVO> detail;
|
||||
|
||||
@@ -32,4 +32,7 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode CONTRACT_PARTNER_NOT_EXISTS = new ErrorCode(1_027_000_017, "客商信息不存在");
|
||||
ErrorCode CONTRACT_PUSH_FAIL = new ErrorCode(1_027_000_019, "推送合同失败:{}");
|
||||
ErrorCode CONTRACT_STATUS_NOT_CANCEL = new ErrorCode(1_027_000_020, "{}状态合同不允许作废");
|
||||
|
||||
ErrorCode CONTRACT_RECEIVE_SEND_NOT_EXISTS = new ErrorCode(1_027_000_021, "收发货规则不存在");
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user