diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/service/impl/DpzaglServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/service/impl/DpzaglServiceImpl.java index 67685613..46ff89d2 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/service/impl/DpzaglServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/service/impl/DpzaglServiceImpl.java @@ -183,9 +183,9 @@ public class DpzaglServiceImpl implements DpzaglService { // 质量展示数据 // TableDataInfo anList = safetyInspectionService.queryPageList(req, pageQuery); // 质量展示数据-整改 - req.setStatus(DpEnum.ZLGDZT_ZG.getTypeValue()); - TableDataInfo aqZgList = safetyInspectionService.queryPageList(req, pageQuery); -// 质量总数(用于判断巡检类型) +// req.setStatus(DpEnum.ZLGDZT_ZG.getTypeValue()); +// TableDataInfo aqZgList = safetyInspectionService.queryPageList(req, pageQuery); +// 安全总数(用于判断巡检类型) List list = safetyInspectionService.list(new LambdaQueryWrapper().ge(bo.getStartDate() != null ,HseSafetyInspection::getCreateTime, bo.getStartDate()).le(bo.getEndDate() != null ,HseSafetyInspection::getCreateTime, bo.getEndDate())); // List rows = anList.getRows(); @@ -198,11 +198,14 @@ public class DpzaglServiceImpl implements DpzaglService { dpznglVo.setDqjcAq(list.stream().filter(zl -> DpEnum.ZLGLLX_DQJC.getTypeValue().equals(zl.getCheckType())).count()); dpznglVo.setRcxjAq(list.stream().filter(zl -> DpEnum.ZLGLLX_RCXJ.getTypeValue().equals(zl.getCheckType())).count()); dpznglVo.setAqZgsl(list.stream().filter(zl -> DpEnum.ZLGDZT_ZG.getTypeValue().equals(zl.getStatus())).count()); + List convert = MapstructUtils.convert(list.stream().filter(zl -> DpEnum.ZLGDZT_ZG.getTypeValue().equals(zl.getStatus())).collect(Collectors.toList()), HseSafetyInspectionVo.class); + convert.forEach(zl ->{if (zl.getCorrectorId() != null)zl.setCorrectorName(userService.selectNicknameByIds(zl.getCorrectorId().toString()));}); + dpznglVo.setAqZgList(convert); } - if (aqZgList.getRows() != null && aqZgList.getRows().size() > 0){ - aqZgList.getRows().forEach(zl ->{if (zl.getCorrectorId() != null){zl.setCorrectorName(userService.selectNicknameByIds(zl.getCorrectorId().toString()));}}); - dpznglVo.setAqZgList(aqZgList.getRows()); - } +// if (aqZgList.getRows() != null && aqZgList.getRows().size() > 0){ +// aqZgList.getRows().forEach(zl ->{if (zl.getCorrectorId() != null){zl.setCorrectorName(userService.selectNicknameByIds(zl.getCorrectorId().toString()));}}); +// dpznglVo.setAqZgList(aqZgList.getRows()); +// } } @@ -215,8 +218,8 @@ public class DpzaglServiceImpl implements DpzaglService { //// 质量展示数据 // TableDataInfo zlLists = qualityInspectionService.queryPageList(req, pageQuery); // 质量展示数据-整改 - req.setInspectionStatus(DpEnum.ZLGDZT_ZG.getTypeValue()); - TableDataInfo zlZgLists = qualityInspectionService.queryPageList(req, pageQuery); +// req.setInspectionStatus(DpEnum.ZLGDZT_ZG.getTypeValue()); +// TableDataInfo zlZgLists = qualityInspectionService.queryPageList(req, pageQuery); // 质量总数 List zsZl = qualityInspectionService.getBaseMapper() .selectList(new LambdaQueryWrapper() @@ -232,10 +235,10 @@ public class DpzaglServiceImpl implements DpzaglService { dpznglVo.setDqjcZl(zsZl.stream().filter(zl -> DpEnum.ZLGLLX_DQJC.getTypeValue().equals(zl.getInspectionType())).count()); dpznglVo.setRcxjZl(zsZl.stream().filter(zl -> DpEnum.ZLGLLX_RCXJ.getTypeValue().equals(zl.getInspectionType())).count()); dpznglVo.setZlZgsl(zsZl.stream().filter(zl -> DpEnum.ZLGDZT_ZG.getTypeValue().equals(zl.getInspectionStatus())).count()); - } - if (zlZgLists.getRows() != null && zlZgLists.getRows().size() > 0){ - zlZgLists.getRows().forEach(zl ->{if (zl.getCorrectorId() != null){zl.setCorrectorName(userService.selectNicknameByIds(zl.getCorrectorId().toString()));}}); - dpznglVo.setZlZgList(zlZgLists.getRows()); + List collect = zsZl.stream().filter(zl -> DpEnum.ZLGDZT_ZG.getTypeValue().equals(zl.getInspectionStatus())).collect(Collectors.toList()); + List convert = MapstructUtils.convert(collect, QltQualityInspectionVo.class); + convert.forEach(zl ->{if (zl.getCorrectorId() != null)zl.setCorrectorName(userService.selectNicknameByIds(zl.getCorrectorId().toString()));}); + dpznglVo.setZlZgList(convert); } } } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/websocket/websocket/service/BigScreenWebSocketServer.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/websocket/websocket/service/BigScreenWebSocketServer.java index 353a2f70..94abc378 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/websocket/websocket/service/BigScreenWebSocketServer.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/websocket/websocket/service/BigScreenWebSocketServer.java @@ -409,16 +409,16 @@ public class BigScreenWebSocketServer { DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd", Locale.CHINA); - - if (StringUtils.isEmpty(startDate) || StringUtils.isEmpty(endDate)){ - throw new RuntimeException("时间获取异常"); - } - DpznglBo dpznglBo = new DpznglBo(); - dpznglBo.setStartDate(LocalDate.parse(startDate, formatter)); - dpznglBo.setEndDate(LocalDate.parse(endDate, formatter)); + if (!StringUtils.isEmpty(startDate) && !StringUtils.isEmpty(endDate)){ + dpznglBo.setStartDate(LocalDate.parse(startDate, formatter)); + dpznglBo.setEndDate(LocalDate.parse(endDate, formatter)); + + } dpznglBo.setProjectId(projectId); + + // 查询大屏-质安管理-安全员分布情况 List dpznglAqyVos = dpzaglService.listByAqy(dpznglBo);