Commit 9294fce7 authored by chenzhao's avatar chenzhao

修改bug

parent 4051b155
...@@ -45,7 +45,7 @@ public class AnalysisReportSchedulerJob { ...@@ -45,7 +45,7 @@ public class AnalysisReportSchedulerJob {
/** /**
* 每月第1天凌晨0-月报生成 * 每月第1天凌晨0-月报生成
*/ */
@Scheduled(cron="0 0 0 1 * ?") @Scheduled(cron="${jobs.month.cron}")
public void monthReport() throws ParseException { public void monthReport() throws ParseException {
Date yestDay = DateUtils.dateAdd(new Date(),-1,false); Date yestDay = DateUtils.dateAdd(new Date(),-1,false);
Date beginDate = DateUtils.getFirstDayOfMonth(yestDay); Date beginDate = DateUtils.getFirstDayOfMonth(yestDay);
......
...@@ -1589,7 +1589,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -1589,7 +1589,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
String pieChart = ChartsUtils.pieChart(pieChartList, "故障设备类型占比"); String pieChart = ChartsUtils.pieChart(pieChartList, "故障设备类型占比");
systemData.put("bing1", pieChart); systemData.put("bing1", pieChart);
if (!CollectionUtils.isEmpty(pieChartListTwo)) { if (!CollectionUtils.isEmpty(pieChartListTwo)) {
String pieChart1 = ChartsUtils.pieChart(pieChartListTwo, "告警信息占比"); String pieChart1 = ChartsUtils.pieChart(pieChartListTwo, "告警设备占比");
systemData.put("bing2", pieChart1); systemData.put("bing2", pieChart1);
} else { } else {
List<Map<String, Object>> data = new ArrayList<>(); List<Map<String, Object>> data = new ArrayList<>();
...@@ -1753,8 +1753,6 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -1753,8 +1753,6 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
listItem.put("trueNum", String.valueOf(0)); listItem.put("trueNum", String.valueOf(0));
} }
list.add(listItem); list.add(listItem);
} }
} else { } else {
HashMap<String, Object> listItem = new HashMap<>(); HashMap<String, Object> listItem = new HashMap<>();
...@@ -1808,11 +1806,11 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -1808,11 +1806,11 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
dayEchartsDate1.put("value",0); dayEchartsDate1.put("value",0);
} }
mapList.add(dayEchartsDate1); mapList.add(dayEchartsDate1);
String pieChart1 = ChartsUtils.pieChart(mapList, "故障设备类型占比"); String pieChart1 = ChartsUtils.pieChart(mapList, "告警设备占比");
systemData.put("pictureLeft", pieChart1); systemData.put("pictureLeft", pieChart1);
List<Map<String, Object>> weekEchart = fireFightingSystemMapper.selectWeekEchart(valueOf(system.get("code")), startDate, endDate); List<Map<String, Object>> weekEchart = fireFightingSystemMapper.selectWeekEchart(valueOf(system.get("code")), startDate, endDate);
String pieChart2 = ChartsUtils.pieChart(weekEchart, "告警信息占比"); String pieChart2 = ChartsUtils.pieChart(weekEchart, "故障设备类型占比");
systemData.put("pictureCenter", pieChart2); systemData.put("pictureCenter", pieChart2);
List<Map<String, Object>> linesEchart = fireFightingSystemMapper.selectWeekLinesEchart(valueOf(system.get("code")), startDate, endDate, indicatorList); List<Map<String, Object>> linesEchart = fireFightingSystemMapper.selectWeekLinesEchart(valueOf(system.get("code")), startDate, endDate, indicatorList);
...@@ -1979,7 +1977,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -1979,7 +1977,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
"条,正常设备"+(ObjectUtils.isEmpty(summarize.get("normalNum"))?0:summarize.get("normalNum"))+"台,正常率"+(ObjectUtils.isEmpty(summarize.get("normalRate"))?0:summarize.get("normalRate"))+"%"); "条,正常设备"+(ObjectUtils.isEmpty(summarize.get("normalNum"))?0:summarize.get("normalNum"))+"台,正常率"+(ObjectUtils.isEmpty(summarize.get("normalRate"))?0:summarize.get("normalRate"))+"%");
// echarts 图表 // echarts 图表
// List<Map<String, Object>> mapList = fireFightingSystemMapper.selectDayEquipEchart(valueOf(system.get("code")), startDate, endDate); List<Map<String, Object>> mapList = fireFightingSystemMapper.selectDayEquipEchart(valueOf(system.get("code")), startDate, endDate);
String pieChart1 = ChartsUtils.pieChart(alarmMapList, "故障设备类型占比"); String pieChart1 = ChartsUtils.pieChart(alarmMapList, "故障设备类型占比");
// List<Map<String, Object>> dayEcharts = fireFightingSystemMapper.selectDayEchart(valueOf(system.get("id")), startDate, indicatorList); // List<Map<String, Object>> dayEcharts = fireFightingSystemMapper.selectDayEchart(valueOf(system.get("id")), startDate, indicatorList);
......
...@@ -1323,7 +1323,7 @@ ...@@ -1323,7 +1323,7 @@
LEFT JOIN wl_equipment e ON e.id = ed.equipment_id LEFT JOIN wl_equipment e ON e.id = ed.equipment_id
WHERE WHERE
e.is_iot = 1 and es.biz_org_code = #{bizOrgCode} e.is_iot = 1 and es.biz_org_code like concat(#{bizOrgCode},'%')
)AS total, )AS total,
( (
SELECT COUNT(DISTINCT(esa.iot_code)) FROM wl_equipment_specific_alarm esa SELECT COUNT(DISTINCT(esa.iot_code)) FROM wl_equipment_specific_alarm esa
......
...@@ -3852,7 +3852,7 @@ ...@@ -3852,7 +3852,7 @@
FROM `f_fire_fighting_system` ffs FROM `f_fire_fighting_system` ffs
LEFT JOIN wl_equipment_category wec LEFT JOIN wl_equipment_category wec
on ffs.system_type = wec.id on ffs.system_type = wec.id
WHERE biz_org_code = #{bizOrgCode} WHERE biz_org_code like concat(#{bizOrgCode},'%')
order by ffs.sort order by ffs.sort
</select> </select>
<select id="selectAlarmList" resultType="java.util.Map"> <select id="selectAlarmList" resultType="java.util.Map">
...@@ -4063,14 +4063,7 @@ ...@@ -4063,14 +4063,7 @@
) temp ) temp
LEFT JOIN LEFT JOIN
( (
SELECT temp.*, SELECT temp.*,
CASE CASE
WHEN wei.is_trend = 0 then "遥信" WHEN wei.is_trend = 0 then "遥信"
...@@ -4103,7 +4096,7 @@ ...@@ -4103,7 +4096,7 @@
wl_equipment_alarm_equip_day e wl_equipment_alarm_equip_day e
WHERE WHERE
e.system_id is not null e.system_id is not null
and e.system_id = #{systemId} and FIND_IN_SET( #{systemId},e.system_id)
AND e.equipment_code = spec.equipment_code AND e.equipment_code = spec.equipment_code
AND e.index_key = spec_index.equipment_index_key AND e.index_key = spec_index.equipment_index_key
AND e.report_date >= DATE_FORMAT(#{startDate},'%y-%m-%d') AND e.report_date >= DATE_FORMAT(#{startDate},'%y-%m-%d')
...@@ -4123,7 +4116,7 @@ ...@@ -4123,7 +4116,7 @@
)temp LEFT JOIN wl_equipment_index wei on temp.equipment_index_id = wei.id )temp LEFT JOIN wl_equipment_index wei on temp.equipment_index_id = wei.id
)temp1 on temp.system_id = temp1.systemId and temp.code = temp1.code )temp1 on temp.system_id = temp1.systemId and temp.code = temp1.code
group by type_code
ORDER BY temp.name ORDER BY temp.name
</select> </select>
<select id="selectAlarms" resultType="java.lang.Integer"> <select id="selectAlarms" resultType="java.lang.Integer">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment