合同主信息字段添加、合同提交审核校验、合同新增接口修改
This commit is contained in:
@@ -19,4 +19,5 @@ public interface ErrorCodeConstants {
|
|||||||
ErrorCode CONTRACT_ID_NOT_EXISTS = new ErrorCode(1_027_000_004, "合同主键为空");
|
ErrorCode CONTRACT_ID_NOT_EXISTS = new ErrorCode(1_027_000_004, "合同主键为空");
|
||||||
ErrorCode CONTRACT_STATUS_NOT_UPDATE = new ErrorCode(1_027_000_005, "{}合同不允许修改");
|
ErrorCode CONTRACT_STATUS_NOT_UPDATE = new ErrorCode(1_027_000_005, "{}合同不允许修改");
|
||||||
ErrorCode CONTRACT_DATA_NOT_EXISTS = new ErrorCode(1_027_000_006, "{}不存在");
|
ErrorCode CONTRACT_DATA_NOT_EXISTS = new ErrorCode(1_027_000_006, "{}不存在");
|
||||||
|
ErrorCode CONTRACT_STATUS_NOT_SUBMIT_APPROVAL = new ErrorCode(1_027_000_005, "{}合同不允许提交审核");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.zt.plat.module.contractorder.controller.admin.contract;
|
package com.zt.plat.module.contractorder.controller.admin.contract;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||||
import com.zt.plat.framework.common.pojo.PageResult;
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
@@ -43,9 +44,9 @@ public class ContractController implements BusinessControllerMarker {
|
|||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "新增合同")
|
@Operation(summary = "新增合同")
|
||||||
@PreAuthorize("@ss.hasPermission('system:contract:create')")
|
@PreAuthorize("@ss.hasPermission('system:contract:create')")
|
||||||
public CommonResult<Long> create(@Valid @RequestBody ContractSaveReqVO reqVO) {
|
public CommonResult<JSONObject> create(@Valid @RequestBody ContractSaveReqVO reqVO) {
|
||||||
Long id = contractService.createContract(reqVO);
|
Long id = contractService.createContract(reqVO);
|
||||||
return success(id);
|
return success(new JSONObject().putOnce("id", id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/get")
|
@GetMapping("/get")
|
||||||
@@ -101,7 +102,6 @@ public class ContractController implements BusinessControllerMarker {
|
|||||||
public void archive() {
|
public void archive() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO
|
|
||||||
@GetMapping("/submit/approval")
|
@GetMapping("/submit/approval")
|
||||||
@Operation(summary = "合同提交审批")
|
@Operation(summary = "合同提交审批")
|
||||||
@PreAuthorize("@ss.hasPermission('system:contract:approval')")
|
@PreAuthorize("@ss.hasPermission('system:contract:approval')")
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ public class ContractPageReqVO extends PageParam {
|
|||||||
@Schema(description = "合同编号;与ERP(HTBH)对应,校验唯一")
|
@Schema(description = "合同编号;与ERP(HTBH)对应,校验唯一")
|
||||||
private String contractPaperNumber;
|
private String contractPaperNumber;
|
||||||
|
|
||||||
|
@Schema(description = "状态", example = "DRAFT")
|
||||||
|
private String status;
|
||||||
|
|
||||||
@Schema(description = "甲方公司名称", example = "王五")
|
@Schema(description = "甲方公司名称", example = "王五")
|
||||||
private String purchaseCompanyName;
|
private String purchaseCompanyName;
|
||||||
|
|
||||||
|
|||||||
@@ -21,132 +21,144 @@ public class ContractSaveReqVO {
|
|||||||
|
|
||||||
@NotNull(message = "步骤不能为空")
|
@NotNull(message = "步骤不能为空")
|
||||||
@Schema(description = "步骤", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@Schema(description = "步骤", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
@ExcelProperty("步骤")
|
|
||||||
private Integer step;
|
private Integer step;
|
||||||
|
|
||||||
|
@Schema(description = "交货地点")
|
||||||
|
private String deliveryAddress;
|
||||||
|
|
||||||
|
@Schema(description = "交货方式(字典:FRCST_ASN)")
|
||||||
|
private String deliveryWay;
|
||||||
|
|
||||||
|
// 基础信息
|
||||||
|
@Schema(description = "附件对象存储")
|
||||||
|
private String fileObject;
|
||||||
|
|
||||||
|
@Schema(description = "其它附件对象存储")
|
||||||
|
private String fileObjectOther;
|
||||||
|
|
||||||
// 合同基本信息
|
// 合同基本信息
|
||||||
@Schema(description = "甲方公司编号;如果是采购合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是销售合同,手动选择,且与ERP(WLDWBH)对应。", example = "甲方公司编号")
|
@Schema(description = "甲方公司编号;如果是采购合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是销售合同,手动选择,且与ERP(WLDWBH)对应。", example = "甲方公司编号")
|
||||||
@ExcelProperty("甲方公司编号;如果是采购合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是销售合同,手动选择,且与ERP(WLDWBH)对应。")
|
|
||||||
private String purchaseCompanyNumber;
|
private String purchaseCompanyNumber;
|
||||||
|
|
||||||
@Schema(description = "甲方公司名称", example = "甲方公司名称")
|
@Schema(description = "甲方公司名称", example = "甲方公司名称")
|
||||||
@ExcelProperty("甲方公司名称")
|
|
||||||
private String purchaseCompanyName;
|
private String purchaseCompanyName;
|
||||||
|
|
||||||
@Schema(description = "甲方地址", example = "甲方地址")
|
@Schema(description = "甲方地址", example = "甲方地址")
|
||||||
@ExcelProperty("甲方地址")
|
|
||||||
private String purchaseAddress;
|
private String purchaseAddress;
|
||||||
|
|
||||||
@Schema(description = "甲方法定代表人", example = "甲方法定代表人")
|
@Schema(description = "甲方法定代表人", example = "甲方法定代表人")
|
||||||
@ExcelProperty("甲方法定代表人")
|
|
||||||
private String purchaseLeader;
|
private String purchaseLeader;
|
||||||
|
|
||||||
|
@Schema(description = "甲方联系人", example = "甲方联系人")
|
||||||
|
private String purchaseHuman;
|
||||||
|
|
||||||
|
@Schema(description = "甲方电话", example = "甲方电话")
|
||||||
|
private String purchaseTel;
|
||||||
|
|
||||||
|
@Schema(description = "甲方邮箱", example = "甲方邮箱")
|
||||||
|
private String purchaseEmail;
|
||||||
|
|
||||||
|
@Schema(description = "甲方传真", example = "甲方传真")
|
||||||
|
private String purchaseFax;
|
||||||
|
|
||||||
|
@Schema(description = "甲方联系地址", example = "甲方联系地址")
|
||||||
|
private String purchaseContactAddress;
|
||||||
|
|
||||||
@Schema(description = "乙方公司编号;如果是销售合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是采购合同,手动选择,且与ERP(WLDWBH)对应。", example = "乙方公司编号")
|
@Schema(description = "乙方公司编号;如果是销售合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是采购合同,手动选择,且与ERP(WLDWBH)对应。", example = "乙方公司编号")
|
||||||
@ExcelProperty("乙方公司编号;如果是销售合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是采购合同,手动选择,且与ERP(WLDWBH)对应。")
|
|
||||||
private String salesCompanyNumber;
|
private String salesCompanyNumber;
|
||||||
|
|
||||||
@Schema(description = "乙方公司名称", example = "乙方公司名称")
|
@Schema(description = "乙方公司名称", example = "乙方公司名称")
|
||||||
@ExcelProperty("乙方公司名称")
|
|
||||||
private String salesCompanyName;
|
private String salesCompanyName;
|
||||||
|
|
||||||
@Schema(description = "乙方地址", example = "乙方地址")
|
@Schema(description = "乙方地址", example = "乙方地址")
|
||||||
@ExcelProperty("乙方地址")
|
|
||||||
private String salesAddress;
|
private String salesAddress;
|
||||||
|
|
||||||
@Schema(description = "乙方企业负责人", example = "乙方企业负责人")
|
@Schema(description = "乙方企业负责人", example = "乙方企业负责人")
|
||||||
@ExcelProperty("乙方企业负责人")
|
|
||||||
private String salesPurchaseLeader;
|
private String salesPurchaseLeader;
|
||||||
|
|
||||||
|
@Schema(description = "乙方联系人", example = "乙方联系人")
|
||||||
|
private String salesHuman;
|
||||||
|
|
||||||
|
@Schema(description = "乙方电话", example = "乙方电话")
|
||||||
|
private String salesTel;
|
||||||
|
|
||||||
|
@Schema(description = "乙方邮箱", example = "乙方邮箱")
|
||||||
|
private String salesEmail;
|
||||||
|
|
||||||
|
@Schema(description = "乙方传真", example = "乙方传真")
|
||||||
|
private String salesFax;
|
||||||
|
|
||||||
|
@Schema(description = "乙方联系地址", example = "乙方联系地址")
|
||||||
|
private String salesContactAddress;
|
||||||
|
|
||||||
@NotBlank(message = "合同名称不能为空")
|
@NotBlank(message = "合同名称不能为空")
|
||||||
@Size(max = 90, message = "合同名称长度不能超过90个字符")
|
@Size(max = 90, message = "合同名称长度不能超过90个字符")
|
||||||
@Schema(description = "合同名称;与ERP(HTMC)对应,校验唯一", example = "合同名称")
|
@Schema(description = "合同名称;与ERP(HTMC)对应,校验唯一", example = "合同名称")
|
||||||
@ExcelProperty("合同名称;与ERP(HTMC)对应,校验唯一")
|
|
||||||
private String contractName;
|
private String contractName;
|
||||||
|
|
||||||
@Schema(description = "合同编号;与ERP(HTBH)对应,校验唯一", example = "合同编号")
|
@Schema(description = "合同编号;与ERP(HTBH)对应,校验唯一", example = "合同编号")
|
||||||
@ExcelProperty("合同编号;与ERP(HTBH)对应,校验唯一")
|
|
||||||
private String contractPaperNumber;
|
private String contractPaperNumber;
|
||||||
|
|
||||||
@NotBlank(message = "合同类型不能为空")
|
// @NotBlank(message = "合同类型不能为空")
|
||||||
@Schema(description = "合同类型", example = "PRCH")
|
@Schema(description = "合同类型", example = "PRCH")
|
||||||
@ExcelProperty("合同类型")
|
|
||||||
private String contractType;
|
private String contractType;
|
||||||
|
|
||||||
@Schema(description = "收支性质;与ERP(SZXZ)对应", example = "EXPENSES")
|
@Schema(description = "收支性质;与ERP(SZXZ)对应", example = "EXPENSES")
|
||||||
@ExcelProperty("收支性质;与ERP(SZXZ)对应")
|
|
||||||
private String direction;
|
private String direction;
|
||||||
|
|
||||||
@Schema(description = "签署日期;与ERP(HTQDRQ)对应")
|
@Schema(description = "签署日期;与ERP(HTQDRQ)对应")
|
||||||
@ExcelProperty("签署日期;与ERP(HTQDRQ)对应")
|
|
||||||
private String signDate;
|
private String signDate;
|
||||||
|
|
||||||
@Schema(description = "开始日期;与ERP(HTQSRQ)对应")
|
@Schema(description = "开始日期;与ERP(HTQSRQ)对应")
|
||||||
@ExcelProperty("开始日期;与ERP(HTQSRQ)对应")
|
|
||||||
private String startDate;
|
private String startDate;
|
||||||
|
|
||||||
@Schema(description = "结束日期;与ERP(HTZZRQ)对应")
|
@Schema(description = "结束日期;与ERP(HTZZRQ)对应")
|
||||||
@ExcelProperty("结束日期;与ERP(HTZZRQ)对应")
|
|
||||||
private String endDate;
|
private String endDate;
|
||||||
|
|
||||||
@Schema(description = "签署地", example = "签署地")
|
@Schema(description = "签署地", example = "签署地")
|
||||||
@ExcelProperty("签署地")
|
|
||||||
private String signPlace;
|
private String signPlace;
|
||||||
|
|
||||||
// 金额信息
|
// 金额信息
|
||||||
@Schema(description = "币种;与ERP(BZBH)对应", example = "CNY")
|
@Schema(description = "币种;与ERP(BZBH)对应", example = "CNY")
|
||||||
@ExcelProperty("币种;与ERP(BZBH)对应")
|
|
||||||
private String currency;
|
private String currency;
|
||||||
|
|
||||||
@Schema(description = "本币金额;与ERP(HTBWBZJE)对应")
|
@Schema(description = "本币金额;与ERP(HTBWBZJE)对应")
|
||||||
@ExcelProperty("本币金额;与ERP(HTBWBZJE)对应")
|
|
||||||
private BigDecimal basicAmount;
|
private BigDecimal basicAmount;
|
||||||
|
|
||||||
@Schema(description = "原币金额;与ERP(HTYBZJE)对应,币种不是人民币时,显示并手动填写,如果是人民币,隐藏且等于本币金额")
|
@Schema(description = "原币金额;与ERP(HTYBZJE)对应,币种不是人民币时,显示并手动填写,如果是人民币,隐藏且等于本币金额")
|
||||||
@ExcelProperty("原币金额;与ERP(HTYBZJE)对应,币种不是人民币时,显示并手动填写,如果是人民币,隐藏且等于本币金额")
|
|
||||||
private BigDecimal cooAmount;
|
private BigDecimal cooAmount;
|
||||||
|
|
||||||
@Schema(description = "是否有履约保证金;为是,则保证金必填。", example = "1")
|
@Schema(description = "是否有履约保证金;为是,则保证金必填。", example = "1")
|
||||||
@ExcelProperty("是否有履约保证金;为是,则保证金必填。")
|
|
||||||
private String hasDeposit;
|
private String hasDeposit;
|
||||||
|
|
||||||
@Schema(description = "原币履约保证金;与ERP(LYBZJBGQYB)对应,币种不是人民币时,显示并手动填写,如果是人民币,隐藏且等于本币金额")
|
@Schema(description = "原币履约保证金;与ERP(LYBZJBGQYB)对应,币种不是人民币时,显示并手动填写,如果是人民币,隐藏且等于本币金额")
|
||||||
@ExcelProperty("原币履约保证金;与ERP(LYBZJBGQYB)对应,币种不是人民币时,显示并手动填写,如果是人民币,隐藏且等于本币金额")
|
|
||||||
private BigDecimal cooAmountDeposit;
|
private BigDecimal cooAmountDeposit;
|
||||||
|
|
||||||
@Schema(description = "本币履约保证金-变更后;与ERP(LYBZJBGHBWB)对应,拓展信息")
|
@Schema(description = "本币履约保证金-变更后;与ERP(LYBZJBGHBWB)对应,拓展信息")
|
||||||
@ExcelProperty("本币履约保证金-变更后;与ERP(LYBZJBGHBWB)对应,拓展信息")
|
|
||||||
private BigDecimal changeBasicAmountDeposit;
|
private BigDecimal changeBasicAmountDeposit;
|
||||||
|
|
||||||
@Schema(description = "是否有预付款;与ERP(SFYYFK)对应", example = "1")
|
@Schema(description = "是否有预付款;与ERP(SFYYFK)对应", example = "1")
|
||||||
@ExcelProperty("是否有预付款;与ERP(SFYYFK)对应")
|
|
||||||
private String hasPrepayment;
|
private String hasPrepayment;
|
||||||
|
|
||||||
@Schema(description = "预付款比例;与ERP(YFKBL)对应")
|
@Schema(description = "预付款比例;与ERP(YFKBL)对应")
|
||||||
@ExcelProperty("预付款比例;与ERP(YFKBL)对应")
|
|
||||||
private BigDecimal prepaymentRatio;
|
private BigDecimal prepaymentRatio;
|
||||||
|
|
||||||
@Schema(description = "预付款金额;与ERP(YFKJE)对应")
|
@Schema(description = "预付款金额;与ERP(YFKJE)对应")
|
||||||
@ExcelProperty("预付款金额;与ERP(YFKJE)对应")
|
|
||||||
private BigDecimal prepaymentAmount;
|
private BigDecimal prepaymentAmount;
|
||||||
|
|
||||||
@Schema(description = "是否有质保金;与ERP(SFHZBJ)对应", example = "1")
|
@Schema(description = "是否有质保金;与ERP(SFHZBJ)对应", example = "1")
|
||||||
@ExcelProperty("是否有质保金;与ERP(SFHZBJ)对应")
|
|
||||||
private String hasQualityAmount;
|
private String hasQualityAmount;
|
||||||
|
|
||||||
@Schema(description = "质保金比例;与ERP(ZBJBL)对应")
|
@Schema(description = "质保金比例;与ERP(ZBJBL)对应")
|
||||||
@ExcelProperty("质保金比例;与ERP(ZBJBL)对应")
|
|
||||||
private BigDecimal qualityRatio;
|
private BigDecimal qualityRatio;
|
||||||
|
|
||||||
@Schema(description = "质保金金额;与ERP(BZJJE)对应")
|
@Schema(description = "质保金金额;与ERP(BZJJE)对应")
|
||||||
@ExcelProperty("质保金金额;与ERP(BZJJE)对应")
|
|
||||||
private BigDecimal qualityAmount;
|
private BigDecimal qualityAmount;
|
||||||
|
|
||||||
@Schema(description = "是否先款后货", example = "1")
|
@Schema(description = "是否先款后货", example = "1")
|
||||||
@ExcelProperty("是否先款后货")
|
|
||||||
private String hasPayable;
|
private String hasPayable;
|
||||||
|
|
||||||
@Schema(description = "备注;与ERP(BZXX)对应", example = "备注")
|
@Schema(description = "备注;与ERP(BZXX)对应", example = "备注")
|
||||||
@ExcelProperty("备注;与ERP(BZXX)对应")
|
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
// 物料信息
|
// 物料信息
|
||||||
@@ -154,72 +166,49 @@ public class ContractSaveReqVO {
|
|||||||
|
|
||||||
// 扩展信息
|
// 扩展信息
|
||||||
@Schema(description = "原币金额-变更后;与ERP(BGHHTYBZJE)对应,拓展信息")
|
@Schema(description = "原币金额-变更后;与ERP(BGHHTYBZJE)对应,拓展信息")
|
||||||
@ExcelProperty("原币金额-变更后;与ERP(BGHHTYBZJE)对应,拓展信息")
|
|
||||||
private BigDecimal changeCooAmount;
|
private BigDecimal changeCooAmount;
|
||||||
|
|
||||||
@Schema(description = "本币金额-变更后;与ERP(BGHHTBWBZJE)对应,拓展信息")
|
@Schema(description = "本币金额-变更后;与ERP(BGHHTBWBZJE)对应,拓展信息")
|
||||||
@ExcelProperty("本币金额-变更后;与ERP(BGHHTBWBZJE)对应,拓展信息")
|
|
||||||
private BigDecimal changeBasicAmount;
|
private BigDecimal changeBasicAmount;
|
||||||
|
|
||||||
@Schema(description = "原币履约保证金-变更后;与ERP(LYBZJBGHYB)对应,拓展信息")
|
@Schema(description = "原币履约保证金-变更后;与ERP(LYBZJBGHYB)对应,拓展信息")
|
||||||
@ExcelProperty("原币履约保证金-变更后;与ERP(LYBZJBGHYB)对应,拓展信息")
|
|
||||||
private BigDecimal changeCooAmountDeposit;
|
private BigDecimal changeCooAmountDeposit;
|
||||||
|
|
||||||
@Schema(description = "本币履约保证金;与ERP(LYBZJBGQBWB)对应")
|
@Schema(description = "本币履约保证金;与ERP(LYBZJBGQBWB)对应")
|
||||||
@ExcelProperty("本币履约保证金;与ERP(LYBZJBGQBWB)对应")
|
|
||||||
private BigDecimal basicAmountDeposit;
|
private BigDecimal basicAmountDeposit;
|
||||||
|
|
||||||
@Schema(description = "是否框架合同;与ERP(SFKJHT)对应,拓展信息", example = "1")
|
@Schema(description = "是否框架合同;与ERP(SFKJHT)对应,拓展信息", example = "1")
|
||||||
@ExcelProperty("是否框架合同;与ERP(SFKJHT)对应,拓展信息")
|
|
||||||
private String isFramework;
|
private String isFramework;
|
||||||
|
|
||||||
@Schema(description = "境内/境外;与ERP(JNJW)对应,拓展信息", example = "DOMESTIC")
|
@Schema(description = "境内/境外;与ERP(JNJW)对应,拓展信息", example = "DOMESTIC")
|
||||||
@ExcelProperty("境内/境外;与ERP(JNJW)对应,拓展信息")
|
|
||||||
private String isDomestic;
|
private String isDomestic;
|
||||||
|
|
||||||
@Schema(description = "施工类型编号;与ERP(HTLXBH)对应,拓展信息", example = "施工类型编号")
|
@Schema(description = "施工类型编号;与ERP(HTLXBH)对应,拓展信息", example = "施工类型编号")
|
||||||
@ExcelProperty("施工类型编号;与ERP(HTLXBH)对应,拓展信息")
|
|
||||||
private String constructionTypeNumber;
|
private String constructionTypeNumber;
|
||||||
|
|
||||||
@Schema(description = "施工类型名称;与ERP(HTLXMC)对应,拓展信息", example = "施工类型名称")
|
@Schema(description = "施工类型名称;与ERP(HTLXMC)对应,拓展信息", example = "施工类型名称")
|
||||||
@ExcelProperty("施工类型名称;与ERP(HTLXMC)对应,拓展信息")
|
|
||||||
private String constructionTypeName;
|
private String constructionTypeName;
|
||||||
|
|
||||||
@Schema(description = "代理方;与ERP(ZLIFNR)对应,拓展信息", example = "代理方")
|
@Schema(description = "代理方;与ERP(ZLIFNR)对应,拓展信息", example = "代理方")
|
||||||
@ExcelProperty("代理方;与ERP(ZLIFNR)对应,拓展信息")
|
|
||||||
private String agent;
|
private String agent;
|
||||||
|
|
||||||
@Schema(description = "类别;与ERP(HTLB)对应,拓展信息", example = "PROCESSING")
|
@Schema(description = "类别;与ERP(HTLB)对应,拓展信息", example = "PROCESSING")
|
||||||
@ExcelProperty("类别;与ERP(HTLB)对应,拓展信息")
|
|
||||||
private String category;
|
private String category;
|
||||||
|
|
||||||
@Schema(description = "是否虚拟合同;与ERP(SFXNHT)对应", example = "1")
|
@Schema(description = "是否虚拟合同;与ERP(SFXNHT)对应", example = "1")
|
||||||
@ExcelProperty("是否虚拟合同;与ERP(SFXNHT)对应")
|
|
||||||
private String contractVirtual;
|
private String contractVirtual;
|
||||||
|
|
||||||
@Schema(description = "补充协议类型;变更协议/增加条款", example = "补充协议类型")
|
@Schema(description = "补充协议类型;变更协议/增加条款", example = "补充协议类型")
|
||||||
@ExcelProperty("补充协议类型;变更协议/增加条款")
|
|
||||||
private String replenishAgreementType;
|
private String replenishAgreementType;
|
||||||
|
|
||||||
@Schema(description = "建筑服务发生地;与ERP(JZFWFSD)对应,拓展信息,销售合同,且类型为SAP02COSR必填", example = "建筑服务发生地")
|
@Schema(description = "建筑服务发生地;与ERP(JZFWFSD)对应,拓展信息,销售合同,且类型为SAP02COSR必填", example = "建筑服务发生地")
|
||||||
@ExcelProperty("建筑服务发生地;与ERP(JZFWFSD)对应,拓展信息,销售合同,且类型为SAP02COSR必填")
|
|
||||||
private String architectureServicePlace;
|
private String architectureServicePlace;
|
||||||
|
|
||||||
@Schema(description = "达到收款条件金额;与ERP(DDSKJE)对应,拓展信息,销售合同,且类型为SAP02COSR必填")
|
@Schema(description = "达到收款条件金额;与ERP(DDSKJE)对应,拓展信息,销售合同,且类型为SAP02COSR必填")
|
||||||
@ExcelProperty("达到收款条件金额;与ERP(DDSKJE)对应,拓展信息,销售合同,且类型为SAP02COSR必填")
|
|
||||||
private BigDecimal payeeConditionAmount;
|
private BigDecimal payeeConditionAmount;
|
||||||
|
|
||||||
@Schema(description = "附件对象存储")
|
// 模板部分
|
||||||
@ExcelProperty("附件对象存储")
|
|
||||||
private String fileObject;
|
|
||||||
|
|
||||||
@Schema(description = "其它附件对象存储")
|
|
||||||
@ExcelProperty("其它附件对象存储")
|
|
||||||
private String fileObjectOther;
|
|
||||||
|
|
||||||
// 模板部分查询
|
|
||||||
@Schema(description = "模板实例主键", example = "10196")
|
@Schema(description = "模板实例主键", example = "10196")
|
||||||
@ExcelProperty("模板实例主键")
|
|
||||||
private Long instanceId;
|
private Long instanceId;
|
||||||
|
|
||||||
// 合同动态表单
|
// 合同动态表单
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ import java.util.List;
|
|||||||
@ExcelIgnoreUnannotated
|
@ExcelIgnoreUnannotated
|
||||||
public class ContractViewRespVO {
|
public class ContractViewRespVO {
|
||||||
|
|
||||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "2090")
|
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "2476")
|
||||||
@ExcelProperty("主键")
|
@ExcelProperty("主键")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "模板实例主键", example = "10196")
|
@Schema(description = "模板实例主键", example = "5352")
|
||||||
@ExcelProperty("模板实例主键")
|
@ExcelProperty("模板实例主键")
|
||||||
private Long instanceId;
|
private Long instanceId;
|
||||||
|
|
||||||
@@ -28,11 +28,11 @@ public class ContractViewRespVO {
|
|||||||
@ExcelProperty("系统合同编号;自动生成,校验唯一")
|
@ExcelProperty("系统合同编号;自动生成,校验唯一")
|
||||||
private String systemContractNumber;
|
private String systemContractNumber;
|
||||||
|
|
||||||
@Schema(description = "状态", example = "1")
|
@Schema(description = "状态", example = "2")
|
||||||
@ExcelProperty("状态")
|
@ExcelProperty("状态")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
@Schema(description = "合同名称;与ERP(HTMC)对应,校验唯一", example = "芋艿")
|
@Schema(description = "合同名称;与ERP(HTMC)对应,校验唯一", example = "李四")
|
||||||
@ExcelProperty("合同名称;与ERP(HTMC)对应,校验唯一")
|
@ExcelProperty("合同名称;与ERP(HTMC)对应,校验唯一")
|
||||||
private String contractName;
|
private String contractName;
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ public class ContractViewRespVO {
|
|||||||
@ExcelProperty("收支性质;与ERP(SZXZ)对应")
|
@ExcelProperty("收支性质;与ERP(SZXZ)对应")
|
||||||
private String direction;
|
private String direction;
|
||||||
|
|
||||||
@Schema(description = "合同类型", example = "1")
|
@Schema(description = "合同类型", example = "2")
|
||||||
@ExcelProperty("合同类型")
|
@ExcelProperty("合同类型")
|
||||||
private String contractType;
|
private String contractType;
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ public class ContractViewRespVO {
|
|||||||
@ExcelProperty("甲方公司编号;如果是采购合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是销售合同,手动选择,且与ERP(WLDWBH)对应。")
|
@ExcelProperty("甲方公司编号;如果是采购合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是销售合同,手动选择,且与ERP(WLDWBH)对应。")
|
||||||
private String purchaseCompanyNumber;
|
private String purchaseCompanyNumber;
|
||||||
|
|
||||||
@Schema(description = "甲方公司名称", example = "王五")
|
@Schema(description = "甲方公司名称", example = "芋艿")
|
||||||
@ExcelProperty("甲方公司名称")
|
@ExcelProperty("甲方公司名称")
|
||||||
private String purchaseCompanyName;
|
private String purchaseCompanyName;
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ public class ContractViewRespVO {
|
|||||||
@ExcelProperty("乙方公司编号;如果是销售合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是采购合同,手动选择,且与ERP(WLDWBH)对应。")
|
@ExcelProperty("乙方公司编号;如果是销售合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是采购合同,手动选择,且与ERP(WLDWBH)对应。")
|
||||||
private String salesCompanyNumber;
|
private String salesCompanyNumber;
|
||||||
|
|
||||||
@Schema(description = "乙方公司名称", example = "王五")
|
@Schema(description = "乙方公司名称", example = "赵六")
|
||||||
@ExcelProperty("乙方公司名称")
|
@ExcelProperty("乙方公司名称")
|
||||||
private String salesCompanyName;
|
private String salesCompanyName;
|
||||||
|
|
||||||
@@ -152,7 +152,7 @@ public class ContractViewRespVO {
|
|||||||
@ExcelProperty("质保金金额;与ERP(BZJJE)对应")
|
@ExcelProperty("质保金金额;与ERP(BZJJE)对应")
|
||||||
private BigDecimal qualityAmount;
|
private BigDecimal qualityAmount;
|
||||||
|
|
||||||
@Schema(description = "补充协议类型;变更协议/增加条款", example = "1")
|
@Schema(description = "补充协议类型;变更协议/增加条款", example = "2")
|
||||||
@ExcelProperty("补充协议类型;变更协议/增加条款")
|
@ExcelProperty("补充协议类型;变更协议/增加条款")
|
||||||
private String replenishAgreementType;
|
private String replenishAgreementType;
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@ public class ContractViewRespVO {
|
|||||||
@ExcelProperty("施工类型编号;与ERP(HTLXBH)对应,拓展信息")
|
@ExcelProperty("施工类型编号;与ERP(HTLXBH)对应,拓展信息")
|
||||||
private String constructionTypeNumber;
|
private String constructionTypeNumber;
|
||||||
|
|
||||||
@Schema(description = "施工类型名称;与ERP(HTLXMC)对应,拓展信息", example = "张三")
|
@Schema(description = "施工类型名称;与ERP(HTLXMC)对应,拓展信息", example = "李四")
|
||||||
@ExcelProperty("施工类型名称;与ERP(HTLXMC)对应,拓展信息")
|
@ExcelProperty("施工类型名称;与ERP(HTLXMC)对应,拓展信息")
|
||||||
private String constructionTypeName;
|
private String constructionTypeName;
|
||||||
|
|
||||||
@@ -216,6 +216,82 @@ public class ContractViewRespVO {
|
|||||||
@ExcelProperty("步骤")
|
@ExcelProperty("步骤")
|
||||||
private Integer step;
|
private Integer step;
|
||||||
|
|
||||||
|
@Schema(description = "ERP请求状态", example = "1")
|
||||||
|
@ExcelProperty("ERP请求状态")
|
||||||
|
private String erpStatus;
|
||||||
|
|
||||||
|
@Schema(description = "ERP请求失败原因")
|
||||||
|
@ExcelProperty("ERP请求失败原因")
|
||||||
|
private String cause;
|
||||||
|
|
||||||
|
@Schema(description = "流程实例编号", example = "27511")
|
||||||
|
@ExcelProperty("流程实例编号")
|
||||||
|
private String processInstanceId;
|
||||||
|
|
||||||
|
@Schema(description = "审批意见")
|
||||||
|
@ExcelProperty("审批意见")
|
||||||
|
private String reviewOpinion;
|
||||||
|
|
||||||
|
@Schema(description = "任务节点主键", example = "26040")
|
||||||
|
@ExcelProperty("任务节点主键")
|
||||||
|
private String taskNodeId;
|
||||||
|
|
||||||
|
@Schema(description = "模板附件对象存储")
|
||||||
|
@ExcelProperty("模板附件对象存储")
|
||||||
|
private String fileObject;
|
||||||
|
|
||||||
|
@Schema(description = "其它附件对象存储")
|
||||||
|
@ExcelProperty("其它附件对象存储")
|
||||||
|
private String fileObjectOther;
|
||||||
|
|
||||||
|
@Schema(description = "交货地点")
|
||||||
|
@ExcelProperty("交货地点")
|
||||||
|
private String deliveryAddress;
|
||||||
|
|
||||||
|
@Schema(description = "交货方式(字典:FRCST_ASN)")
|
||||||
|
@ExcelProperty("交货方式(字典:FRCST_ASN)")
|
||||||
|
private String deliveryWay;
|
||||||
|
|
||||||
|
@Schema(description = "甲方联系人")
|
||||||
|
@ExcelProperty("甲方联系人")
|
||||||
|
private String purchaseHuman;
|
||||||
|
|
||||||
|
@Schema(description = "甲方电话")
|
||||||
|
@ExcelProperty("甲方电话")
|
||||||
|
private String purchaseTel;
|
||||||
|
|
||||||
|
@Schema(description = "甲方邮箱")
|
||||||
|
@ExcelProperty("甲方邮箱")
|
||||||
|
private String purchaseEmail;
|
||||||
|
|
||||||
|
@Schema(description = "甲方传真")
|
||||||
|
@ExcelProperty("甲方传真")
|
||||||
|
private String purchaseFax;
|
||||||
|
|
||||||
|
@Schema(description = "甲方联系地址")
|
||||||
|
@ExcelProperty("甲方联系地址")
|
||||||
|
private String purchaseContactAddress;
|
||||||
|
|
||||||
|
@Schema(description = "乙方联系人")
|
||||||
|
@ExcelProperty("乙方联系人")
|
||||||
|
private String salesHuman;
|
||||||
|
|
||||||
|
@Schema(description = "乙方电话")
|
||||||
|
@ExcelProperty("乙方电话")
|
||||||
|
private String salesTel;
|
||||||
|
|
||||||
|
@Schema(description = "乙方邮箱")
|
||||||
|
@ExcelProperty("乙方邮箱")
|
||||||
|
private String salesEmail;
|
||||||
|
|
||||||
|
@Schema(description = "乙方传真")
|
||||||
|
@ExcelProperty("乙方传真")
|
||||||
|
private String salesFax;
|
||||||
|
|
||||||
|
@Schema(description = "乙方联系地址")
|
||||||
|
@ExcelProperty("乙方联系地址")
|
||||||
|
private String salesContactAddress;
|
||||||
|
|
||||||
// 物料信息
|
// 物料信息
|
||||||
private List<ContractViewDetailRespVO> detail;
|
private List<ContractViewDetailRespVO> detail;
|
||||||
|
|
||||||
|
|||||||
@@ -304,4 +304,64 @@ public class ContractMainDO extends BusinessBaseDO {
|
|||||||
*/
|
*/
|
||||||
@TableField("FILE_OBJ_OTH")
|
@TableField("FILE_OBJ_OTH")
|
||||||
private String fileObjectOther;
|
private String fileObjectOther;
|
||||||
|
/**
|
||||||
|
* 交货地点
|
||||||
|
*/
|
||||||
|
@TableField("DLVY_ADR")
|
||||||
|
private String deliveryAddress;
|
||||||
|
/**
|
||||||
|
* 交货方式(字典:FRCST_ASN)
|
||||||
|
*/
|
||||||
|
@TableField("DLVY_WY")
|
||||||
|
private String deliveryWay;
|
||||||
|
/**
|
||||||
|
* 甲方联系人
|
||||||
|
*/
|
||||||
|
@TableField("PRCH_HMN")
|
||||||
|
private String purchaseHuman;
|
||||||
|
/**
|
||||||
|
* 甲方电话
|
||||||
|
*/
|
||||||
|
@TableField("PRCH_TEL")
|
||||||
|
private String purchaseTel;
|
||||||
|
/**
|
||||||
|
* 甲方邮箱
|
||||||
|
*/
|
||||||
|
@TableField("PRCH_EM")
|
||||||
|
private String purchaseEmail;
|
||||||
|
/**
|
||||||
|
* 甲方传真
|
||||||
|
*/
|
||||||
|
@TableField("PRCH_FAX")
|
||||||
|
private String purchaseFax;
|
||||||
|
/**
|
||||||
|
* 甲方联系地址
|
||||||
|
*/
|
||||||
|
@TableField("PRCH_CTCT_ADR")
|
||||||
|
private String purchaseContactAddress;
|
||||||
|
/**
|
||||||
|
* 乙方联系人
|
||||||
|
*/
|
||||||
|
@TableField("SALE_HMN")
|
||||||
|
private String salesHuman;
|
||||||
|
/**
|
||||||
|
* 乙方电话
|
||||||
|
*/
|
||||||
|
@TableField("SALE_TEL")
|
||||||
|
private String salesTel;
|
||||||
|
/**
|
||||||
|
* 乙方邮箱
|
||||||
|
*/
|
||||||
|
@TableField("SALE_EM")
|
||||||
|
private String salesEmail;
|
||||||
|
/**
|
||||||
|
* 乙方传真
|
||||||
|
*/
|
||||||
|
@TableField("SALE_FAX")
|
||||||
|
private String salesFax;
|
||||||
|
/**
|
||||||
|
* 乙方联系地址
|
||||||
|
*/
|
||||||
|
@TableField("SALE_CTCT_ADR")
|
||||||
|
private String salesContactAddress;
|
||||||
}
|
}
|
||||||
@@ -22,6 +22,7 @@ public interface ContractMainMapper extends BaseMapperX<ContractMainDO> {
|
|||||||
.betweenIfPresent(ContractMainDO::getSignDate, reqVO.getSignDate())
|
.betweenIfPresent(ContractMainDO::getSignDate, reqVO.getSignDate())
|
||||||
.likeIfPresent(ContractMainDO::getPurchaseCompanyName, reqVO.getPurchaseCompanyName())
|
.likeIfPresent(ContractMainDO::getPurchaseCompanyName, reqVO.getPurchaseCompanyName())
|
||||||
.eqIfPresent(ContractMainDO::getBasicAmount, reqVO.getBasicAmount())
|
.eqIfPresent(ContractMainDO::getBasicAmount, reqVO.getBasicAmount())
|
||||||
|
.eqIfPresent(ContractMainDO::getStatus, reqVO.getStatus())
|
||||||
.orderByDesc(ContractMainDO::getCreateTime));
|
.orderByDesc(ContractMainDO::getCreateTime));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -543,10 +543,21 @@ public class ContractServiceImpl implements ContractService {
|
|||||||
throw exception(CONTRACT_NOT_EXISTS);
|
throw exception(CONTRACT_NOT_EXISTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 合同内容校验 TODO
|
// 合同状态校验
|
||||||
|
if (ContractStatusEnum.UNDER_REVIEW.getCode().equals(contractMainDO.getStatus())
|
||||||
|
|| ContractStatusEnum.IN_PROGRESS.getCode().equals(contractMainDO.getStatus())
|
||||||
|
|| ContractStatusEnum.TERMINATED.getCode().equals(contractMainDO.getStatus())
|
||||||
|
|| ContractStatusEnum.ARCHIVED.getCode().equals(contractMainDO.getStatus())
|
||||||
|
|| ContractStatusEnum.DELETED.getCode().equals(contractMainDO.getStatus())) {
|
||||||
|
|
||||||
|
throw exception(CONTRACT_STATUS_NOT_SUBMIT_APPROVAL,
|
||||||
|
ContractStatusEnum.valueOf(contractMainDO.getStatus()).getLabel());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 合同内容校验
|
||||||
verifyContract(get(id));
|
verifyContract(get(id));
|
||||||
|
|
||||||
// 查询用户
|
// 查询登陆用户
|
||||||
AdminUserRespDTO adminUserRespDTO = adminUserApi
|
AdminUserRespDTO adminUserRespDTO = adminUserApi
|
||||||
.getUser(SecurityFrameworkUtils.getLoginUserId()).getData();
|
.getUser(SecurityFrameworkUtils.getLoginUserId()).getData();
|
||||||
|
|
||||||
@@ -571,6 +582,11 @@ public class ContractServiceImpl implements ContractService {
|
|||||||
return "提交审批失败";
|
return "提交审批失败";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验合同内容
|
||||||
|
*
|
||||||
|
* @param contract 合同数据
|
||||||
|
*/
|
||||||
private void verifyContract(ContractViewRespVO contract) {
|
private void verifyContract(ContractViewRespVO contract) {
|
||||||
|
|
||||||
/* 合同基本信息 */
|
/* 合同基本信息 */
|
||||||
@@ -703,9 +719,22 @@ public class ContractServiceImpl implements ContractService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 物料信息 */
|
/* 物料信息 */
|
||||||
|
if (contract.getDetail() != null && !contract.getDetail().isEmpty()) {
|
||||||
|
contract.getDetail().forEach(detail -> {
|
||||||
// 物料名称不能为空
|
// 物料名称不能为空
|
||||||
|
if (StringUtils.isBlank(detail.getMaterialName())) {
|
||||||
|
throw exception(CONTRACT_DATA_NOT_EXISTS, TableFieldConstants.BSE_CTRT_DTL_MTRL_NAME_LABEL);
|
||||||
|
}
|
||||||
// 数量不能为空
|
// 数量不能为空
|
||||||
|
if (detail.getQuantity() != null) {
|
||||||
|
throw exception(CONTRACT_DATA_NOT_EXISTS, TableFieldConstants.BSE_CTRT_DTL_QTY_LABEL);
|
||||||
|
}
|
||||||
// 计量单位不能为空
|
// 计量单位不能为空
|
||||||
|
if (StringUtils.isBlank(detail.getUnit())) {
|
||||||
|
throw exception(CONTRACT_DATA_NOT_EXISTS, TableFieldConstants.BSE_CTRT_DTL_UNT_LABEL);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/* 扩展信息 */
|
/* 扩展信息 */
|
||||||
// 是否框架合同不能为空
|
// 是否框架合同不能为空
|
||||||
|
|||||||
Reference in New Issue
Block a user