合同数据结构修改、合同审核接口部分代码
This commit is contained in:
@@ -17,7 +17,8 @@ public interface ErrorCodeConstants {
|
|||||||
ErrorCode CONTRACT_PAPER_NUMBER_EXISTS = new ErrorCode(1_027_000_002, "合同编号已存在");
|
ErrorCode CONTRACT_PAPER_NUMBER_EXISTS = new ErrorCode(1_027_000_002, "合同编号已存在");
|
||||||
ErrorCode CONTRACT_NOT_EXISTS = new ErrorCode(1_027_000_003, "合同不存在");
|
ErrorCode CONTRACT_NOT_EXISTS = new ErrorCode(1_027_000_003, "合同不存在");
|
||||||
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, "{}合同不允许提交审核");
|
ErrorCode CONTRACT_STATUS_NOT_SUBMIT_APPROVAL = new ErrorCode(1_027_000_007, "{}状态合同不允许提交审核");
|
||||||
|
ErrorCode CONTRACT_STATUS_NOT_APPROVAL = new ErrorCode(1_027_000_008, "{}状态合同不允许审核");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,8 +99,8 @@ public class TableFieldConstants {
|
|||||||
public static final String BSE_CTRT_PLN_CTRT_DTL_ID = "CTRT_DTL_ID";
|
public static final String BSE_CTRT_PLN_CTRT_DTL_ID = "CTRT_DTL_ID";
|
||||||
|
|
||||||
/* 价款结算条款表 */
|
/* 价款结算条款表 */
|
||||||
// 合同明细主键
|
// 合同主键
|
||||||
public static final String BSE_CTRT_FMU_CTRT_DTL_ID = "CTRT_DTL_ID";
|
public static final String BSE_CTRT_FMU_CTRT_ID = "CTRT_ID";
|
||||||
|
|
||||||
/* 基础系数配置表 */
|
/* 基础系数配置表 */
|
||||||
// 条款主键
|
// 条款主键
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package com.zt.plat.module.contractorder.enums.contract;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同审核结果
|
||||||
|
*/
|
||||||
|
public enum AuditResultEnum {
|
||||||
|
/**
|
||||||
|
* 合同状态-草稿
|
||||||
|
*/
|
||||||
|
PASS("通过","PASS", null),
|
||||||
|
/**
|
||||||
|
* 合同状态-正在审核
|
||||||
|
*/
|
||||||
|
REJECT("驳回","REJECT",null);
|
||||||
|
|
||||||
|
AuditResultEnum(String label, String code, String remark) {
|
||||||
|
this.label = label;
|
||||||
|
this.code = code;
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签
|
||||||
|
*/
|
||||||
|
private final String label;
|
||||||
|
/**
|
||||||
|
* 编码
|
||||||
|
*/
|
||||||
|
private final String code;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private final String remark;
|
||||||
|
|
||||||
|
public String getLabel() {
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,10 +5,7 @@ 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;
|
||||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||||
import com.zt.plat.module.contractorder.controller.admin.contract.vo.contract.ContractPageReqVO;
|
import com.zt.plat.module.contractorder.controller.admin.contract.vo.contract.*;
|
||||||
import com.zt.plat.module.contractorder.controller.admin.contract.vo.contract.ContractRespVO;
|
|
||||||
import com.zt.plat.module.contractorder.controller.admin.contract.vo.contract.ContractSaveReqVO;
|
|
||||||
import com.zt.plat.module.contractorder.controller.admin.contract.vo.contract.ContractViewRespVO;
|
|
||||||
import com.zt.plat.module.contractorder.dal.dataobject.contract.ContractMainDO;
|
import com.zt.plat.module.contractorder.dal.dataobject.contract.ContractMainDO;
|
||||||
import com.zt.plat.module.contractorder.service.contract.ContractService;
|
import com.zt.plat.module.contractorder.service.contract.ContractService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
@@ -109,6 +106,14 @@ public class ContractController implements BusinessControllerMarker {
|
|||||||
return success(contractService.submitApproval(id));
|
return success(contractService.submitApproval(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
@PostMapping("/approval")
|
||||||
|
@Operation(summary = "合同审批")
|
||||||
|
@PreAuthorize("@ss.hasPermission('system:contract:approval')")
|
||||||
|
public CommonResult<String> approval(@Valid @RequestBody ContractApprovalReqVO reqVO) {
|
||||||
|
return success(contractService.approval(reqVO));
|
||||||
|
}
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
@PostMapping("/view/approval")
|
@PostMapping("/view/approval")
|
||||||
@Operation(summary = "查看审批")
|
@Operation(summary = "查看审批")
|
||||||
@@ -117,9 +122,9 @@ public class ContractController implements BusinessControllerMarker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
@PostMapping("/submit/ERP")
|
@PostMapping("/submit/erp")
|
||||||
@Operation(summary = "提交ERP")
|
@Operation(summary = "提交ERP")
|
||||||
@PreAuthorize("@ss.hasPermission('system:contract:erp')")
|
@PreAuthorize("@ss.hasPermission('system:contract:erp')")
|
||||||
public void submitERP() {
|
public void submitErp() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.zt.plat.module.contractorder.controller.admin.contract.vo.contract;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 合同审核请求对象 Request VO")
|
||||||
|
@Data
|
||||||
|
public class ContractApprovalReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "合同主键ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "合同主键ID不能为空")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "审核结果(通过:PASS,驳回:REJECT)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotBlank(message = "审核结果不能为空")
|
||||||
|
private String auditResult;
|
||||||
|
|
||||||
|
@Schema(description = "审批意见", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotBlank(message = "审核意见不能为空")
|
||||||
|
private String reviewOpinion;
|
||||||
|
}
|
||||||
@@ -42,7 +42,4 @@ public class ContractDetailSaveReqVO {
|
|||||||
|
|
||||||
// 交货计划
|
// 交货计划
|
||||||
private List<ContractPlanSaveReqVO> plans;
|
private List<ContractPlanSaveReqVO> plans;
|
||||||
|
|
||||||
// 价款结算条款
|
|
||||||
private List<ContractFormulaSaveReqVO> formulas;
|
|
||||||
}
|
}
|
||||||
@@ -10,14 +10,14 @@ import java.util.List;
|
|||||||
@Data
|
@Data
|
||||||
public class ContractFormulaSaveReqVO {
|
public class ContractFormulaSaveReqVO {
|
||||||
|
|
||||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "28539")
|
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "22933")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "合同明细主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "8181")
|
@Schema(description = "合同主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "9162")
|
||||||
@NotNull(message = "合同明细主键不能为空")
|
@NotNull(message = "合同主键不能为空")
|
||||||
private Long contractDetailId;
|
private Long contractId;
|
||||||
|
|
||||||
@Schema(description = "公式类型;单价/总价/水扣款/加工费", example = "UNIT_PRICE")
|
@Schema(description = "公式类型;单价/总价/水扣款/加工费", example = "1")
|
||||||
private String formulaType;
|
private String formulaType;
|
||||||
|
|
||||||
@Schema(description = "公式")
|
@Schema(description = "公式")
|
||||||
@@ -26,7 +26,7 @@ public class ContractFormulaSaveReqVO {
|
|||||||
@Schema(description = "编码公式")
|
@Schema(description = "编码公式")
|
||||||
private String numberFormula;
|
private String numberFormula;
|
||||||
|
|
||||||
@Schema(description = "物料名称", example = "物料名称")
|
@Schema(description = "物料名称", example = "赵六")
|
||||||
private String materialName;
|
private String materialName;
|
||||||
|
|
||||||
@Schema(description = "物料编码")
|
@Schema(description = "物料编码")
|
||||||
@@ -41,10 +41,10 @@ public class ContractFormulaSaveReqVO {
|
|||||||
@Schema(description = "金属元素缩写")
|
@Schema(description = "金属元素缩写")
|
||||||
private String elementAbbreviation;
|
private String elementAbbreviation;
|
||||||
|
|
||||||
@Schema(description = "金属元素名称", example = "金属元素名称")
|
@Schema(description = "金属元素名称", example = "赵六")
|
||||||
private String elementName;
|
private String elementName;
|
||||||
|
|
||||||
@Schema(description = "结算类型,多条使用逗号分隔(字典:PRCH_STLM_TP)", example = "LST")
|
@Schema(description = "结算类型,多条使用逗号分隔(字典:PRCH_STLM_TP)", example = "1")
|
||||||
private String settlementType;
|
private String settlementType;
|
||||||
|
|
||||||
// 基础系数配置
|
// 基础系数配置
|
||||||
|
|||||||
@@ -214,4 +214,7 @@ public class ContractSaveReqVO {
|
|||||||
|
|
||||||
// 合同动态表单
|
// 合同动态表单
|
||||||
private List<TemplateInstanceDataSaveReqVO> dynamicsFields;
|
private List<TemplateInstanceDataSaveReqVO> dynamicsFields;
|
||||||
|
|
||||||
|
// 价款结算条款
|
||||||
|
private List<ContractFormulaSaveReqVO> formulas;
|
||||||
}
|
}
|
||||||
@@ -38,7 +38,4 @@ public class ContractViewDetailRespVO {
|
|||||||
|
|
||||||
// 交货计划
|
// 交货计划
|
||||||
private List<ContractViewPlanRespVO> plans;
|
private List<ContractViewPlanRespVO> plans;
|
||||||
|
|
||||||
// 价款结算条款
|
|
||||||
private List<ContractViewFormulaRespVO> formulas;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ import java.util.List;
|
|||||||
@Schema(description = "管理后台 - 价款结算条款 Response VO")
|
@Schema(description = "管理后台 - 价款结算条款 Response VO")
|
||||||
@Data
|
@Data
|
||||||
public class ContractViewFormulaRespVO {
|
public class ContractViewFormulaRespVO {
|
||||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "28539")
|
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "22933")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "合同明细主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "8181")
|
@Schema(description = "合同主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "9162")
|
||||||
private Long contractDetailId;
|
private Long contractId;
|
||||||
|
|
||||||
@Schema(description = "公式类型;单价/总价/水扣款/加工费", example = "UNIT_PRICE")
|
@Schema(description = "公式类型;单价/总价/水扣款/加工费", example = "1")
|
||||||
private String formulaType;
|
private String formulaType;
|
||||||
|
|
||||||
@Schema(description = "公式")
|
@Schema(description = "公式")
|
||||||
@@ -23,7 +23,7 @@ public class ContractViewFormulaRespVO {
|
|||||||
@Schema(description = "编码公式")
|
@Schema(description = "编码公式")
|
||||||
private String numberFormula;
|
private String numberFormula;
|
||||||
|
|
||||||
@Schema(description = "物料名称", example = "物料名称")
|
@Schema(description = "物料名称", example = "赵六")
|
||||||
private String materialName;
|
private String materialName;
|
||||||
|
|
||||||
@Schema(description = "物料编码")
|
@Schema(description = "物料编码")
|
||||||
@@ -38,9 +38,12 @@ public class ContractViewFormulaRespVO {
|
|||||||
@Schema(description = "金属元素缩写")
|
@Schema(description = "金属元素缩写")
|
||||||
private String elementAbbreviation;
|
private String elementAbbreviation;
|
||||||
|
|
||||||
@Schema(description = "金属元素名称", example = "金属元素名称")
|
@Schema(description = "金属元素名称", example = "赵六")
|
||||||
private String elementName;
|
private String elementName;
|
||||||
|
|
||||||
|
@Schema(description = "结算类型,多条使用逗号分隔(字典:PRCH_STLM_TP)", example = "1")
|
||||||
|
private String settlementType;
|
||||||
|
|
||||||
// 基础系数配置
|
// 基础系数配置
|
||||||
private List<ContractViewCoefficientRespVO> coefficients;
|
private List<ContractViewCoefficientRespVO> coefficients;
|
||||||
// 品位等级价配置
|
// 品位等级价配置
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user