|
@@ -21,6 +21,7 @@ import com.minpay.common.util.DateUtil;
|
|
|
import com.minpay.common.util.FilesUtil;
|
|
import com.minpay.common.util.FilesUtil;
|
|
|
import com.minpay.db.table.mapper.DwDdyFxbDetailMapper;
|
|
import com.minpay.db.table.mapper.DwDdyFxbDetailMapper;
|
|
|
import com.minpay.db.table.mapper.DwDdyFxbMapper;
|
|
import com.minpay.db.table.mapper.DwDdyFxbMapper;
|
|
|
|
|
+import com.minpay.db.table.mapper.DwFileDetail00Mapper;
|
|
|
import com.minpay.db.table.mapper.DwFileDetail01Mapper;
|
|
import com.minpay.db.table.mapper.DwFileDetail01Mapper;
|
|
|
import com.minpay.db.table.mapper.DwFileDetail03Mapper;
|
|
import com.minpay.db.table.mapper.DwFileDetail03Mapper;
|
|
|
import com.minpay.db.table.mapper.DwFileDetail04Mapper;
|
|
import com.minpay.db.table.mapper.DwFileDetail04Mapper;
|
|
@@ -32,6 +33,8 @@ import com.minpay.db.table.model.DwDdyFxb;
|
|
|
import com.minpay.db.table.model.DwDdyFxbDetail;
|
|
import com.minpay.db.table.model.DwDdyFxbDetail;
|
|
|
import com.minpay.db.table.model.DwDdyFxbDetailExample;
|
|
import com.minpay.db.table.model.DwDdyFxbDetailExample;
|
|
|
import com.minpay.db.table.model.DwDdyFxbExample;
|
|
import com.minpay.db.table.model.DwDdyFxbExample;
|
|
|
|
|
+import com.minpay.db.table.model.DwFileDetail00;
|
|
|
|
|
+import com.minpay.db.table.model.DwFileDetail00Example;
|
|
|
import com.minpay.db.table.model.DwFileDetail01;
|
|
import com.minpay.db.table.model.DwFileDetail01;
|
|
|
import com.minpay.db.table.model.DwFileDetail01Example;
|
|
import com.minpay.db.table.model.DwFileDetail01Example;
|
|
|
import com.minpay.db.table.model.DwFileDetail03;
|
|
import com.minpay.db.table.model.DwFileDetail03;
|
|
@@ -150,8 +153,7 @@ public class ReportServiceImpl implements IReportService {
|
|
|
String monthNum = (String)param.get("monthNum");
|
|
String monthNum = (String)param.get("monthNum");
|
|
|
String countNum = (String)param.get("countNum");
|
|
String countNum = (String)param.get("countNum");
|
|
|
|
|
|
|
|
- List<List<String>> resList = reportTypeTQTDRB(range, timeRange, monthNum, countNum);
|
|
|
|
|
- resMap.put("resList", resList);
|
|
|
|
|
|
|
+ return reportTypeTQTDRB(range, timeRange, monthNum, countNum);
|
|
|
// 台区停电周报
|
|
// 台区停电周报
|
|
|
} else if (Constant.REPORT_TYPE_01.equals(reportTypeId)) {
|
|
} else if (Constant.REPORT_TYPE_01.equals(reportTypeId)) {
|
|
|
return reportTypeTQTDZB(range, timeRange);
|
|
return reportTypeTQTDZB(range, timeRange);
|
|
@@ -220,9 +222,12 @@ public class ReportServiceImpl implements IReportService {
|
|
|
* @throws MINBusinessException
|
|
* @throws MINBusinessException
|
|
|
* @throws ParseException
|
|
* @throws ParseException
|
|
|
*/
|
|
*/
|
|
|
- public List<List<String>> reportTypeTQTDRB(String range, String timeRange, String monthNum, String countNum) throws MINBusinessException, ParseException {
|
|
|
|
|
|
|
+ public Map<String, Object> reportTypeTQTDRB(String range, String timeRange, String monthNum, String countNum) throws MINBusinessException, ParseException {
|
|
|
IMINDataBaseService db = Service.lookup(IMINDataBaseService.class);
|
|
IMINDataBaseService db = Service.lookup(IMINDataBaseService.class);
|
|
|
|
|
+ Map<String, Object> resMap = new HashMap<String, Object>();
|
|
|
List<List<String>> resList = new ArrayList<List<String>>();
|
|
List<List<String>> resList = new ArrayList<List<String>>();
|
|
|
|
|
+ resMap.put("excelList", resList);
|
|
|
|
|
+
|
|
|
Map<String, Object> param = new HashMap<String, Object>();
|
|
Map<String, Object> param = new HashMap<String, Object>();
|
|
|
String beginTime = null;
|
|
String beginTime = null;
|
|
|
String endTime = null;
|
|
String endTime = null;
|
|
@@ -561,7 +566,84 @@ public class ReportServiceImpl implements IReportService {
|
|
|
childList8.add(yiciMap.get("heji").toString());
|
|
childList8.add(yiciMap.get("heji").toString());
|
|
|
resList.add(childList8);
|
|
resList.add(childList8);
|
|
|
|
|
|
|
|
- return resList;
|
|
|
|
|
|
|
+ String tingdianNum = countMap.get("heji");
|
|
|
|
|
+ String tingdianNumDesc = "";
|
|
|
|
|
+ for (Map.Entry<String, String> entry : countMap.entrySet()) {
|
|
|
|
|
+ String mapKey = entry.getKey();
|
|
|
|
|
+ String mapValue = entry.getValue();
|
|
|
|
|
+ // 新泰
|
|
|
|
|
+ if ("xintai".equals(mapKey)) {
|
|
|
|
|
+ tingdianNumDesc += "新泰" + mapValue + "个,";
|
|
|
|
|
+ } else if ("daiyue".equals(mapKey)) {
|
|
|
|
|
+ tingdianNumDesc += "岱岳" + mapValue + "个,";
|
|
|
|
|
+ } else if ("ningyang".equals(mapKey)) {
|
|
|
|
|
+ tingdianNumDesc += "宁阳" + mapValue + "个,";
|
|
|
|
|
+ } else if ("taishan".equals(mapKey)) {
|
|
|
|
|
+ tingdianNumDesc += "泰山" + mapValue + "个,";
|
|
|
|
|
+ } else if ("dongping".equals(mapKey)) {
|
|
|
|
|
+ tingdianNumDesc += "东平" + mapValue + "个,";
|
|
|
|
|
+ } else if ("feicheng".equals(mapKey)) {
|
|
|
|
|
+ tingdianNumDesc += "肥城" + mapValue + "个,";
|
|
|
|
|
+ } else if ("taishanjingqu".equals(mapKey)) {
|
|
|
|
|
+ tingdianNumDesc += "泰山景区" + mapValue + "个,";
|
|
|
|
|
+ } else if ("gaoxin".equals(mapKey)) {
|
|
|
|
|
+ tingdianNumDesc += "高新" + mapValue + "个,";
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ String sanciyishangNum = String.valueOf(taiQuMap.get("heji"));
|
|
|
|
|
+ String sanciyishangNumDesc = "";
|
|
|
|
|
+ for (Map.Entry<String, Integer> entry : taiQuMap.entrySet()) {
|
|
|
|
|
+ String mapKey = entry.getKey();
|
|
|
|
|
+ Integer mapValue = entry.getValue();
|
|
|
|
|
+ // 新泰
|
|
|
|
|
+ if ("xintai".equals(mapKey)) {
|
|
|
|
|
+ sanciyishangNumDesc += "新泰" + mapValue + "个,";
|
|
|
|
|
+ } else if ("daiyue".equals(mapKey)) {
|
|
|
|
|
+ sanciyishangNumDesc += "岱岳" + mapValue + "个,";
|
|
|
|
|
+ } else if ("ningyang".equals(mapKey)) {
|
|
|
|
|
+ sanciyishangNumDesc += "宁阳" + mapValue + "个,";
|
|
|
|
|
+ } else if ("taishan".equals(mapKey)) {
|
|
|
|
|
+ sanciyishangNumDesc += "泰山" + mapValue + "个,";
|
|
|
|
|
+ } else if ("dongping".equals(mapKey)) {
|
|
|
|
|
+ sanciyishangNumDesc += "东平" + mapValue + "个,";
|
|
|
|
|
+ } else if ("feicheng".equals(mapKey)) {
|
|
|
|
|
+ sanciyishangNumDesc += "肥城" + mapValue + "个,";
|
|
|
|
|
+ } else if ("taishanjingqu".equals(mapKey)) {
|
|
|
|
|
+ sanciyishangNumDesc += "泰山景区" + mapValue + "个,";
|
|
|
|
|
+ } else if ("gaoxin".equals(mapKey)) {
|
|
|
|
|
+ sanciyishangNumDesc += "高新" + mapValue + "个,";
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 恢复供电时间
|
|
|
|
|
+ DwFileDetail00Example example = new DwFileDetail00Example();
|
|
|
|
|
+ example.createCriteria().andStartTimeGreaterThanOrEqualTo(beginTime).andEndTimeLessThanOrEqualTo(endTime);
|
|
|
|
|
+ List<DwFileDetail00> selectByExample = db.selectByExample(DwFileDetail00Mapper.class, example, new MINRowBounds(1, 1));
|
|
|
|
|
+ String huifu = "";
|
|
|
|
|
+ if (selectByExample.size() != 0) {
|
|
|
|
|
+ String hour = selectByExample.get(0).getEndTime().substring(8, 10);
|
|
|
|
|
+ String min = selectByExample.get(0).getEndTime().substring(10, 12);
|
|
|
|
|
+ if ("00".equals(min)) {
|
|
|
|
|
+ huifu = hour;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ huifu = CommonUtil.add(hour, "1");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ Map<String, Object> dataMap = new HashMap<String, Object>();
|
|
|
|
|
+ dataMap.put("tingdianNum", tingdianNum);
|
|
|
|
|
+ dataMap.put("tingdianNumDesc", tingdianNumDesc);
|
|
|
|
|
+ dataMap.put("monthNum", monthNum);
|
|
|
|
|
+ dataMap.put("countNum", countNum);
|
|
|
|
|
+ dataMap.put("sanciyishangNum", sanciyishangNum);
|
|
|
|
|
+ dataMap.put("sanciyishangNumDesc", sanciyishangNumDesc);
|
|
|
|
|
+ dataMap.put("huifu", huifu);
|
|
|
|
|
+ String descStr = "监测发现台区停电${tingdianNum}个,按单位分:${tingdianNumDesc}其中${monthNum}个月内重复停电${countNum}次及以上的台区${sanciyishangNum},按单位分:${sanciyishangNumDesc}截止今日${huifu}时已全部恢复送电。";
|
|
|
|
|
+ resMap.put("dataMap", dataMap);
|
|
|
|
|
+ resMap.put("descStr", descStr);
|
|
|
|
|
+
|
|
|
|
|
+ return resMap;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|