|
@@ -118,18 +118,18 @@ 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);
|
|
|
- // month个月停电count次及以上台区且昨日停电穿透
|
|
|
+ // month个月停电count次及以上台区且当日停电穿透
|
|
|
} else if ("TQTD03".equals(chuantouType)) {
|
|
|
String monthNum = reportInf.getTqtdMonth();
|
|
|
String countNum = reportInf.getTqtdCount();
|
|
|
// monthNum个月内停电 countNum次以上的台区
|
|
|
String beginDay = DateUtil.dateAddMonth(dayIntervalArray[1], Integer.parseInt("-" + monthNum));
|
|
|
- param.put("beginDay", beginDay);
|
|
|
- param.put("endDay", dayIntervalArray[1]);
|
|
|
+ param.put("beginDay", beginDay + timeIntervalArray[0]);
|
|
|
+ param.put("endDay", dayIntervalArray[1] + timeIntervalArray[1]);
|
|
|
param.put("countNum", countNum);
|
|
|
|
|
|
- // 查询昨日停电的数据
|
|
|
- param.put("yesterday", DateUtil.dateAddDay(dayIntervalArray[1], -1));
|
|
|
+ // 查询当日停电的数据
|
|
|
+ param.put("yesterday", dayIntervalArray[1]);
|
|
|
List<Map<String, String>> yesterdayList = db.getMybatisMapper(ReportServiceMapper.class).queryYesterdayDetail(param);
|
|
|
param.put("yesterdayDetail", yesterdayList);
|
|
|
|
|
@@ -137,32 +137,32 @@ public class TQTDReportAction implements IMINAction {
|
|
|
|
|
|
List<String> addressNumList = CommonUtil.getIdFromList(mountCountList, "addressNum");
|
|
|
DwFileDetail00Example example = new DwFileDetail00Example();
|
|
|
- example.createCriteria().andAddressNumIn(addressNumList).andStartTimeGreaterThanOrEqualTo(beginDay).andEndTimeLessThanOrEqualTo(dayIntervalArray[1]);
|
|
|
+ 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);
|
|
|
- // 2个月停电1次及以上台区且昨日停电穿透
|
|
|
+ // 2个月停电1次及以上台区且当日停电穿透
|
|
|
} else if ("TQTD04".equals(chuantouType)) {
|
|
|
String monthNum = "2";
|
|
|
String countNum = "1";
|
|
|
// monthNum个月内停电 countNum次以上的台区
|
|
|
String beginDay = DateUtil.dateAddMonth(dayIntervalArray[1], Integer.parseInt("-" + monthNum));
|
|
|
- param.put("beginDay", beginDay);
|
|
|
- param.put("endDay", dayIntervalArray[1]);
|
|
|
+ param.put("beginDay", beginDay + timeIntervalArray[0]);
|
|
|
+ param.put("endDay", dayIntervalArray[1] + timeIntervalArray[1]);
|
|
|
param.put("countNum", countNum);
|
|
|
|
|
|
- // 查询昨日停电的数据
|
|
|
- param.put("yesterday", DateUtil.dateAddDay(dayIntervalArray[1], -1));
|
|
|
+ // 查询当日停电的数据
|
|
|
+ param.put("yesterday", dayIntervalArray[1]);
|
|
|
List<Map<String, String>> yesterdayList = db.getMybatisMapper(ReportServiceMapper.class).queryYesterdayDetail(param);
|
|
|
param.put("yesterdayDetail", yesterdayList);
|
|
|
|
|
|
- List<Map<String, String>> mountCountList = db.getMybatisMapper(ReportServiceMapper.class).selectMountCount00(param);
|
|
|
+// List<Map<String, String>> mountCountList = db.getMybatisMapper(ReportServiceMapper.class).selectMountCount00(param);
|
|
|
|
|
|
- List<String> addressNumList = CommonUtil.getIdFromList(mountCountList, "addressNum");
|
|
|
+ List<String> addressNumList = CommonUtil.getIdFromList(yesterdayList, "addressNum");
|
|
|
DwFileDetail00Example example = new DwFileDetail00Example();
|
|
|
- example.createCriteria().andAddressNumIn(addressNumList).andStartTimeGreaterThanOrEqualTo(beginDay).andEndTimeLessThanOrEqualTo(dayIntervalArray[1]);
|
|
|
+ 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");
|