合同编制保存
This commit is contained in:
@@ -126,6 +126,12 @@
|
||||
<artifactId>zt-spring-boot-starter-biz-business</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-base-server</artifactId>
|
||||
<version>3.0.35</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.contract.vo.preparaton;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 基础系数配置新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContractCoefficientSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31657")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "配置主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "6534")
|
||||
@NotNull(message = "配置主键不能为空")
|
||||
private Long parameterId;
|
||||
|
||||
@Schema(description = "条款主键", example = "29652")
|
||||
private Long formulaId;
|
||||
|
||||
@Schema(description = "金属元素编码")
|
||||
private String elementNumber;
|
||||
|
||||
@Schema(description = "金属元素缩写")
|
||||
private String elementAbbreviation;
|
||||
|
||||
@Schema(description = "金属元素名称", example = "芋艿")
|
||||
private String elementName;
|
||||
|
||||
@Schema(description = "系数值")
|
||||
private String settlementCoefficient;
|
||||
|
||||
@Schema(description = "系数上限")
|
||||
private BigDecimal coefficientUp;
|
||||
|
||||
@Schema(description = "系数下限")
|
||||
private BigDecimal coefficientDown;
|
||||
|
||||
@Schema(description = "是否包含上限")
|
||||
private String isInUp;
|
||||
|
||||
@Schema(description = "是否包含下限")
|
||||
private String isInDown;
|
||||
|
||||
@Schema(description = "是否省内", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "是否省内不能为空")
|
||||
private String inState;
|
||||
|
||||
@Schema(description = "类型", example = "1")
|
||||
private String type;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.contract.vo.preparaton;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 调整价配置新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContractDeductSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "25312")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "配置主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "21114")
|
||||
@NotNull(message = "配置主键不能为空")
|
||||
private Long parameterId;
|
||||
|
||||
@Schema(description = "条款主键", example = "29909")
|
||||
private Long formulaId;
|
||||
|
||||
@Schema(description = "物料编码;推送ERP")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "物料名称", example = "张三")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "上限", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "上限不能为空")
|
||||
private BigDecimal gradeUp;
|
||||
|
||||
@Schema(description = "下限")
|
||||
private BigDecimal gradeDown;
|
||||
|
||||
@Schema(description = "是否包含上限")
|
||||
private String isInUp;
|
||||
|
||||
@Schema(description = "是否包含下限")
|
||||
private String isInDown;
|
||||
|
||||
@Schema(description = "方式")
|
||||
private String way;
|
||||
|
||||
@Schema(description = "类型", example = "1")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "是否省内", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "是否省内不能为空")
|
||||
private String inState;
|
||||
|
||||
@Schema(description = "调整价")
|
||||
private BigDecimal gradeAmount;
|
||||
}
|
||||
@@ -10,36 +10,36 @@ import java.util.List;
|
||||
@Data
|
||||
public class ContractDetailSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "32609")
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "合同主信息主键", example = "13595")
|
||||
private Long contractMainId;
|
||||
|
||||
@Schema(description = "物料名称", example = "张三")
|
||||
@Schema(description = "物料名称", example = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
@Schema(description = "物料编码", example = "物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@Schema(description = "计量单位")
|
||||
@Schema(description = "计量单位", example = "吨")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "含税单价", example = "28579")
|
||||
private BigDecimal inTaxUnitPrice;
|
||||
|
||||
@Schema(description = "金属元素缩写")
|
||||
@Schema(description = "金属元素缩写", example = "金属元素缩写")
|
||||
private String elementAbbreviation;
|
||||
|
||||
@Schema(description = "金属元素名称", example = "赵六")
|
||||
@Schema(description = "金属元素名称", example = "金属元素名称")
|
||||
private String elementName;
|
||||
|
||||
@Schema(description = "金属元素编码")
|
||||
@Schema(description = "金属元素编码", example = "金属元素编码")
|
||||
private String elementNumber;
|
||||
|
||||
// 交货计划
|
||||
private List<ContractPlanSaveReqVO> plans;
|
||||
|
||||
// 价款结算条款
|
||||
private List<ContractFormulaSaveReqVO> formulas;
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.contract.vo.preparaton;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 价款结算条款新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContractFormulaSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "28539")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "合同明细主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "8181")
|
||||
@NotNull(message = "合同明细主键不能为空")
|
||||
private Long contractDetailId;
|
||||
|
||||
@Schema(description = "公式类型;单价/总价/水扣款/加工费", example = "UNIT_PRICE")
|
||||
private String formulaType;
|
||||
|
||||
@Schema(description = "公式")
|
||||
private String formulaCalculate;
|
||||
|
||||
@Schema(description = "编码公式")
|
||||
private String numberFormula;
|
||||
|
||||
@Schema(description = "物料名称", example = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "计算小数位")
|
||||
private Long decimal;
|
||||
|
||||
@Schema(description = "金属元素编码")
|
||||
private String elementNumber;
|
||||
|
||||
@Schema(description = "金属元素缩写")
|
||||
private String elementAbbreviation;
|
||||
|
||||
@Schema(description = "金属元素名称", example = "金属元素名称")
|
||||
private String elementName;
|
||||
|
||||
// 基础系数配置
|
||||
private List<ContractCoefficientSaveReqVO> coefficients;
|
||||
// 品位等级价配置
|
||||
private List<ContractGradeSaveReqVO> grades;
|
||||
// 调整价配置
|
||||
private List<ContractDeductSaveReqVO> deducts;
|
||||
// 市场价配置
|
||||
private List<ContractPriceSaveReqVO> prices;
|
||||
// 品位不计价配置
|
||||
private List<ContractNotSaveReqVO> nots;
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.contract.vo.preparaton;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 品位等级价配置新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContractGradeSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "15414")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "配置主键", example = "16734")
|
||||
private Long parameterId;
|
||||
|
||||
@Schema(description = "条款主键", example = "15344")
|
||||
private Long formulaId;
|
||||
|
||||
@Schema(description = "金属元素编码")
|
||||
private String elementNumber;
|
||||
|
||||
@Schema(description = "金属元素缩写")
|
||||
private String elementAbbreviation;
|
||||
|
||||
@Schema(description = "金属元素名称", example = "芋艿")
|
||||
private String elementName;
|
||||
|
||||
@Schema(description = "品位单位")
|
||||
private String gradeUnit;
|
||||
|
||||
@Schema(description = "品位上限")
|
||||
private BigDecimal gradeUp;
|
||||
|
||||
@Schema(description = "品位下限")
|
||||
private BigDecimal gradeDown;
|
||||
|
||||
@Schema(description = "是否包含上限;包含则是大于等于,不包含则是大于")
|
||||
private String isInUp;
|
||||
|
||||
@Schema(description = "是否包含下限;包含则是小于等于,不包含则是小于")
|
||||
private String isInDown;
|
||||
|
||||
@Schema(description = "默认计价品位;计价方式为加时,默认为为下限,计价方式为减时,默认为为上限,可手动填写")
|
||||
private BigDecimal gradeDefault;
|
||||
|
||||
@Schema(description = "系数;计价类型为阶梯价使用,标识没上升多少系数进行加款还是减款")
|
||||
private BigDecimal settlementCoefficient;
|
||||
|
||||
@Schema(description = "不足系数值按比例计算")
|
||||
private String useCoefficient;
|
||||
|
||||
@Schema(description = "计价类型", example = "2")
|
||||
private String priceType;
|
||||
|
||||
@Schema(description = "是否省内", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "是否省内不能为空")
|
||||
private String inState;
|
||||
|
||||
@Schema(description = "等级单价", example = "26237")
|
||||
private BigDecimal unitPrice;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.contract.vo.preparaton;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 品位不计价配置新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContractNotSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "21132")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "配置主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "3781")
|
||||
@NotNull(message = "配置主键不能为空")
|
||||
private Long parameterId;
|
||||
|
||||
@Schema(description = "条款主键", example = "5722")
|
||||
private Long formulaId;
|
||||
|
||||
@Schema(description = "金属元素编码")
|
||||
private String elementNumber;
|
||||
|
||||
@Schema(description = "金属元素缩写")
|
||||
private String elementAbbreviation;
|
||||
|
||||
@Schema(description = "金属元素名称", example = "张三")
|
||||
private String elementName;
|
||||
|
||||
@Schema(description = "上限", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "上限不能为空")
|
||||
private BigDecimal gradeUp;
|
||||
|
||||
@Schema(description = "下限")
|
||||
private BigDecimal gradeDown;
|
||||
|
||||
@Schema(description = "是否包含上限")
|
||||
private String isInUp;
|
||||
|
||||
@Schema(description = "是否包含下限")
|
||||
private String isInDown;
|
||||
|
||||
@Schema(description = "是否省内", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "是否省内不能为空")
|
||||
private String inState;
|
||||
}
|
||||
@@ -4,30 +4,26 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 交货计划条款新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContractPlanSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "27474")
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "合同明细主键", example = "32763")
|
||||
private Long contractDetailId;
|
||||
|
||||
@Schema(description = "交货年份", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "交货年份", example = "2025")
|
||||
private Long contractDeliveryYear;
|
||||
|
||||
@Schema(description = "交货月份")
|
||||
@Schema(description = "交货月份", example = "9")
|
||||
private Long contractPlanDeliveryMonth;
|
||||
|
||||
@Schema(description = "计划交货数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "计划交货数量")
|
||||
private BigDecimal contractPlanDeliveryQuantity;
|
||||
|
||||
@Schema(description = "交货开始日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime contractDeliveryStartDate;
|
||||
@Schema(description = "交货开始日期")
|
||||
private String contractDeliveryStartDate;
|
||||
|
||||
@Schema(description = "交货结束日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime contractDeliveryEndDate;
|
||||
@Schema(description = "交货结束日期")
|
||||
private String contractDeliveryEndDate;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.contract.vo.preparaton;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 市场价配置新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContractPriceSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "13654")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "配置主键", example = "1590")
|
||||
private Long parameterId;
|
||||
|
||||
@Schema(description = "条款主键", example = "24677")
|
||||
private Long formulaId;
|
||||
|
||||
@Schema(description = "市场价")
|
||||
private BigDecimal value;
|
||||
|
||||
@Schema(description = "计算方式;均价/高位价/地位价")
|
||||
private String calculateWay;
|
||||
|
||||
@Schema(description = "数据来源网价代码;数据字典")
|
||||
private String dataOrigin;
|
||||
|
||||
@Schema(description = "计价开始日期")
|
||||
private LocalDateTime calculateStartDate;
|
||||
|
||||
@Schema(description = "计价截止日期")
|
||||
private LocalDateTime calculateEndDate;
|
||||
|
||||
@Schema(description = "包含开始日期")
|
||||
private String inStartDate;
|
||||
|
||||
@Schema(description = "包含结束日期")
|
||||
private String inEndDate;
|
||||
|
||||
@Schema(description = "价格品种元素的明细分类")
|
||||
private String priceGrade;
|
||||
|
||||
@Schema(description = "品种分类", example = "1")
|
||||
private String gradeType;
|
||||
|
||||
@Schema(description = "取价方式;区间价/固定价", example = "2")
|
||||
private String averageType;
|
||||
|
||||
@Schema(description = "网价小数位")
|
||||
private BigDecimal decimal;
|
||||
}
|
||||
@@ -167,7 +167,7 @@ public class ContractRespVO {
|
||||
|
||||
@Schema(description = "代理方;与ERP(ZLIFNR)对应,拓展信息")
|
||||
@ExcelProperty("代理方;与ERP(ZLIFNR)对应,拓展信息")
|
||||
private String zlifnr;
|
||||
private String agent;
|
||||
|
||||
@Schema(description = "类别;与ERP(HTLB)对应,拓展信息")
|
||||
@ExcelProperty("类别;与ERP(HTLB)对应,拓展信息")
|
||||
@@ -195,7 +195,7 @@ public class ContractRespVO {
|
||||
|
||||
@Schema(description = "境内/境外;与ERP(JNJW)对应,拓展信息")
|
||||
@ExcelProperty("境内/境外;与ERP(JNJW)对应,拓展信息")
|
||||
private String jnjw;
|
||||
private String isDomestic;
|
||||
|
||||
@Schema(description = "建筑服务发生地;与ERP(JZFWFSD)对应,拓展信息,销售合同,且类型为SAP02COSR必填")
|
||||
@ExcelProperty("建筑服务发生地;与ERP(JZFWFSD)对应,拓展信息,销售合同,且类型为SAP02COSR必填")
|
||||
|
||||
@@ -1,21 +1,16 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.contract.vo.preparaton;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TemplateInstanceDataSaveReqVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.TIME_ZONE_DEFAULT;
|
||||
|
||||
@Schema(description = "管理后台 - 合同信息新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContractSaveReqVO {
|
||||
@@ -30,45 +25,45 @@ public class ContractSaveReqVO {
|
||||
private Integer step;
|
||||
|
||||
// 合同基本信息
|
||||
@Schema(description = "甲方公司编号;如果是采购合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是销售合同,手动选择,且与ERP(WLDWBH)对应。")
|
||||
@Schema(description = "甲方公司编号;如果是采购合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是销售合同,手动选择,且与ERP(WLDWBH)对应。", example = "甲方公司编号")
|
||||
@ExcelProperty("甲方公司编号;如果是采购合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是销售合同,手动选择,且与ERP(WLDWBH)对应。")
|
||||
private String purchaseCompanyNumber;
|
||||
|
||||
@Schema(description = "甲方公司名称", example = "王五")
|
||||
@Schema(description = "甲方公司名称", example = "甲方公司名称")
|
||||
@ExcelProperty("甲方公司名称")
|
||||
private String purchaseCompanyName;
|
||||
|
||||
@Schema(description = "甲方地址")
|
||||
@Schema(description = "甲方地址", example = "甲方地址")
|
||||
@ExcelProperty("甲方地址")
|
||||
private String purchaseAddress;
|
||||
|
||||
@Schema(description = "甲方法定代表人")
|
||||
@Schema(description = "甲方法定代表人", example = "甲方法定代表人")
|
||||
@ExcelProperty("甲方法定代表人")
|
||||
private String purchaseLeader;
|
||||
|
||||
@Schema(description = "乙方公司编号;如果是销售合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是采购合同,手动选择,且与ERP(WLDWBH)对应。")
|
||||
@Schema(description = "乙方公司编号;如果是销售合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是采购合同,手动选择,且与ERP(WLDWBH)对应。", example = "乙方公司编号")
|
||||
@ExcelProperty("乙方公司编号;如果是销售合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是采购合同,手动选择,且与ERP(WLDWBH)对应。")
|
||||
private String salesCompanyNumber;
|
||||
|
||||
@Schema(description = "乙方公司名称", example = "王五")
|
||||
@Schema(description = "乙方公司名称", example = "乙方公司名称")
|
||||
@ExcelProperty("乙方公司名称")
|
||||
private String salesCompanyName;
|
||||
|
||||
@Schema(description = "乙方地址")
|
||||
@Schema(description = "乙方地址", example = "乙方地址")
|
||||
@ExcelProperty("乙方地址")
|
||||
private String salesAddress;
|
||||
|
||||
@Schema(description = "乙方企业负责人")
|
||||
@Schema(description = "乙方企业负责人", example = "乙方企业负责人")
|
||||
@ExcelProperty("乙方企业负责人")
|
||||
private String salesPurchaseLeader;
|
||||
|
||||
@NotBlank(message = "合同名称不能为空")
|
||||
@Size(max = 90, message = "合同名称长度不能超过90个字符")
|
||||
@Schema(description = "合同名称;与ERP(HTMC)对应,校验唯一", example = "芋艿")
|
||||
@Schema(description = "合同名称;与ERP(HTMC)对应,校验唯一", example = "合同名称")
|
||||
@ExcelProperty("合同名称;与ERP(HTMC)对应,校验唯一")
|
||||
private String contractName;
|
||||
|
||||
@Schema(description = "合同编号;与ERP(HTBH)对应,校验唯一")
|
||||
@Schema(description = "合同编号;与ERP(HTBH)对应,校验唯一", example = "合同编号")
|
||||
@ExcelProperty("合同编号;与ERP(HTBH)对应,校验唯一")
|
||||
private String contractPaperNumber;
|
||||
|
||||
@@ -77,34 +72,28 @@ public class ContractSaveReqVO {
|
||||
@ExcelProperty("合同类型")
|
||||
private String contractType;
|
||||
|
||||
@Schema(description = "收支性质;与ERP(SZXZ)对应")
|
||||
@Schema(description = "收支性质;与ERP(SZXZ)对应", example = "EXPENSES")
|
||||
@ExcelProperty("收支性质;与ERP(SZXZ)对应")
|
||||
private String direction;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@JsonFormat(timezone = TIME_ZONE_DEFAULT, pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@Schema(description = "签署日期;与ERP(HTQDRQ)对应")
|
||||
@ExcelProperty("签署日期;与ERP(HTQDRQ)对应")
|
||||
private LocalDateTime signDate;
|
||||
private String signDate;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@JsonFormat(timezone = TIME_ZONE_DEFAULT, pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@Schema(description = "开始日期;与ERP(HTQSRQ)对应")
|
||||
@ExcelProperty("开始日期;与ERP(HTQSRQ)对应")
|
||||
private LocalDateTime startDate;
|
||||
private String startDate;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@JsonFormat(timezone = TIME_ZONE_DEFAULT, pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@Schema(description = "结束日期;与ERP(HTZZRQ)对应")
|
||||
@ExcelProperty("结束日期;与ERP(HTZZRQ)对应")
|
||||
private LocalDateTime endDate;
|
||||
private String endDate;
|
||||
|
||||
@Schema(description = "签署地")
|
||||
@Schema(description = "签署地", example = "签署地")
|
||||
@ExcelProperty("签署地")
|
||||
private String signPlace;
|
||||
|
||||
// 金额信息
|
||||
@Schema(description = "币种;与ERP(BZBH)对应")
|
||||
@Schema(description = "币种;与ERP(BZBH)对应", example = "CNY")
|
||||
@ExcelProperty("币种;与ERP(BZBH)对应")
|
||||
private String currency;
|
||||
|
||||
@@ -116,7 +105,7 @@ public class ContractSaveReqVO {
|
||||
@ExcelProperty("原币金额;与ERP(HTYBZJE)对应,币种不是人民币时,显示并手动填写,如果是人民币,隐藏且等于本币金额")
|
||||
private BigDecimal cooAmount;
|
||||
|
||||
@Schema(description = "是否有履约保证金;为是,则保证金必填。")
|
||||
@Schema(description = "是否有履约保证金;为是,则保证金必填。", example = "1")
|
||||
@ExcelProperty("是否有履约保证金;为是,则保证金必填。")
|
||||
private String hasDeposit;
|
||||
|
||||
@@ -128,7 +117,7 @@ public class ContractSaveReqVO {
|
||||
@ExcelProperty("本币履约保证金-变更后;与ERP(LYBZJBGHBWB)对应,拓展信息")
|
||||
private BigDecimal changeBasicAmountDeposit;
|
||||
|
||||
@Schema(description = "是否有预付款;与ERP(SFYYFK)对应")
|
||||
@Schema(description = "是否有预付款;与ERP(SFYYFK)对应", example = "1")
|
||||
@ExcelProperty("是否有预付款;与ERP(SFYYFK)对应")
|
||||
private String hasPrepayment;
|
||||
|
||||
@@ -140,7 +129,7 @@ public class ContractSaveReqVO {
|
||||
@ExcelProperty("预付款金额;与ERP(YFKJE)对应")
|
||||
private BigDecimal prepaymentAmount;
|
||||
|
||||
@Schema(description = "是否有质保金;与ERP(SFHZBJ)对应")
|
||||
@Schema(description = "是否有质保金;与ERP(SFHZBJ)对应", example = "1")
|
||||
@ExcelProperty("是否有质保金;与ERP(SFHZBJ)对应")
|
||||
private String hasQualityAmount;
|
||||
|
||||
@@ -152,11 +141,11 @@ public class ContractSaveReqVO {
|
||||
@ExcelProperty("质保金金额;与ERP(BZJJE)对应")
|
||||
private BigDecimal qualityAmount;
|
||||
|
||||
@Schema(description = "是否先款后货")
|
||||
@Schema(description = "是否先款后货", example = "1")
|
||||
@ExcelProperty("是否先款后货")
|
||||
private String hasPayable;
|
||||
|
||||
@Schema(description = "备注;与ERP(BZXX)对应")
|
||||
@Schema(description = "备注;与ERP(BZXX)对应", example = "备注")
|
||||
@ExcelProperty("备注;与ERP(BZXX)对应")
|
||||
private String remark;
|
||||
|
||||
@@ -180,51 +169,51 @@ public class ContractSaveReqVO {
|
||||
@ExcelProperty("本币履约保证金;与ERP(LYBZJBGQBWB)对应")
|
||||
private BigDecimal basicAmountDeposit;
|
||||
|
||||
@Schema(description = "是否框架合同;与ERP(SFKJHT)对应,拓展信息")
|
||||
@Schema(description = "是否框架合同;与ERP(SFKJHT)对应,拓展信息", example = "1")
|
||||
@ExcelProperty("是否框架合同;与ERP(SFKJHT)对应,拓展信息")
|
||||
private String isFramework;
|
||||
|
||||
@Schema(description = "境内/境外;与ERP(JNJW)对应,拓展信息")
|
||||
@Schema(description = "境内/境外;与ERP(JNJW)对应,拓展信息", example = "DOMESTIC")
|
||||
@ExcelProperty("境内/境外;与ERP(JNJW)对应,拓展信息")
|
||||
private String jnjw;
|
||||
private String isDomestic;
|
||||
|
||||
@Schema(description = "施工类型编号;与ERP(HTLXBH)对应,拓展信息")
|
||||
@Schema(description = "施工类型编号;与ERP(HTLXBH)对应,拓展信息", example = "施工类型编号")
|
||||
@ExcelProperty("施工类型编号;与ERP(HTLXBH)对应,拓展信息")
|
||||
private String constructionTypeNumber;
|
||||
|
||||
@Schema(description = "施工类型名称;与ERP(HTLXMC)对应,拓展信息", example = "张三")
|
||||
@Schema(description = "施工类型名称;与ERP(HTLXMC)对应,拓展信息", example = "施工类型名称")
|
||||
@ExcelProperty("施工类型名称;与ERP(HTLXMC)对应,拓展信息")
|
||||
private String constructionTypeName;
|
||||
|
||||
@Schema(description = "代理方;与ERP(ZLIFNR)对应,拓展信息")
|
||||
@Schema(description = "代理方;与ERP(ZLIFNR)对应,拓展信息", example = "代理方")
|
||||
@ExcelProperty("代理方;与ERP(ZLIFNR)对应,拓展信息")
|
||||
private String zlifnr;
|
||||
private String agent;
|
||||
|
||||
@Schema(description = "类别;与ERP(HTLB)对应,拓展信息")
|
||||
@Schema(description = "类别;与ERP(HTLB)对应,拓展信息", example = "PROCESSING")
|
||||
@ExcelProperty("类别;与ERP(HTLB)对应,拓展信息")
|
||||
private String category;
|
||||
|
||||
// 模板部分查询
|
||||
@Schema(description = "模板实例主键", example = "10196")
|
||||
@ExcelProperty("模板实例主键")
|
||||
private Long instanceId;
|
||||
// 合同动态表单
|
||||
// 合同动态条款
|
||||
|
||||
// TODO 未确认字段
|
||||
@Schema(description = "是否虚拟合同;与ERP(SFXNHT)对应")
|
||||
@Schema(description = "是否虚拟合同;与ERP(SFXNHT)对应", example = "1")
|
||||
@ExcelProperty("是否虚拟合同;与ERP(SFXNHT)对应")
|
||||
private String contractVirtual;
|
||||
|
||||
@Schema(description = "补充协议类型;变更协议/增加条款", example = "1")
|
||||
@Schema(description = "补充协议类型;变更协议/增加条款", example = "补充协议类型")
|
||||
@ExcelProperty("补充协议类型;变更协议/增加条款")
|
||||
private String replenishAgreementType;
|
||||
|
||||
@Schema(description = "建筑服务发生地;与ERP(JZFWFSD)对应,拓展信息,销售合同,且类型为SAP02COSR必填")
|
||||
@Schema(description = "建筑服务发生地;与ERP(JZFWFSD)对应,拓展信息,销售合同,且类型为SAP02COSR必填", example = "建筑服务发生地")
|
||||
@ExcelProperty("建筑服务发生地;与ERP(JZFWFSD)对应,拓展信息,销售合同,且类型为SAP02COSR必填")
|
||||
private String architectureServicePlace;
|
||||
|
||||
@Schema(description = "达到收款条件金额;与ERP(DDSKJE)对应,拓展信息,销售合同,且类型为SAP02COSR必填")
|
||||
@ExcelProperty("达到收款条件金额;与ERP(DDSKJE)对应,拓展信息,销售合同,且类型为SAP02COSR必填")
|
||||
private BigDecimal payeeConditionAmount;
|
||||
|
||||
// 模板部分查询
|
||||
@Schema(description = "模板实例主键", example = "10196")
|
||||
@ExcelProperty("模板实例主键")
|
||||
private Long instanceId;
|
||||
|
||||
// 合同动态表单
|
||||
private List<TemplateInstanceDataSaveReqVO> dynamicsFields;
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.zt.plat.module.contractorder.dal.dataobject.contract;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 基础系数配置 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("bse_ctrt_coef")
|
||||
@KeySequence("bse_ctrt_coef_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ContractCoefficientDO extends BusinessBaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 配置主键
|
||||
*/
|
||||
@TableField("PRM_ID")
|
||||
private Long parameterId;
|
||||
/**
|
||||
* 条款主键
|
||||
*/
|
||||
@TableField("FMU_ID")
|
||||
private Long formulaId;
|
||||
/**
|
||||
* 金属元素编码
|
||||
*/
|
||||
@TableField("ELEM_NUM")
|
||||
private String elementNumber;
|
||||
/**
|
||||
* 金属元素缩写
|
||||
*/
|
||||
@TableField("ELEM_ABBR")
|
||||
private String elementAbbreviation;
|
||||
/**
|
||||
* 金属元素名称
|
||||
*/
|
||||
@TableField("ELEM_NAME")
|
||||
private String elementName;
|
||||
/**
|
||||
* 系数值
|
||||
*/
|
||||
@TableField("STLM_COEF")
|
||||
private String settlementCoefficient;
|
||||
/**
|
||||
* 系数上限
|
||||
*/
|
||||
@TableField("COEF_UP")
|
||||
private BigDecimal coefficientUp;
|
||||
/**
|
||||
* 系数下限
|
||||
*/
|
||||
@TableField("COEF_DOWN")
|
||||
private BigDecimal coefficientDown;
|
||||
/**
|
||||
* 是否包含上限
|
||||
*/
|
||||
@TableField("IS_IN_UP")
|
||||
private String isInUp;
|
||||
/**
|
||||
* 是否包含下限
|
||||
*/
|
||||
@TableField("IS_IN_DOWN")
|
||||
private String isInDown;
|
||||
/**
|
||||
* 是否省内
|
||||
*/
|
||||
@TableField("IN_STA")
|
||||
private String inState;
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@TableField("TP")
|
||||
private String type;
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.zt.plat.module.contractorder.dal.dataobject.contract;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 调整价配置 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("bse_ctrt_ddct")
|
||||
@KeySequence("bse_ctrt_ddct_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ContractDeductDO extends BusinessBaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 配置主键
|
||||
*/
|
||||
@TableField("PRM_ID")
|
||||
private Long parameterId;
|
||||
/**
|
||||
* 条款主键
|
||||
*/
|
||||
@TableField("FMU_ID")
|
||||
private Long formulaId;
|
||||
/**
|
||||
* 物料编码;推送ERP
|
||||
*/
|
||||
@TableField("MTRL_NUM")
|
||||
private String materialNumber;
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
@TableField("MTRL_NAME")
|
||||
private String materialName;
|
||||
/**
|
||||
* 上限
|
||||
*/
|
||||
@TableField("GRD_UP")
|
||||
private BigDecimal gradeUp;
|
||||
/**
|
||||
* 下限
|
||||
*/
|
||||
@TableField("GRD_DOWN")
|
||||
private BigDecimal gradeDown;
|
||||
/**
|
||||
* 是否包含上限
|
||||
*/
|
||||
@TableField("IS_IN_UP")
|
||||
private String isInUp;
|
||||
/**
|
||||
* 是否包含下限
|
||||
*/
|
||||
@TableField("IS_IN_DOWN")
|
||||
private String isInDown;
|
||||
/**
|
||||
* 方式
|
||||
*/
|
||||
@TableField("WY")
|
||||
private String way;
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@TableField("TP")
|
||||
private String type;
|
||||
/**
|
||||
* 是否省内
|
||||
*/
|
||||
@TableField("IN_STA")
|
||||
private String inState;
|
||||
/**
|
||||
* 调整价
|
||||
*/
|
||||
@TableField("GRD_AMT")
|
||||
private BigDecimal gradeAmount;
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.zt.plat.module.contractorder.dal.dataobject.contract;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* 价款结算条款 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("bse_ctrt_fmu")
|
||||
@KeySequence("bse_ctrt_fmu_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ContractFormulaDO extends BusinessBaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 合同明细主键
|
||||
*/
|
||||
@TableField("CTRT_DTL_ID")
|
||||
private Long contractDetailId;
|
||||
/**
|
||||
* 公式类型;单价/总价/水扣款/加工费
|
||||
*/
|
||||
@TableField("FMU_TP")
|
||||
private String formulaType;
|
||||
/**
|
||||
* 公式
|
||||
*/
|
||||
@TableField("FMU_CALT")
|
||||
private String formulaCalculate;
|
||||
/**
|
||||
* 编码公式
|
||||
*/
|
||||
@TableField("NUM_FMU")
|
||||
private String numberFormula;
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
@TableField("MTRL_NAME")
|
||||
private String materialName;
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
@TableField("MTRL_NUM")
|
||||
private String materialNumber;
|
||||
/**
|
||||
* 计算小数位
|
||||
*/
|
||||
@TableField("DEC")
|
||||
private Long decimal;
|
||||
/**
|
||||
* 金属元素编码
|
||||
*/
|
||||
@TableField("ELEM_NUM")
|
||||
private String elementNumber;
|
||||
/**
|
||||
* 金属元素缩写
|
||||
*/
|
||||
@TableField("ELEM_ABBR")
|
||||
private String elementAbbreviation;
|
||||
/**
|
||||
* 金属元素名称
|
||||
*/
|
||||
@TableField("ELEM_NAME")
|
||||
private String elementName;
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.zt.plat.module.contractorder.dal.dataobject.contract;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 品位等级价配置 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("bse_ctrt_grd")
|
||||
@KeySequence("bse_ctrt_grd_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ContractGradeDO extends BusinessBaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 配置主键
|
||||
*/
|
||||
@TableField("PRM_ID")
|
||||
private Long parameterId;
|
||||
/**
|
||||
* 条款主键
|
||||
*/
|
||||
@TableField("FMU_ID")
|
||||
private Long formulaId;
|
||||
/**
|
||||
* 金属元素编码
|
||||
*/
|
||||
@TableField("ELEM_NUM")
|
||||
private String elementNumber;
|
||||
/**
|
||||
* 金属元素缩写
|
||||
*/
|
||||
@TableField("ELEM_ABBR")
|
||||
private String elementAbbreviation;
|
||||
/**
|
||||
* 金属元素名称
|
||||
*/
|
||||
@TableField("ELEM_NAME")
|
||||
private String elementName;
|
||||
/**
|
||||
* 品位单位
|
||||
*/
|
||||
@TableField("GRD_UNT")
|
||||
private String gradeUnit;
|
||||
/**
|
||||
* 品位上限
|
||||
*/
|
||||
@TableField("GRD_UP")
|
||||
private BigDecimal gradeUp;
|
||||
/**
|
||||
* 品位下限
|
||||
*/
|
||||
@TableField("GRD_DOWN")
|
||||
private BigDecimal gradeDown;
|
||||
/**
|
||||
* 是否包含上限;包含则是大于等于,不包含则是大于
|
||||
*/
|
||||
@TableField("IS_IN_UP")
|
||||
private String isInUp;
|
||||
/**
|
||||
* 是否包含下限;包含则是小于等于,不包含则是小于
|
||||
*/
|
||||
@TableField("IS_IN_DOWN")
|
||||
private String isInDown;
|
||||
/**
|
||||
* 默认计价品位;计价方式为加时,默认为为下限,计价方式为减时,默认为为上限,可手动填写
|
||||
*/
|
||||
@TableField("GRD_DFT")
|
||||
private BigDecimal gradeDefault;
|
||||
/**
|
||||
* 系数;计价类型为阶梯价使用,标识没上升多少系数进行加款还是减款
|
||||
*/
|
||||
@TableField("STLM_COEF")
|
||||
private BigDecimal settlementCoefficient;
|
||||
/**
|
||||
* 不足系数值按比例计算
|
||||
*/
|
||||
@TableField("USE_COEF")
|
||||
private String useCoefficient;
|
||||
/**
|
||||
* 计价类型
|
||||
*/
|
||||
@TableField("PRC_TP")
|
||||
private String priceType;
|
||||
/**
|
||||
* 是否省内
|
||||
*/
|
||||
@TableField("IN_STA")
|
||||
private String inState;
|
||||
/**
|
||||
* 等级单价
|
||||
*/
|
||||
@TableField("UPRC")
|
||||
private BigDecimal unitPrice;
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.zt.plat.module.contractorder.dal.dataobject.contract;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@@ -218,8 +217,8 @@ public class ContractMainDO extends BusinessBaseDO {
|
||||
/**
|
||||
* 代理方;与ERP(ZLIFNR)对应,拓展信息
|
||||
*/
|
||||
@TableField("ZLIFNR")
|
||||
private String zlifnr;
|
||||
@TableField("AGT")
|
||||
private String agent;
|
||||
/**
|
||||
* 类别;与ERP(HTLB)对应,拓展信息
|
||||
*/
|
||||
@@ -253,8 +252,8 @@ public class ContractMainDO extends BusinessBaseDO {
|
||||
/**
|
||||
* 境内/境外;与ERP(JNJW)对应,拓展信息
|
||||
*/
|
||||
@TableField("JNJW")
|
||||
private String jnjw;
|
||||
@TableField("IS_DOM")
|
||||
private String isDomestic;
|
||||
/**
|
||||
* 建筑服务发生地;与ERP(JZFWFSD)对应,拓展信息,销售合同,且类型为SAP02COSR必填
|
||||
*/
|
||||
@@ -270,4 +269,14 @@ public class ContractMainDO extends BusinessBaseDO {
|
||||
*/
|
||||
@TableField("STP")
|
||||
private Integer step;
|
||||
/**
|
||||
* ERP请求状态
|
||||
*/
|
||||
@TableField("ERP_STS")
|
||||
private String erpStatus;
|
||||
/**
|
||||
* ERP请求失败原因
|
||||
*/
|
||||
@TableField("CAUS")
|
||||
private String cause;
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.zt.plat.module.contractorder.dal.dataobject.contract;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 品位不计价配置 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("bse_ctrt_nt")
|
||||
@KeySequence("bse_ctrt_nt_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ContractNotDO extends BusinessBaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 配置主键
|
||||
*/
|
||||
@TableField("PRM_ID")
|
||||
private Long parameterId;
|
||||
/**
|
||||
* 条款主键
|
||||
*/
|
||||
@TableField("FMU_ID")
|
||||
private Long formulaId;
|
||||
/**
|
||||
* 金属元素编码
|
||||
*/
|
||||
@TableField("ELEM_NUM")
|
||||
private String elementNumber;
|
||||
/**
|
||||
* 金属元素缩写
|
||||
*/
|
||||
@TableField("ELEM_ABBR")
|
||||
private String elementAbbreviation;
|
||||
/**
|
||||
* 金属元素名称
|
||||
*/
|
||||
@TableField("ELEM_NAME")
|
||||
private String elementName;
|
||||
/**
|
||||
* 上限
|
||||
*/
|
||||
@TableField("GRD_UP")
|
||||
private BigDecimal gradeUp;
|
||||
/**
|
||||
* 下限
|
||||
*/
|
||||
@TableField("GRD_DOWN")
|
||||
private BigDecimal gradeDown;
|
||||
/**
|
||||
* 是否包含上限
|
||||
*/
|
||||
@TableField("IS_IN_UP")
|
||||
private String isInUp;
|
||||
/**
|
||||
* 是否包含下限
|
||||
*/
|
||||
@TableField("IS_IN_DOWN")
|
||||
private String isInDown;
|
||||
/**
|
||||
* 是否省内
|
||||
*/
|
||||
@TableField("IN_STA")
|
||||
private String inState;
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.zt.plat.module.contractorder.dal.dataobject.contract;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 市场价配置 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("bse_ctrt_prc")
|
||||
@KeySequence("bse_ctrt_prc_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ContractPriceDO extends BusinessBaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 配置主键
|
||||
*/
|
||||
@TableField("PRM_ID")
|
||||
private Long parameterId;
|
||||
/**
|
||||
* 条款主键
|
||||
*/
|
||||
@TableField("FMU_ID")
|
||||
private Long formulaId;
|
||||
/**
|
||||
* 市场价
|
||||
*/
|
||||
@TableField("VAL")
|
||||
private BigDecimal value;
|
||||
/**
|
||||
* 计算方式;均价/高位价/地位价
|
||||
*/
|
||||
@TableField("CALT_WY")
|
||||
private String calculateWay;
|
||||
/**
|
||||
* 数据来源网价代码;数据字典
|
||||
*/
|
||||
@TableField("DAT_ORGN")
|
||||
private String dataOrigin;
|
||||
/**
|
||||
* 计价开始日期
|
||||
*/
|
||||
@TableField("CALT_STRT_DT")
|
||||
private LocalDateTime calculateStartDate;
|
||||
/**
|
||||
* 计价截止日期
|
||||
*/
|
||||
@TableField("CALT_END_DT")
|
||||
private LocalDateTime calculateEndDate;
|
||||
/**
|
||||
* 包含开始日期
|
||||
*/
|
||||
@TableField("IN_STRT_DT")
|
||||
private String inStartDate;
|
||||
/**
|
||||
* 包含结束日期
|
||||
*/
|
||||
@TableField("IN_END_DT")
|
||||
private String inEndDate;
|
||||
/**
|
||||
* 价格品种元素的明细分类
|
||||
*/
|
||||
@TableField("PRC_GRD")
|
||||
private String priceGrade;
|
||||
/**
|
||||
* 品种分类
|
||||
*/
|
||||
@TableField("GRD_TP")
|
||||
private String gradeType;
|
||||
/**
|
||||
* 取价方式;区间价/固定价
|
||||
*/
|
||||
@TableField("AVG_TP")
|
||||
private String averageType;
|
||||
/**
|
||||
* 网价小数位
|
||||
*/
|
||||
@TableField("DEC")
|
||||
private BigDecimal decimal;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.zt.plat.module.contractorder.dal.mysql.contract;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.contract.ContractCoefficientDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 基础系数配置 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ContractCoefficientMapper extends BaseMapperX<ContractCoefficientDO> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.zt.plat.module.contractorder.dal.mysql.contract;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.contract.ContractDeductDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 调整价配置 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ContractDeductMapper extends BaseMapperX<ContractDeductDO> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.zt.plat.module.contractorder.dal.mysql.contract;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.contract.ContractFormulaDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 价款结算条款 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ContractFormulaMapper extends BaseMapperX<ContractFormulaDO> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.zt.plat.module.contractorder.dal.mysql.contract;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.contract.ContractGradeDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 品位等级价配置 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ContractGradeMapper extends BaseMapperX<ContractGradeDO> {
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.zt.plat.module.contractorder.dal.mysql.contract;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.contract.ContractNotDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 品位不计价配置 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ContractNotMapper extends BaseMapperX<ContractNotDO> {
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.zt.plat.module.contractorder.dal.mysql.contract;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.contract.ContractPlanDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 交货计划条款 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ContractPlanMapper extends BaseMapperX<ContractPlanDO> {
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.zt.plat.module.contractorder.dal.mysql.contract;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.contract.ContractPriceDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 市场价配置 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ContractPriceMapper extends BaseMapperX<ContractPriceDO> {
|
||||
}
|
||||
@@ -1,22 +1,27 @@
|
||||
package com.zt.plat.module.contractorder.service.contract;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.tenant.core.context.CompanyContextHolder;
|
||||
import com.zt.plat.module.base.dal.dataobject.tmpltp.TemplateInstanceDataDO;
|
||||
import com.zt.plat.module.base.service.tmpltp.TemplateInstanceDataService;
|
||||
import com.zt.plat.module.contractorder.controller.admin.contract.vo.preparaton.ContractPageReqVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.contract.vo.preparaton.ContractSaveReqVO;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.contract.ContractMainDO;
|
||||
import com.zt.plat.module.contractorder.dal.mysql.contract.ContractMainMapper;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.contract.*;
|
||||
import com.zt.plat.module.contractorder.dal.mysql.contract.*;
|
||||
import com.zt.plat.module.contractorder.enums.contract.ContractStatusEnum;
|
||||
import com.zt.plat.module.contractorder.enums.contract.DateConstants;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.zt.plat.module.contractorder.enums.ErrorCodeConstants.*;
|
||||
@@ -32,12 +37,31 @@ public class ContractServiceImpl implements ContractService {
|
||||
|
||||
@Resource
|
||||
private ContractMainMapper contractMainMapper;
|
||||
@Resource
|
||||
private ContractDetailMapper contractDetailMapper;
|
||||
@Resource
|
||||
private ContractPlanMapper contractPlanMapper;
|
||||
@Resource
|
||||
private TemplateInstanceDataService templateInstanceDataService;
|
||||
@Resource
|
||||
private ContractFormulaMapper contractFormulaMapper;
|
||||
@Resource
|
||||
private ContractCoefficientMapper contractCoefficientMapper;
|
||||
@Resource
|
||||
private ContractGradeMapper contractGradeMapper;
|
||||
@Resource
|
||||
private ContractDeductMapper contractDeductMapper;
|
||||
@Resource
|
||||
private ContractPriceMapper contractPriceMapper;
|
||||
@Resource
|
||||
private ContractNotMapper contractNotMapper;
|
||||
|
||||
@Override
|
||||
public PageResult<ContractMainDO> getContractPage(ContractPageReqVO pageReqVO) {
|
||||
return contractMainMapper.selectContractPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public Long createContract(ContractSaveReqVO reqVO) {
|
||||
|
||||
@@ -65,7 +89,99 @@ public class ContractServiceImpl implements ContractService {
|
||||
// 保存合同主信息
|
||||
contractMainMapper.insert(contractMainDO);
|
||||
|
||||
System.out.println(contractMainDO);
|
||||
// 合同主信息ID
|
||||
Long contractId = contractMainDO.getId();
|
||||
// 合同明细
|
||||
reqVO.getDetail().forEach(detail -> {
|
||||
// 合同明细DO
|
||||
ContractDetailDO detailDO = BeanUtils.toBean(detail, ContractDetailDO.class);
|
||||
// 设置合同主信息ID
|
||||
detailDO.setContractMainId(contractId);
|
||||
// 保存合同明细
|
||||
contractDetailMapper.insert(detailDO);
|
||||
|
||||
// 合同明细ID
|
||||
Long detailDOId = detailDO.getId();
|
||||
// 交货计划
|
||||
detail.getPlans().forEach(plan -> {
|
||||
// 交货计划DO
|
||||
ContractPlanDO planDO = BeanUtils.toBean(plan, ContractPlanDO.class);
|
||||
// 合同明细主键
|
||||
planDO.setContractDetailId(detailDOId);
|
||||
// 保存交货计划
|
||||
contractPlanMapper.insert(planDO);
|
||||
});
|
||||
|
||||
// 价款结算条款
|
||||
detail.getFormulas().forEach(formula -> {
|
||||
// 价款结算条款DO
|
||||
ContractFormulaDO formulaDO = BeanUtils.toBean(formula, ContractFormulaDO.class);
|
||||
// 合同明细主键
|
||||
formulaDO.setContractDetailId(detailDOId);
|
||||
// 保存价款结算条款
|
||||
contractFormulaMapper.insert(formulaDO);
|
||||
|
||||
// 价款结算条款ID
|
||||
Long formulaDOId = formulaDO.getId();
|
||||
// 基础系数配置
|
||||
formula.getCoefficients().forEach(coefficient -> {
|
||||
// 基础系数配置DO
|
||||
ContractCoefficientDO coefficientDO = BeanUtils.toBean(coefficient, ContractCoefficientDO.class);
|
||||
// 条款主键
|
||||
coefficientDO.setFormulaId(formulaDOId);
|
||||
// 保存基础系数配置
|
||||
contractCoefficientMapper.insert(coefficientDO);
|
||||
});
|
||||
// 品位等级价配置
|
||||
formula.getGrades().forEach(grade -> {
|
||||
// 品位等级价配置DO
|
||||
ContractGradeDO gradeDO = BeanUtils.toBean(grade, ContractGradeDO.class);
|
||||
// 条款主键
|
||||
gradeDO.setFormulaId(formulaDOId);
|
||||
// 保存品位等级价配置
|
||||
contractGradeMapper.insert(gradeDO);
|
||||
});
|
||||
// 调整价配置
|
||||
formula.getDeducts().forEach(deduct -> {
|
||||
// 调整价配置DO
|
||||
ContractDeductDO deductDO = BeanUtils.toBean(deduct, ContractDeductDO.class);
|
||||
// 条款主键
|
||||
deductDO.setFormulaId(formulaDOId);
|
||||
// 保存品位等级价配置
|
||||
contractDeductMapper.insert(deductDO);
|
||||
});
|
||||
// 市场价配置
|
||||
formula.getPrices().forEach(price -> {
|
||||
// 市场价配置DO
|
||||
ContractPriceDO priceDO = BeanUtils.toBean(price, ContractPriceDO.class);
|
||||
// 条款主键
|
||||
priceDO.setFormulaId(formulaDOId);
|
||||
// 保存市场价配置
|
||||
contractPriceMapper.insert(priceDO);
|
||||
});
|
||||
// 品位不计价配置
|
||||
formula.getNots().forEach(not -> {
|
||||
// 品位不计价配置DO
|
||||
ContractNotDO notDO = BeanUtils.toBean(not, ContractNotDO.class);
|
||||
// 条款主键
|
||||
notDO.setFormulaId(formulaDOId);
|
||||
// 保存品位不计价配置
|
||||
contractNotMapper.insert(notDO);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// 合同动态表单
|
||||
List<TemplateInstanceDataDO> templateInstanceDataDOS = new ArrayList<>();
|
||||
reqVO.getDynamicsFields().forEach(dynamicsField -> {
|
||||
TemplateInstanceDataDO templateInstanceDataDO = new TemplateInstanceDataDO();
|
||||
BeanUtils.copyProperties(dynamicsField, templateInstanceDataDO);
|
||||
templateInstanceDataDO.setInscId(reqVO.getInstanceId().toString());
|
||||
templateInstanceDataDOS.add(templateInstanceDataDO);
|
||||
});
|
||||
// 更新合同动态表单值
|
||||
templateInstanceDataService.setTemplateInstanceData(templateInstanceDataDOS);
|
||||
|
||||
return contractMainDO.getId();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user