|
@@ -148,10 +148,10 @@ public class TQTDReportAction implements IMINAction {
|
|
|
selectByExample = Service.lookup(IFormatService.class).formatDate(selectByExample, "date");
|
|
|
selectByExample = Service.lookup(IFormatService.class).formatDateTime(selectByExample, "startTime", "endTime");
|
|
|
res.set(IMINBusinessConstant.F_PAGING_LAY, selectByExample);
|
|
|
- // 2个月停电1次及以上台区且当日停电穿透
|
|
|
+ // 2个月停电2次台区且当日停电穿透
|
|
|
} else if ("TQTD04".equals(chuantouType)) {
|
|
|
String monthNum = "2";
|
|
|
- String countNum = "1";
|
|
|
+ String countNum = "2";
|
|
|
// monthNum个月内停电 countNum次以上的台区
|
|
|
String beginDay = DateUtil.dateAddMonth(dayIntervalArray[1], Integer.parseInt("-" + monthNum));
|
|
|
param.put("beginDay", beginDay + timeIntervalArray[0]);
|
|
@@ -162,14 +162,14 @@ public class TQTDReportAction implements IMINAction {
|
|
|
param.put("yesterday", dayIntervalArray[1]);
|
|
|
List<Map<String, String>> yesterdayList = db.getMybatisMapper(ReportServiceMapper.class).queryYesterdayDetail(param);
|
|
|
|
|
|
- if (yesterdayList.size() == 0) {
|
|
|
- return res;
|
|
|
- }
|
|
|
|
|
|
- param.put("yesterdayDetail", yesterdayList);
|
|
|
|
|
|
-// List<Map<String, String>> mountCountList = db.getMybatisMapper(ReportServiceMapper.class).selectMountCount00(param);
|
|
|
+ param.put("yesterdayDetail", yesterdayList);
|
|
|
|
|
|
+ List<Map<String, String>> mountCountList = db.getMybatisMapper(ReportServiceMapper.class).selectMountCount01(param);
|
|
|
+ if (mountCountList.size() == 0) {
|
|
|
+ return res;
|
|
|
+ }
|
|
|
List<String> addressNumList = CommonUtil.getIdFromList(yesterdayList, "addressNum");
|
|
|
DwFileDetail00Example example = new DwFileDetail00Example();
|
|
|
example.createCriteria().andAddressNumIn(addressNumList).andStartTimeGreaterThanOrEqualTo(beginDay + timeIntervalArray[0]).andEndTimeLessThanOrEqualTo(dayIntervalArray[1] + timeIntervalArray[1]);
|
|
@@ -184,6 +184,34 @@ public class TQTDReportAction implements IMINAction {
|
|
|
fileList00 = Service.lookup(IFormatService.class).formatDate(fileList00, "date");
|
|
|
fileList00 = Service.lookup(IFormatService.class).formatDateTime(fileList00, "startTime", "endTime");
|
|
|
res.set(IMINBusinessConstant.F_PAGING_LAY, fileList00);
|
|
|
+ // 2个月停电1次台区且当日停电穿透
|
|
|
+ }else if ("TQTD06".equals(chuantouType)) {
|
|
|
+ String monthNum = "2";
|
|
|
+ String countNum = "1";
|
|
|
+ // monthNum个月内停电 countNum次以上的台区
|
|
|
+ String beginDay = DateUtil.dateAddMonth(dayIntervalArray[1], Integer.parseInt("-" + monthNum));
|
|
|
+ param.put("beginDay", beginDay + timeIntervalArray[0]);
|
|
|
+ param.put("endDay", dayIntervalArray[1] + timeIntervalArray[1]);
|
|
|
+ param.put("countNum", countNum);
|
|
|
+
|
|
|
+ // 查询当日停电的数据
|
|
|
+ param.put("yesterday", dayIntervalArray[1]);
|
|
|
+ List<Map<String, String>> yesterdayList = db.getMybatisMapper(ReportServiceMapper.class).queryYesterdayDetail(param);
|
|
|
+ if (yesterdayList.size() == 0) {
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ param.put("yesterdayDetail", yesterdayList);
|
|
|
+
|
|
|
+// List<Map<String, String>> mountCountList = db.getMybatisMapper(ReportServiceMapper.class).selectMountCount01(param);
|
|
|
+
|
|
|
+ List<String> addressNumList = CommonUtil.getIdFromList(yesterdayList, "addressNum");
|
|
|
+ DwFileDetail00Example example = new DwFileDetail00Example();
|
|
|
+ example.createCriteria().andAddressNumIn(addressNumList).andStartTimeGreaterThanOrEqualTo(beginDay + timeIntervalArray[0]).andEndTimeLessThanOrEqualTo(dayIntervalArray[1] + timeIntervalArray[1]);
|
|
|
+ example.setOrderByClause("DFD0_ADDRESS_NUM");
|
|
|
+ List<DwFileDetail00> selectByExample = db.selectByExample(DwFileDetail00Mapper.class, example);
|
|
|
+ selectByExample = Service.lookup(IFormatService.class).formatDate(selectByExample, "date");
|
|
|
+ selectByExample = Service.lookup(IFormatService.class).formatDateTime(selectByExample, "startTime", "endTime");
|
|
|
+ res.set(IMINBusinessConstant.F_PAGING_LAY, selectByExample);
|
|
|
}
|
|
|
|
|
|
return res;
|