Przeglądaj źródła

无数据判断

tudc 5 lat temu
rodzic
commit
51bcbaa324

+ 11 - 1
src/main/java/com/minpay/reportManage/action/TQTDReportAction.java

@@ -111,6 +111,9 @@ public class TQTDReportAction implements IMINAction {
 			param.put("countNum", countNum);
 			List<Map<String, String>> mountCountList = db.getMybatisMapper(ReportServiceMapper.class).selectMountCount00(param);
 			List<String> addressNumList = CommonUtil.getIdFromList(mountCountList, "addressNum");
+			if (addressNumList.size() == 0) {
+				return res;
+			}
 			DwFileDetail00Example example = new DwFileDetail00Example();
 			example.createCriteria().andAddressNumIn(addressNumList).andStartTimeGreaterThanOrEqualTo(beginDay).andEndTimeLessThanOrEqualTo(dayIntervalArray[1]);
 			example.setOrderByClause("DFD0_ADDRESS_NUM");
@@ -134,7 +137,9 @@ public class TQTDReportAction implements IMINAction {
 			param.put("yesterdayDetail", yesterdayList);
 			
 			List<Map<String, String>> mountCountList = db.getMybatisMapper(ReportServiceMapper.class).selectMountCount00(param);
-			
+			if (mountCountList.size() == 0) {
+				return res;
+			}
 			List<String> addressNumList = CommonUtil.getIdFromList(mountCountList, "addressNum");
 			DwFileDetail00Example example = new DwFileDetail00Example();
 			example.createCriteria().andAddressNumIn(addressNumList).andStartTimeGreaterThanOrEqualTo(beginDay + timeIntervalArray[0]).andEndTimeLessThanOrEqualTo(dayIntervalArray[1] + timeIntervalArray[1]);
@@ -156,6 +161,11 @@ 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);