|
@@ -4,6 +4,9 @@ package com.factory.controller.web;
|
|
|
import java.util.List;
|
|
|
import java.util.function.Function;
|
|
|
|
|
|
+import com.factory.web.entity.pm.req.SearchPmPlanListForPadReq;
|
|
|
+import com.factory.web.entity.pm.res.GetUnFinishedNumRes;
|
|
|
+import com.factory.web.entity.vo.req.pad.GetUnFinishedNumReq;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
@@ -249,15 +252,38 @@ public class FirstArticleController {
|
|
|
@ApiOperationSupport(order = 22)
|
|
|
public ResponseBean<Void> setFaRepeatResult(@RequestBody SearchFaTaskReq req) {
|
|
|
firstArticleService.setFaRepeatResult(req.getFirstArticleTaskId());
|
|
|
- return ResponseBeanBuilder.ok();
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation(value = "获取中断任务列表")
|
|
|
- @PostMapping("/getFaBreakTaskForPad")
|
|
|
- @ApiOperationSupport(order = 23)
|
|
|
- public ResponseBean<List<FaTaskResForPad>> getFaBreakTaskForPad(@RequestBody SearchFaWorkshopListForPadReq req) {
|
|
|
- List<FaTaskResForPad> list = firstArticleService.getFaBreakTaskForPad(req);
|
|
|
- return ResponseBeanBuilder.ok(list, Function.identity());
|
|
|
- }
|
|
|
+ return ResponseBeanBuilder.ok();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取中断任务列表")
|
|
|
+ @PostMapping("/getFaBreakTaskForPad")
|
|
|
+ @ApiOperationSupport(order = 23)
|
|
|
+ public ResponseBean<List<FaTaskResForPad>> getFaBreakTaskForPad(@RequestBody SearchFaWorkshopListForPadReq req) {
|
|
|
+ List<FaTaskResForPad> list = firstArticleService.getFaBreakTaskForPad(req);
|
|
|
+ return ResponseBeanBuilder.ok(list, Function.identity());
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "查询未完成数量提示")
|
|
|
+ @PostMapping("/getUnFinishedNum")
|
|
|
+ @ApiOperationSupport(order = 23)
|
|
|
+ public ResponseBean<GetUnFinishedNumRes> getUnFinishedNum(@RequestBody GetUnFinishedNumReq req) {
|
|
|
+ //首件未完成计划数量
|
|
|
+ SearchFaPlanListForPadReq searchFaPlanListForPadReq = SearchFaPlanListForPadReq.builder().userId(req.getUserId()).type(0).build();
|
|
|
+ int firstUnfinishNum = firstArticleService.getFaPlanListForPad(searchFaPlanListForPadReq).getData().size();
|
|
|
+ //放错数量
|
|
|
+ SearchPmPlanListForPadReq errorReq = SearchPmPlanListForPadReq.builder().userId(req.getUserId()).type(0).build();
|
|
|
+ int errorNum = preventMistakeService.getPmPlanListForPad(errorReq).getData().size();
|
|
|
+ //异常重检数量
|
|
|
+ SearchFaPlanListForPadReq firstReinspectionReq = SearchFaPlanListForPadReq.builder().type(2).typeFlag(0).userId(req.getUserId()).build();
|
|
|
+ int firstReinspectionNum = firstArticleService.getFaPlanListForPad(firstReinspectionReq).getData().size();
|
|
|
+ //异常重建防错数量
|
|
|
+ SearchPmPlanListForPadReq errorReinspectionReq = SearchPmPlanListForPadReq.builder().type(2).userId(req.getUserId()).build();
|
|
|
+ int errorReinspectionNum = preventMistakeService.getPmPlanListForPad(errorReinspectionReq).getData().size();
|
|
|
+ return ResponseBeanBuilder.ok(GetUnFinishedNumRes.builder()
|
|
|
+ .ReinspectionNum(firstReinspectionNum + errorReinspectionNum)
|
|
|
+ .errorNum(errorNum)
|
|
|
+ .firstUnfinishNum(firstUnfinishNum)
|
|
|
+ .build());
|
|
|
+ }
|
|
|
|
|
|
}
|