合同数据结构修改
This commit is contained in:
@@ -118,9 +118,13 @@ public class TableFieldConstants {
|
|||||||
// 条款主键
|
// 条款主键
|
||||||
public static final String BSE_CTRT_PRC_FMU_ID = "FMU_ID";
|
public static final String BSE_CTRT_PRC_FMU_ID = "FMU_ID";
|
||||||
|
|
||||||
|
/* 参数降级规则表 */
|
||||||
|
// 合同主键
|
||||||
|
public static final String BSE_CTRT_DMOT_CTRT_ID = "CTRT_ID";
|
||||||
|
|
||||||
/* 品位不计价配置表 */
|
/* 品位不计价配置表 */
|
||||||
// 条款主键
|
// 合同主键
|
||||||
public static final String BSE_CTRT_NT_FMU_ID = "FMU_ID";
|
public static final String BSE_CTRT_NT_CTRT_ID = "CTRT_ID";
|
||||||
|
|
||||||
/* 实例字段值表 */
|
/* 实例字段值表 */
|
||||||
// 关联实例主键
|
// 关联实例主键
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package com.zt.plat.module.contractorder.controller.admin.contract.vo.contract;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 参数降级规则新增/修改 Request VO")
|
||||||
|
@Data
|
||||||
|
public class ContractDemoteSaveReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31818")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "合同主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14971")
|
||||||
|
@NotNull(message = "合同主键不能为空")
|
||||||
|
private Long contractId;
|
||||||
|
|
||||||
|
@Schema(description = "金属元素编码")
|
||||||
|
private String elementNumber;
|
||||||
|
|
||||||
|
@Schema(description = "金属元素缩写")
|
||||||
|
private String elementAbbreviation;
|
||||||
|
|
||||||
|
@Schema(description = "金属元素名称", example = "王五")
|
||||||
|
private String elementName;
|
||||||
|
|
||||||
|
@Schema(description = "上限")
|
||||||
|
private BigDecimal gradeUp;
|
||||||
|
|
||||||
|
@Schema(description = "区间方式(字典:STLM_RNG_WY)")
|
||||||
|
private String rangeWay;
|
||||||
|
|
||||||
|
@Schema(description = "下限")
|
||||||
|
private BigDecimal gradeDown;
|
||||||
|
|
||||||
|
@Schema(description = "降级后物料名称", example = "李四")
|
||||||
|
private String materialName;
|
||||||
|
|
||||||
|
@Schema(description = "降级后物料编码")
|
||||||
|
private String materialNumber;
|
||||||
|
}
|
||||||
@@ -55,6 +55,4 @@ public class ContractFormulaSaveReqVO {
|
|||||||
private List<ContractDeductSaveReqVO> deducts;
|
private List<ContractDeductSaveReqVO> deducts;
|
||||||
// 市场价配置
|
// 市场价配置
|
||||||
private List<ContractPriceSaveReqVO> prices;
|
private List<ContractPriceSaveReqVO> prices;
|
||||||
// 品位不计价配置
|
|
||||||
private List<ContractNotSaveReqVO> nots;
|
|
||||||
}
|
}
|
||||||
@@ -1,24 +1,21 @@
|
|||||||
package com.zt.plat.module.contractorder.controller.admin.contract.vo.contract;
|
package com.zt.plat.module.contractorder.controller.admin.contract.vo.contract;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 品位不计价配置新增/修改 Request VO")
|
@Schema(description = "管理后台 - 品位不计价规则新增/修改 Request VO")
|
||||||
@Data
|
@Data
|
||||||
public class ContractNotSaveReqVO {
|
public class ContractNotSaveReqVO {
|
||||||
|
|
||||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "21132")
|
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "18545")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "配置主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "3781")
|
@Schema(description = "合同主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "5333")
|
||||||
@NotNull(message = "配置主键不能为空")
|
@NotNull(message = "合同主键不能为空")
|
||||||
private Long parameterId;
|
private Long contractId;
|
||||||
|
|
||||||
@Schema(description = "条款主键", example = "5722")
|
|
||||||
private Long formulaId;
|
|
||||||
|
|
||||||
@Schema(description = "金属元素编码")
|
@Schema(description = "金属元素编码")
|
||||||
private String elementNumber;
|
private String elementNumber;
|
||||||
@@ -26,23 +23,21 @@ public class ContractNotSaveReqVO {
|
|||||||
@Schema(description = "金属元素缩写")
|
@Schema(description = "金属元素缩写")
|
||||||
private String elementAbbreviation;
|
private String elementAbbreviation;
|
||||||
|
|
||||||
@Schema(description = "金属元素名称", example = "张三")
|
@Schema(description = "金属元素名称", example = "王五")
|
||||||
private String elementName;
|
private String elementName;
|
||||||
|
|
||||||
@Schema(description = "上限", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "上限")
|
||||||
@NotNull(message = "上限不能为空")
|
|
||||||
private BigDecimal gradeUp;
|
private BigDecimal gradeUp;
|
||||||
|
|
||||||
@Schema(description = "下限")
|
@Schema(description = "下限")
|
||||||
private BigDecimal gradeDown;
|
private BigDecimal gradeDown;
|
||||||
|
|
||||||
@Schema(description = "是否包含上限")
|
@Schema(description = "区间方式(字典:STLM_RNG_WY)")
|
||||||
private String isInUp;
|
private String rangeWay;
|
||||||
|
|
||||||
@Schema(description = "是否包含下限")
|
@Schema(description = "物料名称", example = "芋艿")
|
||||||
private String isInDown;
|
private String materialName;
|
||||||
|
|
||||||
@Schema(description = "是否省内", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "物料编码")
|
||||||
@NotEmpty(message = "是否省内不能为空")
|
private String materialNumber;
|
||||||
private String inState;
|
|
||||||
}
|
}
|
||||||
@@ -217,4 +217,10 @@ public class ContractSaveReqVO {
|
|||||||
|
|
||||||
// 价款结算条款
|
// 价款结算条款
|
||||||
private List<ContractFormulaSaveReqVO> formulas;
|
private List<ContractFormulaSaveReqVO> formulas;
|
||||||
|
|
||||||
|
// 参数降级规则
|
||||||
|
private List<ContractDemoteSaveReqVO> demotes;
|
||||||
|
|
||||||
|
// 品位不计价配置
|
||||||
|
private List<ContractNotSaveReqVO> nots;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package com.zt.plat.module.contractorder.controller.admin.contract.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.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 参数降级规则 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class ContractViewDemoteRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31818")
|
||||||
|
@ExcelProperty("主键")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "合同主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14971")
|
||||||
|
@ExcelProperty("合同主键")
|
||||||
|
private Long contractId;
|
||||||
|
|
||||||
|
@Schema(description = "金属元素编码")
|
||||||
|
@ExcelProperty("金属元素编码")
|
||||||
|
private String elementNumber;
|
||||||
|
|
||||||
|
@Schema(description = "金属元素缩写")
|
||||||
|
@ExcelProperty("金属元素缩写")
|
||||||
|
private String elementAbbreviation;
|
||||||
|
|
||||||
|
@Schema(description = "金属元素名称", example = "王五")
|
||||||
|
@ExcelProperty("金属元素名称")
|
||||||
|
private String elementName;
|
||||||
|
|
||||||
|
@Schema(description = "上限")
|
||||||
|
@ExcelProperty("上限")
|
||||||
|
private BigDecimal gradeUp;
|
||||||
|
|
||||||
|
@Schema(description = "区间方式(字典:STLM_RNG_WY)")
|
||||||
|
@ExcelProperty("区间方式(字典:STLM_RNG_WY)")
|
||||||
|
private String rangeWay;
|
||||||
|
|
||||||
|
@Schema(description = "下限")
|
||||||
|
@ExcelProperty("下限")
|
||||||
|
private BigDecimal gradeDown;
|
||||||
|
|
||||||
|
@Schema(description = "降级后物料名称", example = "李四")
|
||||||
|
@ExcelProperty("降级后物料名称")
|
||||||
|
private String materialName;
|
||||||
|
|
||||||
|
@Schema(description = "降级后物料编码")
|
||||||
|
@ExcelProperty("降级后物料编码")
|
||||||
|
private String materialNumber;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
}
|
||||||
@@ -52,6 +52,4 @@ public class ContractViewFormulaRespVO {
|
|||||||
private List<ContractViewDeductRespVO> deducts;
|
private List<ContractViewDeductRespVO> deducts;
|
||||||
// 市场价配置
|
// 市场价配置
|
||||||
private List<ContractViewPriceRespVO> prices;
|
private List<ContractViewPriceRespVO> prices;
|
||||||
// 品位不计价配置
|
|
||||||
private List<ContractViewNotRespVO> nots;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,48 +1,59 @@
|
|||||||
package com.zt.plat.module.contractorder.controller.admin.contract.vo.contract;
|
package com.zt.plat.module.contractorder.controller.admin.contract.vo.contract;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 品位不计价配置 Response VO")
|
@Schema(description = "管理后台 - 品位不计价规则 Response VO")
|
||||||
@Data
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
public class ContractViewNotRespVO {
|
public class ContractViewNotRespVO {
|
||||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "21132")
|
|
||||||
|
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "18545")
|
||||||
|
@ExcelProperty("主键")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "配置主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "3781")
|
@Schema(description = "合同主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "5333")
|
||||||
@NotNull(message = "配置主键不能为空")
|
@ExcelProperty("合同主键")
|
||||||
private Long parameterId;
|
private Long contractId;
|
||||||
|
|
||||||
@Schema(description = "条款主键", example = "5722")
|
|
||||||
private Long formulaId;
|
|
||||||
|
|
||||||
@Schema(description = "金属元素编码")
|
@Schema(description = "金属元素编码")
|
||||||
|
@ExcelProperty("金属元素编码")
|
||||||
private String elementNumber;
|
private String elementNumber;
|
||||||
|
|
||||||
@Schema(description = "金属元素缩写")
|
@Schema(description = "金属元素缩写")
|
||||||
|
@ExcelProperty("金属元素缩写")
|
||||||
private String elementAbbreviation;
|
private String elementAbbreviation;
|
||||||
|
|
||||||
@Schema(description = "金属元素名称", example = "张三")
|
@Schema(description = "金属元素名称", example = "王五")
|
||||||
|
@ExcelProperty("金属元素名称")
|
||||||
private String elementName;
|
private String elementName;
|
||||||
|
|
||||||
@Schema(description = "上限", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "上限")
|
||||||
@NotNull(message = "上限不能为空")
|
@ExcelProperty("上限")
|
||||||
private BigDecimal gradeUp;
|
private BigDecimal gradeUp;
|
||||||
|
|
||||||
@Schema(description = "下限")
|
@Schema(description = "下限")
|
||||||
|
@ExcelProperty("下限")
|
||||||
private BigDecimal gradeDown;
|
private BigDecimal gradeDown;
|
||||||
|
|
||||||
@Schema(description = "是否包含上限")
|
@Schema(description = "区间方式(字典:STLM_RNG_WY)")
|
||||||
private String isInUp;
|
@ExcelProperty("区间方式(字典:STLM_RNG_WY)")
|
||||||
|
private String rangeWay;
|
||||||
|
|
||||||
@Schema(description = "是否包含下限")
|
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
private String isInDown;
|
@ExcelProperty("创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
@Schema(description = "是否省内", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "物料名称", example = "芋艿")
|
||||||
@NotEmpty(message = "是否省内不能为空")
|
@ExcelProperty("物料名称")
|
||||||
private String inState;
|
private String materialName;
|
||||||
|
|
||||||
|
@Schema(description = "物料编码")
|
||||||
|
@ExcelProperty("物料编码")
|
||||||
|
private String materialNumber;
|
||||||
}
|
}
|
||||||
@@ -303,4 +303,10 @@ public class ContractViewRespVO {
|
|||||||
|
|
||||||
// 价款结算条款
|
// 价款结算条款
|
||||||
private List<ContractViewFormulaRespVO> formulas;
|
private List<ContractViewFormulaRespVO> formulas;
|
||||||
|
|
||||||
|
// 参数降级规则
|
||||||
|
private List<ContractViewDemoteRespVO> demotes;
|
||||||
|
|
||||||
|
// 品位不计价配置
|
||||||
|
private List<ContractViewNotRespVO> nots;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,77 @@
|
|||||||
|
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 后台管理-1
|
||||||
|
*/
|
||||||
|
@TableName("bse_ctrt_dmot")
|
||||||
|
@KeySequence("bse_ctrt_dmot_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
/**
|
||||||
|
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||||
|
*/
|
||||||
|
public class ContractDemoteDO extends BusinessBaseDO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 合同主键
|
||||||
|
*/
|
||||||
|
@TableField("CTRT_ID")
|
||||||
|
private Long contractId;
|
||||||
|
/**
|
||||||
|
* 金属元素编码
|
||||||
|
*/
|
||||||
|
@TableField("ELEM_NUM")
|
||||||
|
private String elementNumber;
|
||||||
|
/**
|
||||||
|
* 金属元素缩写
|
||||||
|
*/
|
||||||
|
@TableField("ELEM_ABBR")
|
||||||
|
private String elementAbbreviation;
|
||||||
|
/**
|
||||||
|
* 金属元素名称
|
||||||
|
*/
|
||||||
|
@TableField("ELEM_NAME")
|
||||||
|
private String elementName;
|
||||||
|
/**
|
||||||
|
* 上限
|
||||||
|
*/
|
||||||
|
@TableField("GRD_UP")
|
||||||
|
private BigDecimal gradeUp;
|
||||||
|
/**
|
||||||
|
* 区间方式(字典:STLM_RNG_WY)
|
||||||
|
*/
|
||||||
|
@TableField("RNG_WY")
|
||||||
|
private String rangeWay;
|
||||||
|
/**
|
||||||
|
* 下限
|
||||||
|
*/
|
||||||
|
@TableField("GRD_DOWN")
|
||||||
|
private BigDecimal gradeDown;
|
||||||
|
/**
|
||||||
|
* 降级后物料名称
|
||||||
|
*/
|
||||||
|
@TableField("MTRL_NAME")
|
||||||
|
private String materialName;
|
||||||
|
/**
|
||||||
|
* 降级后物料编码
|
||||||
|
*/
|
||||||
|
@TableField("MTRL_NUM")
|
||||||
|
private String materialNumber;
|
||||||
|
}
|
||||||
@@ -7,9 +7,9 @@ import lombok.*;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 品位不计价配置 DO
|
* 品位不计价规则 DO
|
||||||
*
|
*
|
||||||
* @author 后台管理
|
* @author 后台管理-1
|
||||||
*/
|
*/
|
||||||
@TableName("bse_ctrt_nt")
|
@TableName("bse_ctrt_nt")
|
||||||
@KeySequence("bse_ctrt_nt_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
@KeySequence("bse_ctrt_nt_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
@@ -30,15 +30,10 @@ public class ContractNotDO extends BusinessBaseDO {
|
|||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
private Long id;
|
private Long id;
|
||||||
/**
|
/**
|
||||||
* 配置主键
|
* 合同主键
|
||||||
*/
|
*/
|
||||||
@TableField("PRM_ID")
|
@TableField("CTRT_ID")
|
||||||
private Long parameterId;
|
private Long contractId;
|
||||||
/**
|
|
||||||
* 条款主键
|
|
||||||
*/
|
|
||||||
@TableField("FMU_ID")
|
|
||||||
private Long formulaId;
|
|
||||||
/**
|
/**
|
||||||
* 金属元素编码
|
* 金属元素编码
|
||||||
*/
|
*/
|
||||||
@@ -65,18 +60,18 @@ public class ContractNotDO extends BusinessBaseDO {
|
|||||||
@TableField("GRD_DOWN")
|
@TableField("GRD_DOWN")
|
||||||
private BigDecimal gradeDown;
|
private BigDecimal gradeDown;
|
||||||
/**
|
/**
|
||||||
* 是否包含上限
|
* 区间方式(字典:STLM_RNG_WY)
|
||||||
*/
|
*/
|
||||||
@TableField("IS_IN_UP")
|
@TableField("RNG_WY")
|
||||||
private String isInUp;
|
private String rangeWay;
|
||||||
/**
|
/**
|
||||||
* 是否包含下限
|
* 物料名称
|
||||||
*/
|
*/
|
||||||
@TableField("IS_IN_DOWN")
|
@TableField("MTRL_NAME")
|
||||||
private String isInDown;
|
private String materialName;
|
||||||
/**
|
/**
|
||||||
* 是否省内
|
* 物料编码
|
||||||
*/
|
*/
|
||||||
@TableField("IN_STA")
|
@TableField("MTRL_NUM")
|
||||||
private String inState;
|
private String materialNumber;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
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 后台管理-1
|
||||||
|
*/
|
||||||
|
@TableName("bse_ctrt_oth_fld")
|
||||||
|
@KeySequence("bse_ctrt_oth_fld_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
/**
|
||||||
|
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||||
|
*/
|
||||||
|
public class ContractOtherFieldDO extends BusinessBaseDO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 动态条款主键
|
||||||
|
*/
|
||||||
|
@TableField("REL_ID")
|
||||||
|
private Long relativityId;
|
||||||
|
/**
|
||||||
|
* 字段编码
|
||||||
|
*/
|
||||||
|
@TableField("FLD_NUM")
|
||||||
|
private String fieldNumber;
|
||||||
|
/**
|
||||||
|
* 字段名称
|
||||||
|
*/
|
||||||
|
@TableField("FLD_NAME")
|
||||||
|
private String fieldName;
|
||||||
|
/**
|
||||||
|
* 字段值关联合同或条款
|
||||||
|
*/
|
||||||
|
@TableField("FLD_VAL")
|
||||||
|
private String fieldValue;
|
||||||
|
/**
|
||||||
|
* 字段描述
|
||||||
|
*/
|
||||||
|
@TableField("FLD_DSP")
|
||||||
|
private String fieldDescription;
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
*/
|
||||||
|
@TableField("TP")
|
||||||
|
private String type;
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@TableField("STS")
|
||||||
|
private String status;
|
||||||
|
/**
|
||||||
|
* 合同主键
|
||||||
|
*/
|
||||||
|
@TableField("CTRT_MAIN_ID")
|
||||||
|
private String contractMainId;
|
||||||
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
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 后台管理-1
|
||||||
|
*/
|
||||||
|
@TableName("bse_ctrt_oth_form")
|
||||||
|
@KeySequence("bse_ctrt_oth_form_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
/**
|
||||||
|
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||||
|
*/
|
||||||
|
public class ContractOtherFormDO extends BusinessBaseDO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 合同主键
|
||||||
|
*/
|
||||||
|
@TableField("CTRT_MAIN_ID")
|
||||||
|
private Long contractMainId;
|
||||||
|
/**
|
||||||
|
* 类型;运输方式/费用
|
||||||
|
*/
|
||||||
|
@TableField("TP")
|
||||||
|
private String type;
|
||||||
|
/**
|
||||||
|
* 条款编码
|
||||||
|
*/
|
||||||
|
@TableField("FORM_NUM")
|
||||||
|
private String formNumber;
|
||||||
|
/**
|
||||||
|
* 条款名称
|
||||||
|
*/
|
||||||
|
@TableField("FORM_NAME")
|
||||||
|
private String formName;
|
||||||
|
/**
|
||||||
|
* 条款值
|
||||||
|
*/
|
||||||
|
@TableField("FORM_VAL")
|
||||||
|
private BigDecimal formValue;
|
||||||
|
/**
|
||||||
|
* 条款描述
|
||||||
|
*/
|
||||||
|
@TableField("FORM_DSP")
|
||||||
|
private String formDescription;
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@TableField("STS")
|
||||||
|
private String status;
|
||||||
|
}
|
||||||
@@ -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.ContractDemoteDO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 参数降级规则 Mapper
|
||||||
|
*
|
||||||
|
* @author 后台管理-1
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface ContractDemoteMapper extends BaseMapperX<ContractDemoteDO> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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.ContractOtherFieldDO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动态条款明细 Mapper
|
||||||
|
*
|
||||||
|
* @author 后台管理-1
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface ContractOtherFieldMapper extends BaseMapperX<ContractOtherFieldDO> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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.ContractOtherFormDO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动态条款 Mapper
|
||||||
|
*
|
||||||
|
* @author 后台管理-1
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface ContractOtherFormMapper extends BaseMapperX<ContractOtherFormDO> {
|
||||||
|
}
|
||||||
@@ -81,6 +81,8 @@ public class ContractServiceImpl implements ContractService {
|
|||||||
private BpmProcessInstanceApi bpmProcessInstanceApi;
|
private BpmProcessInstanceApi bpmProcessInstanceApi;
|
||||||
@Resource
|
@Resource
|
||||||
private BpmTaskApi bpmTaskApi;
|
private BpmTaskApi bpmTaskApi;
|
||||||
|
@Resource
|
||||||
|
private ContractDemoteMapper contractDemoteMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<ContractMainDO> getContractPage(ContractPageReqVO pageReqVO) {
|
public PageResult<ContractMainDO> getContractPage(ContractPageReqVO pageReqVO) {
|
||||||
@@ -201,17 +203,30 @@ public class ContractServiceImpl implements ContractService {
|
|||||||
contractPriceMapper.insert(priceDO);
|
contractPriceMapper.insert(priceDO);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 品位不计价配置
|
|
||||||
if (formula.getNots() != null && !formula.getNots().isEmpty()) {
|
|
||||||
formula.getNots().forEach(not -> {
|
|
||||||
// 品位不计价配置DO
|
|
||||||
ContractNotDO notDO = BeanUtils.toBean(not, ContractNotDO.class);
|
|
||||||
// 条款主键
|
|
||||||
notDO.setFormulaId(formulaDOId);
|
|
||||||
// 保存品位不计价配置
|
|
||||||
contractNotMapper.insert(notDO);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 参数降级规则
|
||||||
|
if (reqVO.getDemotes() != null && !reqVO.getDemotes().isEmpty()) {
|
||||||
|
reqVO.getDemotes().forEach(demote -> {
|
||||||
|
// 参数降级规则DO
|
||||||
|
ContractDemoteDO demoteDO = BeanUtils.toBean(demote, ContractDemoteDO.class);
|
||||||
|
// 设置合同主键
|
||||||
|
demoteDO.setContractId(contractId);
|
||||||
|
// 保存参数降级规则
|
||||||
|
contractDemoteMapper.insert(demoteDO);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 品位不计价规则
|
||||||
|
if (reqVO.getNots() != null && !reqVO.getNots().isEmpty()) {
|
||||||
|
reqVO.getNots().forEach(not -> {
|
||||||
|
// 品位不计价规则DO
|
||||||
|
ContractNotDO notDO = BeanUtils.toBean(not, ContractNotDO.class);
|
||||||
|
// 条款主键
|
||||||
|
notDO.setContractId(contractId);
|
||||||
|
// 保存品位不计价规则
|
||||||
|
contractNotMapper.insert(notDO);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -246,7 +261,7 @@ public class ContractServiceImpl implements ContractService {
|
|||||||
}
|
}
|
||||||
BeanUtils.copyProperties(contractMainDO, respVO);
|
BeanUtils.copyProperties(contractMainDO, respVO);
|
||||||
|
|
||||||
// 查询并设置物料信息
|
// 查询并设置合同明细
|
||||||
List<ContractDetailDO> detailDOS = contractDetailMapper
|
List<ContractDetailDO> detailDOS = contractDetailMapper
|
||||||
.selectList(TableFieldConstants.BSE_CTRT_DTL_CTRT_MAIN_ID, contractMainDO.getId());
|
.selectList(TableFieldConstants.BSE_CTRT_DTL_CTRT_MAIN_ID, contractMainDO.getId());
|
||||||
if (detailDOS != null && !detailDOS.isEmpty()) {
|
if (detailDOS != null && !detailDOS.isEmpty()) {
|
||||||
@@ -294,15 +309,23 @@ public class ContractServiceImpl implements ContractService {
|
|||||||
if (priceDOS != null && !priceDOS.isEmpty()) {
|
if (priceDOS != null && !priceDOS.isEmpty()) {
|
||||||
formula.setPrices(BeanUtils.toBean(priceDOS, ContractViewPriceRespVO.class));
|
formula.setPrices(BeanUtils.toBean(priceDOS, ContractViewPriceRespVO.class));
|
||||||
}
|
}
|
||||||
// 查询并设置品位不计价配置
|
|
||||||
List<ContractNotDO> notDOS = contractNotMapper
|
|
||||||
.selectList(TableFieldConstants.BSE_CTRT_NT_FMU_ID, formula.getId());
|
|
||||||
if (notDOS != null && !notDOS.isEmpty()) {
|
|
||||||
formula.setNots(BeanUtils.toBean(notDOS, ContractViewNotRespVO.class));
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询并设置参数降级规则
|
||||||
|
List<ContractDemoteDO> demoteDOS = contractDemoteMapper
|
||||||
|
.selectList(TableFieldConstants.BSE_CTRT_DMOT_CTRT_ID, contractMainDO.getId());
|
||||||
|
if (demoteDOS != null && !demoteDOS.isEmpty()) {
|
||||||
|
respVO.setDemotes(BeanUtils.toBean(demoteDOS, ContractViewDemoteRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询并设置品位不计价规则
|
||||||
|
List<ContractNotDO> notDOS = contractNotMapper
|
||||||
|
.selectList(TableFieldConstants.BSE_CTRT_NT_CTRT_ID, contractMainDO.getId());
|
||||||
|
if (notDOS != null && !notDOS.isEmpty()) {
|
||||||
|
respVO.setNots(BeanUtils.toBean(notDOS, ContractViewNotRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
// 查询并设置合同动态表单
|
// 查询并设置合同动态表单
|
||||||
List<TemplateInstanceDataDO> templateInstanceDataDOS = templateInstanceDataMapper
|
List<TemplateInstanceDataDO> templateInstanceDataDOS = templateInstanceDataMapper
|
||||||
.selectList(TableFieldConstants.BSE_TMPL_INSC_DAT_INSC_ID, contractMainDO.getInstanceId());
|
.selectList(TableFieldConstants.BSE_TMPL_INSC_DAT_INSC_ID, contractMainDO.getInstanceId());
|
||||||
@@ -401,14 +424,18 @@ public class ContractServiceImpl implements ContractService {
|
|||||||
contractDeductMapper.delete(TableFieldConstants.BSE_CTRT_DDCT_FMU_ID, formulaDOId.toString());
|
contractDeductMapper.delete(TableFieldConstants.BSE_CTRT_DDCT_FMU_ID, formulaDOId.toString());
|
||||||
// 删除市场价配置
|
// 删除市场价配置
|
||||||
contractPriceMapper.delete(TableFieldConstants.BSE_CTRT_PRC_FMU_ID, formulaDOId.toString());
|
contractPriceMapper.delete(TableFieldConstants.BSE_CTRT_PRC_FMU_ID, formulaDOId.toString());
|
||||||
// 删除品位不计价配置
|
|
||||||
contractNotMapper.delete(TableFieldConstants.BSE_CTRT_NT_FMU_ID, formulaDOId.toString());
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// 删除价款结算条款
|
// 删除价款结算条款
|
||||||
contractFormulaMapper.delete(TableFieldConstants.BSE_CTRT_FMU_CTRT_ID, id.toString());
|
contractFormulaMapper.delete(TableFieldConstants.BSE_CTRT_FMU_CTRT_ID, id.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除参数降级规则
|
||||||
|
contractDemoteMapper.delete(TableFieldConstants.BSE_CTRT_DMOT_CTRT_ID, id.toString());
|
||||||
|
|
||||||
|
// 删除品位不计价规则
|
||||||
|
contractNotMapper.delete(TableFieldConstants.BSE_CTRT_NT_CTRT_ID, id.toString());
|
||||||
|
|
||||||
// 重新插入关联信息
|
// 重新插入关联信息
|
||||||
if (reqVO.getDetail() != null && !reqVO.getDetail().isEmpty()) {
|
if (reqVO.getDetail() != null && !reqVO.getDetail().isEmpty()) {
|
||||||
reqVO.getDetail().forEach(detail -> {
|
reqVO.getDetail().forEach(detail -> {
|
||||||
@@ -491,17 +518,30 @@ public class ContractServiceImpl implements ContractService {
|
|||||||
contractPriceMapper.insert(priceDO);
|
contractPriceMapper.insert(priceDO);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 品位不计价配置
|
|
||||||
if (formula.getNots() != null && !formula.getNots().isEmpty()) {
|
|
||||||
formula.getNots().forEach(not -> {
|
|
||||||
// 品位不计价配置DO
|
|
||||||
ContractNotDO notDO = BeanUtils.toBean(not, ContractNotDO.class);
|
|
||||||
// 条款主键
|
|
||||||
notDO.setFormulaId(formulaDOId);
|
|
||||||
// 保存品位不计价配置
|
|
||||||
contractNotMapper.insert(notDO);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 参数降级规则
|
||||||
|
if (reqVO.getDemotes() != null && !reqVO.getDemotes().isEmpty()) {
|
||||||
|
reqVO.getDemotes().forEach(demote -> {
|
||||||
|
// 参数降级规则DO
|
||||||
|
ContractDemoteDO demoteDO = BeanUtils.toBean(demote, ContractDemoteDO.class);
|
||||||
|
// 设置合同主键
|
||||||
|
demoteDO.setContractId(id);
|
||||||
|
// 保存参数降级规则
|
||||||
|
contractDemoteMapper.insert(demoteDO);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 品位不计价规则
|
||||||
|
if (reqVO.getNots() != null && !reqVO.getNots().isEmpty()) {
|
||||||
|
reqVO.getNots().forEach(not -> {
|
||||||
|
// 品位不计价规则DO
|
||||||
|
ContractNotDO notDO = BeanUtils.toBean(not, ContractNotDO.class);
|
||||||
|
// 条款主键
|
||||||
|
notDO.setContractId(id);
|
||||||
|
// 保存品位不计价规则
|
||||||
|
contractNotMapper.insert(notDO);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user