|
@@ -911,9 +911,9 @@ public class ReportServiceImpl implements IReportService {
|
|
|
param.put("yesterday", rangeArray[1]);
|
|
param.put("yesterday", rangeArray[1]);
|
|
|
List<Map<String, String>> yesterdayList = db.getMybatisMapper(ReportServiceMapper.class).queryYesterdayDetail(param);
|
|
List<Map<String, String>> yesterdayList = db.getMybatisMapper(ReportServiceMapper.class).queryYesterdayDetail(param);
|
|
|
|
|
|
|
|
- param.put("yesterdayDetail", yesterdayList);
|
|
|
|
|
List<Map<String, String>> yesterdayAndTDData = null;
|
|
List<Map<String, String>> yesterdayAndTDData = null;
|
|
|
if (yesterdayList.size() != 0) {
|
|
if (yesterdayList.size() != 0) {
|
|
|
|
|
+ param.put("yesterdayDetail", yesterdayList);
|
|
|
yesterdayAndTDData = db.getMybatisMapper(ReportServiceMapper.class).selectMountCount00(param);
|
|
yesterdayAndTDData = db.getMybatisMapper(ReportServiceMapper.class).selectMountCount00(param);
|
|
|
} else {
|
|
} else {
|
|
|
yesterdayAndTDData = new ArrayList<Map<String, String>>();
|
|
yesterdayAndTDData = new ArrayList<Map<String, String>>();
|
|
@@ -1325,9 +1325,10 @@ public class ReportServiceImpl implements IReportService {
|
|
|
liangyueMostAddressNumDesc += addressName + "、";
|
|
liangyueMostAddressNumDesc += addressName + "、";
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- // 去除最后一个符号
|
|
|
|
|
- liangyueMostAddressNumDesc = liangyueMostAddressNumDesc.substring(0, liangyueMostAddressNumDesc.length() - 1);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ if(!"".equals(liangyueMostAddressNumDesc)){
|
|
|
|
|
+ // 去除最后一个符号
|
|
|
|
|
+ liangyueMostAddressNumDesc = liangyueMostAddressNumDesc.substring(0, liangyueMostAddressNumDesc.length() - 1);
|
|
|
|
|
+ }
|
|
|
// 环比
|
|
// 环比
|
|
|
String huanbi = "0";
|
|
String huanbi = "0";
|
|
|
String huanbiBegin = DateUtil.dateAddMonth(rangeArray[0], -2); // 环比周开始时间
|
|
String huanbiBegin = DateUtil.dateAddMonth(rangeArray[0], -2); // 环比周开始时间
|
|
@@ -1723,8 +1724,9 @@ public class ReportServiceImpl implements IReportService {
|
|
|
for (Map.Entry<String, Integer> entry : taiQuMapTwice.entrySet()) {
|
|
for (Map.Entry<String, Integer> entry : taiQuMapTwice.entrySet()) {
|
|
|
totalCountTwiceDesc += entry.getKey() + entry.getValue()+"台,占比"+CommonUtil.multiply(CommonUtil.divide(entry.getValue().toString(), totalCountTwice, 4), "100", 2)+"%;";
|
|
totalCountTwiceDesc += entry.getKey() + entry.getValue()+"台,占比"+CommonUtil.multiply(CommonUtil.divide(entry.getValue().toString(), totalCountTwice, 4), "100", 2)+"%;";
|
|
|
}
|
|
}
|
|
|
- totalCountTwiceDesc = totalCountTwiceDesc.substring(0,totalCountTwiceDesc.length() - 1) + "。";
|
|
|
|
|
-
|
|
|
|
|
|
|
+ if(!"".equals(totalCountTwiceDesc)){
|
|
|
|
|
+ totalCountTwiceDesc = totalCountTwiceDesc.substring(0,totalCountTwiceDesc.length() - 1) + "。";
|
|
|
|
|
+ }
|
|
|
Map<String, Integer> countMapTwice = new HashMap<String, Integer>();
|
|
Map<String, Integer> countMapTwice = new HashMap<String, Integer>();
|
|
|
for (Map<String, String> map : twiceMountCountList) {
|
|
for (Map<String, String> map : twiceMountCountList) {
|
|
|
String num = map.get("num");
|
|
String num = map.get("num");
|
|
@@ -1739,8 +1741,9 @@ public class ReportServiceImpl implements IReportService {
|
|
|
for (Map.Entry<String, Integer> entry : countMapTwice.entrySet()) {
|
|
for (Map.Entry<String, Integer> entry : countMapTwice.entrySet()) {
|
|
|
countMapTwiceDesc += "停电" + entry.getKey() + "次的" + entry.getValue() + "台,占比" + CommonUtil.multiply(CommonUtil.divide(entry.getValue().toString(), totalCountTwice, 4), "100", 2)+"%;";
|
|
countMapTwiceDesc += "停电" + entry.getKey() + "次的" + entry.getValue() + "台,占比" + CommonUtil.multiply(CommonUtil.divide(entry.getValue().toString(), totalCountTwice, 4), "100", 2)+"%;";
|
|
|
}
|
|
}
|
|
|
- countMapTwiceDesc = countMapTwiceDesc.substring(0,countMapTwiceDesc.length() - 1) + "。";
|
|
|
|
|
-
|
|
|
|
|
|
|
+ if(!"".equals(countMapTwiceDesc)){
|
|
|
|
|
+ countMapTwiceDesc = countMapTwiceDesc.substring(0,countMapTwiceDesc.length() - 1) + "。";
|
|
|
|
|
+ }
|
|
|
// 两个月内停电3次以上的数据
|
|
// 两个月内停电3次以上的数据
|
|
|
param.put("countNum", "3");
|
|
param.put("countNum", "3");
|
|
|
List<Map<String, String>> thipleMountCountList = db.getMybatisMapper(ReportServiceMapper.class).selectMountCount00(param);
|
|
List<Map<String, String>> thipleMountCountList = db.getMybatisMapper(ReportServiceMapper.class).selectMountCount00(param);
|
|
@@ -2056,7 +2059,11 @@ public class ReportServiceImpl implements IReportService {
|
|
|
resMap.put("count", rows.getCount());
|
|
resMap.put("count", rows.getCount());
|
|
|
//取所有用户ID
|
|
//取所有用户ID
|
|
|
List<String> yhidList = CommonUtil.getIdFromList(DDYZLFXBList, "yhid");
|
|
List<String> yhidList = CommonUtil.getIdFromList(DDYZLFXBList, "yhid");
|
|
|
-
|
|
|
|
|
|
|
+ //如果用户ID为空,添加默认用户XXXXXXXX
|
|
|
|
|
+ if(yhidList == null || yhidList.isEmpty()){
|
|
|
|
|
+ yhidList = new ArrayList<String>();
|
|
|
|
|
+ yhidList.add("XXXXXXXX");
|
|
|
|
|
+ }
|
|
|
DwFileDetail03Example example03 = new DwFileDetail03Example();
|
|
DwFileDetail03Example example03 = new DwFileDetail03Example();
|
|
|
example03.createCriteria().andSjrqBetween(beginTime, endTime).andYhidIn(yhidList);
|
|
example03.createCriteria().andSjrqBetween(beginTime, endTime).andYhidIn(yhidList);
|
|
|
example03.setOrderByClause("DFD3_YHID,DFD3_SJRQ desc");
|
|
example03.setOrderByClause("DFD3_YHID,DFD3_SJRQ desc");
|