Browse Source

Merge remote-tracking branch 'origin/dev_v1.0.0' into dev_v1.0.0

caozixuan 1 năm trước cách đây
mục cha
commit
204629dea1
29 tập tin đã thay đổi với 219 bổ sung84 xóa
  1. 6 0
      sop-business/src/main/java/com/qmth/sop/business/entity/SysCustom.java
  2. 5 0
      sop-business/src/main/java/com/qmth/sop/business/entity/SysCustomRole.java
  3. 7 0
      sop-business/src/main/java/com/qmth/sop/business/entity/SysDevice.java
  4. 5 0
      sop-business/src/main/java/com/qmth/sop/business/entity/SysDingDate.java
  5. 8 0
      sop-business/src/main/java/com/qmth/sop/business/entity/SysDingGroup.java
  6. 4 0
      sop-business/src/main/java/com/qmth/sop/business/entity/SysDingObj.java
  7. 4 0
      sop-business/src/main/java/com/qmth/sop/business/entity/SysLevel.java
  8. 4 0
      sop-business/src/main/java/com/qmth/sop/business/entity/SysLevelRole.java
  9. 4 0
      sop-business/src/main/java/com/qmth/sop/business/entity/SysNotice.java
  10. 6 0
      sop-business/src/main/java/com/qmth/sop/business/entity/SysSupplier.java
  11. 9 0
      sop-business/src/main/java/com/qmth/sop/business/entity/TBCrm.java
  12. 3 0
      sop-business/src/main/java/com/qmth/sop/business/entity/TBDelayWarnDetail.java
  13. 5 0
      sop-business/src/main/java/com/qmth/sop/business/entity/TBViolation.java
  14. 3 0
      sop-business/src/main/java/com/qmth/sop/business/entity/TBViolationDetail.java
  15. 20 12
      sop-server/src/main/java/com/qmth/sop/server/api/SysCustomController.java
  16. 14 7
      sop-server/src/main/java/com/qmth/sop/server/api/SysDeviceController.java
  17. 10 6
      sop-server/src/main/java/com/qmth/sop/server/api/SysDingDateController.java
  18. 14 7
      sop-server/src/main/java/com/qmth/sop/server/api/SysDingGroupController.java
  19. 13 6
      sop-server/src/main/java/com/qmth/sop/server/api/SysLevelController.java
  20. 10 10
      sop-server/src/main/java/com/qmth/sop/server/api/SysMessageController.java
  21. 11 7
      sop-server/src/main/java/com/qmth/sop/server/api/SysNoticeController.java
  22. 13 6
      sop-server/src/main/java/com/qmth/sop/server/api/SysSupplierController.java
  23. 12 8
      sop-server/src/main/java/com/qmth/sop/server/api/TBCrmController.java
  24. 5 5
      sop-server/src/main/java/com/qmth/sop/server/api/TBDelayWarnController.java
  25. 6 2
      sop-server/src/main/java/com/qmth/sop/server/api/TBDelayWarnDetailController.java
  26. 2 2
      sop-server/src/main/java/com/qmth/sop/server/api/TBDingController.java
  27. 3 3
      sop-server/src/main/java/com/qmth/sop/server/api/TBQualityProblemApplyController.java
  28. 6 1
      sop-server/src/main/java/com/qmth/sop/server/api/TBViolationController.java
  29. 7 2
      sop-server/src/main/java/com/qmth/sop/server/api/TBViolationDetailController.java

+ 6 - 0
sop-business/src/main/java/com/qmth/sop/business/entity/SysCustom.java

