mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
1、禅道#1445问题修复,入参必填校验完善;2、封边系统配置兼容double类型;
This commit is contained in:
+2
-1
@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import static com.cf.imes.framework.operatelog.core.enums.OperateTypeEnum.IMPORT;
|
||||
|
||||
@@ -33,7 +34,7 @@ public class OrderImportController {
|
||||
@PostMapping("/webcad/import")
|
||||
@Operation(summary = "webcad拆单导入生产单")
|
||||
@OperateLog(type = IMPORT)
|
||||
public CommonResult<Boolean> webCadOrderImport(@RequestBody WebCadDataReqVO webCadDataReqVO) {
|
||||
public CommonResult<Boolean> webCadOrderImport(@RequestBody @Valid WebCadDataReqVO webCadDataReqVO) {
|
||||
webCadOrderImportService.webCadOrderImport(webCadDataReqVO);
|
||||
return CommonResult.success(true);
|
||||
}
|
||||
|
||||
+4
@@ -3,6 +3,8 @@ package com.cf.imes.module.plan.controller.admin.orderImport.webcad.vo;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -18,6 +20,7 @@ public class WebCadDataDoubleRoomTreeReqVO {
|
||||
|
||||
private Integer count;
|
||||
|
||||
@Valid
|
||||
private List<ChildrenDTO> children;
|
||||
|
||||
@NoArgsConstructor
|
||||
@@ -26,6 +29,7 @@ public class WebCadDataDoubleRoomTreeReqVO {
|
||||
|
||||
private String name;
|
||||
|
||||
@NotNull(message = "房间倍数不能为空")
|
||||
private Integer count;
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
@@ -18,5 +19,6 @@ public class WebCadDataOrderReqVO {
|
||||
*/
|
||||
@JsonProperty(value = "OrderNo")
|
||||
@NotNull(message = "生产单号不能为空")
|
||||
@NotEmpty(message = "生产单号不能为空")
|
||||
private String OrderNo;
|
||||
}
|
||||
|
||||
+3
-2
@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -15,6 +16,7 @@ import java.util.List;
|
||||
public class WebCadDataReqVO {
|
||||
|
||||
@JsonProperty(value = "Orders")
|
||||
@Valid
|
||||
private WebCadDataOrderReqVO orders;
|
||||
|
||||
@JsonProperty(value = "Materials")
|
||||
@@ -29,7 +31,6 @@ public class WebCadDataReqVO {
|
||||
@JsonProperty(value = "ProcessGroup")
|
||||
private List<WebCadDataProcessGroupReqVO> ProcessGroup;
|
||||
|
||||
@Valid
|
||||
private List<WebCadDataDoubleRoomTreeReqVO> douleRoomTree;
|
||||
|
||||
private String orderType;
|
||||
}
|
||||
|
||||
+1
-1
@@ -288,7 +288,7 @@ public class WebCadOrderImportFactory {
|
||||
String widthValue = jsonObject.getString("widthValue");
|
||||
|
||||
if (StringUtils.isNotEmpty(widthMin) && StringUtils.isNotEmpty(widthMax) && StringUtils.isNotEmpty(widthValue)) {
|
||||
sealEdgeConfigList.add(new SystemConfigSealEdgeRespDTO(Integer.parseInt(widthMin), Integer.parseInt(widthMax), Integer.parseInt(widthValue)));
|
||||
sealEdgeConfigList.add(new SystemConfigSealEdgeRespDTO(NumberUtil.parseDouble(widthMin), NumberUtil.parseDouble(widthMax), NumberUtil.parseDouble(widthValue)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -20,15 +20,15 @@ public class SystemConfigSealEdgeRespDTO implements Serializable {
|
||||
/**
|
||||
* 宽最小值
|
||||
*/
|
||||
private int widthMin;
|
||||
private double widthMin;
|
||||
|
||||
/**
|
||||
* 宽最大值
|
||||
*/
|
||||
private int widthMax;
|
||||
private double widthMax;
|
||||
|
||||
/**
|
||||
* 宽取值a
|
||||
*/
|
||||
private int widthValue;
|
||||
private double widthValue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user