Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
潘荣晟
2025-10-24 11:40:15 +08:00
41 changed files with 70 additions and 52 deletions

View File

@@ -4,16 +4,21 @@ import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.module.contractorder.api.dto.PrchOrdDtlDTO;
import com.zt.plat.module.contractorder.api.dto.PurchaseOrderWithDetailsDTO;
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PurchaseOrderDetailsRespVO;
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PurchaseOrderWithDetailsVO;
import com.zt.plat.module.contractorder.api.dto.contract.ContractRespDTO;
import com.zt.plat.module.contractorder.api.vo.contract.ContractSaveReqVO;
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PurchaseOrderDetailsRespVO;
import com.zt.plat.module.contractorder.service.contract.ContractService;
import com.zt.plat.module.contractorder.service.purchaseorder.PurchaseOrderService;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
@@ -28,6 +33,8 @@ public class ContractApiImpl implements ContractApi {
private ContractService contractService;
@Resource
private PurchaseOrderService purchaseOrderService;
@Resource
private RedisTemplate redisTemplate;
@Override
public ContractRespDTO getContractByPaperNumber(String contractPaperNumber) {
@@ -57,4 +64,17 @@ public class ContractApiImpl implements ContractApi {
});
return success(purchaseOrderWithDetailsDTOS);
}
@Override
public CommonResult<Boolean> create(@Valid @RequestBody ContractSaveReqVO reqVO) {
log.info("外部调用创建合同接口,参数:{}", reqVO);
redisTemplate.opsForHash().put(
"HT-TEMP",
reqVO.getContractPaperNumber()
+ "-"
+ LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmSSS")),
reqVO)
;
return success(true);
}
}

View File

@@ -5,7 +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.PageResult;
import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.module.contractorder.controller.admin.contract.vo.contract.*;
import com.zt.plat.module.contractorder.api.vo.contract.*;
import com.zt.plat.module.contractorder.dal.dataobject.contract.ContractMainDO;
import com.zt.plat.module.contractorder.service.contract.ContractService;
import io.swagger.v3.oas.annotations.Operation;

View File

@@ -1,23 +0,0 @@
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 ApprovalReqVO {
@Schema(description = "合同主键ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "合同主键ID不能为空")
private Long id;
@Schema(description = "审批意见", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "审核意见不能为空")
private String reviewOpinion;
@Schema(description = "状态:待推送 WAIT_PUSH已驳回 REJECTED", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "审核状态不能为空")
private String status;
}

View File

@@ -1,43 +0,0 @@
package com.zt.plat.module.contractorder.controller.admin.contract.vo.contract;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
@Schema(description = "管理后台 - 基础系数配置 Response VO")
@Data
public class CoefficientRespVO {
@Schema(description = "主键")
private Long id;
@Schema(description = "条款主键")
private Long formulaId;
@Schema(description = "金属元素编码")
private String elementNumber;
@Schema(description = "金属元素缩写")
private String elementAbbreviation;
@Schema(description = "金属元素名称")
private String elementName;
@Schema(description = "系数上限")
private BigDecimal coefficientUp;
@Schema(description = "系数下限")
private BigDecimal coefficientDown;
@Schema(description = "区间方式(字典STLM_RNG_WY)")
private String rangeWay;
@Schema(description = "是否省内")
private String inState;
@Schema(description = "类型")
private String type;
@Schema(description = "系数值")
private BigDecimal settlementCoefficient;
}

View File

@@ -1,44 +0,0 @@
package com.zt.plat.module.contractorder.controller.admin.contract.vo.contract;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
@Schema(description = "管理后台 - 基础系数配置新增/修改 Request VO")
@Data
public class CoefficientSaveReqVO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "27478")
private Long id;
@Schema(description = "条款主键", example = "13898")
private Long formulaId;
@Schema(description = "金属元素编码")
private String elementNumber;
@Schema(description = "金属元素缩写")
private String elementAbbreviation;
@Schema(description = "金属元素名称", example = "芋艿")
private String elementName;
@Schema(description = "系数上限")
private BigDecimal coefficientUp;
@Schema(description = "系数下限")
private BigDecimal coefficientDown;
@Schema(description = "区间方式(字典STLM_RNG_WY)")
private String rangeWay;
@Schema(description = "是否省内(字典ERP_CTRT_YN)")
private String inState;
@Schema(description = "类型(字典STLM_COEF)", example = "1")
private String type;
@Schema(description = "系数值")
private BigDecimal settlementCoefficient;
}

View File

@@ -1,44 +0,0 @@
package com.zt.plat.module.contractorder.controller.admin.contract.vo.contract;
import com.zt.plat.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 合同信息分页 Request VO")
@Data
public class ContractPageReqVO extends PageParam {
@Schema(description = "合同名称;与ERP(HTMC)对应,校验唯一", example = "芋艿")
private String contractName;
@Schema(description = "合同编号;与ERP(HTBH)对应,校验唯一")
private String contractPaperNumber;
@Schema(description = "状态", example = "DRAFT")
private String status;
@Schema(description = "甲方公司名称", example = "王五")
private String purchaseCompanyName;
@Schema(description = "乙方公司名称", example = "王五")
private String salesCompanyName;
@Schema(description = "收支性质;与ERP(SZXZ)对应")
private String direction;
@Schema(description = "签署日期;与ERP(HTQDRQ)对应")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] signDate;
@Schema(description = "本币金额;与ERP(HTBWBZJE)对应")
private BigDecimal basicAmount;
@Schema(description = "合同分类(字典SPLY_BSN_TP)")
private String businessType;
}

View File

@@ -1,44 +0,0 @@
package com.zt.plat.module.contractorder.controller.admin.contract.vo.contract;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 调整价配置 Response VO")
@Data
public class DeductRespVO {
@Schema(description = "主键")
private Long id;
@Schema(description = "条款主键")
private Long formulaId;
@Schema(description = "金属元素缩写")
private String elementAbbreviation;
@Schema(description = "数据项类型(字典:GRD_CFG_TP)")
private String configType;
@Schema(description = "是否省内")
private String inState;
@Schema(description = "调整价")
private BigDecimal gradeAmount;
@Schema(description = "区间方式(字典STLM_RNG_WY)")
private String rangeWay;
@Schema(description = "上限")
private BigDecimal up;
@Schema(description = "下限")
private BigDecimal down;
@Schema(description = "类型(字典STLM_COEF)")
private String type;
@Schema(description = "创建时间")
private LocalDateTime createTime;
}

View File

@@ -1,41 +0,0 @@
package com.zt.plat.module.contractorder.controller.admin.contract.vo.contract;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
@Schema(description = "管理后台 - 调整价配置新增/修改 Request VO")
@Data
public class DeductSaveReqVO {
@Schema(description = "主键")
private Long id;
@Schema(description = "条款主键")
private Long formulaId;
@Schema(description = "金属元素缩写")
private String elementAbbreviation;
@Schema(description = "数据项类型(字典:GRD_CFG_TP)")
private String configType;
@Schema(description = "是否省内")
private String inState;
@Schema(description = "调整价")
private BigDecimal gradeAmount;
@Schema(description = "区间方式(字典STLM_RNG_WY)")
private String rangeWay;
@Schema(description = "上限")
private BigDecimal up;
@Schema(description = "下限")
private BigDecimal down;
@Schema(description = "类型(字典STLM_COEF)")
private String type;
}

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