Merge branch 'refs/heads/dev' into test

# Conflicts:
#	zt-module-contract-order/zt-module-contract-order-api/src/main/java/com/zt/plat/module/contractorder/enums/ErrorCodeConstants.java
#	zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/controller/admin/contract/ContractController.java
#	zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/controller/admin/contract/vo/contract/ContractNotSaveReqVO.java
#	zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/controller/admin/contract/vo/contract/ContractSaveReqVO.java
#	zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/controller/admin/contract/vo/contract/ContractViewNotRespVO.java
#	zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/controller/admin/contract/vo/contract/ContractViewRespVO.java
#	zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/controller/admin/contract/vo/contract/DetailRespVO.java
#	zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/controller/admin/contract/vo/contract/DetailSaveReqVO.java
#	zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/controller/admin/contract/vo/contract/FormulaRespVO.java
#	zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/controller/admin/contract/vo/contract/FormulaSaveReqVO.java
#	zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/dal/mysql/contract/ContractDemoteMapper.java
#	zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/service/contract/ContractService.java
#	zt-module-contract-order/zt-module-contract-order-server/src/main/java/com/zt/plat/module/contractorder/service/contract/ContractServiceImpl.java
This commit is contained in:
liss
2025-10-11 09:50:49 +08:00
113 changed files with 3889 additions and 1088 deletions

View File

@@ -0,0 +1,22 @@
package com.zt.plat.module.contractorder.api;
import com.zt.plat.module.contractorder.api.dto.ContractFormulaRespDTO;
import com.zt.plat.module.contractorder.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 合同")
public interface ContractApi {
String PREFIX = ApiConstants.PREFIX + "/contract";
@GetMapping(PREFIX + "/formulas")
@Operation(summary = "通过合同编号获取对应的结算条款数据")
List<ContractFormulaRespDTO> getFormulas(@RequestParam("contractPaperNumber") String contractPaperNumber);
}

View File

@@ -1,4 +1,4 @@
package com.zt.plat.module.contractorder.controller.admin.contract.vo.contract; package com.zt.plat.module.contractorder.api.dto;
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.NotEmpty;
@@ -6,16 +6,17 @@ import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
@Schema(description = "管理后台 - 基础系数配置 Response VO") @Schema(description = "RPC 服务 - 基础系数配置 Response DTO")
@Data @Data
public class ContractViewCoefficientRespVO { public class ContractCoefficientRespDTO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31657")
@Schema(description = "主键")
private Long id; private Long id;
@Schema(description = "配置主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "6534") @Schema(description = "配置主键")
private Long parameterId; private Long parameterId;
@Schema(description = "条款主键", example = "29652") @Schema(description = "条款主键")
private Long formulaId; private Long formulaId;
@Schema(description = "金属元素编码") @Schema(description = "金属元素编码")
@@ -24,7 +25,7 @@ public class ContractViewCoefficientRespVO {
@Schema(description = "金属元素缩写") @Schema(description = "金属元素缩写")
private String elementAbbreviation; private String elementAbbreviation;
@Schema(description = "金属元素名称", example = "芋艿") @Schema(description = "金属元素名称")
private String elementName; private String elementName;
@Schema(description = "系数值") @Schema(description = "系数值")
@@ -42,10 +43,10 @@ public class ContractViewCoefficientRespVO {
@Schema(description = "是否包含下限") @Schema(description = "是否包含下限")
private String isInDown; private String isInDown;
@Schema(description = "是否省内", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "是否省内")
@NotEmpty(message = "是否省内不能为空") @NotEmpty(message = "是否省内不能为空")
private String inState; private String inState;
@Schema(description = "类型", example = "1") @Schema(description = "类型")
private String type; private String type;
} }

View File

@@ -0,0 +1,50 @@
package com.zt.plat.module.contractorder.api.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
@Schema(description = "RPC 服务 - 调整价配置 Response DTO")
@Data
public class ContractDeductRespDTO {
@Schema(description = "主键")
private Long id;
@Schema(description = "配置主键")
private Long parameterId;
@Schema(description = "条款主键")
private Long formulaId;
@Schema(description = "物料编码;推送ERP")
private String materialNumber;
@Schema(description = "物料名称")
private String materialName;
@Schema(description = "上限")
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 = "类型")
private String type;
@Schema(description = "是否省内")
private String inState;
@Schema(description = "调整价")
private BigDecimal gradeAmount;
}

View File

@@ -0,0 +1,56 @@
package com.zt.plat.module.contractorder.api.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.List;
@Schema(description = "RPC 服务 - 价款结算条款 Response DTO")
@Data
public class ContractFormulaRespDTO {
@Schema(description = "主键")
private Long id;
@Schema(description = "合同主键")
private Long contractId;
@Schema(description = "公式类型;单价/总价/水扣款/加工费")
private String formulaType;
@Schema(description = "公式")
private String formulaCalculate;
@Schema(description = "编码公式")
private String numberFormula;
@Schema(description = "物料名称")
private String materialName;
@Schema(description = "物料编码")
private String materialNumber;
@Schema(description = "计算小数位")
private Long decimalPoint;
@Schema(description = "金属元素编码")
private String elementNumber;
@Schema(description = "金属元素缩写")
private String elementAbbreviation;
@Schema(description = "金属元素名称")
private String elementName;
@Schema(description = "结算类型多条使用逗号分隔字典PRCH_STLM_TP")
private String settlementType;
// 基础系数配置
private List<ContractCoefficientRespDTO> coefficients;
// 品位等级价配置
private List<ContractGradeRespDTO> grades;
// 调整价配置
private List<ContractDeductRespDTO> deducts;
// 市场价配置
private List<ContractPriceRespDTO> prices;
}

View File

@@ -1,21 +1,21 @@
package com.zt.plat.module.contractorder.controller.admin.contract.vo.contract; package com.zt.plat.module.contractorder.api.dto;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
@Schema(description = "管理后台 - 品位等级价配置 Response VO") @Schema(description = "RPC 服务 - 品位等级价配置 Response DTO")
@Data @Data
public class ContractViewGradeRespVO { public class ContractGradeRespDTO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "15414")
@Schema(description = "主键")
private Long id; private Long id;
@Schema(description = "配置主键", example = "16734") @Schema(description = "配置主键")
private Long parameterId; private Long parameterId;
@Schema(description = "条款主键", example = "15344") @Schema(description = "条款主键")
private Long formulaId; private Long formulaId;
@Schema(description = "金属元素编码") @Schema(description = "金属元素编码")
@@ -24,7 +24,7 @@ public class ContractViewGradeRespVO {
@Schema(description = "金属元素缩写") @Schema(description = "金属元素缩写")
private String elementAbbreviation; private String elementAbbreviation;
@Schema(description = "金属元素名称", example = "芋艿") @Schema(description = "金属元素名称")
private String elementName; private String elementName;
@Schema(description = "品位单位") @Schema(description = "品位单位")
@@ -51,13 +51,12 @@ public class ContractViewGradeRespVO {
@Schema(description = "不足系数值按比例计算") @Schema(description = "不足系数值按比例计算")
private String useCoefficient; private String useCoefficient;
@Schema(description = "计价类型", example = "2") @Schema(description = "计价类型")
private String priceType; private String priceType;
@Schema(description = "是否省内", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "是否省内")
@NotEmpty(message = "是否省内不能为空")
private String inState; private String inState;
@Schema(description = "等级单价", example = "26237") @Schema(description = "等级单价")
private BigDecimal unitPrice; private BigDecimal unitPrice;
} }

View File

@@ -0,0 +1,54 @@
package com.zt.plat.module.contractorder.api.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@Schema(description = "RPC 服务 - 市场价配置 Response DTO")
@Data
public class ContractPriceRespDTO {
@Schema(description = "主键")
private Long id;
@Schema(description = "配置主键")
private Long parameterId;
@Schema(description = "条款主键")
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 = "品种分类")
private String gradeType;
@Schema(description = "取价方式;区间价/固定价")
private String averageType;
@Schema(description = "网价小数位")
private BigDecimal decimalPoint;
}

