质安管理
This commit is contained in:
@ -183,9 +183,9 @@ public class DpzaglServiceImpl implements DpzaglService {
|
||||
// 质量展示数据
|
||||
// TableDataInfo<HseSafetyInspectionVo> anList = safetyInspectionService.queryPageList(req, pageQuery);
|
||||
// 质量展示数据-整改
|
||||
req.setStatus(DpEnum.ZLGDZT_ZG.getTypeValue());
|
||||
TableDataInfo<HseSafetyInspectionVo> aqZgList = safetyInspectionService.queryPageList(req, pageQuery);
|
||||
// 质量总数(用于判断巡检类型)
|
||||
// req.setStatus(DpEnum.ZLGDZT_ZG.getTypeValue());
|
||||
// TableDataInfo<HseSafetyInspectionVo> aqZgList = safetyInspectionService.queryPageList(req, pageQuery);
|
||||
// 安全总数(用于判断巡检类型)
|
||||
List<HseSafetyInspection> list = safetyInspectionService.list(new LambdaQueryWrapper<HseSafetyInspection>().ge(bo.getStartDate() != null ,HseSafetyInspection::getCreateTime, bo.getStartDate()).le(bo.getEndDate() != null ,HseSafetyInspection::getCreateTime, bo.getEndDate()));
|
||||
|
||||
// List<HseSafetyInspectionVo> 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<HseSafetyInspectionVo> 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<QltQualityInspectionVo> zlLists = qualityInspectionService.queryPageList(req, pageQuery);
|
||||
// 质量展示数据-整改
|
||||
req.setInspectionStatus(DpEnum.ZLGDZT_ZG.getTypeValue());
|
||||
TableDataInfo<QltQualityInspectionVo> zlZgLists = qualityInspectionService.queryPageList(req, pageQuery);
|
||||
// req.setInspectionStatus(DpEnum.ZLGDZT_ZG.getTypeValue());
|
||||
// TableDataInfo<QltQualityInspectionVo> zlZgLists = qualityInspectionService.queryPageList(req, pageQuery);
|
||||
// 质量总数
|
||||
List<QltQualityInspection> zsZl = qualityInspectionService.getBaseMapper()
|
||||
.selectList(new LambdaQueryWrapper<QltQualityInspection>()
|
||||
@ -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<QltQualityInspection> collect = zsZl.stream().filter(zl -> DpEnum.ZLGDZT_ZG.getTypeValue().equals(zl.getInspectionStatus())).collect(Collectors.toList());
|
||||
List<QltQualityInspectionVo> convert = MapstructUtils.convert(collect, QltQualityInspectionVo.class);
|
||||
convert.forEach(zl ->{if (zl.getCorrectorId() != null)zl.setCorrectorName(userService.selectNicknameByIds(zl.getCorrectorId().toString()));});
|
||||
dpznglVo.setZlZgList(convert);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<DpznglAqyVo> dpznglAqyVos = dpzaglService.listByAqy(dpznglBo);
|
||||
|
||||
Reference in New Issue
Block a user