|
|
@@ -599,7 +599,7 @@ public class ReportServiceImpl implements IReportService {
|
|
|
}
|
|
|
childList9.add(CommonUtil.divide(shihuMap.get("合计"), "60", 2));
|
|
|
resList.add(childList9);
|
|
|
-
|
|
|
+
|
|
|
String shihuNum = CommonUtil.divide(shihuMap.get("合计"), "60", 2);
|
|
|
|
|
|
List<String> childList3 = new ArrayList<String>();
|
|
|
@@ -646,7 +646,7 @@ public class ReportServiceImpl implements IReportService {
|
|
|
taiQuMap.put(apppar.getValue(), 0);
|
|
|
}
|
|
|
taiQuMap.put("合计", 0);
|
|
|
-
|
|
|
+
|
|
|
// 最大停电次数(大于等于3)
|
|
|
for (Map<String, String> map : mountCountList) {
|
|
|
String area = map.get("area");
|
|
|
@@ -692,7 +692,7 @@ public class ReportServiceImpl implements IReportService {
|
|
|
}
|
|
|
yesterdayTaiQuMap.put("合计",yesterdayTaiQuMap.get("合计") + 1);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
String max = "0";
|
|
|
List<Map<String, Object>> maxDescList = new ArrayList<>();
|
|
|
for (Map<String, String> map : yesterdayAndTDData) {
|
|
|
@@ -726,10 +726,11 @@ public class ReportServiceImpl implements IReportService {
|
|
|
pinfanMaxDesc += "为";
|
|
|
for (Map<String, Object> map : maxDescList) {
|
|
|
String area = map.get("area").toString();
|
|
|
- pinfanMaxDesc += area + "管辖的";
|
|
|
+// pinfanMaxDesc += area + "管辖的";
|
|
|
+ pinfanMaxDesc += area;
|
|
|
Object addressNameListObj = map.get("addressNameList");
|
|
|
List<String> addressNameList = (List<String>)addressNameListObj;
|
|
|
-
|
|
|
+
|
|
|
for (String addressName : addressNameList) {
|
|
|
pinfanMaxDesc += addressName + "、";
|
|
|
}
|
|
|
@@ -738,7 +739,7 @@ public class ReportServiceImpl implements IReportService {
|
|
|
}
|
|
|
pinfanMaxDesc = pinfanMaxDesc.substring(0, pinfanMaxDesc.length()-1) + "。";
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
List<String> childList7 = new ArrayList<String>();
|
|
|
childList7.add(monthNum+"个月停电" + countNum + "次及以上台区且当日停电");
|
|
|
for (PubApppar apppar : appparList) {
|
|
|
@@ -808,7 +809,10 @@ public class ReportServiceImpl implements IReportService {
|
|
|
for (Map.Entry<String, String> entry : countMap.entrySet()) {
|
|
|
String mapKey = entry.getKey();
|
|
|
String mapValue = entry.getValue();
|
|
|
- tingdianNumDesc += mapKey + mapValue + "个,";
|
|
|
+ if(!"合计".equals(mapKey)){
|
|
|
+ tingdianNumDesc += mapKey + mapValue + "个,";
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
String sanciyishangNum = String.valueOf(taiQuMap.get("合计"));
|
|
|
@@ -816,7 +820,10 @@ public class ReportServiceImpl implements IReportService {
|
|
|
for (Map.Entry<String, Integer> entry : taiQuMap.entrySet()) {
|
|
|
String mapKey = entry.getKey();
|
|
|
Integer mapValue = entry.getValue();
|
|
|
- sanciyishangNumDesc += mapKey + mapValue + "个,";
|
|
|
+ if(!"合计".equals(mapKey)){
|
|
|
+ sanciyishangNumDesc += mapKey + mapValue + "个,";
|
|
|
+ }
|
|
|
+// sanciyishangNumDesc += mapKey + mapValue + "个,";
|
|
|
}
|
|
|
|
|
|
// 恢复供电时间
|
|
|
@@ -825,7 +832,7 @@ public class ReportServiceImpl implements IReportService {
|
|
|
List<DwFileDetail00> selectByExample = db.selectByExample(DwFileDetail00Mapper.class, example, new MINRowBounds(1, 1));
|
|
|
String huifu = "";
|
|
|
if (selectByExample.size() != 0) {
|
|
|
- System.out.println(selectByExample.get(0).getEndTime());
|
|
|
+ System.out.println("恢复时间======》"+selectByExample.get(0).getEndTime());
|
|
|
String hour = selectByExample.get(0).getEndTime().substring(8, 10);
|
|
|
String min = selectByExample.get(0).getEndTime().substring(10, 12);
|
|
|
if ("00".equals(min)) {
|
|
|
@@ -850,7 +857,8 @@ public class ReportServiceImpl implements IReportService {
|
|
|
zuiduoshihuDesc = "停电时户数最多的为"+zuiduoshihuArea + zuiduoshihu+"时户。";
|
|
|
}
|
|
|
dataMap.put("zuiduoshihuDesc", zuiduoshihuDesc);
|
|
|
- String descStr = "<p>监测发现台区停电${tingdianNum}个(${shihuNum}时户),按单位分:${tingdianNumDesc}${zuiduoshihuDesc}${pinfanMaxDesc}其中${monthNum}个月内重复停电${countNum}次及以上的台区${sanciyishangNum},按单位分:${sanciyishangNumDesc}截止今日${huifu}时已全部恢复送电。</p>";
|
|
|
+// String descStr = "<p>监测发现台区停电${tingdianNum}台次(${shihuNum}时户),按单位分:${tingdianNumDesc}${zuiduoshihuDesc}${pinfanMaxDesc}其中${monthNum}个月内重复停电${countNum}次及以上的台区${sanciyishangNum}个,按单位分:${sanciyishangNumDesc}截止今日${huifu}时已全部恢复送电。</p>";
|
|
|
+ String descStr = "<p>监测发现台区停电${tingdianNum}台次(${shihuNum}时户),按单位分:${tingdianNumDesc}${zuiduoshihuDesc}${pinfanMaxDesc}其中${monthNum}个月内重复停电${countNum}次及以上的台区${sanciyishangNum}个,按单位分:${sanciyishangNumDesc}截止今日6时已全部恢复送电。</p>";
|
|
|
resMap.put("dataMap", dataMap);
|
|
|
resMap.put("descStr", descStr);
|
|
|
|
|
|
@@ -919,7 +927,7 @@ public class ReportServiceImpl implements IReportService {
|
|
|
heji.add(totalMap.get("合计"));
|
|
|
|
|
|
resList.add(heji);
|
|
|
-
|
|
|
+
|
|
|
// 停电台区数
|
|
|
List<Map<String, String>> tqCountList = db.getMybatisMapper(ReportServiceMapper.class).selectDetail00ByAddress(param);
|
|
|
String tqTotalCount = "0";
|
|
|
@@ -1012,7 +1020,7 @@ public class ReportServiceImpl implements IReportService {
|
|
|
String mostAddressNumDesc = "";
|
|
|
// 停电最多的次数
|
|
|
String mostAddressNum = "";
|
|
|
-
|
|
|
+
|
|
|
List<Map<String, String>> twiceCountList = db.getMybatisMapper(ReportServiceMapper.class).selectMountCount00(param);
|
|
|
for (Map<String, String> map : twiceCountList) {
|
|
|
String area = map.get("area");
|
|
|
@@ -1022,7 +1030,7 @@ public class ReportServiceImpl implements IReportService {
|
|
|
if (areaList.contains(area)) {
|
|
|
int index = areaList.indexOf(area);
|
|
|
List<String> child = resList.get(index + 1);
|
|
|
-
|
|
|
+
|
|
|
// 本周督办频繁停电台次
|
|
|
if (child.size() >= 7) {
|
|
|
child.set(6, CommonUtil.add(child.get(6), "1"));
|
|
|
@@ -1032,14 +1040,14 @@ public class ReportServiceImpl implements IReportService {
|
|
|
} else {
|
|
|
continue;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (CommonUtil.isEmpty(mostAddressNum)) {
|
|
|
mostAddressNum = num;
|
|
|
}
|
|
|
if (mostAddressNum.equals(num)) {
|
|
|
- mostAddressNumDesc += addressName + "、";
|
|
|
+ mostAddressNumDesc += area+addressName + "、";
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 合计
|
|
|
if (heji.size() >= 7) {
|
|
|
heji.set(6, CommonUtil.add(heji.get(6), "1"));
|
|
|
@@ -1051,7 +1059,7 @@ public class ReportServiceImpl implements IReportService {
|
|
|
if (!CommonUtil.isEmpty(mostAddressNumDesc)) {
|
|
|
mostAddressNumDesc = mostAddressNumDesc.substring(0, mostAddressNumDesc.length() - 1);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
for (List<String> list : resList) {
|
|
|
if (list.size() == 6) {
|
|
|
list.add("0");
|
|
|
@@ -1070,7 +1078,7 @@ public class ReportServiceImpl implements IReportService {
|
|
|
// 本周督办频繁停电台次
|
|
|
String begin = rangeArray[0];
|
|
|
String end = rangeArray[1];
|
|
|
-
|
|
|
+
|
|
|
// 查询每天的停电三次以上且当日停电的台次
|
|
|
while (CommonUtil.compare(begin, end) != 1) {
|
|
|
param.put("yesterday", begin);
|
|
|
@@ -1090,10 +1098,10 @@ public class ReportServiceImpl implements IReportService {
|
|
|
String area = map.get("area");
|
|
|
String num = map.get("num");
|
|
|
if (areaList.contains(area)) {
|
|
|
-
|
|
|
+
|
|
|
int index = areaList.indexOf(area);
|
|
|
List<String> child = resList.get(index + 1);
|
|
|
-
|
|
|
+
|
|
|
// 本周督办频繁停电台次
|
|
|
if (child.size() >= 8) {
|
|
|
child.set(7, CommonUtil.add(child.get(7), num));
|
|
|
@@ -1114,7 +1122,7 @@ public class ReportServiceImpl implements IReportService {
|
|
|
} else {
|
|
|
heji.add(num);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 合计
|
|
|
if (heji.size() >= 9) {
|
|
|
heji.set(8, CommonUtil.add(heji.get(8), "1"));
|
|
|
@@ -1125,7 +1133,7 @@ public class ReportServiceImpl implements IReportService {
|
|
|
// 天数 + 1
|
|
|
begin = DateUtil.dateAddDay(begin, 1);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 没有数据的区域数值为0
|
|
|
for (List<String> list : resList) {
|
|
|
if (list.size() == 7) {
|
|
|
@@ -1140,7 +1148,7 @@ public class ReportServiceImpl implements IReportService {
|
|
|
}
|
|
|
|
|
|
// 督办总次数
|
|
|
- String totalMonthChongfuTaici = heji.get(6);
|
|
|
+ String totalMonthChongfuTaici = heji.get(7);
|
|
|
if (CommonUtil.isEmpty(timeRange)) {
|
|
|
param.put("beginDay", DateUtil.dateAddDay(DateUtil.dateAddMonth(rangeArray[1], -2), 1) + "000000");
|
|
|
} else {
|
|
|
@@ -1245,11 +1253,11 @@ public class ReportServiceImpl implements IReportService {
|
|
|
for (int i = 1; i < resList.size(); i ++) {
|
|
|
List<String> childList = resList.get(i);
|
|
|
String area = childList.get(0);
|
|
|
- String num = childList.get(5);
|
|
|
+ String num = childList.get(6);
|
|
|
if (CommonUtil.compare(num, "0") != 0) {
|
|
|
twiceCountDesc += area + num + "个,";
|
|
|
}
|
|
|
- num = childList.get(6);
|
|
|
+ num = childList.get(7);
|
|
|
if (CommonUtil.compare(num, "0") != 0) {
|
|
|
dubantaiciDesc += area + num + "次,";
|
|
|
}
|
|
|
@@ -1582,7 +1590,7 @@ public class ReportServiceImpl implements IReportService {
|
|
|
String countMapTwiceDesc = "";
|
|
|
String max1 = "0";
|
|
|
String max1Value = "0";
|
|
|
-
|
|
|
+
|
|
|
param.put("beginTime", beginDay + beginTime.substring(8,14));
|
|
|
param.put("endTime", rangeArray[1] + endTime.substring(8,14));
|
|
|
for (Map.Entry<String, Integer> entry : countMapTwice.entrySet()) {
|
|
|
@@ -1600,7 +1608,7 @@ public class ReportServiceImpl implements IReportService {
|
|
|
}
|
|
|
countMapTwiceDesc = countMapTwiceDesc.substring(0, countMapTwiceDesc.length() - 1) + ";";
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if(!"".equals(countMapTwiceDesc)){
|
|
|
countMapTwiceDesc = countMapTwiceDesc.substring(0,countMapTwiceDesc.length() - 1) + "。";
|
|
|
}
|
|
|
@@ -1623,7 +1631,7 @@ public class ReportServiceImpl implements IReportService {
|
|
|
} else {
|
|
|
max1Desc = max1Desc.substring(0, max1Desc.length()-1) + "台区,占比" + CommonUtil.multiply(CommonUtil.divide(numTemp, max1Value, 4), "100", 2) + "%;";
|
|
|
max1Desc = max1Desc.replace("#num#", numTemp);
|
|
|
-
|
|
|
+
|
|
|
numTemp = "1";
|
|
|
areaTemp = maxMap.get("area");
|
|
|
max1Desc += areaTemp + "区#num#台,为" + maxMap.get("addressName") + "、";
|
|
|
@@ -1632,7 +1640,7 @@ public class ReportServiceImpl implements IReportService {
|
|
|
max1Desc = max1Desc.substring(0, max1Desc.length()-1) + "台区,占比" + CommonUtil.multiply(CommonUtil.divide(numTemp, max1Value, 4), "100", 2) + "%。";
|
|
|
max1Desc = max1Desc.replace("#num#", numTemp);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 两个月内停电3次以上的数据
|
|
|
param.put("countNum", "3");
|
|
|
List<Map<String, String>> thipleMountCountList = db.getMybatisMapper(ReportServiceMapper.class).selectMountCount00(param);
|