diff --git a/src/main/java/com/biutag/supervision/controller/datav/DataVSupervisionNotifyController.java b/src/main/java/com/biutag/supervision/controller/datav/DataVSupervisionNotifyController.java index 13d6a86..5ad1b58 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/DataVSupervisionNotifyController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/DataVSupervisionNotifyController.java @@ -25,13 +25,13 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.*; /** * @Auther: sh * @Date: 2024/11/7 10:30 - * @Description: 现场督察大屏相关 + * @Description: 现场专项大屏相关 */ @Slf4j @RestController @RequiredArgsConstructor @RequestMapping("datav/supervisonNotify") -@Tag(name = "现场督察一级大屏", description = "现场督察一级大屏") +@Tag(name = "现场专项一级大屏", description = "现场专项一级大屏") public class DataVSupervisionNotifyController { private final NegativeMapper negativeMapper; @@ -51,6 +51,7 @@ public class DataVSupervisionNotifyController { @GetMapping("/getProblemTypeRate") public Result getProblemTypeRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + endTime = DateUtil.endOfDay(endTime); List wtlxList = negativeMapper.getProblemTypeRatio(beginTime, endTime); JSONObject data = new JSONObject().fluentPut("wtlxList", wtlxList); return Result.success(data); diff --git a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java index 77db162..1769f51 100644 --- a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java +++ b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java @@ -47,6 +47,7 @@ public class SubOneSupervisionNotifyController { public Result getSubOneProblemTypeRate(@RequestParam Integer departId, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + endTime = DateUtil.endOfDay(endTime); List wtlxList = negativeMapper.getSubOneProblemTypeRatio(departId, beginTime, endTime); JSONObject data = new JSONObject().fluentPut("wtlxList", wtlxList); return Result.success(data); @@ -69,7 +70,8 @@ public class SubOneSupervisionNotifyController { @GetMapping("/getSubOneSupervisionTrend") public Result getSubOneSupervisionTrend(@RequestParam Integer departId, @RequestParam String year) { - List supervisionTrend = negativeMapper.getSubOneTrend(departId.toString(), year, XCDC.getValue(), ZXDC.getValue(),LMGZ.getValue()); + List proCodes = List.of(XCDC.getValue(), ZXDC.getValue(), LMGZ.getValue()); + List supervisionTrend = negativeMapper.selectMonthStatByYear(Integer.valueOf(year), String.valueOf(departId), proCodes); JSONObject data = new JSONObject().fluentPut("supervisionTrend", supervisionTrend); return Result.success(data); } diff --git a/src/main/java/com/biutag/supervision/service/subDatav/SubDatavServiceImpl.java b/src/main/java/com/biutag/supervision/service/subDatav/SubDatavServiceImpl.java index 111b591..75ab82f 100644 --- a/src/main/java/com/biutag/supervision/service/subDatav/SubDatavServiceImpl.java +++ b/src/main/java/com/biutag/supervision/service/subDatav/SubDatavServiceImpl.java @@ -539,7 +539,7 @@ public class SubDatavServiceImpl implements SubDatavService { LambdaQueryWrapper superviseReportLambdaQueryWrapper = new LambdaQueryWrapper<>(); superviseReportLambdaQueryWrapper.between(SuperviseReport::getCrtTime, request.getBeginTime(), request.getEndTime()); superviseReportLambdaQueryWrapper.eq(SuperviseReport::getType, "1"); - superviseReportLambdaQueryWrapper.eq(SuperviseReport::getCrtDepartId, request.getDepartId()); + superviseReportLambdaQueryWrapper.eq(SuperviseReport::getCrtDepartId, supDepart.getId()); List superviseReportList = superviseReportService.list(superviseReportLambdaQueryWrapper); DatavServiceImpl.BlameResult blameResult = this.buildBlameResult(negatives); SuperviseMapIconVo superviseMapIconVo = new SuperviseMapIconVo();