@@ -7,6 +7,7 @@ import com.qmth.sop.common.enums.ProductTypeEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
+import javax.validation.constraints.NotBlank;
 import java.io.Serializable;
 
 /**
@@ -23,6 +24,7 @@ public class SysCustom extends BaseEntity implements Serializable {
     private static final long serialVersionUID = 1L;
 
     @ApiModelProperty(value = "名称")
+    @NotBlank(message = "名称不能为空")
     private String name;
 
     @ApiModelProperty(value = "编码")
@@ -32,9 +34,11 @@ public class SysCustom extends BaseEntity implements Serializable {
     private ProductTypeEnum type;
 
     @ApiModelProperty(value = "省份")
+    @NotBlank(message = "省份不能为空")
     private String province;
 
     @ApiModelProperty(value = "城市")
+    @NotBlank(message = "城市不能为空")
     private String city;
 
     @ApiModelProperty(value = "县区")
@@ -55,9 +59,11 @@ public class SysCustom extends BaseEntity implements Serializable {
     private Integer peoperDay;
 
     @ApiModelProperty(value = "是否crm同步,0:否,1:是")
+    @NotBlank(message = "是否crm同步不能为空")
     private Boolean sync;
 
     @ApiModelProperty(value = "是否启用,0:停用,1:启用")
+    @NotBlank(message = "是否启用不能为空")
     private Boolean enable;
 
     public String getName() {

+ 5 - 0
sop-business/src/main/java/com/qmth/sop/business/entity/SysCustomRole.java

@@ -8,6 +8,8 @@ import com.qmth.sop.common.contant.SystemConstant;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
+import javax.validation.constraints.NotBlank;
+
 /**
  * 客户角色配置表 模型.
  * 
@@ -29,12 +31,15 @@ public class SysCustomRole implements Serializable {
 
   	@ApiModelProperty(value = "客户id")
 	@JsonSerialize(using = ToStringSerializer.class)
+	@NotBlank(message = "客户id不能为空")
   	private long customId;
   	@ApiModelProperty(value = "角色id")
 	@JsonSerialize(using = ToStringSerializer.class)
+	@NotBlank(message = "角色id不能为空")
   	private long roleId;
   	@ApiModelProperty(value = "配额")
 	@JsonSerialize(using = ToStringSerializer.class)
+	@NotBlank(message = "配额不能为空")
   	private long quota;
 
 	public Long getId() {

+ 7 - 0
sop-business/src/main/java/com/qmth/sop/business/entity/SysDevice.java

@@ -7,6 +7,7 @@ import com.qmth.sop.common.enums.DeviceStatusEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
+import javax.validation.constraints.NotNull;
 import java.io.Serializable;
 
 /**
@@ -23,15 +24,19 @@ public class SysDevice extends BaseEntity implements Serializable {
     private static final long serialVersionUID = 1L;
 
     @ApiModelProperty(value = "名称")
+    @NotNull(message = "名称不能为空")
     private String name;
 
     @ApiModelProperty(value = "序列号")
+    @NotNull(message = "序列号不能为空")
     private String serialNo;
 
     @ApiModelProperty(value = "品牌")
+    @NotNull(message = "品牌不能为空")
     private String brand;
 
     @ApiModelProperty(value = "购买时间")
+    @NotNull(message = "购买时间不能为空")
     private Long buyTime;
 
     @ApiModelProperty(value = "供应商id")
@@ -48,9 +53,11 @@ public class SysDevice extends BaseEntity implements Serializable {
     private Long scanCount;
 
     @ApiModelProperty(value = "是否crm同步,0:否,1:是")
+    @NotNull(message = "是否crm同步不能为空")
     private Boolean sync;
 
     @ApiModelProperty(value = "是否启用,0:停用,1:启用")
+    @NotNull(message = "是否启用不能为空")
     private Boolean enable;
 
     public String getName() {

+ 5 - 0
sop-business/src/main/java/com/qmth/sop/business/entity/SysDingDate.java

@@ -7,6 +7,7 @@ import com.qmth.sop.common.enums.DingDateTypeEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
+import javax.validation.constraints.NotNull;
 import java.io.Serializable;
 
 /**
@@ -29,14 +30,18 @@ public class SysDingDate implements Serializable {
 	private static final long serialVersionUID = 1L;
   	@ApiModelProperty(value = "年")
 	@JsonSerialize(using = ToStringSerializer.class)
+	@NotNull(message = "年不能为空")
   	private Long year;
   	@ApiModelProperty(value = "月")
 	@JsonSerialize(using = ToStringSerializer.class)
+	@NotNull(message = "月不能为空")
   	private Long month;
   	@ApiModelProperty(value = "日")
 	@JsonSerialize(using = ToStringSerializer.class)
+	@NotNull(message = "日不能为空")
   	private Long day;
 	@ApiModelProperty(value = "日期类型:WEEKDAY(工作日),WEEKEND(周末),LEGAL_HOLIDAYS(法定节假日)")
+	@NotNull(message = "日期类型不能为空")
 	private DingDateTypeEnum type;
 
 	/**

+ 8 - 0
sop-business/src/main/java/com/qmth/sop/business/entity/SysDingGroup.java

@@ -6,6 +6,7 @@ import com.qmth.sop.common.base.BaseEntity;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
+import javax.validation.constraints.NotNull;
 import java.io.Serializable;
 
 /**
@@ -23,28 +24,35 @@ public class SysDingGroup extends BaseEntity implements Serializable {
 
     @ApiModelProperty(value = "服务单元id")
     @JsonSerialize(using = ToStringSerializer.class)
+    @NotNull(message = "服务单元id不能为空")
     private Long serviceId;
 
     @ApiModelProperty(value = "名称")
+    @NotNull(message = "名称不能为空")
     private String name;
 
     @ApiModelProperty(value = "供应商id")
     @JsonSerialize(using = ToStringSerializer.class)
+    @NotNull(message = "供应商id不能为空")
     private Long supplierId;
 
     @ApiModelProperty(value = "签到时段")
+    @NotNull(message = "签到时段不能为空")
     private String signInTime;
 
     @ApiModelProperty(value = "签退时段")
+    @NotNull(message = "签退时段不能为空")
     private String signOutTime;
 
     @ApiModelProperty(value = "是否开启人脸,0:不开启,1:开启")
+    @NotNull(message = "是否开启人脸不能为空")
     private Boolean faceOpen;
 
     @ApiModelProperty(value = "允许补卡次数")
     private Integer reissueCardCount;
 
     @ApiModelProperty(value = "是否启用,0:停用,1:启用")
+    @NotNull(message = "是否启用不能为空")
     private Boolean enable;
 
     public Long getServiceId() {

+ 4 - 0
sop-business/src/main/java/com/qmth/sop/business/entity/SysDingObj.java

@@ -6,6 +6,7 @@ import com.qmth.sop.common.enums.DingObjTypeEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
+import javax.validation.constraints.NotBlank;
 import java.io.Serializable;
 
 /**
@@ -27,13 +28,16 @@ public class SysDingObj implements Serializable {
 
     @ApiModelProperty(value = "考勤组id")
     @JsonSerialize(using = ToStringSerializer.class)
+    @NotBlank(message = "考勤组id不能为空")
     private Long dingGroupId;
 
     @ApiModelProperty(value = "角色id")
     @JsonSerialize(using = ToStringSerializer.class)
+    @NotBlank(message = "角色id不能为空")
     private Long roleId;
 
     @ApiModelProperty(value = "类型,DING:考勤,APPROVE:审核")
+    @NotBlank(message = "类型不能为空")
     private DingObjTypeEnum type;
 
     public Long getId() {

+ 4 - 0
sop-business/src/main/java/com/qmth/sop/business/entity/SysLevel.java

@@ -6,6 +6,7 @@ import com.qmth.sop.common.enums.ProductTypeEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
+import javax.validation.constraints.NotBlank;
 import java.io.Serializable;
 
 /**
@@ -26,12 +27,15 @@ public class SysLevel implements Serializable {
     private Long id;
 
     @ApiModelProperty(value = "档位")
+    @NotBlank(message = "档位不能为空")
     private String level;
 
     @ApiModelProperty(value = "类型,OFFICE:教务处,CLOUD_MARK:云阅卷")
+    @NotBlank(message = "s类型不能为空")
     private ProductTypeEnum type;
 
     @ApiModelProperty(value = "是否启用,0:停用,1:启用")
+    @NotBlank(message = "是否启用不能为空")
     private Boolean enable;
 
     @ApiModelProperty(value = "创建人id")

+ 4 - 0
sop-business/src/main/java/com/qmth/sop/business/entity/SysLevelRole.java

@@ -5,6 +5,7 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
+import javax.validation.constraints.NotBlank;
 import java.io.Serializable;
 
 /**
@@ -26,14 +27,17 @@ public class SysLevelRole implements Serializable {
 
     @ApiModelProperty(value = "服务档位id")
     @JsonSerialize(using = ToStringSerializer.class)
+    @NotBlank(message = "服务档位id不能为空")
     private Long levelId;
 
     @ApiModelProperty(value = "角色id")
     @JsonSerialize(using = ToStringSerializer.class)
+    @NotBlank(message = "角色id不能为空")
     private Long roleId;
 
     @ApiModelProperty(value = "配额")
     @JsonSerialize(using = ToStringSerializer.class)
+    @NotBlank(message = "配额不能为空")
     private Long quota;
 
     public Long getId() {

+ 4 - 0
sop-business/src/main/java/com/qmth/sop/business/entity/SysNotice.java

@@ -8,6 +8,7 @@ import com.qmth.sop.common.enums.NoticeTypeEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
+import javax.validation.constraints.NotBlank;
 import java.io.Serializable;
 
 /**
@@ -32,9 +33,11 @@ public class SysNotice extends BaseEntity implements Serializable {
     private Long supplierId;
 
     @ApiModelProperty(value = "标题")
+    @NotBlank(message = "标题不能为空")
     private String title;
 
     @ApiModelProperty(value = "内容")
+    @NotBlank(message = "内容不能为空")
     private String content;
 
     @ApiModelProperty(value = "类型,SYSTEM:公告,SUPPLIER:供应商,SERVICE:服务单元")
@@ -44,6 +47,7 @@ public class SysNotice extends BaseEntity implements Serializable {
     private NoticeStatusEnum status;
 
     @ApiModelProperty(value = "是否启用,0:停用,1:启用")
+    @NotBlank(message = "是否启用不能为空")
     private Boolean enable;
 
     @ApiModelProperty(value = "发布日期")

+ 6 - 0
sop-business/src/main/java/com/qmth/sop/business/entity/SysSupplier.java

@@ -5,6 +5,7 @@ import com.qmth.sop.common.enums.SupplierTypeEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
+import javax.validation.constraints.NotBlank;
 import java.io.Serializable;
 
 /**
@@ -21,21 +22,26 @@ public class SysSupplier extends BaseEntity implements Serializable {
     private static final long serialVersionUID = 1L;
 
     @ApiModelProperty(value = "名称")
+    @NotBlank(message = "名称不能为空")
     private String name;
 
     @ApiModelProperty(value = "编码")
+    @NotBlank(message = "编码不能为空")
     private String code;
 
     @ApiModelProperty(value = "类型,HUMAN:人力,DEVICE:设备")
+    @NotBlank(message = "类型不能为空")
     private SupplierTypeEnum type;
 
     @ApiModelProperty(value = "是否启用,0:停用,1:启用")
+    @NotBlank(message = "s是否启用不能为空")
     private Boolean enable;
 
     @ApiModelProperty(value = "备注")
     private String remark;
 
     @ApiModelProperty(value = "是否crm同步,0:否,1:是")
+    @NotBlank(message = "是否crm同步不能为空")
     private Boolean sync;
 
     public String getName() {

+ 9 - 0
sop-business/src/main/java/com/qmth/sop/business/entity/TBCrm.java

@@ -6,6 +6,7 @@ import com.qmth.sop.common.base.BaseEntity;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
+import javax.validation.constraints.NotBlank;
 import java.io.Serializable;
 
 /**
@@ -22,12 +23,15 @@ public class TBCrm extends BaseEntity implements Serializable {
     private static final long serialVersionUID = 1L;
 
     @ApiModelProperty(value = "项目单号")
+    @NotBlank(message = "项目单号不能为空")
     private String crmNo;
 
     @ApiModelProperty(value = "项目名称")
+    @NotBlank(message = "项目名称不能为空")
     private String name;
 
     @ApiModelProperty(value = "派单时间")
+    @NotBlank(message = "派单时间不能为空")
     private Long beginTime;
 
     @ApiModelProperty(value = "服务单元id")
@@ -36,10 +40,12 @@ public class TBCrm extends BaseEntity implements Serializable {
 
     @ApiModelProperty(value = "派单人id")
     @JsonSerialize(using = ToStringSerializer.class)
+    @NotBlank(message = "派单人id不能为空")
     private Long crmUserId;
 
     @ApiModelProperty(value = "客户id")
     @JsonSerialize(using = ToStringSerializer.class)
+    @NotBlank(message = "客户id不能为空")
     private Long customId;
 
     @ApiModelProperty(value = "考试开始时间")
@@ -50,6 +56,7 @@ public class TBCrm extends BaseEntity implements Serializable {
 
     @ApiModelProperty(value = "产品id")
     @JsonSerialize(using = ToStringSerializer.class)
+    @NotBlank(message = "产品id不能为空")
     private Long productId;
 
     @ApiModelProperty(value = "区域经理id")
@@ -57,9 +64,11 @@ public class TBCrm extends BaseEntity implements Serializable {
     private Long leadId;
 
     @ApiModelProperty(value = "是否crm同步,false:否,true:是")
+    @NotBlank(message = "是否crm同步不能为空")
     private Boolean sync;
 
     @ApiModelProperty(value = "是否启用,0:停用,1:启用")
+    @NotBlank(message = "是否启用不能为空")
     private Boolean enable;
 
     public String getCrmNo() {

+ 3 - 0
sop-business/src/main/java/com/qmth/sop/business/entity/TBDelayWarnDetail.java

@@ -5,6 +5,7 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
+import javax.validation.constraints.NotBlank;
 import java.io.Serializable;
 
 /**
@@ -26,9 +27,11 @@ public class TBDelayWarnDetail implements Serializable {
 
     @ApiModelProperty(value = "延期预警id")
     @JsonSerialize(using = ToStringSerializer.class)
+    @NotBlank(message = "延期预警id不能为空")
     private Long delayWarnId;
 
     @ApiModelProperty(value = "跟进说明")
+    @NotBlank(message = "跟进说明不能为空")
     private String remark;
 
     @ApiModelProperty(value = "附件ids")

+ 5 - 0
sop-business/src/main/java/com/qmth/sop/business/entity/TBViolation.java

@@ -8,6 +8,7 @@ import com.qmth.sop.common.enums.ViolationTypeEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
+import javax.validation.constraints.NotBlank;
 import java.io.Serializable;
 
 /**
@@ -35,15 +36,19 @@ public class TBViolation extends BaseEntity implements Serializable {
 
     @ApiModelProperty(value = "负责人id")
     @JsonSerialize(using = ToStringSerializer.class)
+    @NotBlank(message = "负责人id不能为空")
     private Long userId;
 
     @ApiModelProperty(value = "类型,CONTENT_ERROR:内容错误虚假,LOGIC_ERROR:逻辑不合理,OTHER:其它")
+    @NotBlank(message = "类型不能为空")
     private ViolationTypeEnum type;
 
     @ApiModelProperty(value = "违规情况")
+    @NotBlank(message = "违规情况不能为空")
     private String content;
 
     @ApiModelProperty(value = "状态,NOT_START:未跟进,FOLLOW:跟进,CLOSE:关闭,RESTART:重启")
+    @NotBlank(message = "状态不能为空")
     private ViolationStatusEnum status;
 
     @ApiModelProperty(value = "附件ids")

+ 3 - 0
sop-business/src/main/java/com/qmth/sop/business/entity/TBViolationDetail.java

@@ -5,6 +5,7 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
+import javax.validation.constraints.NotBlank;
 import java.io.Serializable;
 
 /**
@@ -26,9 +27,11 @@ public class TBViolationDetail implements Serializable {
 
     @ApiModelProperty(value = "违规id")
     @JsonSerialize(using = ToStringSerializer.class)
+    @NotBlank(message = "违规id不能为空")
     private Long violationId;
 
     @ApiModelProperty(value = "跟进说明")
+    @NotBlank(message = "跟进说明不能为空")
     private String remark;
 
     @ApiModelProperty(value = "附件ids")

+ 20 - 12
sop-server/src/main/java/com/qmth/sop/server/api/SysCustomController.java

@@ -20,6 +20,7 @@ import com.qmth.sop.common.enums.TaskTypeEnum;
 import com.qmth.sop.common.util.Result;
 import com.qmth.sop.common.util.ResultUtil;
 import io.swagger.annotations.*;
+import org.springframework.validation.BindingResult;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
@@ -57,6 +58,7 @@ public class SysCustomController {
     @Resource
     SysCustomRoleService sysCustomRoleService;
 
+   
     @ApiOperation(value = "客户表查询接口")
     @RequestMapping(value = "/query", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "客户表列表信息", response = SysCustomResult.class)})
@@ -65,34 +67,40 @@ public class SysCustomController {
             @ApiParam(value = "客户经理id", required = false) @RequestParam(required = false) Long managerId,
             @ApiParam(value = "客户名称", required = false) @RequestParam(required = false) String name,
             @ApiParam(value = "服务档位id", required = false) @RequestParam(required = false) Long levelId,
-            @Valid @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
-            @Valid @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+            @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
+            @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
         IPage<SysCustomResult> resultIPage = sysCustomService.query(new Page<>(pageNumber, pageSize), type, managerId, name, levelId);
         return ResultUtil.ok(resultIPage);
     }
 
-    
+   
     @ApiOperation(value = "新增客户表接口")
     @RequestMapping(value = "/add", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "新增客户表信息", response = Object.class)})
-    public Result add(@Valid @ApiParam(value = "客户信息", required = true) @RequestBody(required = true) SysCustomResult sysCustom) {
+    public Result add(@Valid @ApiParam(value = "客户信息", required = true) @RequestBody(required = true) SysCustomResult sysCustom, BindingResult bindingResult) throws InterruptedException {
+        if (bindingResult.hasErrors()) {
+            return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
+        }
         sysCustomService.add(sysCustom);
         return ResultUtil.ok();
     }
 
-    
+   
     @ApiOperation(value = "修改客户表接口")
     @RequestMapping(value = "/update", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "修改客户表信息", response = Object.class)})
-    public Result update(@Valid @ApiParam(value = "客户信息", required = true) @RequestBody(required = true) SysCustomResult sysCustom) {
+    public Result update(@Valid @ApiParam(value = "客户信息", required = true) @RequestBody(required = true) SysCustomResult sysCustom, BindingResult bindingResult) throws InterruptedException {
+        if (bindingResult.hasErrors()) {
+            return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
+        }
         sysCustomService.update(sysCustom);
         return ResultUtil.ok();
     }
-    
+   
     @ApiOperation(value = "删除客户表接口")
     @RequestMapping(value = "/delete", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "删除客户表信息", response = Object.class)})
-    public Result delete(@Valid @ApiParam(value = "客户id", required = true) @RequestParam(required = true) long id) {
+    public Result delete(@ApiParam(value = "客户id", required = true) @RequestParam(required = true) long id) {
         sysCustomService.delete(id);
         return ResultUtil.ok();
     }
@@ -102,22 +110,22 @@ public class SysCustomController {
      * @param id
      * @return
      */
