From 878f53b781dfb2aab0f8ac79d735e30013c4de0d Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Tue, 18 Apr 2023 15:49:28 +0800 Subject: [PATCH] =?UTF-8?q?#=E6=99=BA=E8=83=BD=E9=A2=84=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/HistoryAbnormalAlarmServiceImpl.java | 6 ++--- .../service/impl/OperPhenomenonServiceImpl.java | 3 +-- .../service/impl/AreaMonthReportServiceImpl.java | 27 +++++++++++----------- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/HistoryAbnormalAlarmServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/HistoryAbnormalAlarmServiceImpl.java index c82aed4..2ad1143 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/HistoryAbnormalAlarmServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/HistoryAbnormalAlarmServiceImpl.java @@ -252,7 +252,7 @@ public class HistoryAbnormalAlarmServiceImpl extends BaseServiceImpl handles = this.getAlarmHandleIds(); + List handles = this.getAlarmHandleIds(); // 返回数据 AlarmReustVo response = new AlarmReustVo(); @@ -263,7 +263,7 @@ public class HistoryAbnormalAlarmServiceImpl extends BaseServiceImpl getAlarmHandleIds() { + private List getAlarmHandleIds() { List handles = handleService.list(); if(CollectionUtil.isEmpty(handles)){ return null; diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/OperPhenomenonServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/OperPhenomenonServiceImpl.java index f928e7f..cf8acfa 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/OperPhenomenonServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/OperPhenomenonServiceImpl.java @@ -543,8 +543,7 @@ public class OperPhenomenonServiceImpl extends BaseServiceImpl id.toString()).collect(Collectors.joining(","))); + defectVO.setTotalIds(operPhenomenonList.stream().map(o->String.valueOf(o.getId())).collect(Collectors.joining(","))); defectVO.setDefectSum(operPhenomenonList.size()); // 消缺数 List defectList = operPhenomenonList.stream().filter(o -> (Func.isNotEmpty(o.getIsDefect()) && o.getIsDefect() == 0) || "1".equals(o.getConclusionStatus())). diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaMonthReportServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaMonthReportServiceImpl.java index ba2337f..4ac6cbe 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaMonthReportServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaMonthReportServiceImpl.java @@ -537,9 +537,9 @@ public class AreaMonthReportServiceImpl implements IAreaMonthReportService { // 预测 this.getPredictPlanPower(oldActualMap,oldOldActualMap,areaStationList,areaMonthReport); // 安全生产会议次数、月度检查报告、技能培训、安全大检查 - this.getSecurityCheck(areaStationList,areaMonthReport,mon + "-01 00:00:00", getStrEndTime(mon)); + this.getSecurityCheck(Collections.singletonList(area.getId()),areaMonthReport,mon + "-01 00:00:00", getStrEndTime(mon)); // 设备试验 - this.getDeviceTry(mon + "-01 00:00:00", getStrEndTime(mon), areaStationList,areaMonthReport); + this.getDeviceTry(mon + "-01 00:00:00", getStrEndTime(mon), Collections.singletonList(area.getId()),areaMonthReport); areaMonthReportVoList.add(areaMonthReport); }); return areaMonthReportVoList; @@ -853,20 +853,21 @@ public class AreaMonthReportServiceImpl implements IAreaMonthReportService { /** * 安全检查 - * @param areaStationList + * @param areas * @param areaMonthReport + * @param startTime + * @param endTime */ - private void getSecurityCheck(List areaStationList, AreaMonthReportVo areaMonthReport,String startTime,String endTime) { + private void getSecurityCheck(List areas, AreaMonthReportVo areaMonthReport,String startTime,String endTime) { areaMonthReport.setSafetyMeeting(0); areaMonthReport.setSelfReport(0); areaMonthReport.setSkillTrainy(0); areaMonthReport.setSecurityCheck(0); // 站点归属机构集合 - List deptList = areaStationList.stream().filter(o-> null != o.getRefDept()).map(StationEntity::getRefDept).collect(Collectors.toList()); Map map = new HashMap<>(); map.put("startDate", startTime); map.put("endDate", endTime); - map.put("deptList", deptList); + map.put("deptList", areas); // 调用安全大检查fegin接口 R> R = safeCheckClient.getCount(map); if(!R.isSuccess() || MapUtils.isEmpty(R.getData())){ @@ -884,17 +885,15 @@ public class AreaMonthReportServiceImpl implements IAreaMonthReportService { /** * 获取设备试验数据 - * @param stationList - * @return + * @param startTime + * @param endTime + * @param areas + * @param areaMonthReport */ - private void getDeviceTry(String startTime,String endTime,List stationList,AreaMonthReportVo areaMonthReport) { + private void getDeviceTry(String startTime,String endTime,List areas,AreaMonthReportVo areaMonthReport) { areaMonthReport.setDeviceTry(0); - List deptIdList = stationList.stream().map(StationEntity::getRefDept).collect(Collectors.toList()); - if(CollectionUtil.isEmpty(deptIdList)){ - return; - } SafeEquipmentTrialDTO request = new SafeEquipmentTrialDTO(); - request.setDeptList(deptIdList); + request.setDeptList(areas); request.setStartTime(startTime); request.setEndTime(endTime); R R = safeEquipmentTrialClient.getCount(request);