|
@@ -3,6 +3,7 @@ package com.factory.controller.web;
|
|
|
import java.util.List;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -52,6 +53,8 @@ import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiOperationSupport;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
+import javax.validation.Valid;
|
|
|
+
|
|
|
/**
|
|
|
* 防错计划
|
|
|
*
|
|
@@ -70,7 +73,7 @@ public class PreventMistakeController {
|
|
|
@ApiOperation(value = "新建防错计划")
|
|
|
@PostMapping("/addPmPlan")
|
|
|
@ApiOperationSupport(order = 1)
|
|
|
- public ResponseBean<Void> addPmPlan(@RequestBody AddPmPlanReq req) {
|
|
|
+ public ResponseBean<Void> addPmPlan(@Valid @RequestBody AddPmPlanReq req) {
|
|
|
return preventMistakeService.addPmPlan(req);
|
|
|
}
|
|
|
|