Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -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);
|
||||
}
|
||||
@@ -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 jakarta.validation.constraints.NotEmpty;
|
||||
@@ -6,16 +6,17 @@ import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 基础系数配置 Response VO")
|
||||
@Schema(description = "RPC 服务 - 基础系数配置 Response DTO")
|
||||
@Data
|
||||
public class ContractViewCoefficientRespVO {
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31657")
|
||||
public class ContractCoefficientRespDTO {
|
||||
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "配置主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "6534")
|
||||
@Schema(description = "配置主键")
|
||||
private Long parameterId;
|
||||
|
||||
@Schema(description = "条款主键", example = "29652")
|
||||
@Schema(description = "条款主键")
|
||||
private Long formulaId;
|
||||
|
||||
@Schema(description = "金属元素编码")
|
||||
@@ -24,7 +25,7 @@ public class ContractViewCoefficientRespVO {
|
||||
@Schema(description = "金属元素缩写")
|
||||
private String elementAbbreviation;
|
||||
|
||||
@Schema(description = "金属元素名称", example = "芋艿")
|
||||
@Schema(description = "金属元素名称")
|
||||
private String elementName;
|
||||
|
||||
@Schema(description = "系数值")
|
||||
@@ -42,10 +43,10 @@ public class ContractViewCoefficientRespVO {
|
||||
@Schema(description = "是否包含下限")
|
||||
private String isInDown;
|
||||
|
||||
@Schema(description = "是否省内", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "是否省内")
|
||||
@NotEmpty(message = "是否省内不能为空")
|
||||
private String inState;
|
||||
|
||||
@Schema(description = "类型", example = "1")
|
||||
@Schema(description = "类型")
|
||||
private String type;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
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 ContractGradeRespDTO {
|
||||
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "配置主键")
|
||||
private Long parameterId;
|
||||
|
||||
@Schema(description = "条款主键")
|
||||
private Long formulaId;
|
||||
|
||||
@Schema(description = "金属元素编码")
|
||||
private String elementNumber;
|
||||
|
||||
@Schema(description = "金属元素缩写")
|
||||
private String elementAbbreviation;
|
||||
|
||||
@Schema(description = "金属元素名称")
|
||||
private String elementName;
|
||||
|
||||
@Schema(description = "品位单位")
|
||||
private String gradeUnit;
|
||||
|
||||
@Schema(description = "品位上限")
|
||||
private BigDecimal gradeUp;
|
||||
|
||||
@Schema(description = "品位下限")
|
||||
private BigDecimal gradeDown;
|
||||
|
||||
@Schema(description = "是否包含上限;包含则是大于等于,不包含则是大于")
|
||||
private String isInUp;
|
||||
|
||||
@Schema(description = "是否包含下限;包含则是小于等于,不包含则是小于")
|
||||
private String isInDown;
|
||||
|
||||
@Schema(description = "默认计价品位;计价方式为加时,默认为为下限,计价方式为减时,默认为为上限,可手动填写")
|
||||
private BigDecimal gradeDefault;
|
||||
|
||||
@Schema(description = "系数;计价类型为阶梯价使用,标识没上升多少系数进行加款还是减款")
|
||||
private BigDecimal settlementCoefficient;
|
||||
|
||||
@Schema(description = "不足系数值按比例计算")
|
||||
private String useCoefficient;
|
||||
|
||||
@Schema(description = "计价类型")
|
||||
private String priceType;
|
||||
|
||||
@Schema(description = "是否省内")
|
||||
private String inState;
|
||||
|
||||
@Schema(description = "等级单价")
|
||||
private BigDecimal unitPrice;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.zt.plat.module.contractorder.api;
|
||||
|
||||
import com.zt.plat.module.contractorder.api.dto.ContractFormulaRespDTO;
|
||||
import com.zt.plat.module.contractorder.service.contract.ContractService;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
@Slf4j
|
||||
public class ContractApiImpl implements ContractApi {
|
||||
|
||||
@Resource
|
||||
private ContractService contractService;
|
||||
|
||||
@Override
|
||||
public List<ContractFormulaRespDTO> getFormulas(String contractPaperNumber) {
|
||||
System.out.println("contract feign" + contractPaperNumber);
|
||||
return List.of();
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,8 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Slf4j
|
||||
@@ -38,9 +40,30 @@ public class ContractController implements BusinessControllerMarker {
|
||||
return success(BeanUtils.toBean(pageResult, ContractRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/nots")
|
||||
@Operation(summary = "查询不计价规则列表")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:query')")
|
||||
public CommonResult<List<NotRespVO>> getNots(NotsQueryReqVO queryReqVO) {
|
||||
return success(contractService.getNots(queryReqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/demotes")
|
||||
@Operation(summary = "查询参数降级规则列表")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:query')")
|
||||
public CommonResult<List<DemoteRespVO>> getDemotes(DemotesQueryReqVO queryReqVO) {
|
||||
return success(contractService.getDemotes(queryReqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/formulas")
|
||||
@Operation(summary = "查询结算公式列表")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:query')")
|
||||
public CommonResult<List<FormulaRespVO>> getFormulas(FormulasQueryReqVO queryReqVO) {
|
||||
return success(contractService.getFormulas(queryReqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "新增合同")
|
||||
@PreAuthorize("@ss.hasPermission('system:contract:create')")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:create')")
|
||||
public CommonResult<JSONObject> create(@Valid @RequestBody ContractSaveReqVO reqVO) {
|
||||
Long id = contractService.createContract(reqVO);
|
||||
return success(new JSONObject().putOnce("id", id));
|
||||
@@ -49,15 +72,15 @@ public class ContractController implements BusinessControllerMarker {
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得合同详情")
|
||||
@Parameter(name = "id", description = "合同ID", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('system:contract:get')")
|
||||
public CommonResult<ContractViewRespVO> get(@RequestParam("id") Long id) {
|
||||
ContractViewRespVO contractViewRespVO = contractService.get(id);
|
||||
return success(contractViewRespVO);
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:get')")
|
||||
public CommonResult<ContractRespVO> get(@RequestParam("id") Long id) {
|
||||
ContractRespVO contractRespVO = contractService.get(id);
|
||||
return success(contractRespVO);
|
||||
}
|
||||
|
||||
@PutMapping("update")
|
||||
@Operation(summary = "修改合同")
|
||||
@PreAuthorize("@ss.hasPermission('system:contract:update')")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:update')")
|
||||
public CommonResult<Boolean> update(@Valid @RequestBody ContractSaveReqVO reqVO) {
|
||||
return success(contractService.update(reqVO));
|
||||
}
|
||||
@@ -66,7 +89,7 @@ public class ContractController implements BusinessControllerMarker {
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除合同")
|
||||
@Parameter(name = "ids", description = "合同ID集合", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('system:contract:delete')")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:delete')")
|
||||
public CommonResult<Boolean> delete(@RequestParam("ids") Long[] ids) {
|
||||
return success(true);
|
||||
}
|
||||
@@ -74,34 +97,34 @@ public class ContractController implements BusinessControllerMarker {
|
||||
// TODO
|
||||
@PostMapping("/download")
|
||||
@Operation(summary = "下载文件")
|
||||
@PreAuthorize("@ss.hasPermission('system:contract:download')")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:download')")
|
||||
public void download() {
|
||||
}
|
||||
|
||||
// TODO
|
||||
@PostMapping("/preview")
|
||||
@Operation(summary = "预览文件")
|
||||
@PreAuthorize("@ss.hasPermission('system:contract:preview')")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:preview')")
|
||||
public void preview() {
|
||||
}
|
||||
|
||||
// TODO
|
||||
@PostMapping("/complete")
|
||||
@Operation(summary = "完结")
|
||||
@PreAuthorize("@ss.hasPermission('system:contract:complete')")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:complete')")
|
||||
public void complete() {
|
||||
}
|
||||
|
||||
// TODO
|
||||
@PostMapping("/archive")
|
||||
@Operation(summary = "归档")
|
||||
@PreAuthorize("@ss.hasPermission('system:contract:archive')")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:archive')")
|
||||
public void archive() {
|
||||
}
|
||||
|
||||
@GetMapping("/submit/approval")
|
||||
@Operation(summary = "合同提交审批")
|
||||
@PreAuthorize("@ss.hasPermission('system:contract:approval')")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:approval')")
|
||||
public CommonResult<String> submitApproval(@RequestParam("id") Long id) {
|
||||
return success(contractService.submitApproval(id));
|
||||
}
|
||||
@@ -109,22 +132,22 @@ public class ContractController implements BusinessControllerMarker {
|
||||
// TODO
|
||||
@PostMapping("/approval")
|
||||
@Operation(summary = "合同审批")
|
||||
@PreAuthorize("@ss.hasPermission('system:contract:approval')")
|
||||
public CommonResult<String> approval(@Valid @RequestBody ContractApprovalReqVO reqVO) {
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:approval')")
|
||||
public CommonResult<String> approval(@Valid @RequestBody ApprovalReqVO reqVO) {
|
||||
return success(contractService.approval(reqVO));
|
||||
}
|
||||
|
||||
// TODO
|
||||
@PostMapping("/view/approval")
|
||||
@Operation(summary = "查看审批")
|
||||
@PreAuthorize("@ss.hasPermission('system:contract:approval')")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:approval')")
|
||||
public void viewApproval() {
|
||||
}
|
||||
|
||||
// TODO
|
||||
@PostMapping("/submit/erp")
|
||||
@Operation(summary = "提交ERP")
|
||||
@PreAuthorize("@ss.hasPermission('system:contract:erp')")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:erp')")
|
||||
public void submitErp() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 合同审核请求对象 Request VO")
|
||||
@Data
|
||||
public class ContractApprovalReqVO {
|
||||
public class ApprovalReqVO {
|
||||
|
||||
@Schema(description = "合同主键ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "合同主键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 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;
|
||||
}
|
||||
@@ -1,23 +1,18 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.contract.vo.contract;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 基础系数配置新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContractCoefficientSaveReqVO {
|
||||
public class CoefficientSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31657")
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "27478")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "配置主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "6534")
|
||||
@NotNull(message = "配置主键不能为空")
|
||||
private Long parameterId;
|
||||
|
||||
@Schema(description = "条款主键", example = "29652")
|
||||
@Schema(description = "条款主键", example = "13898")
|
||||
private Long formulaId;
|
||||
|
||||
@Schema(description = "金属元素编码")
|
||||
@@ -29,25 +24,21 @@ public class ContractCoefficientSaveReqVO {
|
||||
@Schema(description = "金属元素名称", example = "芋艿")
|
||||
private String elementName;
|
||||
|
||||
@Schema(description = "系数值")
|
||||
private String settlementCoefficient;
|
||||
|
||||
@Schema(description = "系数上限")
|
||||
private BigDecimal coefficientUp;
|
||||
|
||||
@Schema(description = "系数下限")
|
||||
private BigDecimal coefficientDown;
|
||||
|
||||
@Schema(description = "是否包含上限")
|
||||
private String isInUp;
|
||||
@Schema(description = "区间方式(字典:STLM_RNG_WY)")
|
||||
private String rangeWay;
|
||||
|
||||
@Schema(description = "是否包含下限")
|
||||
private String isInDown;
|
||||
|
||||
@Schema(description = "是否省内", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "是否省内不能为空")
|
||||
@Schema(description = "是否省内(字典:ERP_CTRT_YN)")
|
||||
private String inState;
|
||||
|
||||
@Schema(description = "类型", example = "1")
|
||||
@Schema(description = "类型(字典:STLM_COEF)", example = "1")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "系数值")
|
||||
private BigDecimal settlementCoefficient;
|
||||
}
|
||||
@@ -1,54 +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.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 调整价配置新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContractDeductSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "25312")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "配置主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "21114")
|
||||
@NotNull(message = "配置主键不能为空")
|
||||
private Long parameterId;
|
||||
|
||||
@Schema(description = "条款主键", example = "29909")
|
||||
private Long formulaId;
|
||||
|
||||
@Schema(description = "物料编码;推送ERP")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "物料名称", example = "张三")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "上限", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "上限不能为空")
|
||||
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 = "类型", example = "1")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "是否省内", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "是否省内不能为空")
|
||||
private String inState;
|
||||
|
||||
@Schema(description = "调整价")
|
||||
private BigDecimal gradeAmount;
|
||||
}
|
||||
@@ -1,215 +1,242 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.contract.vo.contract;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TemplateInstanceDataRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TemplateInstanceItemRespVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 合同信息 Response VO")
|
||||
@Schema(description = "管理后台 - 合同详情 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ContractRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "2090")
|
||||
@ExcelProperty("主键")
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "模板实例主键", example = "10196")
|
||||
@ExcelProperty("模板实例主键")
|
||||
@Schema(description = "模板实例主键")
|
||||
private Long instanceId;
|
||||
|
||||
@Schema(description = "系统合同编号;自动生成,校验唯一")
|
||||
@ExcelProperty("系统合同编号;自动生成,校验唯一")
|
||||
private String systemContractNumber;
|
||||
|
||||
@Schema(description = "状态", example = "1")
|
||||
@ExcelProperty("状态")
|
||||
@Schema(description = "状态")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "合同名称;与ERP(HTMC)对应,校验唯一", example = "芋艿")
|
||||
@ExcelProperty("合同名称;与ERP(HTMC)对应,校验唯一")
|
||||
@Schema(description = "合同名称;与ERP(HTMC)对应,校验唯一")
|
||||
private String contractName;
|
||||
|
||||
@Schema(description = "合同编号;与ERP(HTBH)对应,校验唯一")
|
||||
@ExcelProperty("合同编号;与ERP(HTBH)对应,校验唯一")
|
||||
private String contractPaperNumber;
|
||||
|
||||
@Schema(description = "是否虚拟合同;与ERP(SFXNHT)对应")
|
||||
@ExcelProperty("是否虚拟合同;与ERP(SFXNHT)对应")
|
||||
private String contractVirtual;
|
||||
|
||||
@Schema(description = "是否先款后货")
|
||||
@ExcelProperty("是否先款后货")
|
||||
private String hasPayable;
|
||||
|
||||
@Schema(description = "收支性质;与ERP(SZXZ)对应")
|
||||
@ExcelProperty("收支性质;与ERP(SZXZ)对应")
|
||||
private String direction;
|
||||
|
||||
@Schema(description = "合同类型", example = "1")
|
||||
@ExcelProperty("合同类型")
|
||||
@Schema(description = "合同类型")
|
||||
private String contractType;
|
||||
|
||||
@Schema(description = "签署日期;与ERP(HTQDRQ)对应")
|
||||
@ExcelProperty("签署日期;与ERP(HTQDRQ)对应")
|
||||
private LocalDateTime signDate;
|
||||
|
||||
@Schema(description = "开始日期;与ERP(HTQSRQ)对应")
|
||||
@ExcelProperty("开始日期;与ERP(HTQSRQ)对应")
|
||||
private LocalDateTime startDate;
|
||||
|
||||
@Schema(description = "结束日期;与ERP(HTZZRQ)对应")
|
||||
@ExcelProperty("结束日期;与ERP(HTZZRQ)对应")
|
||||
private LocalDateTime endDate;
|
||||
|
||||
@Schema(description = "签署地")
|
||||
@ExcelProperty("签署地")
|
||||
private String signPlace;
|
||||
|
||||
@Schema(description = "甲方公司编号;如果是采购合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是销售合同,手动选择,且与ERP(WLDWBH)对应。")
|
||||
@ExcelProperty("甲方公司编号;如果是采购合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是销售合同,手动选择,且与ERP(WLDWBH)对应。")
|
||||
private String purchaseCompanyNumber;
|
||||
|
||||
@Schema(description = "甲方公司名称", example = "王五")
|
||||
@ExcelProperty("甲方公司名称")
|
||||
@Schema(description = "甲方公司名称")
|
||||
private String purchaseCompanyName;
|
||||
|
||||
@Schema(description = "甲方地址")
|
||||
@ExcelProperty("甲方地址")
|
||||
private String purchaseAddress;
|
||||
|
||||
@Schema(description = "甲方法定代表人")
|
||||
@ExcelProperty("甲方法定代表人")
|
||||
private String purchaseLeader;
|
||||
|
||||
@Schema(description = "乙方公司编号;如果是销售合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是采购合同,手动选择,且与ERP(WLDWBH)对应。")
|
||||
@ExcelProperty("乙方公司编号;如果是销售合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是采购合同,手动选择,且与ERP(WLDWBH)对应。")
|
||||
private String salesCompanyNumber;
|
||||
|
||||
@Schema(description = "乙方公司名称", example = "王五")
|
||||
@ExcelProperty("乙方公司名称")
|
||||
@Schema(description = "乙方公司名称")
|
||||
private String salesCompanyName;
|
||||
|
||||
@Schema(description = "乙方地址")
|
||||
@ExcelProperty("乙方地址")
|
||||
private String salesAddress;
|
||||
|
||||
@Schema(description = "乙方企业负责人")
|
||||
@ExcelProperty("乙方企业负责人")
|
||||
private String salesPurchaseLeader;
|
||||
|
||||
@Schema(description = "币种;与ERP(BZBH)对应")
|
||||
@ExcelProperty("币种;与ERP(BZBH)对应")
|
||||
private String currency;
|
||||
|
||||
@Schema(description = "原币金额;与ERP(HTYBZJE)对应,币种不是人民币时,显示并手动填写,如果是人民币,隐藏且等于本币金额")
|
||||
@ExcelProperty("原币金额;与ERP(HTYBZJE)对应,币种不是人民币时,显示并手动填写,如果是人民币,隐藏且等于本币金额")
|
||||
private BigDecimal cooAmount;
|
||||
|
||||
@Schema(description = "本币金额;与ERP(HTBWBZJE)对应")
|
||||
@ExcelProperty("本币金额;与ERP(HTBWBZJE)对应")
|
||||
private BigDecimal basicAmount;
|
||||
|
||||
@Schema(description = "是否有履约保证金;为是,则保证金必填。")
|
||||
@ExcelProperty("是否有履约保证金;为是,则保证金必填。")
|
||||
private String hasDeposit;
|
||||
|
||||
@Schema(description = "原币履约保证金;与ERP(LYBZJBGQYB)对应,币种不是人民币时,显示并手动填写,如果是人民币,隐藏且等于本币金额")
|
||||
@ExcelProperty("原币履约保证金;与ERP(LYBZJBGQYB)对应,币种不是人民币时,显示并手动填写,如果是人民币,隐藏且等于本币金额")
|
||||
private BigDecimal cooAmountDeposit;
|
||||
|
||||
@Schema(description = "本币履约保证金;与ERP(LYBZJBGQBWB)对应")
|
||||
@ExcelProperty("本币履约保证金;与ERP(LYBZJBGQBWB)对应")
|
||||
private BigDecimal basicAmountDeposit;
|
||||
|
||||
@Schema(description = "是否有预付款;与ERP(SFYYFK)对应")
|
||||
@ExcelProperty("是否有预付款;与ERP(SFYYFK)对应")
|
||||
private String hasPrepayment;
|
||||
|
||||
@Schema(description = "预付款比例;与ERP(YFKBL)对应")
|
||||
@ExcelProperty("预付款比例;与ERP(YFKBL)对应")
|
||||
private BigDecimal prepaymentRatio;
|
||||
|
||||
@Schema(description = "预付款金额;与ERP(YFKJE)对应")
|
||||
@ExcelProperty("预付款金额;与ERP(YFKJE)对应")
|
||||
private BigDecimal prepaymentAmount;
|
||||
|
||||
@Schema(description = "是否有质保金;与ERP(SFHZBJ)对应")
|
||||
@ExcelProperty("是否有质保金;与ERP(SFHZBJ)对应")
|
||||
private String hasQualityAmount;
|
||||
|
||||
@Schema(description = "质保金比例;与ERP(ZBJBL)对应")
|
||||
@ExcelProperty("质保金比例;与ERP(ZBJBL)对应")
|
||||
private BigDecimal qualityRatio;
|
||||
|
||||
@Schema(description = "质保金金额;与ERP(BZJJE)对应")
|
||||
@ExcelProperty("质保金金额;与ERP(BZJJE)对应")
|
||||
private BigDecimal qualityAmount;
|
||||
|
||||
@Schema(description = "补充协议类型;变更协议/增加条款", example = "1")
|
||||
@ExcelProperty("补充协议类型;变更协议/增加条款")
|
||||
@Schema(description = "补充协议类型;变更协议/增加条款")
|
||||
private String replenishAgreementType;
|
||||
|
||||
@Schema(description = "备注;与ERP(BZXX)对应")
|
||||
@ExcelProperty("备注;与ERP(BZXX)对应")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "施工类型编号;与ERP(HTLXBH)对应,拓展信息")
|
||||
@ExcelProperty("施工类型编号;与ERP(HTLXBH)对应,拓展信息")
|
||||
private String constructionTypeNumber;
|
||||
|
||||
@Schema(description = "施工类型名称;与ERP(HTLXMC)对应,拓展信息", example = "张三")
|
||||
@ExcelProperty("施工类型名称;与ERP(HTLXMC)对应,拓展信息")
|
||||
@Schema(description = "施工类型名称;与ERP(HTLXMC)对应,拓展信息")
|
||||
private String constructionTypeName;
|
||||
|
||||
@Schema(description = "代理方;与ERP(ZLIFNR)对应,拓展信息")
|
||||
@ExcelProperty("代理方;与ERP(ZLIFNR)对应,拓展信息")
|
||||
private String agent;
|
||||
|
||||
@Schema(description = "类别;与ERP(HTLB)对应,拓展信息")
|
||||
@ExcelProperty("类别;与ERP(HTLB)对应,拓展信息")
|
||||
private String category;
|
||||
|
||||
@Schema(description = "原币金额-变更后;与ERP(BGHHTYBZJE)对应,拓展信息")
|
||||
@ExcelProperty("原币金额-变更后;与ERP(BGHHTYBZJE)对应,拓展信息")
|
||||
private BigDecimal changeCooAmount;
|
||||
|
||||
@Schema(description = "本币金额-变更后;与ERP(BGHHTBWBZJE)对应,拓展信息")
|
||||
@ExcelProperty("本币金额-变更后;与ERP(BGHHTBWBZJE)对应,拓展信息")
|
||||
private BigDecimal changeBasicAmount;
|
||||
|
||||
@Schema(description = "原币履约保证金-变更后;与ERP(LYBZJBGHYB)对应,拓展信息")
|
||||
@ExcelProperty("原币履约保证金-变更后;与ERP(LYBZJBGHYB)对应,拓展信息")
|
||||
private BigDecimal changeCooAmountDeposit;
|
||||
|
||||
@Schema(description = "本币履约保证金-变更后;与ERP(LYBZJBGHBWB)对应,拓展信息")
|
||||
@ExcelProperty("本币履约保证金-变更后;与ERP(LYBZJBGHBWB)对应,拓展信息")
|
||||
private BigDecimal changeBasicAmountDeposit;
|
||||
|
||||
@Schema(description = "是否框架合同;与ERP(SFKJHT)对应,拓展信息")
|
||||
@ExcelProperty("是否框架合同;与ERP(SFKJHT)对应,拓展信息")
|
||||
private String isFramework;
|
||||
|
||||
@Schema(description = "境内/境外;与ERP(JNJW)对应,拓展信息")
|
||||
@ExcelProperty("境内/境外;与ERP(JNJW)对应,拓展信息")
|
||||
private String isDomestic;
|
||||
|
||||
@Schema(description = "建筑服务发生地;与ERP(JZFWFSD)对应,拓展信息,销售合同,且类型为SAP02COSR必填")
|
||||
@ExcelProperty("建筑服务发生地;与ERP(JZFWFSD)对应,拓展信息,销售合同,且类型为SAP02COSR必填")
|
||||
private String architectureServicePlace;
|
||||
|
||||
@Schema(description = "达到收款条件金额;与ERP(DDSKJE)对应,拓展信息,销售合同,且类型为SAP02COSR必填")
|
||||
@ExcelProperty("达到收款条件金额;与ERP(DDSKJE)对应,拓展信息,销售合同,且类型为SAP02COSR必填")
|
||||
private BigDecimal payeeConditionAmount;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "步骤")
|
||||
@ExcelProperty("步骤")
|
||||
private Integer step;
|
||||
|
||||
@Schema(description = "ERP请求状态")
|
||||
private String erpStatus;
|
||||
|
||||
@Schema(description = "ERP请求失败原因")
|
||||
private String cause;
|
||||
|
||||
@Schema(description = "流程实例编号")
|
||||
private String processInstanceId;
|
||||
|
||||
@Schema(description = "审批意见")
|
||||
private String reviewOpinion;
|
||||
|
||||
@Schema(description = "任务节点主键")
|
||||
private String taskNodeId;
|
||||
|
||||
@Schema(description = "模板附件对象存储")
|
||||
private String fileObject;
|
||||
|
||||
@Schema(description = "其它附件对象存储")
|
||||
private String fileObjectOther;
|
||||
|
||||
@Schema(description = "交货地点")
|
||||
private String deliveryAddress;
|
||||
|
||||
@Schema(description = "交货方式(字典:FRCST_ASN)")
|
||||
private String deliveryWay;
|
||||
|
||||
@Schema(description = "甲方联系人")
|
||||
private String purchaseHuman;
|
||||
|
||||
@Schema(description = "甲方电话")
|
||||
private String purchaseTel;
|
||||
|
||||
@Schema(description = "甲方邮箱")
|
||||
private String purchaseEmail;
|
||||
|
||||
@Schema(description = "甲方传真")
|
||||
private String purchaseFax;
|
||||
|
||||
@Schema(description = "甲方联系地址")
|
||||
private String purchaseContactAddress;
|
||||
|
||||
@Schema(description = "乙方联系人")
|
||||
private String salesHuman;
|
||||
|
||||
@Schema(description = "乙方电话")
|
||||
private String salesTel;
|
||||
|
||||
@Schema(description = "乙方邮箱")
|
||||
private String salesEmail;
|
||||
|
||||
@Schema(description = "乙方传真")
|
||||
private String salesFax;
|
||||
|
||||
@Schema(description = "乙方联系地址")
|
||||
private String salesContactAddress;
|
||||
|
||||
// 物料信息
|
||||
private List<DetailRespVO> detail;
|
||||
|
||||
// 合同动态表单
|
||||
private List<TemplateInstanceDataRespVO> dynamicsFields;
|
||||
|
||||
// 合同动态条款
|
||||
private List<TemplateInstanceItemRespVO> dynamicsItems;
|
||||
|
||||
// 价款结算条款
|
||||
private List<FormulaRespVO> formulas;
|
||||
|
||||
// 参数降级规则
|
||||
private List<DemoteRespVO> demotes;
|
||||
|
||||
// 品位不计价规则
|
||||
private List<NotRespVO> nots;
|
||||
}
|
||||
@@ -162,7 +162,7 @@ public class ContractSaveReqVO {
|
||||
private String remark;
|
||||
|
||||
// 物料信息
|
||||
private List<ContractDetailSaveReqVO> detail;
|
||||
private List<DetailSaveReqVO> detail;
|
||||
|
||||
// 扩展信息
|
||||
@Schema(description = "原币金额-变更后;与ERP(BGHHTYBZJE)对应,拓展信息")
|
||||
@@ -219,11 +219,11 @@ public class ContractSaveReqVO {
|
||||
private List<TemplateInstanceDataSaveReqVO> dynamicsFields;
|
||||
|
||||
// 价款结算条款
|
||||
private List<ContractFormulaSaveReqVO> formulas;
|
||||
private List<FormulaSaveReqVO> formulas;
|
||||
|
||||
// 参数降级规则
|
||||
private List<ContractDemoteSaveReqVO> demotes;
|
||||
private List<DemoteSaveReqVO> demotes;
|
||||
|
||||
// 品位不计价规则
|
||||
private List<ContractNotSaveReqVO> nots;
|
||||
private List<NotSaveReqVO> nots;
|
||||
}
|
||||
@@ -1,54 +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.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 调整价配置 Response VO")
|
||||
@Data
|
||||
public class ContractViewDeductRespVO {
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "25312")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "配置主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "21114")
|
||||
@NotNull(message = "配置主键不能为空")
|
||||
private Long parameterId;
|
||||
|
||||
@Schema(description = "条款主键", example = "29909")
|
||||
private Long formulaId;
|
||||
|
||||
@Schema(description = "物料编码;推送ERP")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "物料名称", example = "张三")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "上限", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "上限不能为空")
|
||||
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 = "类型", example = "1")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "是否省内", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "是否省内不能为空")
|
||||
private String inState;
|
||||
|
||||
@Schema(description = "调整价")
|
||||
private BigDecimal gradeAmount;
|
||||
}
|
||||
@@ -1,312 +0,0 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.contract.vo.contract;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TemplateInstanceDataRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TemplateInstanceItemRespVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 合同详情 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ContractViewRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "2476")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "模板实例主键", example = "5352")
|
||||
@ExcelProperty("模板实例主键")
|
||||
private Long instanceId;
|
||||
|
||||
@Schema(description = "系统合同编号;自动生成,校验唯一")
|
||||
@ExcelProperty("系统合同编号;自动生成,校验唯一")
|
||||
private String systemContractNumber;
|
||||
|
||||
@Schema(description = "状态", example = "2")
|
||||
@ExcelProperty("状态")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "合同名称;与ERP(HTMC)对应,校验唯一", example = "李四")
|
||||
@ExcelProperty("合同名称;与ERP(HTMC)对应,校验唯一")
|
||||
private String contractName;
|
||||
|
||||
@Schema(description = "合同编号;与ERP(HTBH)对应,校验唯一")
|
||||
@ExcelProperty("合同编号;与ERP(HTBH)对应,校验唯一")
|
||||
private String contractPaperNumber;
|
||||
|
||||
@Schema(description = "是否虚拟合同;与ERP(SFXNHT)对应")
|
||||
@ExcelProperty("是否虚拟合同;与ERP(SFXNHT)对应")
|
||||
private String contractVirtual;
|
||||
|
||||
@Schema(description = "是否先款后货")
|
||||
@ExcelProperty("是否先款后货")
|
||||
private String hasPayable;
|
||||
|
||||
@Schema(description = "收支性质;与ERP(SZXZ)对应")
|
||||
@ExcelProperty("收支性质;与ERP(SZXZ)对应")
|
||||
private String direction;
|
||||
|
||||
@Schema(description = "合同类型", example = "2")
|
||||
@ExcelProperty("合同类型")
|
||||
private String contractType;
|
||||
|
||||
@Schema(description = "签署日期;与ERP(HTQDRQ)对应")
|
||||
@ExcelProperty("签署日期;与ERP(HTQDRQ)对应")
|
||||
private LocalDateTime signDate;
|
||||
|
||||
@Schema(description = "开始日期;与ERP(HTQSRQ)对应")
|
||||
@ExcelProperty("开始日期;与ERP(HTQSRQ)对应")
|
||||
private LocalDateTime startDate;
|
||||
|
||||
@Schema(description = "结束日期;与ERP(HTZZRQ)对应")
|
||||
@ExcelProperty("结束日期;与ERP(HTZZRQ)对应")
|
||||
private LocalDateTime endDate;
|
||||
|
||||
@Schema(description = "签署地")
|
||||
@ExcelProperty("签署地")
|
||||
private String signPlace;
|
||||
|
||||
@Schema(description = "甲方公司编号;如果是采购合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是销售合同,手动选择,且与ERP(WLDWBH)对应。")
|
||||
@ExcelProperty("甲方公司编号;如果是采购合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是销售合同,手动选择,且与ERP(WLDWBH)对应。")
|
||||
private String purchaseCompanyNumber;
|
||||
|
||||
@Schema(description = "甲方公司名称", example = "芋艿")
|
||||
@ExcelProperty("甲方公司名称")
|
||||
private String purchaseCompanyName;
|
||||
|
||||
@Schema(description = "甲方地址")
|
||||
@ExcelProperty("甲方地址")
|
||||
private String purchaseAddress;
|
||||
|
||||
@Schema(description = "甲方法定代表人")
|
||||
@ExcelProperty("甲方法定代表人")
|
||||
private String purchaseLeader;
|
||||
|
||||
@Schema(description = "乙方公司编号;如果是销售合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是采购合同,手动选择,且与ERP(WLDWBH)对应。")
|
||||
@ExcelProperty("乙方公司编号;如果是销售合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是采购合同,手动选择,且与ERP(WLDWBH)对应。")
|
||||
private String salesCompanyNumber;
|
||||
|
||||
@Schema(description = "乙方公司名称", example = "赵六")
|
||||
@ExcelProperty("乙方公司名称")
|
||||
private String salesCompanyName;
|
||||
|
||||
@Schema(description = "乙方地址")
|
||||
@ExcelProperty("乙方地址")
|
||||
private String salesAddress;
|
||||
|
||||
@Schema(description = "乙方企业负责人")
|
||||
@ExcelProperty("乙方企业负责人")
|
||||
private String salesPurchaseLeader;
|
||||
|
||||
@Schema(description = "币种;与ERP(BZBH)对应")
|
||||
@ExcelProperty("币种;与ERP(BZBH)对应")
|
||||
private String currency;
|
||||
|
||||
@Schema(description = "原币金额;与ERP(HTYBZJE)对应,币种不是人民币时,显示并手动填写,如果是人民币,隐藏且等于本币金额")
|
||||
@ExcelProperty("原币金额;与ERP(HTYBZJE)对应,币种不是人民币时,显示并手动填写,如果是人民币,隐藏且等于本币金额")
|
||||
private BigDecimal cooAmount;
|
||||
|
||||
@Schema(description = "本币金额;与ERP(HTBWBZJE)对应")
|
||||
@ExcelProperty("本币金额;与ERP(HTBWBZJE)对应")
|
||||
private BigDecimal basicAmount;
|
||||
|
||||
@Schema(description = "是否有履约保证金;为是,则保证金必填。")
|
||||
@ExcelProperty("是否有履约保证金;为是,则保证金必填。")
|
||||
private String hasDeposit;
|
||||
|
||||
@Schema(description = "原币履约保证金;与ERP(LYBZJBGQYB)对应,币种不是人民币时,显示并手动填写,如果是人民币,隐藏且等于本币金额")
|
||||
@ExcelProperty("原币履约保证金;与ERP(LYBZJBGQYB)对应,币种不是人民币时,显示并手动填写,如果是人民币,隐藏且等于本币金额")
|
||||
private BigDecimal cooAmountDeposit;
|
||||
|
||||
@Schema(description = "本币履约保证金;与ERP(LYBZJBGQBWB)对应")
|
||||
@ExcelProperty("本币履约保证金;与ERP(LYBZJBGQBWB)对应")
|
||||
private BigDecimal basicAmountDeposit;
|
||||
|
||||
@Schema(description = "是否有预付款;与ERP(SFYYFK)对应")
|
||||
@ExcelProperty("是否有预付款;与ERP(SFYYFK)对应")
|
||||
private String hasPrepayment;
|
||||
|
||||
@Schema(description = "预付款比例;与ERP(YFKBL)对应")
|
||||
@ExcelProperty("预付款比例;与ERP(YFKBL)对应")
|
||||
private BigDecimal prepaymentRatio;
|
||||
|
||||
@Schema(description = "预付款金额;与ERP(YFKJE)对应")
|
||||
@ExcelProperty("预付款金额;与ERP(YFKJE)对应")
|
||||
private BigDecimal prepaymentAmount;
|
||||
|
||||
@Schema(description = "是否有质保金;与ERP(SFHZBJ)对应")
|
||||
@ExcelProperty("是否有质保金;与ERP(SFHZBJ)对应")
|
||||
private String hasQualityAmount;
|
||||
|
||||
@Schema(description = "质保金比例;与ERP(ZBJBL)对应")
|
||||
@ExcelProperty("质保金比例;与ERP(ZBJBL)对应")
|
||||
private BigDecimal qualityRatio;
|
||||
|
||||
@Schema(description = "质保金金额;与ERP(BZJJE)对应")
|
||||
@ExcelProperty("质保金金额;与ERP(BZJJE)对应")
|
||||
private BigDecimal qualityAmount;
|
||||
|
||||
@Schema(description = "补充协议类型;变更协议/增加条款", example = "2")
|
||||
@ExcelProperty("补充协议类型;变更协议/增加条款")
|
||||
private String replenishAgreementType;
|
||||
|
||||
@Schema(description = "备注;与ERP(BZXX)对应")
|
||||
@ExcelProperty("备注;与ERP(BZXX)对应")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "施工类型编号;与ERP(HTLXBH)对应,拓展信息")
|
||||
@ExcelProperty("施工类型编号;与ERP(HTLXBH)对应,拓展信息")
|
||||
private String constructionTypeNumber;
|
||||
|
||||
@Schema(description = "施工类型名称;与ERP(HTLXMC)对应,拓展信息", example = "李四")
|
||||
@ExcelProperty("施工类型名称;与ERP(HTLXMC)对应,拓展信息")
|
||||
private String constructionTypeName;
|
||||
|
||||
@Schema(description = "代理方;与ERP(ZLIFNR)对应,拓展信息")
|
||||
@ExcelProperty("代理方;与ERP(ZLIFNR)对应,拓展信息")
|
||||
private String agent;
|
||||
|
||||
@Schema(description = "类别;与ERP(HTLB)对应,拓展信息")
|
||||
@ExcelProperty("类别;与ERP(HTLB)对应,拓展信息")
|
||||
private String category;
|
||||
|
||||
@Schema(description = "原币金额-变更后;与ERP(BGHHTYBZJE)对应,拓展信息")
|
||||
@ExcelProperty("原币金额-变更后;与ERP(BGHHTYBZJE)对应,拓展信息")
|
||||
private BigDecimal changeCooAmount;
|
||||
|
||||
@Schema(description = "本币金额-变更后;与ERP(BGHHTBWBZJE)对应,拓展信息")
|
||||
@ExcelProperty("本币金额-变更后;与ERP(BGHHTBWBZJE)对应,拓展信息")
|
||||
private BigDecimal changeBasicAmount;
|
||||
|
||||
@Schema(description = "原币履约保证金-变更后;与ERP(LYBZJBGHYB)对应,拓展信息")
|
||||
@ExcelProperty("原币履约保证金-变更后;与ERP(LYBZJBGHYB)对应,拓展信息")
|
||||
private BigDecimal changeCooAmountDeposit;
|
||||
|
||||
@Schema(description = "本币履约保证金-变更后;与ERP(LYBZJBGHBWB)对应,拓展信息")
|
||||
@ExcelProperty("本币履约保证金-变更后;与ERP(LYBZJBGHBWB)对应,拓展信息")
|
||||
private BigDecimal changeBasicAmountDeposit;
|
||||
|
||||
@Schema(description = "是否框架合同;与ERP(SFKJHT)对应,拓展信息")
|
||||
@ExcelProperty("是否框架合同;与ERP(SFKJHT)对应,拓展信息")
|
||||
private String isFramework;
|
||||
|
||||
@Schema(description = "境内/境外;与ERP(JNJW)对应,拓展信息")
|
||||
@ExcelProperty("境内/境外;与ERP(JNJW)对应,拓展信息")
|
||||
private String isDomestic;
|
||||
|
||||
@Schema(description = "建筑服务发生地;与ERP(JZFWFSD)对应,拓展信息,销售合同,且类型为SAP02COSR必填")
|
||||
@ExcelProperty("建筑服务发生地;与ERP(JZFWFSD)对应,拓展信息,销售合同,且类型为SAP02COSR必填")
|
||||
private String architectureServicePlace;
|
||||
|
||||
@Schema(description = "达到收款条件金额;与ERP(DDSKJE)对应,拓展信息,销售合同,且类型为SAP02COSR必填")
|
||||
@ExcelProperty("达到收款条件金额;与ERP(DDSKJE)对应,拓展信息,销售合同,且类型为SAP02COSR必填")
|
||||
private BigDecimal payeeConditionAmount;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "步骤")
|
||||
@ExcelProperty("步骤")
|
||||
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<TemplateInstanceDataRespVO> dynamicsFields;
|
||||
|
||||
// 合同动态条款
|
||||
private List<TemplateInstanceItemRespVO> dynamicsItems;
|
||||
|
||||
// 价款结算条款
|
||||
private List<ContractViewFormulaRespVO> formulas;
|
||||
|
||||
// 参数降级规则
|
||||
private List<ContractViewDemoteRespVO> demotes;
|
||||
|
||||
// 品位不计价配置
|
||||
private List<ContractViewNotRespVO> nots;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
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 = "数据项类型(字典:GRD_CFG_TP)")
|
||||
private String configType;
|
||||
|
||||
@Schema(description = "是否省内")
|
||||
private String inState;
|
||||
|
||||
@Schema(description = "调整价")
|
||||
private BigDecimal gradeAmount;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
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 = "数据项类型(字典:GRD_CFG_TP)")
|
||||
private String configType;
|
||||
|
||||
@Schema(description = "是否省内")
|
||||
private String inState;
|
||||
|
||||
@Schema(description = "调整价")
|
||||
private BigDecimal gradeAmount;
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
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;
|
||||
|
||||
@@ -11,49 +10,44 @@ import java.time.LocalDateTime;
|
||||
@Schema(description = "管理后台 - 参数降级规则 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ContractViewDemoteRespVO {
|
||||
public class DemoteRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31818")
|
||||
@ExcelProperty("主键")
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "合同主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14971")
|
||||
@ExcelProperty("合同主键")
|
||||
@Schema(description = "合同主键")
|
||||
private Long contractId;
|
||||
|
||||
@Schema(description = "金属元素编码")
|
||||
@ExcelProperty("金属元素编码")
|
||||
private String elementNumber;
|
||||
|
||||
@Schema(description = "金属元素缩写")
|
||||
@ExcelProperty("金属元素缩写")
|
||||
private String elementAbbreviation;
|
||||
|
||||
@Schema(description = "金属元素名称", example = "王五")
|
||||
@ExcelProperty("金属元素名称")
|
||||
@Schema(description = "金属元素名称")
|
||||
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("降级后物料名称")
|
||||
@Schema(description = "降级后物料名称")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "降级后物料编码")
|
||||
@ExcelProperty("降级后物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "合同名称")
|
||||
private String contractName;
|
||||
|
||||
@Schema(description = "合同编码")
|
||||
private String contractPaperNumber;
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 参数降级规则新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContractDemoteSaveReqVO {
|
||||
public class DemoteSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31818")
|
||||
private Long id;
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.contract.vo.contract;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 查询参数降级规则列表 Request VO")
|
||||
@Data
|
||||
public class DemotesQueryReqVO {
|
||||
|
||||
@Schema(description = "合同名称")
|
||||
private String contractName;
|
||||
@Schema(description = "合同编码")
|
||||
private String contractPaperNumber;
|
||||
@Schema(description = "物料名称")
|
||||
private String materialName;
|
||||
@Schema(description = "金属元素")
|
||||
private String elementName;
|
||||
}
|
||||
@@ -8,34 +8,34 @@ import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 合同明细 Response VO")
|
||||
@Data
|
||||
public class ContractViewDetailRespVO {
|
||||
public class DetailRespVO {
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "物料名称", example = "物料名称")
|
||||
@Schema(description = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "物料编码", example = "物料编码")
|
||||
@Schema(description = "物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@Schema(description = "计量单位", example = "吨")
|
||||
@Schema(description = "计量单位")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "含税单价", example = "28579")
|
||||
@Schema(description = "含税单价")
|
||||
private BigDecimal inTaxUnitPrice;
|
||||
|
||||
@Schema(description = "金属元素缩写", example = "金属元素缩写")
|
||||
@Schema(description = "金属元素缩写")
|
||||
private String elementAbbreviation;
|
||||
|
||||
@Schema(description = "金属元素名称", example = "金属元素名称")
|
||||
@Schema(description = "金属元素名称")
|
||||
private String elementName;
|
||||
|
||||
@Schema(description = "金属元素编码", example = "金属元素编码")
|
||||
@Schema(description = "金属元素编码")
|
||||
private String elementNumber;
|
||||
|
||||
// 交货计划
|
||||
private List<ContractViewPlanRespVO> plans;
|
||||
private List<PlanRespVO> plans;
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 合同明细新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContractDetailSaveReqVO {
|
||||
public class DetailSaveReqVO {
|
||||
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
@@ -41,5 +41,5 @@ public class ContractDetailSaveReqVO {
|
||||
private String elementNumber;
|
||||
|
||||
// 交货计划
|
||||
private List<ContractPlanSaveReqVO> plans;
|
||||
private List<PlanSaveReqVO> plans;
|
||||
}
|
||||
@@ -7,14 +7,14 @@ import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 价款结算条款 Response VO")
|
||||
@Data
|
||||
public class ContractViewFormulaRespVO {
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "22933")
|
||||
public class FormulaRespVO {
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "合同主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "9162")
|
||||
@Schema(description = "合同主键")
|
||||
private Long contractId;
|
||||
|
||||
@Schema(description = "公式类型;单价/总价/水扣款/加工费", example = "1")
|
||||
@Schema(description = "公式类型;单价/总价/水扣款/加工费")
|
||||
private String formulaType;
|
||||
|
||||
@Schema(description = "公式")
|
||||
@@ -23,7 +23,7 @@ public class ContractViewFormulaRespVO {
|
||||
@Schema(description = "编码公式")
|
||||
private String numberFormula;
|
||||
|
||||
@Schema(description = "物料名称", example = "赵六")
|
||||
@Schema(description = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
@@ -38,18 +38,24 @@ public class ContractViewFormulaRespVO {
|
||||
@Schema(description = "金属元素缩写")
|
||||
private String elementAbbreviation;
|
||||
|
||||
@Schema(description = "金属元素名称", example = "赵六")
|
||||
@Schema(description = "金属元素名称")
|
||||
private String elementName;
|
||||
|
||||
@Schema(description = "结算类型,多条使用逗号分隔(字典:PRCH_STLM_TP)", example = "1")
|
||||
@Schema(description = "结算类型,多条使用逗号分隔(字典:PRCH_STLM_TP)")
|
||||
private String settlementType;
|
||||
|
||||
@Schema(description = "合同名称")
|
||||
private String contractName;
|
||||
|
||||
@Schema(description = "合同编码")
|
||||
private String contractPaperNumber;
|
||||
|
||||
// 基础系数配置
|
||||
private List<ContractViewCoefficientRespVO> coefficients;
|
||||
private List<CoefficientRespVO> coefficients;
|
||||
// 品位等级价配置
|
||||
private List<ContractViewGradeRespVO> grades;
|
||||
private List<GradeRespVO> grades;
|
||||
// 调整价配置
|
||||
private List<ContractViewDeductRespVO> deducts;
|
||||
private List<DeductRespVO> deducts;
|
||||
// 市场价配置
|
||||
private List<ContractViewPriceRespVO> prices;
|
||||
private List<PriceRespVO> prices;
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 价款结算条款新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContractFormulaSaveReqVO {
|
||||
public class FormulaSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "22933")
|
||||
private Long id;
|
||||
@@ -48,11 +48,11 @@ public class ContractFormulaSaveReqVO {
|
||||
private String settlementType;
|
||||
|
||||
// 基础系数配置
|
||||
private List<ContractCoefficientSaveReqVO> coefficients;
|
||||
private List<CoefficientSaveReqVO> coefficients;
|
||||
// 品位等级价配置
|
||||
private List<ContractGradeSaveReqVO> grades;
|
||||
private List<GradeSaveReqVO> grades;
|
||||
// 调整价配置
|
||||
private List<ContractDeductSaveReqVO> deducts;
|
||||
private List<DeductSaveReqVO> deducts;
|
||||
// 市场价配置
|
||||
private List<ContractPriceSaveReqVO> prices;
|
||||
private List<PriceSaveReqVO> prices;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.contract.vo.contract;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 查询结算公式列表 Request VO")
|
||||
@Data
|
||||
public class FormulasQueryReqVO {
|
||||
|
||||
@Schema(description = "合同名称")
|
||||
private String contractName;
|
||||
@Schema(description = "合同编码")
|
||||
private String contractPaperNumber;
|
||||
@Schema(description = "物料名称")
|
||||
private String materialName;
|
||||
@Schema(description = "金属元素")
|
||||
private String elementName;
|
||||
}
|
||||
@@ -8,14 +8,14 @@ import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 品位等级价配置 Response VO")
|
||||
@Data
|
||||
public class ContractViewGradeRespVO {
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "15414")
|
||||
public class GradeRespVO {
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "配置主键", example = "16734")
|
||||
@Schema(description = "配置主键")
|
||||
private Long parameterId;
|
||||
|
||||
@Schema(description = "条款主键", example = "15344")
|
||||
@Schema(description = "条款主键")
|
||||
private Long formulaId;
|
||||
|
||||
@Schema(description = "金属元素编码")
|
||||
@@ -24,7 +24,7 @@ public class ContractViewGradeRespVO {
|
||||
@Schema(description = "金属元素缩写")
|
||||
private String elementAbbreviation;
|
||||
|
||||
@Schema(description = "金属元素名称", example = "芋艿")
|
||||
@Schema(description = "金属元素名称")
|
||||
private String elementName;
|
||||
|
||||
@Schema(description = "品位单位")
|
||||
@@ -51,13 +51,13 @@ public class ContractViewGradeRespVO {
|
||||
@Schema(description = "不足系数值按比例计算")
|
||||
private String useCoefficient;
|
||||
|
||||
@Schema(description = "计价类型", example = "2")
|
||||
@Schema(description = "计价类型")
|
||||
private String priceType;
|
||||
|
||||
@Schema(description = "是否省内", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "是否省内")
|
||||
@NotEmpty(message = "是否省内不能为空")
|
||||
private String inState;
|
||||
|
||||
@Schema(description = "等级单价", example = "26237")
|
||||
@Schema(description = "等级单价")
|
||||
private BigDecimal unitPrice;
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 品位等级价配置新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContractGradeSaveReqVO {
|
||||
public class GradeSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "15414")
|
||||
private Long id;
|
||||
@@ -1,7 +1,6 @@
|
||||
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;
|
||||
|
||||
@@ -11,49 +10,44 @@ import java.time.LocalDateTime;
|
||||
@Schema(description = "管理后台 - 品位不计价规则 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ContractViewNotRespVO {
|
||||
public class NotRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "18545")
|
||||
@ExcelProperty("主键")
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "合同主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "5333")
|
||||
@ExcelProperty("合同主键")
|
||||
@Schema(description = "合同主键")
|
||||
private Long contractId;
|
||||
|
||||
@Schema(description = "金属元素编码")
|
||||
@ExcelProperty("金属元素编码")
|
||||
private String elementNumber;
|
||||
|
||||
@Schema(description = "金属元素缩写")
|
||||
@ExcelProperty("金属元素缩写")
|
||||
private String elementAbbreviation;
|
||||
|
||||
@Schema(description = "金属元素名称", example = "王五")
|
||||
@ExcelProperty("金属元素名称")
|
||||
@Schema(description = "金属元素名称")
|
||||
private String elementName;
|
||||
|
||||
@Schema(description = "上限")
|
||||
@ExcelProperty("上限")
|
||||
private BigDecimal gradeUp;
|
||||
|
||||
@Schema(description = "下限")
|
||||
@ExcelProperty("下限")
|
||||
private BigDecimal gradeDown;
|
||||
|
||||
@Schema(description = "区间方式(字典:STLM_RNG_WY)")
|
||||
@ExcelProperty("区间方式(字典:STLM_RNG_WY)")
|
||||
private String rangeWay;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "物料名称", example = "芋艿")
|
||||
@ExcelProperty("物料名称")
|
||||
@Schema(description = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
@ExcelProperty("物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "合同名称")
|
||||
private String contractName;
|
||||
|
||||
@Schema(description = "合同编码")
|
||||
private String contractPaperNumber;
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 品位不计价规则新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContractNotSaveReqVO {
|
||||
public class NotSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "18545")
|
||||
private Long id;
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.contract.vo.contract;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 查询不计价规则列表 Request VO")
|
||||
@Data
|
||||
public class NotsQueryReqVO {
|
||||
|
||||
@Schema(description = "合同名称")
|
||||
private String contractName;
|
||||
@Schema(description = "合同编码")
|
||||
private String contractPaperNumber;
|
||||
@Schema(description = "物料名称")
|
||||
private String materialName;
|
||||
@Schema(description = "金属元素")
|
||||
private String elementName;
|
||||
}
|
||||
@@ -7,14 +7,14 @@ import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 交货计划 Response VO")
|
||||
@Data
|
||||
public class ContractViewPlanRespVO {
|
||||
public class PlanRespVO {
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "交货年份", example = "2025")
|
||||
@Schema(description = "交货年份")
|
||||
private Long contractDeliveryYear;
|
||||
|
||||
@Schema(description = "交货月份", example = "9")
|
||||
@Schema(description = "交货月份")
|
||||
private Long contractPlanDeliveryMonth;
|
||||
|
||||
@Schema(description = "计划交货数量")
|
||||
@@ -7,7 +7,7 @@ import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 交货计划条款新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContractPlanSaveReqVO {
|
||||
public class PlanSaveReqVO {
|
||||
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
@@ -8,14 +8,14 @@ import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 市场价配置新 Response VO")
|
||||
@Data
|
||||
public class ContractViewPriceRespVO {
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "13654")
|
||||
public class PriceRespVO {
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "配置主键", example = "1590")
|
||||
@Schema(description = "配置主键")
|
||||
private Long parameterId;
|
||||
|
||||
@Schema(description = "条款主键", example = "24677")
|
||||
@Schema(description = "条款主键")
|
||||
private Long formulaId;
|
||||
|
||||
@Schema(description = "市场价")
|
||||
@@ -42,10 +42,10 @@ public class ContractViewPriceRespVO {
|
||||
@Schema(description = "价格品种元素的明细分类")
|
||||
private String priceGrade;
|
||||
|
||||
@Schema(description = "品种分类", example = "1")
|
||||
@Schema(description = "品种分类")
|
||||
private String gradeType;
|
||||
|
||||
@Schema(description = "取价方式;区间价/固定价", example = "2")
|
||||
@Schema(description = "取价方式;区间价/固定价")
|
||||
private String averageType;
|
||||
|
||||
@Schema(description = "网价小数位")
|
||||
@@ -7,7 +7,7 @@ import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 市场价配置新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContractPriceSaveReqVO {
|
||||
public class PriceSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "13654")
|
||||
private Long id;
|
||||
@@ -29,11 +29,6 @@ public class ContractCoefficientDO extends BusinessBaseDO {
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 配置主键
|
||||
*/
|
||||
@TableField("PRM_ID")
|
||||
private Long parameterId;
|
||||
/**
|
||||
* 条款主键
|
||||
*/
|
||||
@@ -54,11 +49,6 @@ public class ContractCoefficientDO extends BusinessBaseDO {
|
||||
*/
|
||||
@TableField("ELEM_NAME")
|
||||
private String elementName;
|
||||
/**
|
||||
* 系数值
|
||||
*/
|
||||
@TableField("STLM_COEF")
|
||||
private String settlementCoefficient;
|
||||
/**
|
||||
* 系数上限
|
||||
*/
|
||||
@@ -70,23 +60,23 @@ public class ContractCoefficientDO extends BusinessBaseDO {
|
||||
@TableField("COEF_DOWN")
|
||||
private BigDecimal coefficientDown;
|
||||
/**
|
||||
* 是否包含上限
|
||||
* 区间方式(字典:STLM_RNG_WY)
|
||||
*/
|
||||
@TableField("IS_IN_UP")
|
||||
private String isInUp;
|
||||
@TableField("RNG_WY")
|
||||
private String rangeWay;
|
||||
/**
|
||||
* 是否包含下限
|
||||
*/
|
||||
@TableField("IS_IN_DOWN")
|
||||
private String isInDown;
|
||||
/**
|
||||
* 是否省内
|
||||
* 是否省内(字典:ERP_CTRT_YN)
|
||||
*/
|
||||
@TableField("IN_STA")
|
||||
private String inState;
|
||||
/**
|
||||
* 类型
|
||||
* 类型(字典:STLM_COEF)
|
||||
*/
|
||||
@TableField("TP")
|
||||
private String type;
|
||||
/**
|
||||
* 系数值
|
||||
*/
|
||||
@TableField("STLM_COEF")
|
||||
private BigDecimal settlementCoefficient;
|
||||
}
|
||||
@@ -29,56 +29,16 @@ public class ContractDeductDO extends BusinessBaseDO {
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 配置主键
|
||||
*/
|
||||
@TableField("PRM_ID")
|
||||
private Long parameterId;
|
||||
/**
|
||||
* 条款主键
|
||||
*/
|
||||
@TableField("FMU_ID")
|
||||
private Long formulaId;
|
||||
/**
|
||||
* 物料编码;推送ERP
|
||||
* 数据项类型(字典:GRD_CFG_TP)
|
||||
*/
|
||||
@TableField("MTRL_NUM")
|
||||
private String materialNumber;
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
@TableField("MTRL_NAME")
|
||||
private String materialName;
|
||||
/**
|
||||
* 上限
|
||||
*/
|
||||
@TableField("GRD_UP")
|
||||
private BigDecimal gradeUp;
|
||||
/**
|
||||
* 下限
|
||||
*/
|
||||
@TableField("GRD_DOWN")
|
||||
private BigDecimal gradeDown;
|
||||
/**
|
||||
* 是否包含上限
|
||||
*/
|
||||
@TableField("IS_IN_UP")
|
||||
private String isInUp;
|
||||
/**
|
||||
* 是否包含下限
|
||||
*/
|
||||
@TableField("IS_IN_DOWN")
|
||||
private String isInDown;
|
||||
/**
|
||||
* 方式
|
||||
*/
|
||||
@TableField("WY")
|
||||
private String way;
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@TableField("TP")
|
||||
private String type;
|
||||
@TableField("CFG_TP")
|
||||
private String configType;
|
||||
/**
|
||||
* 是否省内
|
||||
*/
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
package com.zt.plat.module.contractorder.dal.mysql.contract;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.module.contractorder.controller.admin.contract.vo.contract.DemoteRespVO;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.contract.ContractDemoteDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 参数降级规则 Mapper
|
||||
@@ -12,4 +16,26 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface ContractDemoteMapper extends BaseMapperX<ContractDemoteDO> {
|
||||
|
||||
@Select({
|
||||
"<script>",
|
||||
"select *",
|
||||
", (select ctrt_name from BSE_CTRT_MAIN where id = ctrt_id) contractName",
|
||||
", (select ctrt_ppr_num from BSE_CTRT_MAIN where id = ctrt_id) contractPaperNumber",
|
||||
"from bse_ctrt_dmot",
|
||||
"where 1 = 1",
|
||||
"<if test= \"contractIds != null and contractIds.size() > 0\">",
|
||||
"and ctrt_id in",
|
||||
"<foreach collection = 'contractIds' item = 'contractId' open='(' separator = ',' close = ')'>",
|
||||
"#{contractId}",
|
||||
"</foreach>",
|
||||
"</if>",
|
||||
"<if test= \"materialName != null and materialName != ''\">",
|
||||
"and mtrl_name like concat('%',#{materialName},'%')",
|
||||
"</if>",
|
||||
"<if test= \"elementName != null and elementName != ''\">",
|
||||
"and mtrl_num like concat('%',#{elementName},'%')",
|
||||
"</if>",
|
||||
"</script>"
|
||||
})
|
||||
List<DemoteRespVO> selectDemotes(List<Long> contractIds, String materialName, String elementName);
|
||||
}
|
||||
@@ -1,8 +1,12 @@
|
||||
package com.zt.plat.module.contractorder.dal.mysql.contract;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.module.contractorder.controller.admin.contract.vo.contract.FormulaRespVO;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.contract.ContractFormulaDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 价款结算条款 Mapper
|
||||
@@ -12,4 +16,26 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface ContractFormulaMapper extends BaseMapperX<ContractFormulaDO> {
|
||||
|
||||
@Select({
|
||||
"<script>",
|
||||
"select *",
|
||||
", (select ctrt_name from BSE_CTRT_MAIN where id = ctrt_id) contractName",
|
||||
", (select ctrt_ppr_num from BSE_CTRT_MAIN where id = ctrt_id) contractPaperNumber",
|
||||
"from bse_ctrt_fmu",
|
||||
"where 1 = 1",
|
||||
"<if test= \"contractIds != null and contractIds.size() > 0\">",
|
||||
"and ctrt_id in",
|
||||
"<foreach collection = 'contractIds' item = 'contractId' open='(' separator = ',' close = ')'>",
|
||||
"#{contractId}",
|
||||
"</foreach>",
|
||||
"</if>",
|
||||
"<if test= \"materialName != null and materialName != ''\">",
|
||||
"and mtrl_name like concat('%',#{materialName},'%')",
|
||||
"</if>",
|
||||
"<if test= \"elementName != null and elementName != ''\">",
|
||||
"and mtrl_num like concat('%',#{elementName},'%')",
|
||||
"</if>",
|
||||
"</script>"
|
||||
})
|
||||
List<FormulaRespVO> selectFormulas(List<Long> contractIds, String materialName, String elementName);
|
||||
}
|
||||
@@ -1,8 +1,12 @@
|
||||
package com.zt.plat.module.contractorder.dal.mysql.contract;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.module.contractorder.controller.admin.contract.vo.contract.NotRespVO;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.contract.ContractNotDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 品位不计价配置 Mapper
|
||||
@@ -11,4 +15,27 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
*/
|
||||
@Mapper
|
||||
public interface ContractNotMapper extends BaseMapperX<ContractNotDO> {
|
||||
|
||||
@Select({
|
||||
"<script>",
|
||||
"select *",
|
||||
", (select ctrt_name from BSE_CTRT_MAIN where id = ctrt_id) contractName",
|
||||
", (select ctrt_ppr_num from BSE_CTRT_MAIN where id = ctrt_id) contractPaperNumber",
|
||||
"from bse_ctrt_nt",
|
||||
"where 1 = 1",
|
||||
"<if test= \"contractIds != null and contractIds.size() > 0\">",
|
||||
"and ctrt_id in",
|
||||
"<foreach collection = 'contractIds' item = 'contractId' open='(' separator = ',' close = ')'>",
|
||||
"#{contractId}",
|
||||
"</foreach>",
|
||||
"</if>",
|
||||
"<if test= \"materialName != null and materialName != ''\">",
|
||||
"and mtrl_name like concat('%',#{materialName},'%')",
|
||||
"</if>",
|
||||
"<if test= \"elementName != null and elementName != ''\">",
|
||||
"and elem_name like concat('%',#{elementName},'%')",
|
||||
"</if>",
|
||||
"</script>"
|
||||
})
|
||||
List<NotRespVO> selectNots(List<Long> contractIds, String materialName, String elementName);
|
||||
}
|
||||
@@ -1,13 +1,12 @@
|
||||
package com.zt.plat.module.contractorder.service.contract;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.contractorder.controller.admin.contract.vo.contract.ContractApprovalReqVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.contract.vo.contract.ContractPageReqVO;
|
||||
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.controller.admin.contract.vo.contract.*;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.contract.ContractMainDO;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 后台合同编制 Service 接口
|
||||
*
|
||||
@@ -37,7 +36,7 @@ public interface ContractService {
|
||||
* @param id 合同ID
|
||||
* @return 合同信息
|
||||
*/
|
||||
ContractViewRespVO get(Long id);
|
||||
ContractRespVO get(Long id);
|
||||
|
||||
/**
|
||||
* 修改合同
|
||||
@@ -51,9 +50,39 @@ public interface ContractService {
|
||||
* 合同提交审批
|
||||
*
|
||||
* @param id 合同ID
|
||||
* @return 审批结果
|
||||
* @return 提交审批结果
|
||||
*/
|
||||
String submitApproval(Long id);
|
||||
|
||||
String approval(@Valid ContractApprovalReqVO reqVO);
|
||||
/**
|
||||
* 合同审批
|
||||
*
|
||||
* @param reqVO 审批信息
|
||||
* @return 审批结果
|
||||
*/
|
||||
String approval(@Valid ApprovalReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 查询不计价规则列表
|
||||
*
|
||||
* @param queryReqVO 查询参数
|
||||
* @return 不计价规则列表
|
||||
*/
|
||||
List<NotRespVO> getNots(NotsQueryReqVO queryReqVO);
|
||||
|
||||
/**
|
||||
* 查询参数降级规则列表
|
||||
*
|
||||
* @param queryReqVO 查询参数
|
||||
* @return 参数降级规则列表
|
||||
*/
|
||||
List<DemoteRespVO> getDemotes(DemotesQueryReqVO queryReqVO);
|
||||
|
||||
/**
|
||||
* 查询结算公式列表
|
||||
*
|
||||
* @param queryReqVO 查询参数
|
||||
* @return 结算公式列表
|
||||
*/
|
||||
List<FormulaRespVO> getFormulas(FormulasQueryReqVO queryReqVO);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.zt.plat.module.contractorder.service.contract;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import com.zt.plat.framework.tenant.core.context.CompanyContextHolder;
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TemplateInstanceDataRespVO;
|
||||
@@ -40,6 +41,7 @@ import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.zt.plat.module.contractorder.enums.ErrorCodeConstants.*;
|
||||
@@ -268,10 +270,10 @@ public class ContractServiceImpl implements ContractService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractViewRespVO get(Long id) {
|
||||
public ContractRespVO get(Long id) {
|
||||
|
||||
// 返回结果
|
||||
ContractViewRespVO respVO = new ContractViewRespVO();
|
||||
ContractRespVO respVO = new ContractRespVO();
|
||||
|
||||
// 查询并设置合同主信息
|
||||
ContractMainDO contractMainDO = contractMainMapper.selectById(id);
|
||||
@@ -284,14 +286,14 @@ public class ContractServiceImpl implements ContractService {
|
||||
List<ContractDetailDO> detailDOS = contractDetailMapper
|
||||
.selectList(TableFieldConstants.BSE_CTRT_DTL_CTRT_MAIN_ID, contractMainDO.getId());
|
||||
if (detailDOS != null && !detailDOS.isEmpty()) {
|
||||
respVO.setDetail(BeanUtils.toBean(detailDOS, ContractViewDetailRespVO.class));
|
||||
respVO.setDetail(BeanUtils.toBean(detailDOS, DetailRespVO.class));
|
||||
respVO.getDetail().forEach(detail -> {
|
||||
|
||||
// 查询并设置交货计划
|
||||
List<ContractPlanDO> planDOS = contractPlanMapper
|
||||
.selectList(TableFieldConstants.BSE_CTRT_PLN_CTRT_DTL_ID, detail.getId());
|
||||
if (planDOS != null && !planDOS.isEmpty()) {
|
||||
detail.setPlans(BeanUtils.toBean(planDOS, ContractViewPlanRespVO.class));
|
||||
detail.setPlans(BeanUtils.toBean(planDOS, PlanRespVO.class));
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -300,7 +302,7 @@ public class ContractServiceImpl implements ContractService {
|
||||
List<ContractFormulaDO> formulaDOS = contractFormulaMapper
|
||||
.selectList(TableFieldConstants.BSE_CTRT_FMU_CTRT_ID, contractMainDO.getId());
|
||||
if (formulaDOS != null && !formulaDOS.isEmpty()) {
|
||||
respVO.setFormulas(BeanUtils.toBean(formulaDOS, ContractViewFormulaRespVO.class));
|
||||
respVO.setFormulas(BeanUtils.toBean(formulaDOS, FormulaRespVO.class));
|
||||
|
||||
respVO.getFormulas().forEach(formula -> {
|
||||
|
||||
@@ -308,25 +310,25 @@ public class ContractServiceImpl implements ContractService {
|
||||
List<ContractCoefficientDO> coefficientDOS = contractCoefficientMapper
|
||||
.selectList(TableFieldConstants.BSE_CTRT_COEF_FMU_ID, formula.getId());
|
||||
if (coefficientDOS != null && !coefficientDOS.isEmpty()) {
|
||||
formula.setCoefficients(BeanUtils.toBean(coefficientDOS, ContractViewCoefficientRespVO.class));
|
||||
formula.setCoefficients(BeanUtils.toBean(coefficientDOS, CoefficientRespVO.class));
|
||||
}
|
||||
// 查询并设置品位等级价配置
|
||||
List<ContractGradeDO> gradeDOS = contractGradeMapper
|
||||
.selectList(TableFieldConstants.BSE_CTRT_GRD_FMU_ID, formula.getId());
|
||||
if (gradeDOS != null && !gradeDOS.isEmpty()) {
|
||||
formula.setGrades(BeanUtils.toBean(gradeDOS, ContractViewGradeRespVO.class));
|
||||
formula.setGrades(BeanUtils.toBean(gradeDOS, GradeRespVO.class));
|
||||
}
|
||||
// 查询并设置调整价配置
|
||||
List<ContractDeductDO> deductDOS = contractDeductMapper
|
||||
.selectList(TableFieldConstants.BSE_CTRT_DDCT_FMU_ID, formula.getId());
|
||||
if (deductDOS != null && !deductDOS.isEmpty()) {
|
||||
formula.setDeducts(BeanUtils.toBean(deductDOS, ContractViewDeductRespVO.class));
|
||||
formula.setDeducts(BeanUtils.toBean(deductDOS, DeductRespVO.class));
|
||||
}
|
||||
// 查询并设置市场价配置
|
||||
List<ContractPriceDO> priceDOS = contractPriceMapper
|
||||
.selectList(TableFieldConstants.BSE_CTRT_PRC_FMU_ID, formula.getId());
|
||||
if (priceDOS != null && !priceDOS.isEmpty()) {
|
||||
formula.setPrices(BeanUtils.toBean(priceDOS, ContractViewPriceRespVO.class));
|
||||
formula.setPrices(BeanUtils.toBean(priceDOS, PriceRespVO.class));
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -335,14 +337,14 @@ public class ContractServiceImpl implements ContractService {
|
||||
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));
|
||||
respVO.setDemotes(BeanUtils.toBean(demoteDOS, DemoteRespVO.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));
|
||||
respVO.setNots(BeanUtils.toBean(notDOS, NotRespVO.class));
|
||||
}
|
||||
|
||||
// 查询并设置合同动态表单
|
||||
@@ -651,7 +653,7 @@ public class ContractServiceImpl implements ContractService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String approval(ContractApprovalReqVO reqVO) {
|
||||
public String approval(ApprovalReqVO reqVO) {
|
||||
|
||||
// 合同主键ID
|
||||
Long id = reqVO.getId();
|
||||
@@ -682,12 +684,55 @@ public class ContractServiceImpl implements ContractService {
|
||||
return "";
|
||||
}
|
||||
|
||||
private List<Long> getContractIds(String contractName, String contractPaperNumber) {
|
||||
List<Long> contractIds = new ArrayList<>();
|
||||
List<ContractMainDO> contractMainDOS = contractMainMapper.selectList(new LambdaQueryWrapperX<ContractMainDO>()
|
||||
.likeIfPresent(ContractMainDO::getContractName, contractName)
|
||||
.likeIfPresent(ContractMainDO::getContractPaperNumber, contractPaperNumber));
|
||||
if (CollectionUtils.isNotEmpty(contractMainDOS)) {
|
||||
contractIds = contractMainDOS.stream()
|
||||
.map(contractMainDO -> contractMainDO.getId())
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
return contractIds;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<NotRespVO> getNots(NotsQueryReqVO queryReqVO) {
|
||||
// 查合同ID集合
|
||||
List<Long> contractIds = new ArrayList<>();
|
||||
if (StringUtils.isNotEmpty(queryReqVO.getContractName()) || StringUtils.isNotEmpty(queryReqVO.getContractPaperNumber())) {
|
||||
contractIds = getContractIds(queryReqVO.getContractName(), queryReqVO.getContractPaperNumber());
|
||||
}
|
||||
return contractNotMapper.selectNots(contractIds, queryReqVO.getMaterialName(), queryReqVO.getElementName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DemoteRespVO> getDemotes(DemotesQueryReqVO queryReqVO) {
|
||||
// 查合同ID集合
|
||||
List<Long> contractIds = new ArrayList<>();
|
||||
if (StringUtils.isNotEmpty(queryReqVO.getContractName()) || StringUtils.isNotEmpty(queryReqVO.getContractPaperNumber())) {
|
||||
contractIds = getContractIds(queryReqVO.getContractName(), queryReqVO.getContractPaperNumber());
|
||||
}
|
||||
return contractDemoteMapper.selectDemotes(contractIds, queryReqVO.getMaterialName(), queryReqVO.getElementName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FormulaRespVO> getFormulas(FormulasQueryReqVO queryReqVO) {
|
||||
// 查合同ID集合
|
||||
List<Long> contractIds = new ArrayList<>();
|
||||
if (StringUtils.isNotEmpty(queryReqVO.getContractName()) || StringUtils.isNotEmpty(queryReqVO.getContractPaperNumber())) {
|
||||
contractIds = getContractIds(queryReqVO.getContractName(), queryReqVO.getContractPaperNumber());
|
||||
}
|
||||
return contractFormulaMapper.selectFormulas(contractIds, queryReqVO.getMaterialName(), queryReqVO.getElementName());
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验合同内容
|
||||
*
|
||||
* @param contract 合同数据
|
||||
*/
|
||||
private void verifyContract(ContractViewRespVO contract) {
|
||||
private void verifyContract(ContractRespVO contract) {
|
||||
|
||||
/* 合同基本信息 */
|
||||
// 甲方公司编号不能为空
|
||||
|
||||
@@ -27,6 +27,7 @@ public interface ErrorCodeConstants {
|
||||
|
||||
ErrorCode ERP_FACTORY_NOT_EXISTS = new ErrorCode(1_008_000_001, "ERP工厂数据不存在");
|
||||
ErrorCode ERP_FACTORY_REDIS_NOT_EXISTS = new ErrorCode(1_008_000_002, "ERP工厂redis数据不存在");
|
||||
ErrorCode ERP_FACTORY_NOT_ALLOW_UPDATE = new ErrorCode(1_008_000_003, "类型为ERP的数据或启用的数据不允许编辑");
|
||||
|
||||
ErrorCode ERP_COSTCENTER_NOT_EXISTS = new ErrorCode(1_009_000_001, "ERP成本中心数据不存在");
|
||||
|
||||
|
||||
@@ -88,6 +88,14 @@ public class ErpFactoryController {
|
||||
return success(BeanUtils.toBean(pageResult, ErpFactoryRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/pageByCpn")
|
||||
@Operation(summary = "获得ERP工厂分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:erp-factory:query')")
|
||||
public CommonResult<PageResult<ErpFactoryRespVO>> getErpFactoryPageByCpn(@Valid ErpFactoryPageReqVO pageReqVO) {
|
||||
PageResult<ErpFactoryDO> pageResult = erpFactoryService.getErpFactoryPageByCpn(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ErpFactoryRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出ERP工厂 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('base:erp-factory:export')")
|
||||
@@ -101,6 +109,14 @@ public class ErpFactoryController {
|
||||
BeanUtils.toBean(list, ErpFactoryRespVO.class));
|
||||
}
|
||||
|
||||
@PutMapping("/enable-list")
|
||||
@Operation(summary = "批量更新")
|
||||
@PreAuthorize("@ss.hasPermission('base:erp-factory:update')")
|
||||
public CommonResult<Boolean> enableFactoryList(@RequestBody List<ErpFactoryRespVO> saveReqVOS) {
|
||||
erpFactoryService.enableFactoryList(saveReqVOS);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/getErpFactoryTask")
|
||||
@Operation(summary = "定时获得erp工厂数据")
|
||||
@PreAuthorize("@ss.hasPermission('base:erp-factory:create')")
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -14,4 +15,13 @@ public class ErpFactoryPageReqVO extends PageParam {
|
||||
@Schema(description = "工厂编码")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "公司编号")
|
||||
private String companyNumber;
|
||||
|
||||
@Schema(description = "公司名称")
|
||||
private String companyName;
|
||||
|
||||
@Schema(description = "类型")
|
||||
private String type;
|
||||
|
||||
}
|
||||
@@ -22,4 +22,18 @@ public class ErpFactoryRespVO {
|
||||
@ExcelProperty("工厂编码")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "公司编号")
|
||||
private String companyNumber;
|
||||
|
||||
@Schema(description = "类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "绑定工厂名")
|
||||
private String relName;
|
||||
|
||||
@Schema(description = "绑定工厂编码")
|
||||
private String relnumber;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
private String isEnable;
|
||||
}
|
||||
@@ -19,4 +19,21 @@ public class ErpFactorySaveReqVO {
|
||||
@NotEmpty(message = "工厂编码不能为空")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "公司编号")
|
||||
private String companyNumber;
|
||||
|
||||
@Schema(description = "公司编号")
|
||||
private String companyName;
|
||||
|
||||
@Schema(description = "类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "绑定工厂名")
|
||||
private String relName;
|
||||
|
||||
@Schema(description = "绑定工厂编码")
|
||||
private String relnumber;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
private String isEnable;
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
package com.zt.plat.module.erp.dal.dataobject.erp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* ERP工厂 DO
|
||||
*
|
||||
@@ -18,9 +20,7 @@ import lombok.*;
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ErpFactoryDO {
|
||||
|
||||
|
||||
public class ErpFactoryDO extends BusinessBaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
@@ -41,6 +41,35 @@ public class ErpFactoryDO {
|
||||
* 公司编号
|
||||
*/
|
||||
@TableField("CPN_ID")
|
||||
private String companyId;
|
||||
private String companyNumber;
|
||||
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String companyName;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@TableField("TP")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 绑定工厂名
|
||||
*/
|
||||
@TableField("REL_NAME")
|
||||
private String relName;
|
||||
|
||||
/**
|
||||
* 绑定工厂编码
|
||||
*/
|
||||
@TableField("REL_NUM")
|
||||
private String relnumber;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@TableField("IS_ENB")
|
||||
private String isEnable;
|
||||
}
|
||||
@@ -41,4 +41,10 @@ public class ErpWarehouseDO {
|
||||
@TableField("NUM")
|
||||
private String number;
|
||||
|
||||
/**
|
||||
* 类别
|
||||
*/
|
||||
@TableField("TP")
|
||||
private String type;
|
||||
|
||||
}
|
||||
@@ -25,6 +25,4 @@ public interface ErpBomMapper extends BaseMapperX<ErpBomDO> {
|
||||
.eqIfPresent(ErpBomDO::getUnit, reqVO.getUnit())
|
||||
.orderByDesc(ErpBomDO::getId));
|
||||
}
|
||||
|
||||
Long insertGetId(ErpBomDO aDo);
|
||||
}
|
||||
@@ -29,6 +29,4 @@ public interface ErpCostcenterMapper extends BaseMapperX<ErpCostcenterDO> {
|
||||
.betweenIfPresent(ErpCostcenterDO::getEndDate, reqVO.getEndDate())
|
||||
.orderByDesc(ErpCostcenterDO::getId));
|
||||
}
|
||||
|
||||
void updateBatchByNumber(@Param("list") List<ErpCostcenterDO> toUpdate);
|
||||
}
|
||||
@@ -22,9 +22,11 @@ public interface ErpFactoryMapper extends BaseMapperX<ErpFactoryDO> {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ErpFactoryDO>()
|
||||
.likeIfPresent(ErpFactoryDO::getName, reqVO.getName())
|
||||
.eqIfPresent(ErpFactoryDO::getNumber, reqVO.getNumber())
|
||||
.eqIfPresent(ErpFactoryDO::getType, reqVO.getType())
|
||||
.orderByDesc(ErpFactoryDO::getId));
|
||||
}
|
||||
|
||||
void updateBatch(@Param("toUpdate") List<ErpFactoryDO> toUpdate);
|
||||
String selectMaxCode();
|
||||
|
||||
List<ErpFactoryDO> getPageByReq(ErpFactoryPageReqVO pageReqVO);
|
||||
}
|
||||
@@ -179,15 +179,42 @@ public class ErpContractServiceImpl implements ErpContractService {
|
||||
try {
|
||||
OftenEnum.FuncnrEnum funcnrEnum = OftenEnum.FuncnrEnum.合同信息;
|
||||
String funcnr = funcnrEnum.getFuncnr();
|
||||
|
||||
Map<String, Object> req = new HashMap<>();
|
||||
JSONArray dataArrayALL = new JSONArray();
|
||||
String commanyKey = "erpMap" + OftenEnum.FuncnrEnum.公司代码.getFuncnr();
|
||||
Map<String, Long> redisCache = myRedisConfig.getRedisCacheMap(commanyKey);
|
||||
if (CollUtil.isEmpty(redisCache)) {
|
||||
return;
|
||||
}
|
||||
String cstmKey = "erpMap" + OftenEnum.FuncnrEnum.客商信息.getFuncnr();
|
||||
Map<String, Long> redisCachecstmKey = myRedisConfig.getRedisCacheMap(cstmKey);
|
||||
if (CollUtil.isEmpty(redisCachecstmKey)) {
|
||||
return;
|
||||
}
|
||||
// 1. 调用ERP接口获取数据
|
||||
for (String INEDR : new String[]{"1", "2"}) {
|
||||
req.put("INEDR", INEDR);
|
||||
for (String number : redisCache.keySet()) {
|
||||
req.put("BUKRS", number);
|
||||
for (String partner : redisCachecstmKey.keySet()) {
|
||||
req.put("PARTNER", partner);
|
||||
|
||||
// 1. 调用ERP接口获取数据
|
||||
HashMap<String, Object> dataFromERP = erpConfig.fetchDataFromERP(funcnr, null);
|
||||
JSONArray dataArray = (JSONArray) dataFromERP.get("E_RESP");
|
||||
if (CollUtil.isEmpty(dataArray)) {
|
||||
if (dataArray!= null) {
|
||||
dataArrayALL.addAll(dataArray);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CollUtil.isEmpty(dataArrayALL)) {
|
||||
throw exception(ERP_CONTRACT_NOT_EXISTS);
|
||||
}
|
||||
|
||||
// 2. 处理公司数据,区分新增和更新
|
||||
ProcessingResult result = processData(dataArray,funcnrEnum);
|
||||
ProcessingResult result = processData(dataArrayALL, funcnrEnum);
|
||||
|
||||
// 3. 批量保存数据
|
||||
saveData(result);
|
||||
|
||||
@@ -62,4 +62,8 @@ public interface ErpFactoryService {
|
||||
PageResult<ErpFactoryDO> getErpFactoryPage(ErpFactoryPageReqVO pageReqVO);
|
||||
|
||||
void callErpRfcInterface();
|
||||
|
||||
void enableFactoryList(List<ErpFactoryRespVO> saveReqVOS);
|
||||
|
||||
PageResult<ErpFactoryDO> getErpFactoryPageByCpn(ErpFactoryPageReqVO pageReqVO);
|
||||
}
|
||||
@@ -16,6 +16,7 @@ import com.zt.plat.module.erp.controller.admin.erp.vo.ErpFactorySaveReqVO;
|
||||
import com.zt.plat.module.erp.dal.dataobject.erp.ErpFactoryDO;
|
||||
import com.zt.plat.module.erp.dal.mysql.erp.ErpFactoryMapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.apache.ibatis.executor.BatchResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -51,6 +52,21 @@ public class ErpFactoryServiceImpl implements ErpFactoryService {
|
||||
public ErpFactoryRespVO createErpFactory(ErpFactorySaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ErpFactoryDO erpFactory = BeanUtils.toBean(createReqVO, ErpFactoryDO.class);
|
||||
// 工厂编码自动生成,格式 GC-0001,依次新增
|
||||
if (erpFactory.getNumber() == null){
|
||||
String maxCode = erpFactoryMapper.selectMaxCode();
|
||||
if (maxCode == null) {
|
||||
erpFactory.setNumber("GC-0001");
|
||||
} else {
|
||||
String prefix = "GC-";
|
||||
String numberPart = maxCode.substring(prefix.length());
|
||||
int nextNumber = Integer.parseInt(numberPart) + 1;
|
||||
String nextCode = prefix + String.format("%04d", nextNumber);
|
||||
erpFactory.setNumber(nextCode);
|
||||
}
|
||||
}
|
||||
erpFactory.setType("供应链");
|
||||
erpFactory.setIsEnable("1");
|
||||
erpFactoryMapper.insert(erpFactory);
|
||||
// 返回
|
||||
return BeanUtils.toBean(erpFactory, ErpFactoryRespVO.class);
|
||||
@@ -62,6 +78,9 @@ public class ErpFactoryServiceImpl implements ErpFactoryService {
|
||||
validateErpFactoryExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ErpFactoryDO updateObj = BeanUtils.toBean(updateReqVO, ErpFactoryDO.class);
|
||||
if (updateObj.getType().equals("ERP")||updateObj.getIsEnable().equals("1")){
|
||||
throw exception(ERP_FACTORY_NOT_ALLOW_UPDATE);
|
||||
}
|
||||
erpFactoryMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@@ -103,6 +122,39 @@ public class ErpFactoryServiceImpl implements ErpFactoryService {
|
||||
public PageResult<ErpFactoryDO> getErpFactoryPage(ErpFactoryPageReqVO pageReqVO) {
|
||||
return erpFactoryMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enableFactoryList(List<ErpFactoryRespVO> saveReqVOS) {
|
||||
List<ErpFactoryDO> updateObj = BeanUtils.toBean(saveReqVOS, ErpFactoryDO.class);
|
||||
List<BatchResult> count = erpFactoryMapper.updateById(updateObj);
|
||||
if (CollUtil.isEmpty(count)) {
|
||||
throw exception(ERP_FACTORY_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ErpFactoryDO> getErpFactoryPageByCpn(ErpFactoryPageReqVO pageReqVO) {
|
||||
// 获取分页数据
|
||||
List<ErpFactoryDO> list = erpFactoryMapper.getPageByReq(pageReqVO);
|
||||
if (list == null) {
|
||||
list = CollUtil.newArrayList();
|
||||
}
|
||||
// 分页处理
|
||||
int pageNo = pageReqVO.getPageNo();
|
||||
int pageSize = pageReqVO.getPageSize();
|
||||
int total = list.size();
|
||||
// 计算分页起始和结束位置
|
||||
int fromIndex = (pageNo - 1) * pageSize;
|
||||
int toIndex = Math.min(fromIndex + pageSize, total);
|
||||
// 如果起始位置超出范围,则返回空列表
|
||||
if (fromIndex >= total) {
|
||||
return new PageResult<>(new ArrayList<>(), (long) total);
|
||||
}
|
||||
// 截取当前页数据
|
||||
List<ErpFactoryDO> pageList = list.subList(fromIndex, toIndex);
|
||||
return new PageResult<>(pageList, (long) total);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
@XxlJob("getErpFactoryTask")
|
||||
@@ -173,7 +225,8 @@ public class ErpFactoryServiceImpl implements ErpFactoryService {
|
||||
ErpFactoryDO DO = new ErpFactoryDO();
|
||||
DO.setName(dataJson.getString("NAME1"));
|
||||
DO.setNumber(number);
|
||||
DO.setCompanyId(dataJson.getString("BUKRS"));
|
||||
DO.setCompanyNumber(dataJson.getString("BUKRS"));
|
||||
DO.setType("ERP");
|
||||
if (numbers.get(number)!=null) {
|
||||
// 更新
|
||||
DO.setId(numbers.get(number));
|
||||
@@ -244,7 +297,7 @@ public class ErpFactoryServiceImpl implements ErpFactoryService {
|
||||
|
||||
private void initializeMap(String key) {
|
||||
Map<String, Long> existingNumbers = erpFactoryMapper.selectList(new LambdaQueryWrapperX<ErpFactoryDO>())
|
||||
.stream()
|
||||
.stream().filter(erpFactoryDO -> erpFactoryDO.getType().equals("ERP"))
|
||||
.collect(Collectors.toMap(ErpFactoryDO::getNumber, ErpFactoryDO::getId));
|
||||
myRedisConfig.addRedisCacheMap(key, existingNumbers);
|
||||
}
|
||||
|
||||
@@ -229,6 +229,7 @@ public class ErpMaterialServiceImpl implements ErpMaterialService {
|
||||
private void initialize(String key) {
|
||||
List<String> existingNumbers = erpMaterialMapper.selectList(new LambdaQueryWrapperX<ErpMaterialDO>())
|
||||
.stream( )
|
||||
.filter(ErpMaterialDO -> ErpMaterialDO.getType().equals("ERP"))
|
||||
.map(ErpMaterialDO::getDownCenterNumber)
|
||||
.collect(Collectors.toList());
|
||||
myRedisConfig.updateRedisCache(key, existingNumbers);
|
||||
|
||||
@@ -244,7 +244,8 @@ public class ErpWarehouseServiceImpl implements ErpWarehouseService {
|
||||
}
|
||||
|
||||
private void initializeMap(String key) {
|
||||
List<ErpWarehouseDO> assets = erpWarehouseMapper.selectList(new LambdaQueryWrapperX<ErpWarehouseDO>());
|
||||
List<ErpWarehouseDO> assets = erpWarehouseMapper.selectList(new LambdaQueryWrapperX<ErpWarehouseDO>()
|
||||
.eq(ErpWarehouseDO::getType, "ERP"));
|
||||
Map<String, Long> existingNumbers = new HashMap<>();
|
||||
for (ErpWarehouseDO asset : assets) {
|
||||
String mapKey = asset.getFactoryNumber() + "-" + asset.getNumber();
|
||||
|
||||
@@ -8,23 +8,4 @@
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
<update id="updateBatch">
|
||||
UPDATE sply_erp_ast
|
||||
<set>
|
||||
NAME = CASE
|
||||
<foreach collection="toUpdate" item="item">
|
||||
WHEN CPN_NUM = #{item.companyNumber} AND MAIN_AST_NUM = #{item.mainAssetNumber} THEN #{item.name}
|
||||
</foreach>
|
||||
END,
|
||||
CPN_ID = CASE
|
||||
<foreach collection="toUpdate" item="item">
|
||||
WHEN CPN_NUM = #{item.companyNumber} AND MAIN_AST_NUM = #{item.mainAssetNumber} THEN #{item.companyId}
|
||||
</foreach>
|
||||
END
|
||||
</set>
|
||||
WHERE (CPN_NUM, MAIN_AST_NUM) IN
|
||||
<foreach collection="toUpdate" item="item" open="(" separator="," close=")">
|
||||
#{item.companyNumber}, #{item.mainAssetNumber}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -9,18 +9,4 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<insert id="insertGetId">
|
||||
|
||||
</insert>
|
||||
|
||||
<update id="updateBatch">
|
||||
<foreach collection="toUpdate" item="item" separator=";">
|
||||
UPDATE sply_erp_fact
|
||||
<set>
|
||||
<if test="item.name != null">NAME = #{item.name},</if>
|
||||
<if test="item.number != null">CPN_ID = #{item.companyId},</if>
|
||||
</set>
|
||||
WHERE NUM = #{item.number}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -8,15 +8,4 @@
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<update id="updateBatch">
|
||||
<foreach collection="toUpdate" item="item" separator=";">
|
||||
UPDATE sply_erp_fact
|
||||
<set>
|
||||
<if test="item.name != null">NAME = #{item.name},</if>
|
||||
<if test="item.number != null">CPN_ID = #{item.companyId},</if>
|
||||
</set>
|
||||
WHERE NUM = #{item.number}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -8,15 +8,4 @@
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<update id="updateBatch">
|
||||
<foreach collection="toUpdate" item="item" separator=";">
|
||||
UPDATE sply_erp_fact
|
||||
<set>
|
||||
<if test="item.name != null">NAME = #{item.name},</if>
|
||||
<if test="item.number != null">CPN_ID = #{item.companyId},</if>
|
||||
</set>
|
||||
WHERE NUM = #{item.number}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -9,61 +9,4 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<update id="updateBatchByNumber">
|
||||
UPDATE sply_erp_cctr
|
||||
SET
|
||||
NAME = CASE NUM
|
||||
<foreach collection="list" item="item">
|
||||
<if test="item.name != null and item.name != ''">
|
||||
WHEN #{item.number} THEN #{item.name}
|
||||
</if>
|
||||
</foreach>
|
||||
ELSE NAME
|
||||
END,
|
||||
IS_USE = CASE NUM
|
||||
<foreach collection="list" item="item">
|
||||
<if test="item.isUse != null and item.isUse != ''">
|
||||
WHEN #{item.number} THEN #{item.isUse}
|
||||
</if>
|
||||
</foreach>
|
||||
ELSE IS_USE
|
||||
END,
|
||||
SCO_NUM = CASE NUM
|
||||
<foreach collection="list" item="item">
|
||||
<if test="item.scopeNumber != null and item.scopeNumber != ''">
|
||||
WHEN #{item.number} THEN #{item.scopeNumber}
|
||||
</if>
|
||||
</foreach>
|
||||
ELSE SCO_NUM
|
||||
END,
|
||||
STRT_DT = CASE NUM
|
||||
<foreach collection="list" item="item">
|
||||
<if test="item.startDate != null">
|
||||
WHEN #{item.number} THEN #{item.startDate}
|
||||
</if>
|
||||
</foreach>
|
||||
ELSE STRT_DT
|
||||
END,
|
||||
END_DT = CASE NUM
|
||||
<foreach collection="list" item="item">
|
||||
<if test="item.endDate != null">
|
||||
WHEN #{item.number} THEN #{item.endDate}
|
||||
</if>
|
||||
</foreach>
|
||||
ELSE END_DT
|
||||
END,
|
||||
SCO_NAME = CASE NUM
|
||||
<foreach collection="list" item="item">
|
||||
<if test="item.scopeName != null and item.scopeName != ''">
|
||||
WHEN #{item.number} THEN #{item.scopeName}
|
||||
</if>
|
||||
</foreach>
|
||||
ELSE SCO_NAME
|
||||
END
|
||||
WHERE NUM IN
|
||||
<foreach collection="list" item="item" open="(" separator="," close=")">
|
||||
#{item.number}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -8,15 +8,4 @@
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<update id="updateBatch">
|
||||
<foreach collection="toUpdate" item="item" separator=";">
|
||||
UPDATE sply_erp_fact
|
||||
<set>
|
||||
<if test="item.name != null">NAME = #{item.name},</if>
|
||||
<if test="item.number != null">CPN_ID = #{item.companyId},</if>
|
||||
</set>
|
||||
WHERE NUM = #{item.number}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -9,14 +9,28 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<update id="updateBatch">
|
||||
<foreach collection="toUpdate" item="item" separator=";">
|
||||
UPDATE sply_erp_fact
|
||||
<set>
|
||||
<if test="item.name != null">NAME = #{item.name},</if>
|
||||
<if test="item.number != null">CPN_ID = #{item.companyId},</if>
|
||||
</set>
|
||||
WHERE NUM = #{item.number}
|
||||
</foreach>
|
||||
</update>
|
||||
<select id="getPageByReq" resultType="com.zt.plat.module.erp.dal.dataobject.erp.ErpFactoryDO">
|
||||
select f.*, c.NAME as companyName
|
||||
from sply_erp_fact f left join sply_erp_company c on f.CPN_ID = c.NUM;
|
||||
where f.DELETED = 0
|
||||
<if test="reqVO.name != null">
|
||||
and f.NAME like concat('%', #{reqVO.name}, '%')
|
||||
</if>
|
||||
<if test="reqVO.number != null">
|
||||
and f.NUM like concat('%', #{reqVO.number}, '%')
|
||||
</if>
|
||||
<if test="reqVO.companyNumber != null">
|
||||
and f.CPN_ID = like concat('%', #{reqVO.companyNumber}, '%')
|
||||
</if>
|
||||
<if test="reqVO.companyName != null">
|
||||
and c.NAME like concat('%', #{reqVO.companyName}, '%')
|
||||
</if>
|
||||
<if test="reqVO.type != null">
|
||||
and f.TP like concat('%', #{reqVO.type}, '%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMaxCode" resultType="java.lang.String">
|
||||
SELECT MAX(NUM) FROM sply_erp_fact where TP = '供应链'
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -9,14 +9,4 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<update id="updateBatch">
|
||||
<foreach collection="toUpdate" item="item" separator=";">
|
||||
UPDATE sply_erp_fact
|
||||
<set>
|
||||
<if test="item.name != null">NAME = #{item.name},</if>
|
||||
<if test="item.number != null">CPN_ID = #{item.companyId},</if>
|
||||
</set>
|
||||
WHERE NUM = #{item.number}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -9,14 +9,4 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<update id="updateBatch">
|
||||
<foreach collection="toUpdate" item="item" separator=";">
|
||||
UPDATE sply_erp_fact
|
||||
<set>
|
||||
<if test="item.name != null">NAME = #{item.name},</if>
|
||||
<if test="item.number != null">CPN_ID = #{item.companyId},</if>
|
||||
</set>
|
||||
WHERE NUM = #{item.number}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -9,14 +9,4 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<update id="updateBatch">
|
||||
<foreach collection="toUpdate" item="item" separator=";">
|
||||
UPDATE sply_erp_fact
|
||||
<set>
|
||||
<if test="item.name != null">NAME = #{item.name},</if>
|
||||
<if test="item.number != null">CPN_ID = #{item.companyId},</if>
|
||||
</set>
|
||||
WHERE NUM = #{item.number}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -9,14 +9,4 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<update id="updateBatch">
|
||||
<foreach collection="toUpdate" item="item" separator=";">
|
||||
UPDATE sply_erp_fact
|
||||
<set>
|
||||
<if test="item.name != null">NAME = #{item.name},</if>
|
||||
<if test="item.number != null">CPN_ID = #{item.companyId},</if>
|
||||
</set>
|
||||
WHERE NUM = #{item.number}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -9,14 +9,4 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<update id="updateBatch">
|
||||
<foreach collection="toUpdate" item="item" separator=";">
|
||||
UPDATE sply_erp_fact
|
||||
<set>
|
||||
<if test="item.name != null">NAME = #{item.name},</if>
|
||||
<if test="item.number != null">CPN_ID = #{item.companyId},</if>
|
||||
</set>
|
||||
WHERE NUM = #{item.number}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -9,14 +9,4 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<update id="updateBatch">
|
||||
<foreach collection="toUpdate" item="item" separator=";">
|
||||
UPDATE sply_erp_fact
|
||||
<set>
|
||||
<if test="item.name != null">NAME = #{item.name},</if>
|
||||
<if test="item.number != null">CPN_ID = #{item.companyId},</if>
|
||||
</set>
|
||||
WHERE NUM = #{item.number}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -9,14 +9,4 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<update id="updateBatch">
|
||||
<foreach collection="toUpdate" item="item" separator=";">
|
||||
UPDATE sply_erp_fact
|
||||
<set>
|
||||
<if test="item.name != null">NAME = #{item.name},</if>
|
||||
<if test="item.number != null">CPN_ID = #{item.companyId},</if>
|
||||
</set>
|
||||
WHERE NUM = #{item.number}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -9,14 +9,4 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<update id="updateBatch">
|
||||
<foreach collection="toUpdate" item="item" separator=";">
|
||||
UPDATE sply_erp_fact
|
||||
<set>
|
||||
<if test="item.name != null">NAME = #{item.name},</if>
|
||||
<if test="item.number != null">CPN_ID = #{item.companyId},</if>
|
||||
</set>
|
||||
WHERE NUM = #{item.number}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user