View File

@@ -20,4 +20,7 @@ public class ApiConstants {
public static final String VERSION = "1.0.0"; public static final String VERSION = "1.0.0";
public static final String PURCHASE = "甲方";
public static final String SALES = "乙方";
} }

View File

@@ -21,4 +21,5 @@ public interface ErrorCodeConstants {
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_007, "{}状态合同不允许提交审核"); ErrorCode CONTRACT_STATUS_NOT_SUBMIT_APPROVAL = new ErrorCode(1_027_000_007, "{}状态合同不允许提交审核");
ErrorCode CONTRACT_STATUS_NOT_APPROVAL = new ErrorCode(1_027_000_008, "{}状态合同不允许审核"); ErrorCode CONTRACT_STATUS_NOT_APPROVAL = new ErrorCode(1_027_000_008, "{}状态合同不允许审核");
ErrorCode CONTRACT_ERP_COMPANY_PLEASE_BIND = new ErrorCode(1_027_000_009, "请先绑定{}ERP公司信息");
} }

View File

@@ -0,0 +1,17 @@
package com.zt.plat.module.contractorder.enums.purchaseorder;
import com.zt.plat.framework.common.exception.ErrorCode;
/**
* contract-order 错误码枚举类
*
* contract-order 系统,使用 1-xxx-xxx-xxx 段
*
* @author ZT
*/
public interface ErrorCodeConstants {
ErrorCode PURCHASE_ORDER_NOT_EXISTS = new ErrorCode(1_008_000_001, "采购订单不存在");
ErrorCode PRCH_ORD_DTL_NOT_EXISTS = new ErrorCode(1_008_001_001, "采购订单明细不存在");
}

View File

@@ -136,6 +136,11 @@
<artifactId>zt-module-bpm-api</artifactId> <artifactId>zt-module-bpm-api</artifactId>
<version>${revision}</version> <version>${revision}</version>
</dependency> </dependency>
<dependency>
<groupId>com.zt.plat</groupId>
<artifactId>zt-module-erp-server</artifactId>
<version>${revision}</version>
</dependency>
</dependencies> </dependencies>
<build> <build>

Some files were not shown because too many files have changed in this diff Show More