-    
+   
     @ApiOperation(value = "获取单个客户")
     @RequestMapping(value = "/get", method = RequestMethod.GET)
     @ApiResponses({@ApiResponse(code = 200, message = "获取单个客户", response = SysCustomResult.class)})
-    public Result detail(@Valid @ApiParam(value = "客户id", required = true) @RequestParam(required = true) long id) {
+    public Result detail(@ApiParam(value = "客户id", required = true) @RequestParam(required = true) long id) {
         SysCustom sysCustom = sysCustomService.getById(id);
         SysCustomResult sysCustomResult= JSON.toJavaObject((JSON) JSON.toJSON(sysCustom),SysCustomResult.class);
         sysCustomResult.setRoleList(sysCustomRoleService.getList(sysCustom.getId()));
         return ResultUtil.ok(sysCustomResult);
     }
 
-
+   
     @ApiOperation(value = "客户表导入")
     @RequestMapping(value = "/import", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Object.class)})
-    public Result importCustom(@Valid @ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file) throws Exception {
+    public Result importCustom(@ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file) throws Exception {
         Map<String, Object> map = tbTaskService.saveTask(file, TaskTypeEnum.CUSTOM_IMPORT);
         asyncSysCustomImportService.importTask(map);
         TBTask tbTask = (TBTask) map.get(SystemConstant.TASK);

+ 14 - 7
sop-server/src/main/java/com/qmth/sop/server/api/SysDeviceController.java

@@ -18,6 +18,7 @@ import com.qmth.sop.common.contant.SystemConstant;
 import com.qmth.sop.common.util.Result;
 import com.qmth.sop.common.util.ResultUtil;
 import io.swagger.annotations.*;
+import org.springframework.validation.BindingResult;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
@@ -51,8 +52,8 @@ public class SysDeviceController {
     @ApiResponses({@ApiResponse(code = 200, message = "设备配置表列表信息", response = SysDeviceResult.class)})
     public Result query(
                 @ApiParam(value = "查询条件", required = false) @RequestParam(required = false) String query,
-                @Valid @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
-                @Valid @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+                @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
+                @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
         IPage<SysDeviceResult> resultIPage = sysDeviceService.query(new Page<>(pageNumber, pageSize),query);
 
         return ResultUtil.ok(resultIPage);
@@ -62,7 +63,10 @@ public class SysDeviceController {
     @ApiOperation(value = "新增设备配置表接口")
     @RequestMapping(value = "/add", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "新增设备配置表信息", response = Object.class)})
-    public Result add(@Valid @ApiParam(value = "设备配置表信息", required = true) @RequestBody(required = true) SysDevice sysDevice) {
+    public Result add(@Valid @ApiParam(value = "设备配置表信息", required = true) @RequestBody(required = true) SysDevice sysDevice, BindingResult bindingResult) throws InterruptedException {
+        if (bindingResult.hasErrors()) {
+            return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
+        }
         sysDeviceService.add(sysDevice);
         return ResultUtil.ok();
     }
@@ -72,7 +76,10 @@ public class SysDeviceController {
     @ApiOperation(value = "修改设备配置表接口")
     @RequestMapping(value = "/update", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "修改设备配置表信息", response = Object.class)})
-    public Result update(@Valid @ApiParam(value = "设备配置表信息", required = true) @RequestBody(required = true) SysDevice sysDevice) {
+    public Result update(@Valid @ApiParam(value = "设备配置表信息", required = true) @RequestBody(required = true) SysDevice sysDevice, BindingResult bindingResult) throws InterruptedException {
+        if (bindingResult.hasErrors()) {
+            return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
+        }
         sysDeviceService.update(sysDevice);
         return ResultUtil.ok();
     }
@@ -81,7 +88,7 @@ public class SysDeviceController {
     @ApiOperation(value = "删除设备配置表接口")
     @RequestMapping(value = "/delete", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "删除设备配置表信息", response = Object.class)})
-    public Result delete(@Valid @ApiParam(value = "设备配置表信息", required = true) @RequestParam(required = true) long id) {
+    public Result delete(@ApiParam(value = "设备配置表信息", required = true) @RequestParam(required = true) long id) {
         sysDeviceService.delete(id);
         return ResultUtil.ok();
     }
@@ -103,7 +110,7 @@ public class SysDeviceController {
     @ApiOperation(value = "停用设备配置接口")
     @RequestMapping(value = "/disable", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "停用设备配置", response = Object.class)})
-    public Result disable(@Valid @ApiParam(value = "设备配置表信息", required = true) @RequestParam(required = true) long id) {
+    public Result disable(@ApiParam(value = "设备配置表信息", required = true) @RequestParam(required = true) long id) {
         sysDeviceService.disable(id);
         return ResultUtil.ok();
     }
@@ -116,7 +123,7 @@ public class SysDeviceController {
     @ApiOperation(value = "获取单个设备配置接口")
     @RequestMapping(value = "/get", method = RequestMethod.GET)
     @ApiResponses({@ApiResponse(code = 200, message = "获取单个设备配置", response = SysDevice.class)})
-    public Result get(@Valid @ApiParam(value = "设备配置表id", required = true) @RequestParam(required = true) long id) {
+    public Result get(@ApiParam(value = "设备配置表id", required = true) @RequestParam(required = true) long id) {
         return ResultUtil.ok(sysDeviceService.getById(id));
     }
 

+ 10 - 6
sop-server/src/main/java/com/qmth/sop/server/api/SysDingDateController.java

@@ -12,7 +12,8 @@ import com.qmth.sop.common.contant.SystemConstant;
 import com.qmth.sop.common.util.Result;
 import com.qmth.sop.common.util.ResultUtil;
 import io.swagger.annotations.*;
-import org.springframework.util.CollectionUtils; 
+import org.springframework.util.CollectionUtils;
+import org.springframework.validation.BindingResult;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 import javax.annotation.Resource;
@@ -46,8 +47,8 @@ public class SysDingDateController {
     @ApiResponses({@ApiResponse(code = 200, message = "考勤特殊日期查询结果", response = SysDingDate.class)})
     public Result query(
                 @ApiParam(value = "模糊查询条件", required = false) @RequestParam(required = false) String query,
-                @Valid @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
-                @Valid @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+                @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
+                @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
         IPage<SysDingDate> resultIPage = sysDingDateService.query(new Page<>(pageNumber, pageSize),query);
 
         return ResultUtil.ok(resultIPage);
@@ -57,7 +58,10 @@ public class SysDingDateController {
     @ApiOperation(value = "考勤特殊日期新增修改接口")
     @RequestMapping(value = "/save", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Object.class)})
-    public Result save(@Valid @ApiParam(value = "考勤特殊日期信息", required = true) @RequestBody(required = true) SysDingDate sysDingDate) {
+    public Result save(@Valid @ApiParam(value = "考勤特殊日期信息", required = true) @RequestBody(required = true) SysDingDate sysDingDate, BindingResult bindingResult) throws InterruptedException {
+        if (bindingResult.hasErrors()) {
+            return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
+        }
         return ResultUtil.ok(sysDingDateService.saveSysDingDate(sysDingDate));
     }
 
@@ -66,7 +70,7 @@ public class SysDingDateController {
     @ApiOperation(value = "考勤特殊日期删除接口")
     @RequestMapping(value = "/delete", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Object.class)})
-    public Result delete(@Valid @ApiParam(value = "考勤特殊日期id", required = true) @RequestParam(required = true) long id) {
+    public Result delete(@ApiParam(value = "考勤特殊日期id", required = true) @RequestParam(required = true) long id) {
         return ResultUtil.ok(sysDingDateService.delete(id));
     }
 
@@ -75,7 +79,7 @@ public class SysDingDateController {
     @ApiOperation(value = "考勤特殊日期获取单个接口")
     @RequestMapping(value = "/get", method = RequestMethod.GET)
     @ApiResponses({@ApiResponse(code = 200, message = "考勤特殊日期信息", response = SysDingDate.class)})
-    public Result get(@Valid @ApiParam(value = "考勤特殊日期id", required = true) @RequestParam long id) {
+    public Result get(@ApiParam(value = "考勤特殊日期id", required = true) @RequestParam long id) {
         return ResultUtil.ok(sysDingDateService.getById(id));
     }
 

+ 14 - 7
sop-server/src/main/java/com/qmth/sop/server/api/SysDingGroupController.java

@@ -17,7 +17,8 @@ import com.qmth.sop.common.contant.SystemConstant;
 import com.qmth.sop.common.util.Result;
 import com.qmth.sop.common.util.ResultUtil;
 import io.swagger.annotations.*;
-import org.springframework.util.CollectionUtils; 
+import org.springframework.util.CollectionUtils;
+import org.springframework.validation.BindingResult;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
@@ -56,8 +57,8 @@ public class SysDingGroupController {
     public Result query(
                 @ApiParam(value = "查询条件", required = false) @RequestParam(required = false) String query,
                 @ApiParam(value = "服务单元id", required = false) @RequestParam(required = false) Long serviceId,
-                @Valid @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
-                @Valid @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+                @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
+                @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
         IPage<SysDingGroupResult> resultIPage = sysDingGroupService.query(new Page<>(pageNumber, pageSize),query,serviceId);
 
         return ResultUtil.ok(resultIPage);
@@ -67,7 +68,10 @@ public class SysDingGroupController {
     @ApiOperation(value = "新增考勤组表接口")
     @RequestMapping(value = "/add", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "新增考勤组表信息", response = Object.class)})
-    public Result add(@Valid @ApiParam(value = "考勤组表信息", required = true) @RequestBody(required = true) SysDingGroupResult sysDingGroup) {
+    public Result add(@Valid @ApiParam(value = "考勤组表信息", required = true) @RequestBody(required = true) SysDingGroupResult sysDingGroup, BindingResult bindingResult) throws InterruptedException {
+        if (bindingResult.hasErrors()) {
+            return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
+        }
         sysDingGroupService.add(sysDingGroup);
         return ResultUtil.ok();
     }
@@ -77,7 +81,10 @@ public class SysDingGroupController {
     @ApiOperation(value = "修改考勤组表接口")
     @RequestMapping(value = "/update", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "修改考勤组表信息", response = Object.class)})
-    public Result update(@Valid @ApiParam(value = "考勤组表信息", required = true) @RequestBody(required = true) SysDingGroupResult sysDingGroup) {
+    public Result update(@Valid @ApiParam(value = "考勤组表信息", required = true) @RequestBody(required = true) SysDingGroupResult sysDingGroup, BindingResult bindingResult) throws InterruptedException {
+        if (bindingResult.hasErrors()) {
+            return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
+        }
         sysDingGroupService.update(sysDingGroup);
         return ResultUtil.ok();
     }
@@ -87,7 +94,7 @@ public class SysDingGroupController {
     @ApiOperation(value = "删除考勤组表接口")
     @RequestMapping(value = "/delete", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "删除考勤组表信息", response = Object.class)})
-    public Result delete(@Valid @ApiParam(value = "考勤组表信息", required = true) @RequestParam(required = true) long id) {
+    public Result delete(@ApiParam(value = "考勤组表信息", required = true) @RequestParam(required = true) long id) {
         sysDingGroupService.delete(id);
         return ResultUtil.ok();
     }
@@ -111,7 +118,7 @@ public class SysDingGroupController {
     @ApiOperation(value = "获取单个考勤组表信息")
     @RequestMapping(value = "/get", method = RequestMethod.GET)
     @ApiResponses({@ApiResponse(code = 200, message = "考勤组表信息", response = SysDingGroupResult.class)})
-    public Result get(@Valid @ApiParam(value = "id", required = true) @RequestParam(value = "id") long id) {
+    public Result get(@ApiParam(value = "id", required = true) @RequestParam(value = "id") long id) {
         SysDingGroup sysDingGroup = sysDingGroupService.getById(id);
         SysDingGroupResult sysDingGroupResult= JSON.toJavaObject((JSON) JSON.toJSON(sysDingGroup),SysDingGroupResult.class);
         sysDingGroupResult.setDingObjs(sysDingObjService.getList(id));

+ 13 - 6
sop-server/src/main/java/com/qmth/sop/server/api/SysLevelController.java

@@ -16,6 +16,7 @@ import com.qmth.sop.common.contant.SystemConstant;
 import com.qmth.sop.common.util.Result;
 import com.qmth.sop.common.util.ResultUtil;
 import io.swagger.annotations.*;
+import org.springframework.validation.BindingResult;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
@@ -52,8 +53,8 @@ public class SysLevelController {
     @RequestMapping(value = "/query", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "档位表列表信息", response = SysLevelResult.class)})
     public Result query(
-            @Valid @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
-            @Valid @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+            @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
+            @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
         IPage<SysLevelResult> resultIPage = sysLevelService.query(new Page<>(pageNumber, pageSize));
 
         return ResultUtil.ok(resultIPage);
@@ -63,7 +64,10 @@ public class SysLevelController {
     @ApiOperation(value = "新增档位表接口")
     @RequestMapping(value = "/add", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "新增档位表信息", response = Object.class)})
-    public Result add(@Valid @ApiParam(value = "档位表信息", required = true) @RequestBody(required = true) SysLevelResult sysLevelResult) {
+    public Result add(@Valid @ApiParam(value = "档位表信息", required = true) @RequestBody(required = true) SysLevelResult sysLevelResult, BindingResult bindingResult) throws InterruptedException {
+        if (bindingResult.hasErrors()) {
+            return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
+        }
         sysLevelService.add(sysLevelResult);
         return ResultUtil.ok();
     }
@@ -72,7 +76,10 @@ public class SysLevelController {
     @ApiOperation(value = "修改档位表接口")
     @RequestMapping(value = "/update", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "修改档位表信息", response = Object.class)})
-    public Result update(@Valid @ApiParam(value = "档位表信息", required = true) @RequestBody(required = true) SysLevelResult sysLevelResult) {
+    public Result update(@Valid @ApiParam(value = "档位表信息", required = true) @RequestBody(required = true) SysLevelResult sysLevelResult, BindingResult bindingResult) throws InterruptedException {
+        if (bindingResult.hasErrors()) {
+            return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
+        }
         sysLevelService.update(sysLevelResult);
         return ResultUtil.ok();
     }
@@ -81,7 +88,7 @@ public class SysLevelController {
     @ApiOperation(value = "删除档位表接口")
     @RequestMapping(value = "/delete", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "删除档位表信息", response = Object.class)})
-    public Result delete(@Valid @ApiParam(value = "档位表信息", required = true) @RequestParam(required = true) long id) {
+    public Result delete(@ApiParam(value = "档位表信息", required = true) @RequestParam(required = true) long id) {
         sysLevelService.delete(id);
         return ResultUtil.ok();
     }
@@ -109,7 +116,7 @@ public class SysLevelController {
     @ApiOperation(value = "获取单个档位表接口")
     @RequestMapping(value = "/get", method = RequestMethod.GET)
     @ApiResponses({@ApiResponse(code = 200, message = "档位表", response = SysLevelResult.class)})
-    public Result get(@Valid @ApiParam(value = "档位表id", required = true) @RequestParam long id) {
+    public Result get(@ApiParam(value = "档位表id", required = true) @RequestParam long id) {
         SysLevel sysLevel =sysLevelService.getById(id);
         SysLevelResult sysLevelResult= JSON.toJavaObject((JSON) JSON.toJSON(sysLevel),SysLevelResult.class);
         sysLevelResult.setRoleList(sysLevelRoleService.getList(sysLevelResult.getId()));

+ 10 - 10
sop-server/src/main/java/com/qmth/sop/server/api/SysMessageController.java

@@ -58,12 +58,12 @@ public class SysMessageController {
     @RequestMapping(value = "/query", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "回执查询结果", response = SysMessageResult.class)})
     public Result query(
-            @Valid @ApiParam(value = "公告表id", required = true) @RequestParam(required = true) Long noticeId,
+                @ApiParam(value = "公告表id", required = true) @RequestParam(required = true) Long noticeId,
                 @ApiParam(value = "区域城市", required = false) @RequestParam(required = false) String city,
                 @ApiParam(value = "供应商", required = false) @RequestParam(required = false) Long supplierId,
                 @ApiParam(value = "回执状态", required = false) @RequestParam(required = false) Boolean status,
-                @Valid @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
-                @Valid @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+                @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
+                @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
         IPage<SysMessageResult> resultIPage = sysMessageService.query(new Page<>(pageNumber, pageSize),noticeId,city,supplierId,status);
         return ResultUtil.ok(resultIPage);
     }
@@ -71,7 +71,7 @@ public class SysMessageController {
     @ApiOperation(value = "回执查询导出")
     @RequestMapping(value = "/export", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Object.class)})
-    public Result export(@Valid @ApiParam(value = "公告表id", required = true) @RequestParam(required = true) Long noticeId,
+    public Result export(@ApiParam(value = "公告表id", required = true) @RequestParam(required = true) Long noticeId,
                          @ApiParam(value = "区域城市", required = false) @RequestParam(required = false) String city,
                          @ApiParam(value = "供应商", required = false) @RequestParam(required = false) Long supplierId,
                          @ApiParam(value = "回执状态", required = false) @RequestParam(required = false) Boolean status) throws Exception {
@@ -91,7 +91,7 @@ public class SysMessageController {
     @ApiOperation(value = "回执统计已读和未读")
     @RequestMapping(value = "/count", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = SysMessageCountResult.class)})
-    public Result count(@Valid @ApiParam(value = "公告表id", required = true) @RequestParam(required = true) long noticeId) throws Exception {
+    public Result count(@ApiParam(value = "公告表id", required = true) @RequestParam(required = true) long noticeId) throws Exception {
         return ResultUtil.ok(sysMessageService.count(noticeId));
     }
 
@@ -103,7 +103,7 @@ public class SysMessageController {
     @ApiOperation(value = "标记消息已阅读")
     @RequestMapping(value = "/read", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Object.class)})
-    public Result read(@Valid @ApiParam(value = "消息表id", required = true) @RequestParam(required = true) long id) {
+    public Result read(@ApiParam(value = "消息表id", required = true) @RequestParam(required = true) long id) {
         return ResultUtil.ok(sysMessageService.read(id));
     }
 
@@ -114,7 +114,7 @@ public class SysMessageController {
     @ApiOperation(value = "查看消息详细")
     @RequestMapping(value = "/get", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = SysMessage.class)})
-    public Result get(@Valid @ApiParam(value = "消息表id", required = true) @RequestParam(required = true) long id) {
+    public Result get(@ApiParam(value = "消息表id", required = true) @RequestParam(required = true) long id) {
         return ResultUtil.ok(sysMessageService.getById(id));
     }
 
@@ -123,7 +123,7 @@ public class SysMessageController {
     @ApiOperation(value = "按多个类型统计当前用户未读消息")
     @RequestMapping(value = "/countByTypes", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Object.class)})
-    public Result countByTypes(@Valid @ApiParam(value = "消息类型", required = true) @RequestParam(required = true) MessageTypeEnum[] types) {
+    public Result countByTypes(@ApiParam(value = "消息类型", required = true) @RequestParam(required = true) MessageTypeEnum[] types) {
         return ResultUtil.ok(sysMessageService.countByTypes(types));
     }
 
@@ -139,8 +139,8 @@ public class SysMessageController {
                               @ApiParam(value = "内容模糊查询", required = false) @RequestParam(required = false) String query,
                               @ApiParam(value = "发送时间开始", required = false) @RequestParam(required = false) Long startTime,
                               @ApiParam(value = "发送时间结束", required = false) @RequestParam(required = false) Long endTime,
-                              @Valid @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
-                              @Valid @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+                              @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
+                              @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
         IPage<SysMessageWorkResult> resultIPage = sysMessageService.pageByTypes(new Page<>(pageNumber, pageSize),types,status,serviceId,custom,query,startTime,endTime);
         return ResultUtil.ok(resultIPage);
     }

+ 11 - 7
sop-server/src/main/java/com/qmth/sop/server/api/SysNoticeController.java

@@ -14,6 +14,7 @@ import com.qmth.sop.common.enums.NoticeTypeEnum;
 import com.qmth.sop.common.util.Result;
 import com.qmth.sop.common.util.ResultUtil;
 import io.swagger.annotations.*;
+import org.springframework.validation.BindingResult;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
@@ -50,8 +51,8 @@ public class SysNoticeController {
                 @ApiParam(value = "发布类型", required = false) @RequestParam(required = false) NoticeTypeEnum type,
                 @ApiParam(value = "发布时间开始", required = false) @RequestParam(required = false) Long startTime,
                 @ApiParam(value = "发布时间结束", required = false) @RequestParam(required = false) Long endTime,
-                @Valid @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
-                @Valid @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+                @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
+                @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
         IPage<SysNoticeResult> resultIPage = sysNoticeService.query(new Page<>(pageNumber, pageSize),query,status,type,startTime,endTime);
 
         return ResultUtil.ok(resultIPage);
@@ -61,7 +62,10 @@ public class SysNoticeController {
     @ApiOperation(value = "公告表新增修改接口")
     @RequestMapping(value = "/save", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Object.class)})
-    public Result save(@Valid @ApiParam(value = "公告表信息", required = true) @RequestBody(required = true) SysNotice sysNotice) {
+    public Result save(@Valid @ApiParam(value = "公告表信息", required = true) @RequestBody(required = true) SysNotice sysNotice, BindingResult bindingResult) throws InterruptedException {
+        if (bindingResult.hasErrors()) {
+            return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
+        }
         return ResultUtil.ok(sysNoticeService.saveSysNotice(sysNotice));
     }
 
@@ -70,7 +74,7 @@ public class SysNoticeController {
     @ApiOperation(value = "公告表删除接口")
     @RequestMapping(value = "/delete", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Object.class)})
-    public Result delete(@Valid @ApiParam(value = "公告表id", required = true) @RequestParam(required = true) long id) {
+    public Result delete(@ApiParam(value = "公告表id", required = true) @RequestParam(required = true) long id) {
         return ResultUtil.ok(sysNoticeService.delete(id));
     }
     /*
@@ -80,7 +84,7 @@ public class SysNoticeController {
     @ApiOperation(value = "公告表批量禁用接口")
     @RequestMapping(value = "/disable", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Object.class)})
-    public  Result disable(@Valid @ApiParam(value = "公告表id", required = true) @RequestParam(required = true) long[] ids) {
+    public  Result disable(@ApiParam(value = "公告表id", required = true) @RequestParam(required = true) long[] ids) {
         return ResultUtil.ok(sysNoticeService.disable(ids));
     }
 
@@ -91,7 +95,7 @@ public class SysNoticeController {
     @ApiOperation(value = "公告表发布或者撤销发布接口")
     @RequestMapping(value = "/publishOrUnpublish", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Object.class)})
-    public  Result publishOrUnpublish(@Valid @ApiParam(value = "公告表id", required = true) @RequestParam(required = true) long id) {
+    public  Result publishOrUnpublish(@ApiParam(value = "公告表id", required = true) @RequestParam(required = true) long id) {
         return ResultUtil.ok(sysNoticeService.publishOrUnpublish(id));
     }
 
@@ -99,7 +103,7 @@ public class SysNoticeController {
     @ApiOperation(value = "公告表获取单个接口")
     @RequestMapping(value = "/get", method = RequestMethod.GET)
     @ApiResponses({@ApiResponse(code = 200, message = "公告表信息", response = SysNotice.class)})
-    public Result get(@Valid @ApiParam(value = "公告表id", required = true) @RequestParam long id) {
+    public Result get(@ApiParam(value = "公告表id", required = true) @RequestParam long id) {
         return ResultUtil.ok(sysNoticeService.getById(id));
     }
 

+ 13 - 6
sop-server/src/main/java/com/qmth/sop/server/api/SysSupplierController.java

@@ -11,6 +11,7 @@ import com.qmth.sop.common.enums.SupplierTypeEnum;
 import com.qmth.sop.common.util.Result;
 import com.qmth.sop.common.util.ResultUtil;
 import io.swagger.annotations.*;
+import org.springframework.validation.BindingResult;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
@@ -42,8 +43,8 @@ public class SysSupplierController {
     @RequestMapping(value = "/query", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "供应商表列表信息", response = SysSupplier.class)})
     public Result query(
-            @Valid @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
-            @Valid  @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+            @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
+            @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
         IPage<SysSupplier> resultIPage = sysSupplierService.query(new Page<>(pageNumber, pageSize));
 
         return ResultUtil.ok(resultIPage);
@@ -51,7 +52,10 @@ public class SysSupplierController {
     @ApiOperation(value = "新增供应商表接口")
     @RequestMapping(value = "/add", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "新增供应商表信息", response = Object.class)})
-    public Result add(@Valid @ApiParam(value = "供应商表信息", required = true) @RequestBody(required = true) SysSupplier sysSupplier) {
+    public Result add(@Valid @ApiParam(value = "供应商表信息", required = true) @RequestBody(required = true) SysSupplier sysSupplier, BindingResult bindingResult) throws InterruptedException {
+        if (bindingResult.hasErrors()) {
+            return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
+        }
         sysSupplierService.add(sysSupplier);
         return ResultUtil.ok();
     }
@@ -59,7 +63,10 @@ public class SysSupplierController {
     @ApiOperation(value = "修改供应商表接口")
     @RequestMapping(value = "/update", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "修改供应商表信息", response = Object.class)})
-    public Result update(@Valid @ApiParam(value = "供应商表信息", required = true) @RequestBody(required = true) SysSupplier sysSupplier) {
+    public Result update(@Valid @ApiParam(value = "供应商表信息", required = true) @RequestBody(required = true) SysSupplier sysSupplier, BindingResult bindingResult) throws InterruptedException {
+        if (bindingResult.hasErrors()) {
+            return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
+        }
         sysSupplierService.update(sysSupplier);
         return ResultUtil.ok();
     }
@@ -77,7 +84,7 @@ public class SysSupplierController {
     @ApiOperation(value = "启用禁用供应商表接口")
     @RequestMapping(value = "/enable", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "启用禁用供应商表信息", response = Object.class)})
-    public Result enable(@Valid @ApiParam(value = "供应商表信息", required = true) @RequestParam(required = true) long id) {
+    public Result enable(@ApiParam(value = "供应商表信息", required = true) @RequestParam(required = true) long id) {
         sysSupplierService.enable(id);
         return ResultUtil.ok();
     }
@@ -102,7 +109,7 @@ public class SysSupplierController {
     @ApiOperation(value = "获取单个供应商表信息接口")
     @RequestMapping(value = "/get", method = RequestMethod.GET)
     @ApiResponses({@ApiResponse(code = 200, message = "供应商表信息", response = SysSupplier.class)})
-    public Result info(@Valid @ApiParam(value = "供应商表id", required = true) @RequestParam long id) {
+    public Result info(@ApiParam(value = "供应商表id", required = true) @RequestParam long id) {
         return ResultUtil.ok(sysSupplierService.getById(id));
     }
 

+ 12 - 8
sop-server/src/main/java/com/qmth/sop/server/api/TBCrmController.java

@@ -14,6 +14,7 @@ import com.qmth.sop.common.enums.ProductTypeEnum;
 import com.qmth.sop.common.util.Result;
 import com.qmth.sop.common.util.ResultUtil;
 import io.swagger.annotations.*;
+import org.springframework.validation.BindingResult;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
@@ -53,8 +54,8 @@ public class TBCrmController {
             @ApiParam(value = "项目单号(模糊查询) ", required = false) @RequestParam(required = false) String crmNo,
             @ApiParam(value = "派单时间开始", required = false) @RequestParam(required = false) Long startTime,
             @ApiParam(value = "派单时间结束", required = false) @RequestParam(required = false) Long endTime,
-            @Valid @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
-            @Valid @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+            @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
+            @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
         IPage<TBCrmResult> resultIPage = tBCrmService.query(new Page<>(pageNumber, pageSize), serviceId,leadId,crmUserId,type,custom,crmNo,startTime,endTime);
 
         return ResultUtil.ok(resultIPage);
@@ -64,7 +65,10 @@ public class TBCrmController {
     @ApiOperation(value = "派单信息表新增修改接口")
     @RequestMapping(value = "/save", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Object.class)})
-    public Result save(@Valid @ApiParam(value = "派单信息表信息", required = true) @RequestBody(required = true) TBCrm tBCrm) {
+    public Result save(@Valid @ApiParam(value = "派单信息表信息", required = true) @RequestBody(required = true) TBCrm tBCrm, BindingResult bindingResult) throws InterruptedException {
+        if (bindingResult.hasErrors()) {
+            return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
+        }
         return ResultUtil.ok(tBCrmService.saveTBCrm(tBCrm));
     }
 
@@ -73,7 +77,7 @@ public class TBCrmController {
     @ApiOperation(value = "派单信息表删除接口")
     @RequestMapping(value = "/delete", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Object.class)})
-    public Result delete(@Valid @ApiParam(value = "派单信息表id", required = true) @RequestParam(required = true) long id) {
+    public Result delete(@ApiParam(value = "派单信息表id", required = true) @RequestParam(required = true) long id) {
         return ResultUtil.ok(tBCrmService.delete(id));
     }
 
@@ -82,7 +86,7 @@ public class TBCrmController {
     @ApiOperation(value = "派单信息表获取单个接口")
     @RequestMapping(value = "/get", method = RequestMethod.GET)
     @ApiResponses({@ApiResponse(code = 200, message = "派单信息表信息", response = TBCrm.class)})
-    public Result get(@Valid @ApiParam(value = "派单信息表id", required = true) @RequestParam long id) {
+    public Result get(@ApiParam(value = "派单信息表id", required = true) @RequestParam long id) {
         return ResultUtil.ok(tBCrmService.getById(id));
     }
 
@@ -91,8 +95,8 @@ public class TBCrmController {
     @ApiOperation(value = "批量划定服务单元接口")
     @RequestMapping(value = "/batchZone", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Object.class)})
-    public Result batchZone(@Valid @ApiParam(value = "服务单元id", required = true) @RequestParam(required = true) long serviceId,
-                            @Valid @ApiParam(value = "派单信息表id", required = true) @RequestParam(required = true) long[] crmIds) {
+    public Result batchZone(@ApiParam(value = "服务单元id", required = true) @RequestParam(required = true) long serviceId,
+                           @ApiParam(value = "派单信息表id", required = true) @RequestParam(required = true) long[] crmIds) {
         return ResultUtil.ok(tBCrmService.batchZone(serviceId, crmIds));
     }
 
@@ -101,7 +105,7 @@ public class TBCrmController {
     @ApiOperation(value = "批量禁用接口")
     @RequestMapping(value = "/batchDisable", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Object.class)})
-    public Result batchDisable(@Valid @ApiParam(value = "派单信息表id", required = true) @RequestParam(required = true) long[] crmIds) {
+    public Result batchDisable(@ApiParam(value = "派单信息表id", required = true) @RequestParam(required = true) long[] crmIds) {
         return ResultUtil.ok(tBCrmService.batchDisable(crmIds));
     }
 

+ 5 - 5
sop-server/src/main/java/com/qmth/sop/server/api/TBDelayWarnController.java

@@ -57,8 +57,8 @@ public class TBDelayWarnController {
                 @ApiParam(value = "SOP流水号(模糊查询)", required = false) @RequestParam(required = false) String sopNo,
                 @ApiParam(value = "预警时间开始", required = false) @RequestParam(required = false) Long startTime,
                 @ApiParam(value = "预警时间结束", required = false) @RequestParam(required = false) Long endTime,
-                @Valid @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
-                @Valid @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+                @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
+                @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
         IPage<TBDelayWarnResult> resultIPage = tBDelayWarnService.query(new Page<>(pageNumber, pageSize),type,status,serviceId,custom,fieldObj,sopNo,startTime,endTime,null);
 
         return ResultUtil.ok(resultIPage);
@@ -69,7 +69,7 @@ public class TBDelayWarnController {
     @ApiOperation(value = "延期预警跟进表获取单个接口")
     @RequestMapping(value = "/get", method = RequestMethod.GET)
     @ApiResponses({@ApiResponse(code = 200, message = "延期预警跟进表信息", response = TBDelayWarnResult.class)})
-    public Result get(@Valid @ApiParam(value = "延期预警跟进表id", required = true) @RequestParam long id) {
+    public Result get(@ApiParam(value = "延期预警跟进表id", required = true) @RequestParam long id) {
         IPage<TBDelayWarnResult> resultIPage = tBDelayWarnService.query(new Page<>(1, 1),null,null,null,null,null,null,null,null,id);
         return ResultUtil.ok(resultIPage.getRecords().get(0));
     }
@@ -79,7 +79,7 @@ public class TBDelayWarnController {
     @ApiOperation(value = "关闭延期预警跟进")
     @RequestMapping(value = "/close", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "关闭成功")})
-    public Result close(@Valid @ApiParam(value = "延期预警跟进表id", required = true) @RequestParam long id) {
+    public Result close(@ApiParam(value = "延期预警跟进表id", required = true) @RequestParam long id) {
         TBDelayWarn tBDelayWarn = tBDelayWarnService.getById(id);
         tBDelayWarn.setStatus(DelayWarnStatusEnum.CLOSE);
         tBDelayWarnService.saveTBDelayWarn(tBDelayWarn);
@@ -90,7 +90,7 @@ public class TBDelayWarnController {
     @ApiOperation(value = "重启延期预警跟进")
     @RequestMapping(value = "/restart", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "重启成功")})
-    public Result restart(@Valid @ApiParam(value = "延期预警跟进表id", required = true) @RequestParam long id) {
+    public Result restart(@ApiParam(value = "延期预警跟进表id", required = true) @RequestParam long id) {
         TBDelayWarn tBDelayWarn = tBDelayWarnService.getById(id);
         tBDelayWarn.setStatus(DelayWarnStatusEnum.RESTART);
         tBDelayWarnService.saveTBDelayWarn(tBDelayWarn);

+ 6 - 2
sop-server/src/main/java/com/qmth/sop/server/api/TBDelayWarnDetailController.java

@@ -10,6 +10,7 @@ import com.qmth.sop.common.contant.SystemConstant;
 import com.qmth.sop.common.util.Result;
 import com.qmth.sop.common.util.ResultUtil;
 import io.swagger.annotations.*;
+import org.springframework.validation.BindingResult;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
@@ -39,7 +40,7 @@ public class TBDelayWarnDetailController {
     @ApiOperation(value = "延期预警明细表查询接口")
     @RequestMapping(value = "/list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "延期预警明细表查询结果", response = TBDelayWarnDetail.class)})
-    public Result list(@Valid @ApiParam(value = "延期预警表id", required = true) @RequestParam(required = true) long id) {
+    public Result list(@ApiParam(value = "延期预警表id", required = true) @RequestParam(required = true) long id) {
         List<TBDelayWarnDetail> resultIPage = tBDelayWarnDetailService.list(new QueryWrapper<TBDelayWarnDetail>().lambda().eq(TBDelayWarnDetail::getDelayWarnId, id).orderByDesc(TBDelayWarnDetail::getCreateTime));
         return ResultUtil.ok(resultIPage);
     }
@@ -48,7 +49,10 @@ public class TBDelayWarnDetailController {
     @ApiOperation(value = "延期预警明细表新增修改接口")
     @RequestMapping(value = "/save", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Object.class)})
-    public Result save(@Valid @ApiParam(value = "延期预警明细表信息", required = true) @RequestBody(required = true) TBDelayWarnDetail tBDelayWarnDetail) {
+    public Result save(@Valid @ApiParam(value = "延期预警明细表信息", required = true) @RequestBody(required = true) TBDelayWarnDetail tBDelayWarnDetail, BindingResult bindingResult) throws InterruptedException {
+        if (bindingResult.hasErrors()) {
+            return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
+        }
         return ResultUtil.ok(tBDelayWarnDetailService.saveTBDelayWarnDetail(tBDelayWarnDetail));
     }
 

+ 2 - 2
sop-server/src/main/java/com/qmth/sop/server/api/TBDingController.java

@@ -65,8 +65,8 @@ public class TBDingController {
             @ApiParam(value = "客户名称(模糊查询)", required = false) @RequestParam(required = false) String custom,
             @ApiParam(value = "SOP流水号(模糊查询)", required = false) @RequestParam(required = false) String sopNo,
             @ApiParam(value = "违规工时", required = false) @RequestParam(required = false) Long days,
-            @Valid @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
-            @Valid @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+            @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
+            @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
         IPage<TBDingCountQueryResult> resultIPage = tBDingService.query(new Page<>(pageNumber, pageSize), serviceId, status, createId, userName, supplierId, custom, sopNo, days);
 
         return ResultUtil.ok(resultIPage);

+ 3 - 3
sop-server/src/main/java/com/qmth/sop/server/api/TBQualityProblemApplyController.java

@@ -51,8 +51,8 @@ public class TBQualityProblemApplyController {
             @ApiParam(value = "质量问题编号(模糊查询) ", required = false) @RequestParam(required = false) String problemNo,
             @ApiParam(value = "提交时间开始", required = false) @RequestParam(required = false) Long startTime,
             @ApiParam(value = "提交时间结束", required = false) @RequestParam(required = false) Long endTime,
-            @Valid @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
-            @Valid @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+            @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
+            @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
         IPage<TBQualityProblemApplyResult> resultIPage = tBQualityProblemApplyService.query(new Page<>(pageNumber, pageSize), serviceId, userId, type, reason, degree, custom, problemNo, startTime, endTime);
         return ResultUtil.ok(resultIPage);
     }
@@ -70,7 +70,7 @@ public class TBQualityProblemApplyController {
     @ApiOperation(value = "质量问题反馈表删除接口")
     @RequestMapping(value = "/delete", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Object.class)})
-    public Result delete(@Valid @ApiParam(value = "质量问题反馈表id", required = true) @RequestParam(required = true) long[] ids) {
+    public Result delete(@ApiParam(value = "质量问题反馈表id", required = true) @RequestParam(required = true) long[] ids) {
         return ResultUtil.ok(tBQualityProblemApplyService.delete(ids));
     }
 

+ 6 - 1
sop-server/src/main/java/com/qmth/sop/server/api/TBViolationController.java

@@ -14,10 +14,12 @@ import com.qmth.sop.common.enums.ViolationTypeEnum;
 import com.qmth.sop.common.util.Result;
 import com.qmth.sop.common.util.ResultUtil;
 import io.swagger.annotations.*;
+import org.springframework.validation.BindingResult;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.validation.Valid;
 import javax.validation.constraints.Max;
 import javax.validation.constraints.Min;
 
@@ -66,7 +68,10 @@ public class TBViolationController {
     @ApiOperation(value = "sop违规登记表新增修改接口")
     @RequestMapping(value = "/save", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Object.class)})
-    public Result save(@ApiParam(value = "sop违规登记表信息", required = true) @RequestBody(required = true) TBViolation tBViolation) {
+    public Result save(@Valid @ApiParam(value = "sop违规登记表信息", required = true) @RequestBody(required = true) TBViolation tBViolation, BindingResult bindingResult) throws InterruptedException {
+        if (bindingResult.hasErrors()) {
+            return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
+        }
         return ResultUtil.ok(tBViolationService.saveTBViolation(tBViolation));
     }
 

+ 7 - 2
sop-server/src/main/java/com/qmth/sop/server/api/TBViolationDetailController.java

@@ -14,10 +14,12 @@ import com.qmth.sop.common.contant.SystemConstant;
 import com.qmth.sop.common.util.Result;
 import com.qmth.sop.common.util.ResultUtil;
 import io.swagger.annotations.*;
-import org.springframework.util.CollectionUtils; 
+import org.springframework.util.CollectionUtils;
+import org.springframework.validation.BindingResult;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 import javax.annotation.Resource;
+import javax.validation.Valid;
 import javax.validation.constraints.Max;
 import javax.validation.constraints.Min;
 import java.util.List;
@@ -55,7 +57,10 @@ public class TBViolationDetailController {
     @ApiOperation(value = "违规明细表新增修改接口")
     @RequestMapping(value = "/save", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Object.class)})
-    public Result save(@ApiParam(value = "违规明细表信息", required = true) @RequestBody(required = true) TBViolationDetail tBViolationDetail) {
+    public Result save(@Valid  @ApiParam(value = "违规明细表信息", required = true) @RequestBody(required = true) TBViolationDetail tBViolationDetail, BindingResult bindingResult) throws InterruptedException {
+        if (bindingResult.hasErrors()) {
+            return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
+        }
         return ResultUtil.ok(tBViolationDetailService.saveTBViolationDetail(tBViolationDetail));
     }