@@ -1,9 +1,8 @@
|
|||||||
package com.zt.plat.module.base.controller.admin.templtp.vo;
|
package com.zt.plat.module.base.controller.admin.templtp.vo;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
import java.util.*;
|
import lombok.Data;
|
||||||
import jakarta.validation.constraints.*;
|
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 实例字段值新增/修改 Request VO")
|
@Schema(description = "管理后台 - 实例字段值新增/修改 Request VO")
|
||||||
@Data
|
@Data
|
||||||
@@ -22,6 +21,6 @@ public class TemplateInstanceDataSaveReqVO {
|
|||||||
|
|
||||||
@Schema(description = "用户填写的值", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "用户填写的值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
// @NotEmpty(message = "用户填写的值不能为空")
|
// @NotEmpty(message = "用户填写的值不能为空")
|
||||||
private String fldVal;
|
private Object fldVal;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public interface ContractApi {
|
|||||||
CommonResult<List<PurchaseOrderWithDetailsDTO>> getOrderByOrderIds(@RequestBody List<Long> ids);
|
CommonResult<List<PurchaseOrderWithDetailsDTO>> getOrderByOrderIds(@RequestBody List<Long> ids);
|
||||||
|
|
||||||
@PostMapping(PREFIX + "/push")
|
@PostMapping(PREFIX + "/push")
|
||||||
@Operation(summary = "国贸2.0系统创建合同")
|
@Operation(summary = "国贸2.0系统推送合同")
|
||||||
CommonResult<Boolean> push(@Valid @RequestBody IntContract reqVO) throws Exception;
|
CommonResult<Boolean> push(@Valid @RequestBody IntContract reqVO) throws Exception;
|
||||||
|
|
||||||
@GetMapping(PREFIX + "/logistics/list/page")
|
@GetMapping(PREFIX + "/logistics/list/page")
|
||||||
|
|||||||
@@ -233,6 +233,9 @@ public class ContractRespVO {
|
|||||||
@Schema(description = "ERP乙方公司名称")
|
@Schema(description = "ERP乙方公司名称")
|
||||||
private String erpSalesCompanyName;
|
private String erpSalesCompanyName;
|
||||||
|
|
||||||
|
@Schema(description = "是否内部企业(字典:ERP_CTRT_YN)")
|
||||||
|
private String isInternal;
|
||||||
|
|
||||||
@Schema(description = "合同分类(字典:SPLY_BSN_TP)")
|
@Schema(description = "合同分类(字典:SPLY_BSN_TP)")
|
||||||
private String businessType;
|
private String businessType;
|
||||||
|
|
||||||
|
|||||||
@@ -17,10 +17,11 @@ public interface ContractMainMapper extends BaseMapperX<ContractMainDO> {
|
|||||||
default PageResult<ContractMainDO> selectContractPage(ContractPageReqVO reqVO) {
|
default PageResult<ContractMainDO> selectContractPage(ContractPageReqVO reqVO) {
|
||||||
return selectPage(reqVO, new LambdaQueryWrapperX<ContractMainDO>()
|
return selectPage(reqVO, new LambdaQueryWrapperX<ContractMainDO>()
|
||||||
.likeIfPresent(ContractMainDO::getContractName, reqVO.getContractName())
|
.likeIfPresent(ContractMainDO::getContractName, reqVO.getContractName())
|
||||||
.eqIfPresent(ContractMainDO::getContractPaperNumber, reqVO.getContractPaperNumber())
|
.likeIfPresent(ContractMainDO::getContractPaperNumber, reqVO.getContractPaperNumber())
|
||||||
.eqIfPresent(ContractMainDO::getDirection, reqVO.getDirection())
|
.eqIfPresent(ContractMainDO::getDirection, reqVO.getDirection())
|
||||||
.betweenIfPresent(ContractMainDO::getSignDate, reqVO.getSignDate())
|
.betweenIfPresent(ContractMainDO::getSignDate, reqVO.getSignDate())
|
||||||
.likeIfPresent(ContractMainDO::getPurchaseCompanyName, reqVO.getPurchaseCompanyName())
|
.likeIfPresent(ContractMainDO::getPurchaseCompanyName, reqVO.getPurchaseCompanyName())
|
||||||
|
.likeIfPresent(ContractMainDO::getSalesCompanyName, reqVO.getSalesCompanyName())
|
||||||
.eqIfPresent(ContractMainDO::getBasicAmount, reqVO.getBasicAmount())
|
.eqIfPresent(ContractMainDO::getBasicAmount, reqVO.getBasicAmount())
|
||||||
.eqIfPresent(ContractMainDO::getStatus, reqVO.getStatus())
|
.eqIfPresent(ContractMainDO::getStatus, reqVO.getStatus())
|
||||||
.eqIfPresent(ContractMainDO::getBusinessType, reqVO.getBusinessType())
|
.eqIfPresent(ContractMainDO::getBusinessType, reqVO.getBusinessType())
|
||||||
|
|||||||
@@ -19,4 +19,13 @@ public interface UnitErrorCodeConstants {
|
|||||||
ErrorCode UNT_INFO_NOT_EXISTS =
|
ErrorCode UNT_INFO_NOT_EXISTS =
|
||||||
new ErrorCode(1_010_000_004, "单位信息记录不存在");
|
new ErrorCode(1_010_000_004, "单位信息记录不存在");
|
||||||
|
|
||||||
|
ErrorCode UNIT_NOT_FOUND =
|
||||||
|
new ErrorCode(1_010_000_005, "找不到单位: %s");
|
||||||
|
|
||||||
|
ErrorCode UNIT_CONVERSION_PATH_NOT_FOUND =
|
||||||
|
new ErrorCode(1_010_000_006, "无法找到从单位 [%s] 到单位 [%s] 的转换路径,请检查单位是否属于同一量纲或配置转换规则");
|
||||||
|
|
||||||
|
ErrorCode UNIT_DIFFERENT_QUANTITY =
|
||||||
|
new ErrorCode(1_010_000_007, "单位 [%s] 和单位 [%s] 不属于同一量纲,无法转换");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ import com.zt.plat.module.unitmanagement.service.UnitConversion.UnitConversionSe
|
|||||||
@Validated
|
@Validated
|
||||||
public class UnitConversionController implements BusinessControllerMarker {
|
public class UnitConversionController implements BusinessControllerMarker {
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private UnitConversionService unitConversionService;
|
private UnitConversionService unitConversionService;
|
||||||
|
|
||||||
@@ -105,4 +104,54 @@ public class UnitConversionController implements BusinessControllerMarker {
|
|||||||
BeanUtils.toBean(list, UnitConversionRespVO.class));
|
BeanUtils.toBean(list, UnitConversionRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/convert")
|
||||||
|
@Operation(summary = "单位转换")
|
||||||
|
@PreAuthorize("@ss.hasPermission('unitmanagement:unit-conversion:query')")
|
||||||
|
public CommonResult<UnitConvertRespVO> convert(@Valid @RequestBody UnitConvertReqVO convertReqVO) {
|
||||||
|
return success(unitConversionService.convert(convertReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/batch-convert")
|
||||||
|
@Operation(summary = "批量单位转换")
|
||||||
|
@PreAuthorize("@ss.hasPermission('unitmanagement:unit-conversion:query')")
|
||||||
|
public CommonResult<BatchUnitConvertRespVO> batchConvert(@Valid @RequestBody BatchUnitConvertReqVO batchReqVO) {
|
||||||
|
return success(unitConversionService.batchConvert(batchReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/convert-by-symbol")
|
||||||
|
@Operation(summary = "按单位符号转换")
|
||||||
|
@PreAuthorize("@ss.hasPermission('unitmanagement:unit-conversion:query')")
|
||||||
|
public CommonResult<UnitConvertRespVO> convertBySymbol(@Valid @RequestBody UnitConvertBySymbolReqVO reqVO) {
|
||||||
|
return success(unitConversionService.convertBySymbol(reqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/convert-by-name")
|
||||||
|
@Operation(summary = "按单位名称转换")
|
||||||
|
@PreAuthorize("@ss.hasPermission('unitmanagement:unit-conversion:query')")
|
||||||
|
public CommonResult<UnitConvertRespVO> convertByName(@Valid @RequestBody UnitConvertByNameReqVO reqVO) {
|
||||||
|
return success(unitConversionService.convertByName(reqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/batch-convert-by-symbol")
|
||||||
|
@Operation(summary = "批量按单位符号转换")
|
||||||
|
@PreAuthorize("@ss.hasPermission('unitmanagement:unit-conversion:query')")
|
||||||
|
public CommonResult<BatchUnitConvertRespVO> batchConvertBySymbol(@Valid @RequestBody BatchUnitConvertBySymbolReqVO reqVO) {
|
||||||
|
return success(unitConversionService.batchConvertBySymbol(reqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/batch-convert-by-name")
|
||||||
|
@Operation(summary = "批量按单位名称转换")
|
||||||
|
@PreAuthorize("@ss.hasPermission('unitmanagement:unit-conversion:query')")
|
||||||
|
public CommonResult<BatchUnitConvertRespVO> batchConvertByName(@Valid @RequestBody BatchUnitConvertByNameReqVO reqVO) {
|
||||||
|
return success(unitConversionService.batchConvertByName(reqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/validate-paths")
|
||||||
|
@Operation(summary = "校验量纲的转换路径")
|
||||||
|
@Parameter(name = "quantityId", description = "量纲ID", required = true, example = "1")
|
||||||
|
@PreAuthorize("@ss.hasPermission('unitmanagement:unit-conversion:query')")
|
||||||
|
public CommonResult<UnitConversionValidationRespVO> validateConversionPaths(@RequestParam("quantityId") Long quantityId) {
|
||||||
|
return success(unitConversionService.validateConversionPaths(quantityId));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.zt.plat.module.unitmanagement.controller.admin.UnitConversion.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 批量按名称单位转换 Request VO")
|
||||||
|
@Data
|
||||||
|
public class BatchUnitConvertByNameReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "源单位名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "千克")
|
||||||
|
@NotBlank(message = "源单位名称不能为空")
|
||||||
|
private String srcUnitName;
|
||||||
|
|
||||||
|
@Schema(description = "目标单位名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "吨")
|
||||||
|
@NotBlank(message = "目标单位名称不能为空")
|
||||||
|
private String tgtUnitName;
|
||||||
|
|
||||||
|
@Schema(description = "待转换的值列表", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotEmpty(message = "待转换的值列表不能为空")
|
||||||
|
private List<BigDecimal> values;
|
||||||
|
|
||||||
|
@Schema(description = "精度(小数位数)", example = "6")
|
||||||
|
private Integer precision = 6;
|
||||||
|
|
||||||
|
@Schema(description = "是否忽略错误(true:遇到错误继续执行, false:遇到错误立即停止)", example = "false")
|
||||||
|
private Boolean ignoreErrors = false;
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.zt.plat.module.unitmanagement.controller.admin.UnitConversion.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 批量按符号单位转换 Request VO")
|
||||||
|
@Data
|
||||||
|
public class BatchUnitConvertBySymbolReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "源单位符号", requiredMode = Schema.RequiredMode.REQUIRED, example = "m")
|
||||||
|
@NotBlank(message = "源单位符号不能为空")
|
||||||
|
private String srcUnitSymbol;
|
||||||
|
|
||||||
|
@Schema(description = "目标单位符号", requiredMode = Schema.RequiredMode.REQUIRED, example = "km")
|
||||||
|
@NotBlank(message = "目标单位符号不能为空")
|
||||||
|
private String tgtUnitSymbol;
|
||||||
|
|
||||||
|
@Schema(description = "待转换的值列表", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotEmpty(message = "待转换的值列表不能为空")
|
||||||
|
private List<BigDecimal> values;
|
||||||
|
|
||||||
|
@Schema(description = "精度(小数位数)", example = "6")
|
||||||
|
private Integer precision = 6;
|
||||||
|
|
||||||
|
@Schema(description = "是否忽略错误(true:遇到错误继续执行, false:遇到错误立即停止)", example = "false")
|
||||||
|
private Boolean ignoreErrors = false;
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.zt.plat.module.unitmanagement.controller.admin.UnitConversion.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 批量单位转换 Request VO")
|
||||||
|
@Data
|
||||||
|
public class BatchUnitConvertReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "转换项列表", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotEmpty(message = "转换项列表不能为空")
|
||||||
|
private List<UnitConvertReqVO> items;
|
||||||
|
|
||||||
|
@Schema(description = "是否忽略错误(true:遇到错误继续执行, false:遇到错误立即停止)", example = "false")
|
||||||
|
private Boolean ignoreErrors = false;
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.zt.plat.module.unitmanagement.controller.admin.UnitConversion.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.Builder;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 批量单位转换 Response VO")
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
public class BatchUnitConvertRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "转换结果列表")
|
||||||
|
private List<UnitConvertResultItem> results;
|
||||||
|
|
||||||
|
@Schema(description = "成功数量", example = "10")
|
||||||
|
private Integer successCount;
|
||||||
|
|
||||||
|
@Schema(description = "失败数量", example = "0")
|
||||||
|
private Integer failureCount;
|
||||||
|
|
||||||
|
@Schema(description = "总数量", example = "10")
|
||||||
|
private Integer totalCount;
|
||||||
|
|
||||||
|
@Schema(description = "转换结果项")
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
public static class UnitConvertResultItem {
|
||||||
|
|
||||||
|
@Schema(description = "是否成功", example = "true")
|
||||||
|
private Boolean success;
|
||||||
|
|
||||||
|
@Schema(description = "转换结果(成功时返回)")
|
||||||
|
private UnitConvertRespVO data;
|
||||||
|
|
||||||
|
@Schema(description = "错误信息(失败时返回)", example = "找不到转换规则")
|
||||||
|
private String errorMessage;
|
||||||
|
|
||||||
|
@Schema(description = "原始请求")
|
||||||
|
private UnitConvertReqVO request;
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user