tudc пре 4 година
родитељ
комит
119ed84476
31 измењених фајлова са 1436 додато и 269 уклоњено
  1. 7 2
      src/main/java/com/minpay/common/constant/Constant.java
  2. 4 1
      src/main/java/com/minpay/common/service/IReportService.java
  3. 22 4
      src/main/java/com/minpay/common/service/impl/DianwangServiceImpl.java
  4. 198 68
      src/main/java/com/minpay/common/service/impl/ReportServiceImpl.java
  5. 3 3
      src/main/java/com/minpay/common/util/ExportExcelUtil.java
  6. 6 0
      src/main/java/com/minpay/db/table/own/mapper/ReportServiceMapper.java
  7. 61 1
      src/main/java/com/minpay/reportManage/action/DataWareManageAction.java
  8. 9 2
      src/main/java/com/minpay/reportManage/action/ReportManageAction.java
  9. 7 0
      src/main/resources/com/minpay/db/table/own/mapper/DataWareManageMapper.xml
  10. 55 1
      src/main/resources/com/minpay/db/table/own/mapper/ReportServiceMapper.xml
  11. 6 6
      src/main/webapp/WEB-INF/config.properties
  12. 1 1
      src/main/webapp/admin/common/chooseDdyFxb.html
  13. 247 0
      src/main/webapp/admin/common/chooseZddty.html
  14. 9 0
      src/main/webapp/admin/ddy/reportManageDetailDdyWzl.html
  15. 1 1
      src/main/webapp/admin/ddy/reportProduceDdy.html
  16. 1 1
      src/main/webapp/admin/ddy/reportProduceDdy30T.html
  17. 1 1
      src/main/webapp/admin/ddy/reportProduceDdyWzl.html
  18. 1 1
      src/main/webapp/admin/ddy/reportProduceDdyZrxz.html
  19. 7 13
      src/main/webapp/admin/ddy/reportProduceZb.html
  20. BIN
      src/main/webapp/admin/img/back.jpg
  21. BIN
      src/main/webapp/admin/img/back3.jpg
  22. BIN
      src/main/webapp/admin/img/logo.png
  23. 4 4
      src/main/webapp/admin/index.html
  24. 97 113
      src/main/webapp/admin/login.html
  25. 62 7
      src/main/webapp/admin/reprotManage/dataWare.html
  26. 2 2
      src/main/webapp/admin/tqtd/reportProduceTqtd.html
  27. 240 0
      src/main/webapp/admin/zdtty/reportManageZdtty2.html
  28. 2 2
      src/main/webapp/admin/zdtty/reportProduceZdtty.html
  29. 348 0
      src/main/webapp/admin/zdtty/reportProduceZdtty2.html
  30. 8 8
      src/main/webapp/build/css/app.css
  31. 27 27
      src/main/webapp/js/report.js

+ 7 - 2
src/main/java/com/minpay/common/constant/Constant.java

@@ -314,9 +314,9 @@ public class Constant implements IMINBusinessConstant{
 	 */
 	public static final String FILE_DETAIL_TYPE_05 = "1000006";
 	/**
-	 * 原始文件类型 1000006:95598计停非计停
+	 * 原始文件类型 1000007:计停非计停
 	 */
-	public static final String FILE_DETAIL_TYPE_07 = "1000007";
+	public static final String FILE_DETAIL_TYPE_06 = "1000007";
 	
 	/**
 	 * 报表类型 TQTDRB:台区停电日报
@@ -379,6 +379,11 @@ public class Constant implements IMINBusinessConstant{
 	 * 报表类型  JTFJT 计停非计停日报
 	 */
 	public static final String REPORT_TYPE_14 = "JTFJTRB";
+	
+	/**
+	 * 报表类型  ZDTTYBB2 终端投退运报表II
+	 */
+	public static final String REPORT_TYPE_15 = "ZDTTYBB2";
 	/**
 	 * 原始文件状态 0正常
 	 */

+ 4 - 1
src/main/java/com/minpay/common/service/IReportService.java

@@ -1,10 +1,13 @@
 package com.minpay.common.service;
 
 
+import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.text.ParseException;
 import java.util.Map;
 
+import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
+
 import com.startup.minpay.frame.exception.MINBusinessException;
 import com.startup.minpay.frame.service.base.IMINLocalService;
 
@@ -14,6 +17,6 @@ import com.startup.minpay.frame.service.base.IMINLocalService;
  *
  */
 public interface IReportService extends IMINLocalService {
-	public Map<String,Object> reportNeedDetail(Map<String, String> param) throws MINBusinessException, ParseException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException;
+	public Map<String,Object> reportNeedDetail(Map<String, Object> param) throws MINBusinessException, ParseException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException,InvalidFormatException, IOException;
 	public Map<String, Object> reportTypeDDYZLFXB(String range, String reportTypeId, int page, int limit) throws MINBusinessException, ParseException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException;
 }

+ 22 - 4
src/main/java/com/minpay/common/service/impl/DianwangServiceImpl.java

@@ -8,9 +8,27 @@ import com.minpay.common.constant.Constant;
 import com.minpay.common.format.IFormatService;
 import com.minpay.common.service.IDianwangService;
 import com.minpay.common.util.CommonUtil;
-import com.minpay.db.table.mapper.*;
-import com.minpay.db.table.model.*;
-import com.startup.minpay.frame.constant.IMINBusinessConstant;
+import com.minpay.db.table.mapper.DwFileDetail00Mapper;
+import com.minpay.db.table.mapper.DwFileDetail01Mapper;
+import com.minpay.db.table.mapper.DwFileDetail02Mapper;
+import com.minpay.db.table.mapper.DwFileDetail03Mapper;
+import com.minpay.db.table.mapper.DwFileDetail04Mapper;
+import com.minpay.db.table.mapper.DwFileDetail05Mapper;
+import com.minpay.db.table.mapper.DwFileDetail07Mapper;
+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.DwFileDetail01Example;
+import com.minpay.db.table.model.DwFileDetail02;
+import com.minpay.db.table.model.DwFileDetail02Example;
+import com.minpay.db.table.model.DwFileDetail03;
+import com.minpay.db.table.model.DwFileDetail03Example;
+import com.minpay.db.table.model.DwFileDetail04;
+import com.minpay.db.table.model.DwFileDetail04Example;
+import com.minpay.db.table.model.DwFileDetail05;
+import com.minpay.db.table.model.DwFileDetail05Example;
+import com.minpay.db.table.model.DwFileDetail07;
+import com.minpay.db.table.model.DwFileDetail07Example;
 import com.startup.minpay.frame.exception.MINBusinessException;
 import com.startup.minpay.frame.jdbc.MINRowBounds;
 import com.startup.minpay.frame.service.base.IMINDataBaseService;
@@ -84,7 +102,7 @@ public class DianwangServiceImpl implements IDianwangService {
     		List<DwFileDetail05> resList = db.selectByExample(DwFileDetail05Mapper.class, fileDetail05Example, rows);
     		return resList;
     	}
-		else if (Constant.FILE_DETAIL_TYPE_07.equals(fileType)) {
+		else if (Constant.FILE_DETAIL_TYPE_06.equals(fileType)) {
 			DwFileDetail07Example fileDetail07Example = new DwFileDetail07Example();
 			fileDetail07Example.createCriteria().andFileIdEqualTo(fileId);
 			List<DwFileDetail07> resList = db.selectByExample(DwFileDetail07Mapper.class, fileDetail07Example, rows);

+ 198 - 68
src/main/java/com/minpay/common/service/impl/ReportServiceImpl.java

@@ -1,6 +1,7 @@
 package com.minpay.common.service.impl;
 
 
+import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.text.ParseException;
 import java.util.ArrayList;
@@ -10,16 +11,21 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.commons.fileupload.FileItem;
+import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
+
 import com.minpay.common.constant.Constant;
 import com.minpay.common.service.IReportService;
 import com.minpay.common.util.CommonUtil;
 import com.minpay.common.util.DateUtil;
+import com.minpay.common.util.FilesUtil;
 import com.minpay.db.table.mapper.DwDdyFxbDetailMapper;
 import com.minpay.db.table.mapper.DwDdyFxbMapper;
 import com.minpay.db.table.mapper.DwFileDetail01Mapper;
 import com.minpay.db.table.mapper.DwFileDetail03Mapper;
 import com.minpay.db.table.mapper.DwFileDetail04Mapper;
 import com.minpay.db.table.mapper.DwFileDetail07Mapper;
+import com.minpay.db.table.mapper.DwReportDataMapper;
 import com.minpay.db.table.mapper.DwReportInfMapper;
 import com.minpay.db.table.mapper.PubAppparMapper;
 import com.minpay.db.table.model.DwDdyFxb;
@@ -34,16 +40,20 @@ import com.minpay.db.table.model.DwFileDetail04;
 import com.minpay.db.table.model.DwFileDetail04Example;
 import com.minpay.db.table.model.DwFileDetail07;
 import com.minpay.db.table.model.DwFileDetail07Example;
+import com.minpay.db.table.model.DwReportData;
 import com.minpay.db.table.model.DwReportInf;
 import com.minpay.db.table.model.PubApppar;
 import com.minpay.db.table.model.PubAppparExample;
 import com.minpay.db.table.own.mapper.ReportServiceMapper;
+import com.startup.minpay.frame.business.MINHttpServletRequestContext;
 import com.startup.minpay.frame.exception.MINBusinessException;
 import com.startup.minpay.frame.jdbc.MINRowBounds;
 import com.startup.minpay.frame.service.base.IMINDataBaseService;
 import com.startup.minpay.frame.service.base.Service;
 import com.startup.minpay.frame.target.MINComponent;
 
+import net.sf.json.JSONArray;
+
 
 @MINComponent
 public class ReportServiceImpl implements IReportService {
@@ -121,23 +131,24 @@ public class ReportServiceImpl implements IReportService {
 
 	
 	@Override
-	public Map<String, Object> reportNeedDetail(Map<String, String> param)
-			throws MINBusinessException, ParseException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
-		String range = param.get("range");
-		String timeRange = param.get("timeRange");
-		String reportTypeId = param.get("reportTypeId");
-		String firstFileId = param.get("firstFileId");
-		String secondFileId = param.get("secondFileId");
-		String FADateRange = param.get("FADateRange");
-		String yearChoose = param.get("yearChoose");
-		String DdyDateRange = param.get("DdyDateRange");
-		String ddyFxbId = param.get("ddyFxbId");
+	public Map<String, Object> reportNeedDetail(Map<String, Object> param)
+			throws MINBusinessException, ParseException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, InvalidFormatException, IOException {
+		String range = (String)param.get("range");
+		String timeRange = (String)param.get("timeRange");
+		String reportTypeId = (String)param.get("reportTypeId");
+		String firstFileId = (String)param.get("firstFileId");
+		String secondFileId = (String)param.get("secondFileId");
+		String FADateRange = (String)param.get("FADateRange");
+		String yearChoose = (String)param.get("yearChoose");
+		String DdyDateRange = (String)param.get("DdyDateRange");
+		String ddyFxbId = (String)param.get("ddyFxbId");
+		MINHttpServletRequestContext request = (MINHttpServletRequestContext)param.get("request");
 		
 		Map<String, Object> resMap = new HashMap<String, Object>();
     	// 台区停电日报
     	if (Constant.REPORT_TYPE_00.equals(reportTypeId)) {
-    		String monthNum = param.get("monthNum");
-    		String countNum = param.get("countNum");
+    		String monthNum = (String)param.get("monthNum");
+    		String countNum = (String)param.get("countNum");
     		
     		List<List<String>> resList = reportTypeTQTDRB(range, timeRange, monthNum, countNum);
     		resMap.put("resList", resList);
@@ -187,8 +198,13 @@ public class ReportServiceImpl implements IReportService {
 		// 低电压月报
 		} else if (Constant.REPORT_TYPE_13.equals(reportTypeId)) {
 			return reportTypeDDYYB(ddyFxbId);
-		}else if (Constant.REPORT_TYPE_14.equals(reportTypeId)) {
+		// 计停非计停周报
+		} else if (Constant.REPORT_TYPE_14.equals(reportTypeId)) {
 			return reportTypeJTFJTRB(range,timeRange);
+		// 终端投退运报表II
+		} else if (Constant.REPORT_TYPE_15.equals(reportTypeId)) {
+			List<List<String>> resList = reportTypeZDDTYBBII(firstFileId, request);
+    		resMap.put("resList", resList);
 		}
 		return resMap;
 	}
@@ -705,7 +721,7 @@ public class ReportServiceImpl implements IReportService {
 		
 		// 没有数据的区域数值为0
 		for (List<String> list : resList) {
-			if (list.size() == 4) {
+			if (list.size() == 3) {
 				list.add("0");
 				list.add("0");
 			}
@@ -946,21 +962,31 @@ public class ReportServiceImpl implements IReportService {
 		dataMap.put("twiceCount", totalChongfu);
 		dataMap.put("dubanCount", totalMonthChongfuTaici);
 		// 环比
-		if (CommonUtil.compare(totalMonthChongfuTaici, huanbi) == 1) {
-			dataMap.put("huanbi", "环比增加" + CommonUtil.multiply(CommonUtil.divide(CommonUtil.subtract(totalMonthChongfuTaici, huanbi), huanbi, 4), "100", 2) + "%");
+		if (CommonUtil.compare(huanbi, "0") != 0) {
+			if (CommonUtil.compare(totalMonthChongfuTaici, huanbi) == 1) {
+				dataMap.put("huanbi", "环比增加" + CommonUtil.multiply(CommonUtil.divide(CommonUtil.subtract(totalMonthChongfuTaici, huanbi), huanbi, 4), "100", 2) + "%");
+			} else {
+				dataMap.put("huanbi", "环比减少" + CommonUtil.multiply(CommonUtil.divide(CommonUtil.subtract(huanbi, totalMonthChongfuTaici), huanbi, 4), "100", 2) + "%");
+			}
 		} else {
-			dataMap.put("huanbi", "环比减少" + CommonUtil.multiply(CommonUtil.divide(CommonUtil.subtract(huanbi, totalMonthChongfuTaici), huanbi, 4), "100", 2) + "%");
+			dataMap.put("huanbi", "");
 		}
+		
 		// 同比
-		if (CommonUtil.compare(totalMonthChongfuTaici, tongbi) == 1) {
-			if (CommonUtil.compare(tongbi, "0") == 0) {
-				dataMap.put("tongbi", "");
+		if (CommonUtil.compare(tongbi, "0") != 0) {
+			if (CommonUtil.compare(totalMonthChongfuTaici, tongbi) == 1) {
+				if (CommonUtil.compare(tongbi, "0") == 0) {
+					dataMap.put("tongbi", "");
+				} else {
+					dataMap.put("tongbi", "同比增加" + CommonUtil.multiply(CommonUtil.divide(CommonUtil.subtract(totalMonthChongfuTaici, tongbi), tongbi, 4), "100", 2) + "%");
+				}
 			} else {
-				dataMap.put("tongbi", "同比增加" + CommonUtil.multiply(CommonUtil.divide(CommonUtil.subtract(totalMonthChongfuTaici, tongbi), tongbi, 4), "100", 2) + "%");
+				dataMap.put("tongbi", "同比减少" + CommonUtil.multiply(CommonUtil.divide(CommonUtil.subtract(tongbi, totalMonthChongfuTaici), tongbi, 4), "100", 2) + "%");
 			}
 		} else {
-			dataMap.put("tongbi", "同比减少" + CommonUtil.multiply(CommonUtil.divide(CommonUtil.subtract(tongbi, totalMonthChongfuTaici), tongbi, 4), "100", 2) + "%");
+			dataMap.put("tongbi", "");
 		}
+		
 		resMap.put("dataMap", dataMap);
 		
 		String descStr = "<p>上周,台区累计停电${totalCount}台次,平均停电时长${pingjun}小时/台。停电两次及以上台区${twiceCount}个。</p>"
@@ -1064,20 +1090,24 @@ public class ReportServiceImpl implements IReportService {
 		}
 		
 		// 同比描述
-		String tongbi = null;
-		if (CommonUtil.compare(benyueCount, tbCount) == 1) {
-			tongbi = "增加" + CommonUtil.multiply(CommonUtil.divide(CommonUtil.subtract(benyueCount, tbCount), tbCount,4), "100", 2) + "%";
-		} else {
-			tongbi = "减少" + CommonUtil.multiply(CommonUtil.divide(CommonUtil.subtract(tbCount, benyueCount), tbCount,4), "100", 2) + "%";
+		String tongbi = "";
+		if (CommonUtil.compare(tbCount, "0") != 0) {
+			if (CommonUtil.compare(benyueCount, tbCount) == 1) {
+				tongbi = "增加" + CommonUtil.multiply(CommonUtil.divide(CommonUtil.subtract(benyueCount, tbCount), tbCount,4), "100", 2) + "%";
+			} else {
+				tongbi = "减少" + CommonUtil.multiply(CommonUtil.divide(CommonUtil.subtract(tbCount, benyueCount), tbCount,4), "100", 2) + "%";
+			}
 		}
+		
 		// 环比描述
-		String huanbi = null;
-		if (CommonUtil.compare(benyueCount, hbCount) == 1) {
-			huanbi = "增加" + CommonUtil.multiply(CommonUtil.divide(CommonUtil.subtract(benyueCount, hbCount), hbCount,4), "100", 2) + "%";
-		} else {
-			huanbi = "减少" + CommonUtil.multiply(CommonUtil.divide(CommonUtil.subtract(hbCount, benyueCount), hbCount,4), "100", 2) + "%";
+		String huanbi = "";
+		if (CommonUtil.compare(hbCount, "0") != 0) {
+			if (CommonUtil.compare(benyueCount, hbCount) == 1) {
+				huanbi = "增加" + CommonUtil.multiply(CommonUtil.divide(CommonUtil.subtract(benyueCount, hbCount), hbCount,4), "100", 2) + "%";
+			} else {
+				huanbi = "减少" + CommonUtil.multiply(CommonUtil.divide(CommonUtil.subtract(hbCount, benyueCount), hbCount,4), "100", 2) + "%";
+			}
 		}
-		
 		int shejiNum = areaCountList.size();
 		String shejiDesc = "";
 		for (int i = 0; i < areaCountList.size(); i++) {
@@ -1109,18 +1139,23 @@ public class ReportServiceImpl implements IReportService {
 		// 平均时长
 		String pingjunHour = CommonUtil.divide(benyueTime, totalCount, 2);
 		// 同比数据
-		String tongbiPingjunHour = null;
-		if (CommonUtil.compare(benyueTime, tbTime) == 1) {
-			tongbiPingjunHour = "增加" + CommonUtil.multiply(CommonUtil.divide(CommonUtil.subtract(benyueTime, tbTime), tbTime, 4), "100", 2)+"%";
-		} else {
-			tongbiPingjunHour = "下降" + CommonUtil.multiply(CommonUtil.divide(CommonUtil.subtract(tbTime, benyueTime), tbTime, 4), "100", 2)+"%";
+		String tongbiPingjunHour = "";
+		if (CommonUtil.compare(tbTime, "0") != 0) {
+			if (CommonUtil.compare(benyueTime, tbTime) == 1) {
+				tongbiPingjunHour = "增加" + CommonUtil.multiply(CommonUtil.divide(CommonUtil.subtract(benyueTime, tbTime), tbTime, 4), "100", 2)+"%";
+			} else {
+				tongbiPingjunHour = "下降" + CommonUtil.multiply(CommonUtil.divide(CommonUtil.subtract(tbTime, benyueTime), tbTime, 4), "100", 2)+"%";
+			}
 		}
+		
 		// 环比数据
-		String huanbiPingjunHour = null;
-		if (CommonUtil.compare(benyueTime, hbTime) == 1) {
-			huanbiPingjunHour = "增加" + CommonUtil.multiply(CommonUtil.divide(CommonUtil.subtract(benyueTime, hbTime), hbTime, 4), "100", 2)+"%";
-		} else {
-			huanbiPingjunHour = "下降" + CommonUtil.multiply(CommonUtil.divide(CommonUtil.subtract(hbTime, benyueTime), hbTime, 4), "100", 2)+"%";
+		String huanbiPingjunHour = "";
+		if (CommonUtil.compare(hbTime, "0") != 0) {
+			if (CommonUtil.compare(benyueTime, hbTime) == 1) {
+				huanbiPingjunHour = "增加" + CommonUtil.multiply(CommonUtil.divide(CommonUtil.subtract(benyueTime, hbTime), hbTime, 4), "100", 2)+"%";
+			} else {
+				huanbiPingjunHour = "下降" + CommonUtil.multiply(CommonUtil.divide(CommonUtil.subtract(hbTime, benyueTime), hbTime, 4), "100", 2)+"%";
+			}
 		}
 		// 台区平均停电时长描述
 		String areaPingjunDesc = "";
@@ -1288,13 +1323,6 @@ public class ReportServiceImpl implements IReportService {
 		List<String> titleList = new ArrayList<String>();
 		titleList.add("ID");
 		titleList.add("TNAME");
-		titleList.add("CMODE");
-		titleList.add("VALUE");
-		titleList.add("facname");
-		titleList.add("type");
-		titleList.add("fdid");
-		titleList.add("yxstatus");
-		titleList.add("tytime");
 		titleList.add("SRC");
 		resList.add(titleList);
 		
@@ -1321,13 +1349,6 @@ public class ReportServiceImpl implements IReportService {
 				List<String> resChildList = new ArrayList<String>();
 				resChildList.add(first.getExcelId());
 				resChildList.add(first.getExcelTname());
-				resChildList.add(first.getExcelCmode());
-				resChildList.add(first.getExcelValue());
-				resChildList.add(first.getExcelFacname());
-				resChildList.add(first.getExcelFdid());
-				resChildList.add(first.getExcelType());
-				resChildList.add(first.getExcelYxstatus());
-				resChildList.add(first.getExcelTytime());
 				resChildList.add("退出");
 				resList.add(resChildList);
 			}
@@ -1346,13 +1367,6 @@ public class ReportServiceImpl implements IReportService {
 				List<String> resChildList = new ArrayList<String>();
 				resChildList.add(second.getExcelId());
 				resChildList.add(second.getExcelTname());
-				resChildList.add(second.getExcelCmode());
-				resChildList.add(second.getExcelValue());
-				resChildList.add(second.getExcelFacname());
-				resChildList.add(second.getExcelFdid());
-				resChildList.add(second.getExcelType());
-				resChildList.add(second.getExcelYxstatus());
-				resChildList.add(second.getExcelTytime());
 				resChildList.add("投入");
 				resList.add(resChildList);
 			}
@@ -2477,6 +2491,8 @@ public class ReportServiceImpl implements IReportService {
 		
 		// 全年累计考核数
 		Map<String, Object> param = new HashMap<String, Object>();
+		param.put("reportId", ddyFxbId);
+		
 		param.put("beginTime", yearBegin);
 		param.put("endTime", weekEnd);
 		List<Map<String, String>> yearTotal = db.getMybatisMapper(ReportServiceMapper.class).selectDetail03ByDDYRB(param, new MINRowBounds());
@@ -2554,14 +2570,76 @@ public class ReportServiceImpl implements IReportService {
 			}
 		}
 		
-		// 正在治理用户
+		// 正在治理用户数
+		String zzliNum = db.getMybatisMapper(ReportServiceMapper.class).selectDdyFxbZZZL(param).get("num");
+		// 治理后再次出现
+		List<Map<String, String>> zlhzccxList = db.getMybatisMapper(ReportServiceMapper.class).selectDdyFxbZlhzccx(param);
+		String zlhzccxNum = "0";
+		String zlhzccxDesc = "";
+		for (int i = 0; i < zlhzccxList.size(); i ++) {
+			Map<String, String> map = zlhzccxList.get(i);
+			String area = map.get("area").substring(0, 2);
+			String num = map.get("num");
+			if ("新泰".equals(area)) {
+			} else if ("高新".equals(area)) {
+			} else if ("岱岳".equals(area)) {
+			} else if ("泰山".equals(area)) {
+			} else if ("宁阳".equals(area)) {
+			} else if ("东平".equals(area)) {
+			} else if ("景区".equals(area)) {
+			} else if ("肥城".equals(area)) {
+			} else {
+				continue;
+			}
+			zlhzccxNum = CommonUtil.add(zlhzccxNum, num);
+			// 最后一条数据
+			if (i == zlhzccxList.size() - 1) {
+				zlhzccxDesc += area + num + "户;";
+			} else {
+				zlhzccxDesc += area + num + "户,";
+			}
+		}
+		// 未开始治理用户区域分组
+		List<Map<String, String>> wkszlList = db.getMybatisMapper(ReportServiceMapper.class).selectDdyFxbWKSZL(param);
+		String wkszlNum = "0";
+		String wkszlDesc = "";
+		for (int i = 0; i < wkszlList.size(); i ++) {
+			Map<String, String> map = wkszlList.get(i);
+			String area = map.get("area").substring(0, 2);
+			String num = map.get("num");
+			if ("新泰".equals(area)) {
+			} else if ("高新".equals(area)) {
+			} else if ("岱岳".equals(area)) {
+			} else if ("泰山".equals(area)) {
+			} else if ("宁阳".equals(area)) {
+			} else if ("东平".equals(area)) {
+			} else if ("景区".equals(area)) {
+			} else if ("肥城".equals(area)) {
+			} else {
+				continue;
+			}
+			wkszlNum = CommonUtil.add(wkszlNum, num);
+			// 最后一条数据
+			if (i == wkszlList.size() - 1) {
+				wkszlDesc += area + num + "户。";
+			} else {
+				wkszlDesc += area + num + "户,";
+			}
+		}
 		
-		String desc = "本月新增受考核低电压客户${benyueXZ}户,其中本周新增${benzhouXZ}户,按单位分${danweiDesc}截至目前未治理完成150户,141户正在治理;3户治理后再次出现,其中新泰、泰山、高新各1户;6户未开始治理,其中景区4户,高新2户。";
+		String wzlwcNum = CommonUtil.add(CommonUtil.add(zzliNum, zlhzccxNum), wkszlNum);
+		String desc = "本月新增受考核低电压客户${benyueXZ}户,其中本周新增${benzhouXZ}户,按单位分${danweiDesc}截至目前未治理完成${wzlwcNum}户,${zzliNum}户正在治理;${zlhzccxNum}户治理后再次出现,${zlhzccxDesc}${wkszlNum}户未开始治理,${wkszlDesc}";
 		
 		Map<String, String> reportMap = new HashMap<String, String>();
 		reportMap.put("benyueXZ", String.valueOf(benyueXZ));
 		reportMap.put("benzhouXZ", String.valueOf(benzhouXZ));
 		reportMap.put("danweiDesc", danweiDesc);
+		reportMap.put("wzlwcNum", wzlwcNum);
+		reportMap.put("zzliNum", zzliNum);
+		reportMap.put("zlhzccxNum", zlhzccxNum);
+		reportMap.put("zlhzccxDesc", zlhzccxDesc);
+		reportMap.put("wkszlNum", wkszlNum);
+		reportMap.put("wkszlDesc", wkszlDesc);
 		resMap.put("reportMap", reportMap);
 		resMap.put("descStr", desc);
 		
@@ -3014,7 +3092,12 @@ public class ReportServiceImpl implements IReportService {
 			}
 			kaoheZlNum = CommonUtil.add(kaoheZlNum, num); 
 		}
-		String kaoheZlNumLv = CommonUtil.multiply(CommonUtil.divide(kaoheZlNum, kaoheNum, 4), "100", 2);
+		
+		String kaoheZlNumLv = "0";
+		if (CommonUtil.compare(kaoheNum, "0") != 0) {
+			kaoheZlNumLv = CommonUtil.multiply(CommonUtil.divide(kaoheZlNum, kaoheNum, 4), "100", 2);
+		}
+		
 		
 		String desc1 = "<p>1.用户低电压情况</p>" +
 						"<p>(1)总体情况(说明:用户电压低于198伏且持续超过1小时为低电压)</p>" +
@@ -3755,4 +3838,51 @@ public class ReportServiceImpl implements IReportService {
 		resMap.put("descStr", descStr);
 		return resMap; 
 	}
+	
+	public List<List<String>> reportTypeZDDTYBBII(String firstFileId, MINHttpServletRequestContext request) throws MINBusinessException, InvalidFormatException, IOException{
+		IMINDataBaseService db = Service.lookup(IMINDataBaseService.class);
+		List<List<String>> resList = new ArrayList<List<String>>();
+		
+		List<String> titleList = new ArrayList<String>();
+		titleList.add("ID");
+		titleList.add("TNAME");
+		titleList.add("SRC");
+		resList.add(titleList);
+		
+		// 选择文件
+		DwReportData reportData = db.selectByPrimaryKey(DwReportDataMapper.class, firstFileId);
+		String jsonArrayStr = reportData.getData();
+		JSONArray array = JSONArray.fromObject(jsonArrayStr);
+		// 对比文件
+		// 获取文件
+		FileItem fileItem = request.getFile("file");
+		String fileName = fileItem.getName();
+		if (!fileName.endsWith(".xlsx") && !fileName.endsWith(".xls")) {
+			throw new MINBusinessException("文件格式错误!");
+		}
+		String[] titleKey = new String[]{"gdbh","gdlx","gdfqsj","hjmc", "bdzmc","xlmc","gddw","zrdw","zrbz","ywmc","zdsbscmc","jhtysj","xttysj"};
+		List<Map<String, String>> secondList = FilesUtil.readExecleasy(fileItem, titleKey, 1);
+		
+		for (Object first : array) {
+			List<String> child = (List<String>)first;
+			String tname = child.get(0);
+			String id = child.get(1);
+			boolean flag = false;
+			for (Map<String, String> second : secondList) {
+				String zdsbscmc = second.get("zdsbscmc");
+				if (tname.equals(zdsbscmc)) {
+					flag = true;
+					break;
+				}
+			}
+			if (!flag) {
+				List<String> resChildList = new ArrayList<String>();
+				resChildList.add(id);
+				resChildList.add(tname);
+				resChildList.add("投运");
+				resList.add(resChildList);
+			}
+		}
+		return resList;
+	}
 }

+ 3 - 3
src/main/java/com/minpay/common/util/ExportExcelUtil.java

@@ -54,11 +54,11 @@ public class ExportExcelUtil<T> {
 	 * @param out     输出流
 	 * @param version 2003 或者 2007,不传时默认生成2003版本
 	 */
-	public void exportExcel(String title, Collection<T> dataset, OutputStream out, String version) {
+	public void exportExcel(String title, Collection<T> dataset, OutputStream out, String version, String[] headers) {
 		if (Strings.isEmpty(version) || EXCEl_FILE_2003.equals(version.trim())) {
-			exportExcel2003(title, null, dataset, out, "yyyy-MM-dd HH:mm:ss");
+			exportExcel2003(title, headers, dataset, out, "yyyy-MM-dd HH:mm:ss");
 		} else {
-			exportExcel2007(title, null, dataset, out, "yyyy-MM-dd HH:mm:ss");
+			exportExcel2007(title, headers, dataset, out, "yyyy-MM-dd HH:mm:ss");
 		}
 	}
 

+ 6 - 0
src/main/java/com/minpay/db/table/own/mapper/ReportServiceMapper.java

@@ -52,4 +52,10 @@ public interface ReportServiceMapper extends IMINMybatisEntityMapper {
 
 	List<Map<String, String>> selectDdyFxbByTQID(Map<String, Object> param);
 
+	Map<String, String> selectDdyFxbZZZL(Map<String, Object> param);
+
+	List<Map<String, String>> selectDdyFxbWKSZL(Map<String, Object> param);
+
+	List<Map<String, String>> selectDdyFxbZlhzccx(Map<String, Object> param);
+
 }

+ 61 - 1
src/main/java/com/minpay/reportManage/action/DataWareManageAction.java

@@ -1,7 +1,10 @@
 package com.minpay.reportManage.action;
 
+import java.io.BufferedOutputStream;
 import java.io.IOException;
+import java.io.OutputStream;
 import java.lang.reflect.InvocationTargetException;
+import java.net.URLEncoder;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.HashMap;
@@ -9,6 +12,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
+import javax.servlet.ServletOutputStream;
 import javax.servlet.http.HttpServletResponse;
 
 import com.minpay.db.table.mapper.*;
@@ -23,6 +27,7 @@ import com.minpay.common.format.IFormatService;
 import com.minpay.common.service.IDianwangService;
 import com.minpay.common.service.IPropertiesService;
 import com.minpay.common.util.CommonUtil;
+import com.minpay.common.util.ExportExcelUtil;
 import com.minpay.common.util.FilesUtil;
 import com.minpay.common.util.ListUtil;
 import com.minpay.db.table.own.mapper.DataWareManageMapper;
@@ -61,6 +66,9 @@ public class DataWareManageAction implements IMINAction {
     
     /** 原始文件详情 */
     public final static String FILE_INF_DETAIL = "fileInfDetail";
+    
+    /** 原始数据下载 */
+    public final static String FILE_DATA_DOWNLOAD = "fileDataDownload";
 
 
     /**
@@ -86,6 +94,7 @@ public class DataWareManageAction implements IMINAction {
         @MINParam(key = "fileName") String fileName,
         @MINParam(key = "notInData") String notInData,
         @MINParam(key = "reportType") String reportType,
+        @MINParam(key = "type") String type,
         MINSession session
     ) throws MINBusinessException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, InstantiationException {
         MINActionResult res = new MINActionResult();
@@ -97,6 +106,7 @@ public class DataWareManageAction implements IMINAction {
 		
 		param.put("date", date);
 		param.put("fileName", fileName);
+		param.put("type", type);
 		
 		if (!CommonUtil.isEmpty(notInData)) {
 			JSONArray notInArray = JSONArray.fromObject(notInData);
@@ -448,7 +458,7 @@ public class DataWareManageAction implements IMINAction {
 				fileDetail05.setFileId(fileId);
 				db.insertSelective(DwFileDetail05Mapper.class, fileDetail05);
 			}
-		}else if(Constant.FILE_DETAIL_TYPE_07.equals(fileType)) {
+		}else if(Constant.FILE_DETAIL_TYPE_06.equals(fileType)) {
 			String[] titleKey = new String[]{"NO","TYPE","UNIT","DEVICE","TIME","EVENTTYPE","FA","TRIPTYPE","CAUSE","CHZDZQK","HANDLE","ERROBRIEF"};
 			list = FilesUtil.readExecleasy(fileItem, titleKey, 1);
 
@@ -584,4 +594,54 @@ public class DataWareManageAction implements IMINAction {
     	res.set(IMINBusinessConstant.F_PAGING_COUNT, rows.getCount());
     	return res;
     }
+    
+    /**
+     * 原始数据文件下载
+     * @param fileId
+     * @param response
+     * @return
+     * @throws MINBusinessException
+     * @throws IOException 
+     */
+    @MINAction(value = FILE_DATA_DOWNLOAD)
+    public HttpServletResponse fileDataDownload(
+    	@MINParam(key = "type") String type,
+    	@MINParam(key = "date") String date,
+        HttpServletResponse response
+    ) throws MINBusinessException, IOException {
+        db = Service.lookup(IMINDataBaseService.class);
+        date = date.replaceAll(" ", "");
+        date = date.replaceAll("-", "");
+        
+        
+        
+        OutputStream os = null;
+        ServletOutputStream ros = null;
+        ros = response.getOutputStream();
+        os = new BufferedOutputStream(ros);
+        // 台区停电
+        if(Constant.FILE_DETAIL_TYPE_00.equals(type)) {
+        	response.setContentType("application/application/vnd.ms-excel");
+    		response.setHeader("Content-disposition","attachment;filename=" + URLEncoder.encode(date + "台区停电数据.xls", "UTF-8"));
+        	DwFileDetail00Example example = new DwFileDetail00Example();
+        	example.createCriteria().andDateGreaterThanOrEqualTo(date.substring(0, 8)).andDateLessThanOrEqualTo(date.substring(8, 16));
+        	List<DwFileDetail00> selectByExample = db.getMybatisMapper(DwFileDetail00Mapper.class).selectByExample(example);
+        	ExportExcelUtil<DwFileDetail00> util = new ExportExcelUtil<DwFileDetail00>();
+        	String[] header = {"系统编号","原EXCEL编号","台区编号","台区名称","数据日期","单位","供电所名称","终端名称","终端编号","终端地址码","停电时间","来电时间","所属文件id"};
+        	util.exportExcel(date, selectByExample, os, "2007", header);
+        } else if (Constant.FILE_DETAIL_TYPE_01.equals(type)) {
+        	
+        } else if (Constant.FILE_DETAIL_TYPE_02.equals(type)) {
+        	
+        } else if (Constant.FILE_DETAIL_TYPE_03.equals(type)) {
+        	
+        } else if (Constant.FILE_DETAIL_TYPE_04.equals(type)) {
+        	
+        } else if (Constant.FILE_DETAIL_TYPE_05.equals(type)) {
+        	
+        } else if (Constant.FILE_DETAIL_TYPE_06.equals(type)) {
+        	
+        }
+        return response;
+    }
 }

+ 9 - 2
src/main/java/com/minpay/reportManage/action/ReportManageAction.java

@@ -1,5 +1,6 @@
 package com.minpay.reportManage.action;
 
+import java.io.IOException;
 import java.io.OutputStream;
 import java.lang.reflect.InvocationTargetException;
 import java.text.ParseException;
@@ -11,6 +12,7 @@ import java.util.Map;
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
 
 import com.minpay.common.bean.User;
 import com.minpay.common.constant.Constant;
@@ -35,6 +37,7 @@ import com.minpay.db.table.own.mapper.ReportManageMapper;
 import com.minpay.db.table.own.mapper.SequenceMapper;
 import com.minpay.dianwang.util.ReportExcelUtil;
 import com.startup.minpay.frame.business.IMINAction;
+import com.startup.minpay.frame.business.MINHttpServletRequestContext;
 import com.startup.minpay.frame.business.res.MINActionResult;
 import com.startup.minpay.frame.constant.IMINBusinessConstant;
 import com.startup.minpay.frame.constant.IMINTransactionEnum;
@@ -234,9 +237,12 @@ public class ReportManageAction implements IMINAction {
      * @throws IllegalAccessException 
      * @throws SecurityException 
      * @throws NoSuchMethodException 
+     * @throws IOException 
+     * @throws InvalidFormatException 
      */
     @MINAction(value = REPORT_NEED_DATA_DETAIL)
     public MINActionResult reportNeedDataDetail(
+    		MINHttpServletRequestContext request,
     		@MINParam(key = "monthChoose") String monthChoose,
     		@MINParam(key = "range") String range,
     		@MINParam(key = "timeRange") String timeRange,
@@ -249,13 +255,13 @@ public class ReportManageAction implements IMINAction {
     		@MINParam(key = "yearChoose") String yearChoose,
     		@MINParam(key = "DdyDateRange") String DdyDateRange,
     		@MINParam(key = "ddyFxbId") String ddyFxbId
-    		) throws MINBusinessException, ParseException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+    		) throws MINBusinessException, ParseException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, InvalidFormatException, IOException {
     	MINActionResult res = new MINActionResult();
     	
     	// 报表类型id
     	String reportTypeId = reportInf.split("_")[0];
     	
-    	Map<String, String> param = new HashMap<String, String>();
+    	Map<String, Object> param = new HashMap<String, Object>();
     	param.put("monthChoose", monthChoose);
     	param.put("range", range);
     	param.put("timeRange", timeRange);
@@ -268,6 +274,7 @@ public class ReportManageAction implements IMINAction {
     	param.put("yearChoose", yearChoose);
     	param.put("DdyDateRange", DdyDateRange);
     	param.put("ddyFxbId", ddyFxbId);
+    	param.put("request", request);
     	Map<String, Object> resMap = Service.lookup(IReportService.class).reportNeedDetail(param);
     	res.set(IMINBusinessConstant.F_PAGING_LAY, resMap);
     	return res;

+ 7 - 0
src/main/resources/com/minpay/db/table/own/mapper/DataWareManageMapper.xml

@@ -9,9 +9,13 @@
 			a.DFI_CREAT_USER creatUser,
 			a.DFI_DATA_NUM dataNum,
 			a.DFI_TYPE type,
+			f.DBFT_NAME typeName,
 			a.DFI_SAVE_PATH savePath,
 			a.DFI_STATE state
         from dw_file_inf a
+        	left join
+        		dw_branch_file_type f
+        	on DBFT_ID = DFI_TYPE
 		where
 			a.DFI_STATE = '0'
 			<if test="fileName != null  and fileName != ''">
@@ -20,6 +24,9 @@
 			<if test="branchId != null  and branchId != ''">
 		    	and DFI_BRANCH = #{branchId,jdbcType=VARCHAR}
 		   	</if>
+			<if test="type != null  and type != ''">
+		    	and DFI_TYPE = #{type,jdbcType=VARCHAR}
+		   	</if>
 			<if test="date != null  and date != ''">
 		    	and DFI_UPLOAD_DATE between substring(#{date,jdbcType=VARCHAR},1,8) and substring(#{date,jdbcType=VARCHAR},9,16)
 		   	</if>

+ 55 - 1
src/main/resources/com/minpay/db/table/own/mapper/ReportServiceMapper.xml

@@ -458,7 +458,7 @@
 		ORDER BY DDF_XGSMC
 	</select>
 	<select id="selectDdyFxbByDDYZYMC" resultType="hashmap" parameterType="java.util.Map">
-		SELECT DDF_DDYZYMC ddyzymc, cast(COUNT(0) as char) num FROM dw_ddy_fxb WHERE DDF_DDYSJ >= 48 GROUP BY DDF_DDYZYMC order by COUNT(0) desc
+		SELECT DDF_DDYZYMC ddyzymc, cast(COUNT(0) as char) num FROM dw_ddy_fxb WHERE DDF_REPORT_ID = #{reportId,jdbcType=VARCHAR} and DDF_DDYSJ >= 48 GROUP BY DDF_DDYZYMC order by COUNT(0) desc
 	</select>
 	<select id="selectDdyFxbByTQID" resultType="hashmap" parameterType="java.util.Map">
 		SELECT 
@@ -480,4 +480,58 @@
 		GROUP BY a.DDF_XGSMC
 		order by COUNT(1) desc
 	</select>
+	<!-- 	正在治理数据 -->
+	<select id = "selectDdyFxbZZZL" resultType="hashmap" parameterType="java.util.Map">
+		SELECT 
+		  CAST(COUNT(1) AS CHAR) num
+		FROM
+		  dw_ddy_fxb 
+		WHERE
+		  DDF_REPORT_ID = #{reportId,jdbcType=VARCHAR} 
+		  AND DDF_DDYSJ &gt;= 48 
+		  AND DDF_SFZL != '是' 
+		  AND (DDF_ZLWCSJ != '' 
+		    or DDF_ZLCS != '')
+	</select>
+	<select id = "selectDdyFxbWKSZL" resultType="hashmap" parameterType="java.util.Map">
+		SELECT 
+		  DDF_XGSMC area,
+		  CAST(COUNT(1) AS CHAR) num 
+		FROM
+		  dw_ddy_fxb 
+		WHERE
+		  DDF_REPORT_ID = #{reportId,jdbcType=VARCHAR} 
+		  AND DDF_DDYSJ &gt;= 48 
+		  AND DDF_SFZL != '是' 
+		  AND (DDF_ZLWCSJ = '' 
+		    AND DDF_ZLCS = '') 
+		GROUP BY DDF_XGSMC 
+		order by COUNT(1) desc
+	</select>
+	
+	<select id="selectDdyFxbZlhzccx" resultType="hashmap" parameterType="java.util.Map">
+		SELECT 
+			cast(COUNT(1) as char) num,
+			a.area area
+		from (
+			SELECT 
+			  DDF_XGSMC area,
+			  DDF_ID,
+			  SUM(DDFD_SC)
+			FROM
+			  dw_ddy_fxb 
+			  LEFT JOIN dw_ddy_fxb_detail 
+			    ON DDFD_DATE > DDF_ZLWCSJ 
+			    AND DDF_ID = DDFD_FXB_ID 
+			WHERE 
+			  DDF_REPORT_ID = #{reportId,jdbcType=VARCHAR} 
+			  AND DDF_DDYSJ 
+			  AND DDF_SFZL = '是' 
+			GROUP BY DDF_ID,
+			  DDF_XGSMC 
+			HAVING SUM(DDFD_SC) > 0 
+			ORDER BY DDF_XGSMC
+		) a
+		group by a.area
+	</select>
 </mapper>

+ 6 - 6
src/main/webapp/WEB-INF/config.properties

@@ -1,11 +1,11 @@
 dataSource.driverClassName=com.mysql.jdbc.Driver
 
-#dataSource.url=jdbc:mysql://123.138.111.28:3506/dianwang?useUnicode=true&characterEncoding=UTF8
-#dataSource.username=dw_user
-#dataSource.password=123456
-dataSource.url=jdbc:mysql://127.0.0.1:3306/dianwang?useUnicode=true&characterEncoding=UTF8
-dataSource.username=root
-dataSource.password=12345
+dataSource.url=jdbc:mysql://123.138.111.28:3506/dianwang?useUnicode=true&characterEncoding=UTF8
+dataSource.username=dw_user
+dataSource.password=123456
+#dataSource.url=jdbc:mysql://127.0.0.1:3306/dianwang?useUnicode=true&characterEncoding=UTF8
+#dataSource.username=root
+#dataSource.password=12345
 
 
 config.MINDebug=false

+ 1 - 1
src/main/webapp/admin/common/chooseDdyFxb.html

@@ -131,7 +131,7 @@
       
       function showDetail(data){
     	  var openPageId = pageId + "-02";
-    	  openMainTabPage(openPageId, "详情查看", "ddy/reportManageDetailDdy.html?pageId="+openPageId+"&reportId="+data.id+"&type="+data.type+"&typeId="+data.typeId+"&fileName="+chineseUrlEncode(data.fileName), '', pageId, null);
+    	  openMainTabPage(openPageId, "详情查看", "ddy/reportManageDetailDdy.html?pageId="+openPageId+"&reportId="+data.id+"&dayInterval="+data.dayInterval+"&fileName="+chineseUrlEncode(data.fileName), '', pageId, null);
       }
       function algorithmDetail(data){
    	  	var openPageId = pageId + "-04";

+ 247 - 0
src/main/webapp/admin/common/chooseZddty.html

@@ -0,0 +1,247 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <title>报表管理</title>
+    <script src="../../js/min-loader-next.js"></script>
+</head>
+<body class="content">
+	<div class="order-body">
+		<div class="order-tiaojian back-gray">
+			<div class="tiaojian-part1" id = "conditions">
+				<div class="fl f12-gray4-op">所选条件:</div>
+			</div>
+			<div class="tiaojian-part2 fr  demoTable">
+				<button class="order-bnt1 layui-btn" onclick="reloadSearch()" >查询</button>
+				<button class="layui-btn order-bnt2" onclick="reset()">重置</button>
+				<button class="order-bnt2 layui-btn" onclick="uploadExcel()">报表生成</button>
+				<a href="#" id="toggle" class="top">收起</a>
+			</div>
+		</div>
+		<form class="layui-form" action="" id = "formRole">
+			<div class="order-select back-border" id="content">
+				<div class="d-dashed" style="margin: 10px 0;"></div>
+				<div class="layui-inline">
+					<label class="f12-gray4">生成日期:</label>
+					<div class="layui-input-inline" style="position: relative;">
+						<input type="text" class="layui-input" id="date" placeholder="请选择日期" readOnly/>
+					</div>
+				</div>
+				<div class="layui-inline">
+					<label class="f12-gray4">文件名称:</label>
+					<input name="fileName"  id ="fileName" autocomplete="off" placeholder="请输入文件名称" class="search-select" onchange = "changeSelectCon(1,this,'inp')">
+				</div>
+			</div>
+		</form>
+	</div>
+	<div class="shadow-content" style="margin:1.5rem;">
+    	<table id="tableTest" lay-filter="tableFilter"></table>
+	</div>
+	<script type="text/html" id="barDemo">
+		<a class="layui-btn layui-btn-xs" lay-event="detail">详情查看</a>
+		<a class="layui-btn layui-btn-xs" lay-event="choose">选择</a>
+   	</script>
+	<script type="text/html" id="algorithmBar">
+		<a class="layui-btn layui-btn-xs" lay-event="algorithmDetail">查看</a>
+   	</script>
+    <script>
+    
+    
+	$("#toggle").click(function() {
+		$(this).html($("#content").is(":hidden") ? "收起" + "<i class='iconfont up iconSelect_drop-down'/></i>" : "展开" +
+			"<i class='iconfont up iconSelect_drop-down'/></i>");
+		$("#content").slideToggle();
+	});
+	var pageId = getQueryString("pageId");
+	// 终端投托运报表
+	var reportType = "ZDTTYBB";
+	
+	var timeType = getQueryString("timeType");// 00日报01周报02月报
+	
+     var table;
+     var form;
+     layui.use(['table','laydate','form'], function(){
+    	  var laydate = layui.laydate;
+    	  laydate.render({ 
+    		  elem: '#date'
+    		  ,type: 'date'
+    		  ,range: true
+    		  ,done: function(value, date, endDate){
+    			  changeSelectCon(0,"date",'date',value)
+  			  }
+		  });
+    	  
+		  table = layui.table;
+		  
+		  // 加载数据
+		  table.render({
+			id: 'tableTest'
+		    ,elem: '#tableTest'
+		    ,limit:10
+		    ,url: 'ReportManageAction/reportInfQuery' //数据接口
+		    ,method: 'post'
+		    ,where:{MINView:"JSON", timeType : timeType, reportType : reportType}
+		    ,page: true //开启分页
+		    ,cols: [[ //表头
+		      {field:'num', title: '序号',width:'5%', type:'numbers', align: 'center'}
+		      ,{field: 'uploadDate', title: '生成时间', width:'15%', sort: true}
+		      ,{field: 'fileName', title: '报表名称', width:'30%'}
+		      ,{field: 'algorith', title: '算法', width: '10%', toolbar: '#algorithmBar'}
+		      ,{field: 'operate', title: '操作', width: '40%', toolbar: '#barDemo', fixed : 'right'}
+		    ]]
+		    ,done: function(res, curr, count){
+		    }
+		    ,even: true //开启隔行背景
+		  });
+		  
+		 // 监听工具条(操作)
+		  table.on('tool(tableFilter)', function(obj){ //注:tool是工具条事件名,tableFilter是table原始容器的属性 lay-filter="对应的值"
+		    var data = obj.data; //获得当前行数据
+		    var layEvent = obj.event; //获得 lay-event 对应的值(也可以是表头的 event 参数对应的值)
+		    var tr = obj.tr; //获得当前行 tr 的DOM对象
+		    if (layEvent === 'detail'){ //查看
+		    	showDetail(data);
+		    } else if(layEvent === 'downLoad'){
+		    	window.open("../../ReportManageAction/reportDownLoad?reportId=" + data.id);
+		    } else if(layEvent === 'delete'){
+		    	layer.confirm('确认删除?', function(index){
+	        		layer.close(index);
+			    	$.request({
+						action : 'ReportManageAction/reportInfDelete',
+						data : {
+							reportId : data.id
+						},
+						success : function(data1) {
+							$.SuccAlert("操作成功!");
+							reloadSearch();
+						},
+						error : function(data2) {
+							$.ErrorAlert(data2.MINErrorMessage);
+						}
+		    	  	});
+	      		});
+		    } else if (layEvent === 'algorithmDetail'){ // 算法查看
+		    	algorithmDetail(data);
+		    } else if (layEvent === "choose") {
+		    	chooseComplete(data);
+		    }
+		  });
+	 });
+      
+      function reloadSearch (t) {
+	    	var fileName = $("#fileName").val();
+	    	var date = $("#date").val();
+	        //执行重载
+ 		    table.reload('tableTest', {
+ 		        page: {
+ 		        	curr: 1 //重新从第 1 页开始
+ 		        }
+ 		        ,where: {
+ 		        	date : date,
+ 		        	fileName : fileName
+ 		        }
+ 		     });
+ 		 if (t == 1) {
+     		  $.Alert("修改成功"); 
+     	 }
+      }
+      
+      function reset(){
+    	  $('#formRole')[0].reset();
+    	  $("#conditions").html('<div class="fl f12-gray4-op">所选条件:</div>');
+      }
+      
+      function uploadExcel(){
+    	  var openPageId = pageId + "-01";
+    	  openMainTabPage(openPageId, "导入", "zdtty/reportProduceZdtty.html?pageId="+openPageId+"&reportType="+reportType, '', pageId, reloadSearch);
+      }
+      
+      function showDetail(data){
+    	  var openPageId = pageId + "-02";
+    	  openMainTabPage(openPageId, "详情查看", "zdtty/reportManageDetailZdtty.html?pageId="+openPageId+"&reportId="+data.id+"&type="+data.type+"&typeId="+data.typeId+"&fileName="+chineseUrlEncode(data.fileName), '', pageId, null);
+      }
+      function algorithmDetail(data){
+   	  	var openPageId = pageId + "-04";
+		openMainTabPage(openPageId, "算法详情", "reprotManage/reportAlgorithm.html?pageId="+openPageId+"&reportTypeId="+data.typeId, '', pageId, null);
+      }
+      
+   	function changeSelectCon(index, t, type, dateValue){
+   		if (type == "date") {
+   			if (isEmpty(dateValue)) {
+   				$("#search" + index).remove();
+   			} else {
+   				$("#search" + index).remove();
+   				if (isEmpty($("#search" + index).attr("name"))) {
+   					$("#conditions").append(getSelectConHtml(index, t, type,dateValue));
+   				}
+   			}
+   		} else if (type == 'inp') {
+   			if (isEmpty($(t).val())) {
+   				$("#search" + index).remove();
+   			} else {
+   				$("#search" + index).remove();
+   				if (isEmpty($("#search" + index).attr("name"))) {
+   					$("#conditions").append(getSelectConHtml(index, t, type));
+   				}
+   			}
+   		} else {
+   			if (isEmpty($(t).val())) {
+   				$("#search" + index).remove();
+   			} else {
+   				$("#search" + index).remove();
+   				if (isEmpty($("#search" + index).attr("name"))) {
+   					$(t).attr("id","subjects");
+   					$("#conditions").append(getSelectConHtml(index, t, type));
+   				}
+   			}
+   		}
+   	}
+    	
+	var array = new Array('生成日期','文件名称');
+	function getSelectConHtml(index, t, type,dateValue){
+		var name;
+		if (type == "date") {
+			name = $("#"+t).attr("id");
+		} else {
+			name = $(t).attr("id");
+		}
+		var value;
+		if(type == "inp"){
+			value = t.value.substr(0,5)+"..";
+		}
+		if (type == "date") {
+			value = dateValue;
+		}
+		if(type == "sel"){
+			value = $("#stateDiv").find("option:selected").text();
+		}
+		var html = '<div class="fl xuanzhong-active" id = "search' + index + '" name = "' + name + '" onclick = "removeSearch(this)">' +
+						'<div class="fl">' + array[index] + '</div>' +
+						':<span>'+value+'</span>' +
+						'<svg class="icon" aria-hidden="true">' +
+						  '<use xlink:href="#iconicon_close1"></use>' +
+						'</svg>' +
+					'</div>';
+		return html;
+	}
+	function removeSearch(t) {
+		if ($(t).attr("name") == 'subjects') {
+			initSelect('stateDiv', "COMPANY_STATE", "state", '', true); 
+			form.render();
+			$(t).remove();
+		} else {
+			$("#"+$(t).attr("name")).val('');
+			$(t).remove();
+		}
+	}
+	
+	// 选择完成
+	function chooseComplete(data) {
+		setTempVal("zddtyReport", data);
+		deleteTabPageParent(pageId);
+	}
+    </script>
+</body>
+
+</html>

+ 9 - 0
src/main/webapp/admin/ddy/reportManageDetailDdyWzl.html

@@ -6,6 +6,15 @@
     <title>报告详情</title>
     <script src="../../js/min-loader-next.js"></script>
     <script src="../../js/report.js"></script>
+    <style type="text/css">
+    	.layui-table td, .layui-table th {
+		    position: relative;
+		    padding: 0px 15px;
+		    min-height: 20px;
+		    line-height: 20px;
+		    font-size: 14px;
+		}
+    </style>
 </head>
 <body class="content">
 	<div class="shadow-content" style="margin:1.5rem; text-align: center;overflow: scroll;height: 600px;">

+ 1 - 1
src/main/webapp/admin/ddy/reportProduceDdy.html

@@ -65,7 +65,7 @@
 	    </div>
 	</div>
 	<div name = "step" style = "height : 300px; display : none; text-align : center;">
-		<div style = "width: 100%; margin-left : 0px;" class = "layui-upload-drag" >
+		<div style = "width: auto; margin-left : 0px;" class = "layui-upload-drag" >
 		  <p id = "fileName" contenteditable="true">国网泰安供电公司2020年8月份配网运行分析月报</p>
 		  <table id = "reportTable" class="layui-table">
 		  </table>

+ 1 - 1
src/main/webapp/admin/ddy/reportProduceDdy30T.html

@@ -65,7 +65,7 @@
 	    </div>
 	</div>
 	<div name = "step" style = "height : 300px; display : none; text-align : center;">
-		<div style = "width: 100%; margin-left : 0px;" class = "layui-upload-drag" >
+		<div style = "width: auto; margin-left : 0px;" class = "layui-upload-drag" >
 		  <p id = "fileName" contenteditable="true">国网泰安供电公司2020年8月份配网运行分析月报</p>
 		  <table id = "reportTable" class="layui-table">
 		  </table>

+ 1 - 1
src/main/webapp/admin/ddy/reportProduceDdyWzl.html

@@ -65,7 +65,7 @@
 	    </div>
 	</div>
 	<div name = "step" style = "height : 300px; display : none; text-align : center;">
-		<div style = "width: 100%; margin-left : 0px;" class = "layui-upload-drag" >
+		<div style = "width:auto; margin-left : 0px;" class = "layui-upload-drag" >
 		  <p id = "fileName" contenteditable="true">国网泰安供电公司2020年8月份配网运行分析月报</p>
 		  <table id = "reportTable" class="layui-table">
 		  </table>

+ 1 - 1
src/main/webapp/admin/ddy/reportProduceDdyZrxz.html

@@ -65,7 +65,7 @@
 	    </div>
 	</div>
 	<div name = "step" style = "height : 300px; display : none; text-align : center;">
-		<div style = "width: 100%; margin-left : 0px;" class = "layui-upload-drag" >
+		<div style = "width: auto; margin-left : 0px;" class = "layui-upload-drag" >
 		  <p id = "fileName" contenteditable="true">国网泰安供电公司2020年8月份配网运行分析月报</p>
 		  <table id = "reportTable" class="layui-table">
 		  </table>

+ 7 - 13
src/main/webapp/admin/ddy/reportProduceZb.html

@@ -67,8 +67,8 @@
 		    </div>
 	    </form>
 	</div>
-	<div name = "step" style = "width: 80%; margin-left : 10%; height : 300px; display : none; text-align : center;">
-		<div style = "width: 80%; margin-left : 0px;" class = "layui-upload-drag" >
+	<div name = "step" style = "width: auto; height : 300px; display : none; text-align : center;">
+		<div style = "margin-left : 0px;width : auto;" class = "layui-upload-drag" >
 		  <p id = "fileName" contenteditable="true">国网泰安供电公司2020年8月份配网运行分析月报</p>
 		  <p id = "reportDiv"></p>
 		  <table id = "reportTable" class="layui-table">
@@ -233,15 +233,11 @@
 			
 			if (step == 4) {
 				var fileName = $("#fileName").html();
-				var yearChoose = $("#yearChoose").val();
-				var monthChoose = $("#monthChoose").val();
+				var reportInf = $("#reportTypeDiv").find("select option:selected").val();
 				var weekRange = $("#weekRange").val();
-				if (isEmpty(yearChoose)) {
-					$.ErrorAlert("请选择年范围!");
-					return;
-				}
-				if (isEmpty(monthChoose)) {
-					$.ErrorAlert("请选择月范围!");
+				
+				if (isEmpty(fxbReport)) {
+					$.ErrorAlert("请选择分析表!");
 					return;
 				}
 				if (isEmpty(weekRange)) {
@@ -254,9 +250,7 @@
 						reportData : JSON.stringify(reportData),
 						reportInf : reportInf,
 						fileName : fileName,
-						range : weekRange,
-						yearChoose : yearChoose,
-						monthChoose : monthChoose
+						range : weekRange
 					},
 					success : function(data) {
 						if (data.code == 0) {

BIN
src/main/webapp/admin/img/back.jpg


BIN
src/main/webapp/admin/img/back3.jpg


BIN
src/main/webapp/admin/img/logo.png


Разлика између датотеке није приказан због своје велике величине
+ 4 - 4
src/main/webapp/admin/index.html


+ 97 - 113
src/main/webapp/admin/login.html

@@ -1,123 +1,107 @@
 <!DOCTYPE html>
-<html lang="ZH-cn" style="height: 100%;">
-
+<html>
 <head>
-  <meta charset="UTF-8">
-  <meta name="viewport" content="width=device-width, initial-scale=1.0">
-  <meta http-equiv="X-UA-Compatible" content="ie=edge">
-  <title>登录界面</title>
-  <script src="../js/min-loader.js"></script>
-  <link rel="stylesheet" href="../css/login.css">
-  <!-- <link rel="stylesheet" href="../build/css/login.css"> -->
-  <style type="text/css">
-  	input{
-  		background-color: transparent !important;
-  	}
-  </style>
+	<meta charset="utf-8">
+	<title></title>
+	<script type="text/javascript" src = "../js/min-loader.js"></script>
+	<style type="text/css">
+		body {background-image: url(img/back.jpg); background-position: center; background-size: cover; background-repeat: no-repeat; min-height: 100vh; font-family: 'Roboto', sans-serif;margin: 0 auto;} 
+		.logo{position: absolute;top: 25px; left: 40px; }
+		.inset {position: relative; background: #fff; padding: 75px 42px 55px; width: 475px; border-radius:10px; }
+		.textbox,.password{padding:0px;width: 475px;height: 50px;border-radius: 5px;border:2px solid #ccc;margin-bottom: 15px;text-indent: 30px;font-size: 23px;font-weight: 100;}
+		input::-webkit-input-placeholder{
+            color:#ccc;
+        }
+        input::-moz-placeholder{
+            color:#ccc;
+        }
+        input:-moz-placeholder{  
+            color:#ccc;
+        }
+        input:-ms-input-placeholder{ 
+            color:#ccc;
+        }
+        .submit{width: 475px;height: 50px;line-height: 50px;background-color: #02534a;border:none;color: #fff;border:2px solid #02534a;font-size: 23px;font-weight: 100;letter-spacing: 2px;margin-top: 20px;border-radius: 5px;}
+        .forreg{text-align: right;} 
+        .forreg span,.forreg .forget{color: #bbb;}
+        .forreg .reg{color: #02534a}
+        .forreg span{margin:0 10px;}
+        h2{ margin: 0 auto;font-size: 35px; color: #fff; font-weight: 100; letter-spacing: 2px;position: relative;top:55px;}
+        .col-md-6{margin-top: 100px;}
+	</style>
 </head>
-
-<body style="height: 100%;margin: 0;">
-	<div class="login-back">
-		
-		<form class="layui-form">
-		<div class="login-kuang">
-		<div class="login-title">
-			<p>融合画像展示及智能决策的供电服务数据地图系统</p>
-<!-- 			<p>内管系统</p> -->
-		</div>
-			<div class="login-input">
-				<i class="layui-icon" style = "color : #27B9B0;">&#xe66f;</i>
-				<input type="text" id="loginName" name="loginName" lay-verify="required" placeholder="用户名/手机号" />
-			</div>
-			<div class="login-input">
-				<i class="layui-icon" style = "color : #27B9B0;">&#xe673;</i>
-				<input type="password" name="password" lay-verify="required" placeholder="密码" />
-			</div>
-			<div class="login-input">
-				<i class="layui-icon" style = "color : #27B9B0;">&#xe679;</i>
-				<input type="" name="imgCode" id="imgCode" value="" maxlength="4" lay-verify="required" placeholder="请输入验证码"/>
-				<div class="yan-img">
-					<img id="checkImg" src="../SystemAction/checkImg?MINView=JSON"  onclick="change()" title="点击更换验证码" style="width: 100%;height: 100%;margin: 0;">
-				</div>
-			</div>
-			<div class="" style="width: 358px;margin: 14px auto 18px;">
-				<input type="checkbox" name="rememberMe" title="记住帐号" lay-skin="primary" id="rememberMe" lay-ignore><label for="rememberMe">记住帐号</label>
-			</div>
-			<div class="" style="margin: auto;width: 352px;">
-				<!-- <button type="button" class="login-btn">登录</button> -->
-				<button class="login-btn" lay-submit="submit" lay-filter="login_hash">登录</button>
+<body>
+	<div class="logo">
+		<img src="img/logo.png">
+	</div>
+	<div class="container" align="center">
+		<h2>融合画像展示及智能决策的供电服务数据地图系统</h2>
+		<div class="col-md-6">
+			<div class="inset">
+				<form name="login" action="javaScript : void(0)" >
+					<input type="hidden" name="enews" value="login">
+					<div>
+						<span><input type="text" name="userName" id = "userName" class="textbox" placeholder="账号"></span>
+					</div>
+					<div>
+						<span><input name="userPwd" id = "userPwd"  type="password" class="password" placeholder="密码"></span>
+					</div>
+					<div>
+						<span>
+							<input name="checkCode" id = "checkCode" type="text" class="textbox" placeholder="验证码" style = "width : 344px">
+							<img id="checkImg" src="../SystemAction/checkImg?MINView=JSON" onclick="change()" title="点击更换验证码" style="">
+						</span>
+					</div>
+					<!-- <div class="forreg">
+						<a href="#" class="forget">忘记密码?</a><span>|</span><a href="#" class="reg">注册</a>
+					</div> -->
+					<div class="sign">
+						<input type="button" value="登录" class="submit" id = "loginBtn">
+					</div>
+				</form>
 			</div>
 		</div>
-		</form>
-	</div>
-	<div class="footer" style="bottom: 3%;color: #00E1EB;width: 100%;text-align: center;position: fixed;left: 0;">
-		 
 	</div>
-	<script type="text/javascript">
-			$("layui-form login-kuang .layui-unselect").remove();
-	</script>
-  <script>
-  $('.footer').load('./common/footer.html');
-//获取验证码
-  function change(){
-  	var img1 = document.getElementById("checkImg");
-  	img1.src="../SystemAction/checkImg?MINView=JSON"+new Date().getTime();
-  }
+	  <script>
+			//获取验证码
+		  function change(){
+		  	var img1 = document.getElementById("checkImg");
+		  	img1.src="../SystemAction/checkImg?MINView=JSON"+new Date().getTime();
+		  }
   
-    $(".layui-unselect").remove();
-    layui.use(['layer', 'form'], function() {
-      var form = layui.form,
-        $ = layui.jquery;
-      
-      $('#forgot').on('click', function() {
-        layer.msg('请联系管理员.');
-      });
-      $("#loginName").val(getSpVal("loginUserName"));
-      //监听提交
-      form.on('submit(login_hash)', function(data) {
-    	  clearLove();
-       // layer.msg(JSON.stringify(data.field));
-        var userName = data.field.loginName;
-		var userPwd = data.field.password;
-		var imgCode = data.field.imgCode;
-		// 如果密码是选中状态
-		var reMak = data.field.rememberMe;
-		$.request({
-			action : "SystemAction/login",
-			data : {
-					userName : userName,//用户名
-					userPwd : userPwd//密码
-					,checkCode:imgCode
-				},
-			success : function(data) {/* debugger */
-				setTempVal("isLogin", true);
-				setSpVal("loginUserChannel", data.channel);
-				if(reMak == 'on') {
-					setSpVal("loginUserName", userName);
-				}
-				if(data.MINStatus == '0'){
-					window.location.href='index.html';
-				}
-				else {
-					layer.alert(data.MINErrorMessage, {
-						icon: 5,
-						title: "提示"
-					}); 
-				}
-			},
-			error : function(data) {
-				 layer.alert(data.MINErrorMessage, {
-						icon: 5,
-						title: "提示"
-				}); 
-			}
-		});	
-		
-
-        return false;
-      });
-    });
+			$("#loginBtn").click(function(){
+				var userName = $("#userName").val();
+				var userPwd = $("#userPwd").val();
+				var checkCode = $("#checkCode").val();
+				$.request({
+					action : "SystemAction/login",
+					data : {
+							userName : userName,//用户名
+							userPwd : userPwd//密码
+							,checkCode : checkCode
+						},
+					success : function(data) {
+						setTempVal("isLogin", true);
+						setSpVal("loginUserChannel", data.channel);
+						if(data.MINStatus == '0'){
+							window.location.href='index.html';
+						}
+						else {
+							layer.alert(data.MINErrorMessage, {
+								icon: 5,
+								title: "提示"
+							}); 
+						}
+					},
+					error : function(data) {
+						 layer.alert(data.MINErrorMessage, {
+								icon: 5,
+								title: "提示"
+						}); 
+					}
+				});	
+			})
+					
   </script>
 </body>
-
 </html>

+ 62 - 7
src/main/webapp/admin/reprotManage/dataWare.html

@@ -16,6 +16,7 @@
 				<button class="order-bnt1 layui-btn" onclick="reloadSearch()" >查询</button>
 				<button class="layui-btn order-bnt2" onclick="reset()">重置</button>
 				<button class="order-bnt2 layui-btn" onclick="uploadExcel()">导入</button>
+				<button class="order-bnt2 layui-btn" onclick="downLoadExcel()">导出</button>
 				<a href="#" id="toggle" class="top">收起</a>
 			</div>
 		</div>
@@ -32,6 +33,10 @@
 					<label class="f12-gray4">文件名称:</label>
 					<input name="fileName"  id ="fileName" autocomplete="off" placeholder="请输入文件名称" class="search-select" onchange = "changeSelectCon(1,this,'inp')">
 				</div>
+				<div class="layui-inline">
+					<label class="f12-gray4">数据类型:</label>
+					<div id = "fileTypeDiv" class="layui-inline"></div>
+				</div>
 			</div>
 		</form>
 	</div>
@@ -53,7 +58,7 @@
 	
      var table;
      var form;
-     layui.use(['table','laydate'], function(){
+     layui.use(['table','laydate', 'form'], function(){
     	  var laydate = layui.laydate;
     	  laydate.render({ 
     		  elem: '#date'
@@ -63,6 +68,31 @@
     			  changeSelectCon(0,"date",'date',value)
   			  }
 		  });
+		  form = layui.form;
+    	  $.request({
+				action : 'BranchFileTypeAction/branchFileTypeQuery',
+				data : {
+				},
+				success : function(data) {
+					var html = '<select id = "fileType"><option value = "">请选择</option>';
+					var fileTypeList = data.data;
+					for (var i = 0; i < fileTypeList.length; i ++) {
+						var fileTypeInf = fileTypeList[i];
+						html += '<option value = "' + fileTypeInf.id +'">' + fileTypeInf.name + '</option>';
+					}
+					html += '</select>';
+					$("#fileTypeDiv").html(html);
+					form.render();
+					
+					form.on('select', function(data){
+						changeSelectCon(2,data.elem,"sel")
+					});      
+				},
+				error : function(data2) {
+					$.ErrorAlert(data2.MINErrorMessage);
+				}
+	  	});
+    	  
     	  
 		  table = layui.table;
 		  
@@ -78,7 +108,8 @@
 		    ,cols: [[ //表头
 		      {field:'num', title: '序号',width:'5%', type:'numbers', align: 'center'}
 		      ,{field: 'uploadDate', title: '时间', width:'10%', sort: true}
-		      ,{field: 'fileName', title: '文件名称', width:'30%'}
+		      ,{field: 'typeName', title: '数据类型', width:'10%'}
+		      ,{field: 'fileName', title: '文件名称', width:'20%'}
 		      ,{field: 'userName', title: '导入人员', width:'10%'}
 		      ,{field: 'dataNum', title: '数据条数', width: '10%', sort: true}
 		      ,{field: 'operate', title: '操作', width: '25%', toolbar: '#barDemo', fixed : 'right'}
@@ -122,6 +153,7 @@
       function reloadSearch (t) {
 	    	var fileName = $("#fileName").val();
 	    	var date = $("#date").val();
+	    	var type = $("#fileTypeDiv").find("select option:selected").val();
 	        //执行重载
  		    table.reload('tableTest', {
  		        page: {
@@ -129,7 +161,8 @@
  		        }
  		        ,where: {
  		        	date : date,
- 		        	fileName : fileName
+ 		        	fileName : fileName,
+ 		        	type : type
  		        }
  		     });
  		 if (t == 1) {
@@ -146,6 +179,23 @@
     	  var openPageId = pageId + "-01";
     	  openMainTabPage(openPageId, "导入", "reprotManage/dataWareUpload.html?pageId="+openPageId, '', pageId, reloadSearch);
       }
+      function downLoadExcel(){
+    	  
+    	  var date = $("#date").val();
+	  	  var type = $("#fileTypeDiv").find("select option:selected").val();
+	  	  if (isEmpty(date)) {
+	  		  $.ErrorAlert("请选择日期范围!");
+	  		  return;
+	  	  }
+	  	  if (isEmpty(type)) {
+	  		  $.ErrorAlert("请选择数据类型!");
+	  		  return;
+	  	  }
+		  var param = {};
+	  	  param.date = date;
+	  	  param.type = type;
+    	  exportExcel("../../DataWareManageAction/fileDataDownload", param);
+      }
       
       function showDetail(data){
     	  var openPageId = pageId + "-02";
@@ -172,19 +222,18 @@
    				}
    			}
    		} else {
-   			if (isEmpty($(t).val())) {
+   			if (isEmpty($(t).val()) && isEmpty($(t).find("select option:selected").val())) {
    				$("#search" + index).remove();
    			} else {
    				$("#search" + index).remove();
    				if (isEmpty($("#search" + index).attr("name"))) {
-   					$(t).attr("id","subjects");
    					$("#conditions").append(getSelectConHtml(index, t, type));
    				}
    			}
    		}
    	}
     	
-	var array = new Array('上传日期','文件名称');
+	var array = new Array('上传日期','文件名称', '数据类型');
 	function getSelectConHtml(index, t, type,dateValue){
 		var name;
 		if (type == "date") {
@@ -200,7 +249,7 @@
 			value = dateValue;
 		}
 		if(type == "sel"){
-			value = $("#stateDiv").find("option:selected").text();
+			value = $(t).find("option:selected").text();
 		}
 		var html = '<div class="fl xuanzhong-active" id = "search' + index + '" name = "' + name + '" onclick = "removeSearch(this)">' +
 						'<div class="fl">' + array[index] + '</div>' +
@@ -218,6 +267,12 @@
 			$(t).remove();
 		} else {
 			$("#"+$(t).attr("name")).val('');
+			var tagName = $("#"+$(t).attr("name")).get(0).tagName;
+			if ("SELECT" == tagName) {
+				console.log($("#"+$(t).attr("name")).next())
+				console.log($("#"+$(t).attr("name")).next().find("input"))
+				$($("#"+$(t).attr("name")).next().find("input")).val('');
+			}
 			$(t).remove();
 		}
 	}

+ 2 - 2
src/main/webapp/admin/tqtd/reportProduceTqtd.html

@@ -67,8 +67,8 @@
 	      <button type="button" class="layui-btn" style = "width : 214px" onclick = "tableYulan()">下一步</button>
 	    </div>
 	</div>
-	<div name = "step" style = "width: 80%; margin-left : 10%; height : 300px; display : none; text-align : center;">
-		<div style = "width: 80%; margin-left : 0px;" class = "layui-upload-drag" >
+	<div name = "step" style = "width: auto; height : 300px; display : none; text-align : center;">
+		<div style = "width: auto; margin-left : 0px;" class = "layui-upload-drag" >
 		  <p id = "fileName" contenteditable="true">国网泰安供电公司2020年8月份配网运行分析月报</p>
 		  <table id = "reportTable" class="layui-table" style = "display : none">
 		  </table>

+ 240 - 0
src/main/webapp/admin/zdtty/reportManageZdtty2.html

@@ -0,0 +1,240 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <title>报表管理</title>
+    <script src="../../js/min-loader-next.js"></script>
+</head>
+<body class="content">
+	<div class="order-body">
+		<div class="order-tiaojian back-gray">
+			<div class="tiaojian-part1" id = "conditions">
+				<div class="fl f12-gray4-op">所选条件:</div>
+			</div>
+			<div class="tiaojian-part2 fr  demoTable">
+				<button class="order-bnt1 layui-btn" onclick="reloadSearch()" >查询</button>
+				<button class="layui-btn order-bnt2" onclick="reset()">重置</button>
+				<button class="order-bnt2 layui-btn" onclick="uploadExcel()">报表生成</button>
+				<a href="#" id="toggle" class="top">收起</a>
+			</div>
+		</div>
+		<form class="layui-form" action="" id = "formRole">
+			<div class="order-select back-border" id="content">
+				<div class="d-dashed" style="margin: 10px 0;"></div>
+				<div class="layui-inline">
+					<label class="f12-gray4">生成日期:</label>
+					<div class="layui-input-inline" style="position: relative;">
+						<input type="text" class="layui-input" id="date" placeholder="请选择日期" readOnly/>
+					</div>
+				</div>
+				<div class="layui-inline">
+					<label class="f12-gray4">文件名称:</label>
+					<input name="fileName"  id ="fileName" autocomplete="off" placeholder="请输入文件名称" class="search-select" onchange = "changeSelectCon(1,this,'inp')">
+				</div>
+			</div>
+		</form>
+	</div>
+	<div class="shadow-content" style="margin:1.5rem;">
+    	<table id="tableTest" lay-filter="tableFilter"></table>
+	</div>
+	<script type="text/html" id="barDemo">
+		<a class="layui-btn layui-btn-xs" lay-event="detail">详情查看</a>
+     	<a class="layui-btn layui-btn-xs" lay-event="downLoad">下载</a>
+		<a class="layui-btn layui-btn-xs" lay-event="delete">删除</a>
+   	</script>
+	<script type="text/html" id="algorithmBar">
+		<a class="layui-btn layui-btn-xs" lay-event="algorithmDetail">查看</a>
+   	</script>
+    <script>
+    
+    
+	$("#toggle").click(function() {
+		$(this).html($("#content").is(":hidden") ? "收起" + "<i class='iconfont up iconSelect_drop-down'/></i>" : "展开" +
+			"<i class='iconfont up iconSelect_drop-down'/></i>");
+		$("#content").slideToggle();
+	});
+	var pageId = "230001";
+	// 终端投托运报表
+	var reportType = "ZDTTYBB2";
+	
+	var timeType = getQueryString("timeType");// 00日报01周报02月报
+	
+     var table;
+     var form;
+     layui.use(['table','laydate','form'], function(){
+    	  var laydate = layui.laydate;
+    	  laydate.render({ 
+    		  elem: '#date'
+    		  ,type: 'date'
+    		  ,range: true
+    		  ,done: function(value, date, endDate){
+    			  changeSelectCon(0,"date",'date',value)
+  			  }
+		  });
+    	  
+		  table = layui.table;
+		  
+		  // 加载数据
+		  table.render({
+			id: 'tableTest'
+		    ,elem: '#tableTest'
+		    ,limit:10
+		    ,url: 'ReportManageAction/reportInfQuery' //数据接口
+		    ,method: 'post'
+		    ,where:{MINView:"JSON", timeType : timeType, reportType : reportType}
+		    ,page: true //开启分页
+		    ,cols: [[ //表头
+		      {field:'num', title: '序号',width:'5%', type:'numbers', align: 'center'}
+		      ,{field: 'uploadDate', title: '生成时间', width:'15%', sort: true}
+		      ,{field: 'fileName', title: '报表名称', width:'30%'}
+		      ,{field: 'algorith', title: '算法', width: '10%', toolbar: '#algorithmBar'}
+		      ,{field: 'operate', title: '操作', width: '40%', toolbar: '#barDemo', fixed : 'right'}
+		    ]]
+		    ,done: function(res, curr, count){
+		    }
+		    ,even: true //开启隔行背景
+		  });
+		  
+		 // 监听工具条(操作)
+		  table.on('tool(tableFilter)', function(obj){ //注:tool是工具条事件名,tableFilter是table原始容器的属性 lay-filter="对应的值"
+		    var data = obj.data; //获得当前行数据
+		    var layEvent = obj.event; //获得 lay-event 对应的值(也可以是表头的 event 参数对应的值)
+		    var tr = obj.tr; //获得当前行 tr 的DOM对象
+		    if (layEvent === 'detail'){ //查看
+		    	showDetail(data);
+		    } else if(layEvent === 'downLoad'){
+		    	window.open("../../ReportManageAction/reportDownLoad?reportId=" + data.id);
+		    } else if(layEvent === 'delete'){
+		    	layer.confirm('确认删除?', function(index){
+	        		layer.close(index);
+			    	$.request({
+						action : 'ReportManageAction/reportInfDelete',
+						data : {
+							reportId : data.id
+						},
+						success : function(data1) {
+							$.SuccAlert("操作成功!");
+							reloadSearch();
+						},
+						error : function(data2) {
+							$.ErrorAlert(data2.MINErrorMessage);
+						}
+		    	  	});
+	      		});
+		    } else if (layEvent === 'algorithmDetail'){ // 算法查看
+		    	algorithmDetail(data);
+		    }
+		  });
+	 });
+      
+      function reloadSearch (t) {
+	    	var fileName = $("#fileName").val();
+	    	var date = $("#date").val();
+	        //执行重载
+ 		    table.reload('tableTest', {
+ 		        page: {
+ 		        	curr: 1 //重新从第 1 页开始
+ 		        }
+ 		        ,where: {
+ 		        	date : date,
+ 		        	fileName : fileName
+ 		        }
+ 		     });
+ 		 if (t == 1) {
+     		  $.Alert("修改成功"); 
+     	 }
+      }
+      
+      function reset(){
+    	  $('#formRole')[0].reset();
+    	  $("#conditions").html('<div class="fl f12-gray4-op">所选条件:</div>');
+      }
+      
+      function uploadExcel(){
+    	  var openPageId = pageId + "-01";
+    	  openMainTabPage(openPageId, "导入", "zdtty/reportProduceZdtty2.html?pageId="+openPageId+"&reportType="+reportType, '', pageId, reloadSearch);
+      }
+      
+      function showDetail(data){
+    	  var openPageId = pageId + "-02";
+    	  openMainTabPage(openPageId, "详情查看", "zdtty/reportManageDetailZdtty.html?pageId="+openPageId+"&reportId="+data.id+"&type="+data.type+"&typeId="+data.typeId+"&fileName="+chineseUrlEncode(data.fileName), '', pageId, null);
+      }
+      function algorithmDetail(data){
+   	  	var openPageId = pageId + "-04";
+		openMainTabPage(openPageId, "算法详情", "reprotManage/reportAlgorithm.html?pageId="+openPageId+"&reportTypeId="+data.typeId, '', pageId, null);
+      }
+      
+   	function changeSelectCon(index, t, type, dateValue){
+   		if (type == "date") {
+   			if (isEmpty(dateValue)) {
+   				$("#search" + index).remove();
+   			} else {
+   				$("#search" + index).remove();
+   				if (isEmpty($("#search" + index).attr("name"))) {
+   					$("#conditions").append(getSelectConHtml(index, t, type,dateValue));
+   				}
+   			}
+   		} else if (type == 'inp') {
+   			if (isEmpty($(t).val())) {
+   				$("#search" + index).remove();
+   			} else {
+   				$("#search" + index).remove();
+   				if (isEmpty($("#search" + index).attr("name"))) {
+   					$("#conditions").append(getSelectConHtml(index, t, type));
+   				}
+   			}
+   		} else {
+   			if (isEmpty($(t).val())) {
+   				$("#search" + index).remove();
+   			} else {
+   				$("#search" + index).remove();
+   				if (isEmpty($("#search" + index).attr("name"))) {
+   					$(t).attr("id","subjects");
+   					$("#conditions").append(getSelectConHtml(index, t, type));
+   				}
+   			}
+   		}
+   	}
+    	
+	var array = new Array('生成日期','文件名称');
+	function getSelectConHtml(index, t, type,dateValue){
+		var name;
+		if (type == "date") {
+			name = $("#"+t).attr("id");
+		} else {
+			name = $(t).attr("id");
+		}
+		var value;
+		if(type == "inp"){
+			value = t.value.substr(0,5)+"..";
+		}
+		if (type == "date") {
+			value = dateValue;
+		}
+		if(type == "sel"){
+			value = $("#stateDiv").find("option:selected").text();
+		}
+		var html = '<div class="fl xuanzhong-active" id = "search' + index + '" name = "' + name + '" onclick = "removeSearch(this)">' +
+						'<div class="fl">' + array[index] + '</div>' +
+						':<span>'+value+'</span>' +
+						'<svg class="icon" aria-hidden="true">' +
+						  '<use xlink:href="#iconicon_close1"></use>' +
+						'</svg>' +
+					'</div>';
+		return html;
+	}
+	function removeSearch(t) {
+		if ($(t).attr("name") == 'subjects') {
+			initSelect('stateDiv', "COMPANY_STATE", "state", '', true); 
+			form.render();
+			$(t).remove();
+		} else {
+			$("#"+$(t).attr("name")).val('');
+			$(t).remove();
+		}
+	}
+    </script>
+</body>
+
+</html>

+ 2 - 2
src/main/webapp/admin/zdtty/reportProduceZdtty.html

@@ -65,8 +65,8 @@
 	      <button type="button" class="layui-btn" style = "width : 214px" onclick = "tableYulan()">下一步</button>
 	    </div>
 	</div>
-	<div name = "step" style = "width: 80%; margin-left : 10%; height : 300px; display : none; text-align : center;">
-		<div style = "width: 100%; margin-left : 0px;" class = "layui-upload-drag" >
+	<div name = "step" style = "width: auto; height : 300px; display : none; text-align : center;">
+		<div style = "width: auto; margin-left : 0px;" class = "layui-upload-drag" >
 		  <p id = "fileName" contenteditable="true">国网泰安供电公司2020年8月份配网运行分析月报</p>
 		  <table id = "reportTable" class="layui-table">
 		  </table>

+ 348 - 0
src/main/webapp/admin/zdtty/reportProduceZdtty2.html

@@ -0,0 +1,348 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <title>导入</title>
+    <script src="../../js/min-loader-next.js"></script>
+    <script src="../../js/report.js"></script>
+    <link rel="stylesheet" href="../../plugins/layui/lay/modules/steps/style.css"></link>
+    <style>
+    	.layui-input {
+    		width : 200px;
+    	}
+    	.layui-upload-drag .layui-icon {
+    		font-size: 18px;
+		    color: #fff;
+		}
+		.layui-btn-sm {
+		    height: 22px;
+		    line-height: 22px;
+		    padding: 0 10px;
+		    font-size: 12px;
+		}
+    </style>
+</head>
+<body class="content">
+	<div id="step_demo" class="step-body" style = "margin-top : 20px; margin-left: 10%;">
+	    <div class="step-header" style="width:80%;overflow: hidden;">
+	        <ul>
+	            <li>
+	                <span class="step-name">选择报告/报表</span>
+	            </li>
+	            <li>
+	                <span class="step-name">选择文件</span>
+	            </li>
+	            <li>
+	                <span class="step-name">数据预览</span>
+	            </li>
+	            <li>
+	                <span class="step-name">生成报告/报表</span>
+	            </li>
+	        </ul>
+	    </div>
+	</div>
+	<div class="order-body" style = "width: 80%; margin-left : 10%;height : 450px" name = "step">
+		<form class="layui-form" style = "text-align : center;">
+			<div class="order-select" id="content" style = "background: #FFFFFF;border-radius: 8px;padding: 16px 1.4rem;">
+				<div class="layui-inline" style="margin-top: 150px;">
+					<label class="f12-gray4">请选择文件类型:</label>
+					<div id = "reportTypeDiv" class="layui-inline">
+					</div>
+				</div>
+				<div style="margin-top : 200px;">
+			      <button type="button" class="layui-btn" style = "width : 214px" onclick = "goStep(2)">下一步</button>
+			    </div>
+			</div>
+		</form>
+	</div>
+	<div name = "step" style = "width: 80%; margin-left : 10%;height : 300px; display : none; text-align : center;">
+		<div style = "width: 80%; margin-left : 0px; height : 200px" class = "layui-upload-drag" >
+			<button type="button" class="layui-btn" style = "width : 214px" id = "firstButton" onclick = "chooseZddtyFile(this)">选择报表</button>
+			<button type="button" class="layui-btn" style = "width : 214px" id = "secondButton">对比文件</button>
+		</div>
+		<div style="margin-top : 50px;">
+	      <button type="button" class="layui-btn" style = "width : 214px" id = "uploadBtn">下一步</button>
+	    </div>
+	</div>
+	<div name = "step" style = "width: auto; height : 300px; display : none; text-align : center;">
+		<div style = "width: auto; margin-left : 0px;" class = "layui-upload-drag" >
+		  <p id = "fileName" contenteditable="true">国网泰安供电公司2020年8月份配网运行分析月报</p>
+		  <table id = "reportTable" class="layui-table">
+		  </table>
+		  <p id = "content"></p>
+		  <p>报表关联的工具表为《<a id = "utilName" onclick = "goUtilDetail(this)">2020年6月底低电压月报工具表</a>》  关联的报表算法为《<a id = "algorithmName" onclick = "goAlgorithmDetail(this)">国网泰安供电公司2020年8月份配网运行分析月报</a>》    的算法</p>
+		</div>
+		<div style="margin-top : 50px;">
+	      <button type="button" class="layui-btn" style = "width : 214px" onclick = "goStep(4)">下一步</button>
+	    </div>
+	</div>
+	<div name = "step" style = "width: 80%; margin-left : 10%;height : 300px; display : none; text-align : center; margin-top : 50px;">
+		<i class="layui-icon layui-icon-ok-circle" style="font-size: 100px; color: #009688;"></i>
+		<p style = "font-weight: 700;font-size: 25px;">报表生成成功!</p>
+		<p style = " color: #b2bbc2;">可在数据仓库-报表管理进行查看</p>
+		<div style="margin-top : 100px;">
+	      <button type="button" class="layui-btn" style = "width : 214px" onclick = "finish()">完成</button>
+	    </div>
+	</div>
+	
+    <script>
+		var pageId = getQueryString("pageId");
+		// 报告类型
+		var reportType = getQueryString("reportType");
+		
+		var $step;
+		layui.config({
+	        base: '../../plugins/layui/lay/modules/steps/'
+	    }).use(['steps','jquery'],function(){
+	    	var $ = layui.$;
+    	    $step = $("#step_demo").step();
+		})
+		
+		layui.use('laydate', function(){
+			var laydate = layui.laydate;
+			// 报告日报日期选择
+			laydate.render({
+				elem : '#dayRange'
+				,format : 'yyyyMMdd'
+				,done: function(value, date, endDate){
+					console.log(value); //得到日期生成的值,如:2017-08-18
+					var fileName = $("#fileName").html();
+					if (fileName.indexOf("-") != -1) {
+						$("#fileName").html(fileName.split("-")[0]+value);
+					} else {
+						$("#fileName").html(fileName+"-" + value);
+					}
+				}
+			});
+			// 报告日期范围选择
+			laydate.render({
+				elem : '#dateRange'
+				,format : 'yyyyMMdd'
+				,range : true
+				,done: function(value, date, endDate){
+					console.log(value); //得到日期生成的值,如:2017-08-18
+					var fileName = $("#fileName").html();
+					if (fileName.indexOf("-") != -1) {
+						$("#fileName").html(fileName.split("-")[0]+value);
+					} else {
+						$("#fileName").html(fileName+"-" + value);
+					}
+				}
+			});
+			//时间范围
+			laydate.render({ 
+			  elem : '#timeRange'
+			  ,type : 'time'
+			  ,format : 'HHmmss'
+			  ,value : '000000 - 235959'
+			  ,range : true
+			});
+		});
+		
+		// 范围类型
+		layui.use('form', function(){
+			var form = layui.form;
+			$.request({
+				action : 'BranchReportTypeAction/branchReportTypeQuery',
+				data : {
+					reportType : reportType
+				},
+				success : function(data) {
+					var html = '<select id = "reportType" lay-filter="reportTypeFilter"><option value = "">请选择</option>';
+					var fileTypeList = data.data;
+					for (var i = 0; i < fileTypeList.length; i ++) {
+						var fileTypeInf = fileTypeList[i];
+						html += '<option value = "' + fileTypeInf.id + '_' + fileTypeInf.type + '_' + fileTypeInf.timeType + '">' + fileTypeInf.name + '</option>';
+					}
+					html += '</select>';
+					$("#reportTypeDiv").html(html);
+					form.render();
+				},
+				error : function(data2) {
+					$.ErrorAlert(data2.MINErrorMessage);
+				}
+    	  	});
+			
+			form.on('select(reportTypeFilter)', function(data){
+				var value = data.value;
+				if (!isEmpty(value)) {
+					var reportTypeId = value.split("_")[0];
+					
+					$("#fileName").html(data.elem.selectedOptions[0].text);
+					
+					if (!isEmpty(reportTypeId)) {
+						  $.request({
+								action : 'BranchReportTypeAction/fileTypeOfReportType',
+								data : {
+									reportTypeId : reportTypeId
+								},
+								success : function(data) {
+									fileType = data.data;
+									setTempVal("fileType", fileType);
+									
+									var utilDataInf = data.utilDataInf;
+									if (!isEmpty(utilDataInf)) {
+										$("#utilName").html(utilDataInf.fileName);
+										$("#utilName").attr("fileName", utilDataInf.fileName);
+										setTempVal("utilExcelDataDetail", utilDataInf.excelData);
+										var algorithmInf = data.algorithmInf;
+										if (!isEmpty(algorithmInf)) {
+											$("#algorithmName").html(utilDataInf.fileName+"算法");
+											$("#algorithmName").attr("reportTypeId", reportTypeId);
+										}
+									}
+									
+								},
+								error : function(data2) {
+									$.ErrorAlert(data2.MINErrorMessage);
+								}
+				    	  });
+					  }
+				}
+			});      
+		})
+		
+		function goStep (step) {
+			var reportInf = $("#reportTypeDiv").find("select option:selected").val();
+			
+			if (step == 2) {
+				if (isEmpty(reportInf)) {
+					$.ErrorAlert("请选择上传文件类型!");
+					return;
+				}
+				var reportType = reportInf.split("_")[0];
+				// 台区停电日报
+				if ("TQTDRB" == reportType) {
+					$("body").find("[name='TQTDRB']").show();
+				}
+			}
+			
+			if (step == 4) {
+				var firstFileId = $("#firstButton").attr("fileId");
+				if (isEmpty(firstFileId)) {
+					$.ErrorAlert("请选择文件!");
+					return;
+				}
+				
+				var fileName = $("#fileName").html();
+				$.request({
+					action : 'ReportManageAction/fileInfReportSubmit',
+					data : {
+						reportData : JSON.stringify(excelList),
+						reportInf : reportInf,
+						fileName : fileName,
+						firstFileId : firstFileId
+					},
+					success : function(data) {
+						if (data.code == 0) {
+							$step.goStep(step);
+							var stepDiv = $("div[name = 'step']");
+							for (var i = 0; i < stepDiv.length; i ++) {
+								if (step == (i + 1)) {
+									$(stepDiv[i]).show();
+								} else {
+									$(stepDiv[i]).hide();
+								}
+							}
+				    	} else {
+				    		$.ErrorAlert(res.MINErrorMessage);
+				    	}
+					},
+					error : function(data2) {
+						$.ErrorAlert(data2.MINErrorMessage);
+					}
+	    	  	});
+				return;
+			}
+			
+			$step.goStep(step);
+			var stepDiv = $("div[name = 'step']");
+			for (var i = 0; i < stepDiv.length; i ++) {
+				if (step == (i + 1)) {
+					$(stepDiv[i]).show();
+				} else {
+					$(stepDiv[i]).hide();
+				}
+			}
+		}
+		
+		function finish() {
+			deleteTabPageParent(pageId); 
+		}
+		
+		// 查看工具表详情
+		function goUtilDetail(t) {
+			var fileName = $(t).attr("fileName");
+			var openPageId = pageId + "-01";
+			openMainTabPage(openPageId, "详情查看", "reprotManage/utilExcelDetail.html?pageId="+openPageId+"&fileName="+chineseUrlEncode(fileName), '', pageId, null);
+		}
+		// 查看算法详情
+		function goAlgorithmDetail(t) {
+			var reportTypeId = $(t).attr("reportTypeId");
+			var openPageId = pageId + "-02";
+			openMainTabPage(openPageId, "详情查看", "reprotManage/reportAlgorithm.html?pageId="+openPageId+"&reportTypeId="+reportTypeId, '', pageId, null);
+		}
+		
+		// 报表excel
+		var excelList = null;
+		
+		// 选择报表文件
+		function chooseZddtyFile(t) {
+			var buttonId = $(t).attr("id");
+			setTempVal("buttonId",buttonId);
+			var openPageId = pageId + "-04";
+			openMainTabPage(openPageId, "选择报表数据", "common/chooseZddty.html?pageId="+openPageId+"&reportType="+reportType, '', pageId, chooseZddtyComplete);
+		}
+		// 选择数据仓库文件返回
+		function chooseZddtyComplete() {
+			var dataWareData = getTempVal("zddtyReport");
+			if (isEmpty(dataWareData) || dataWareData.length == 0) {
+				return;
+			}
+			$("#firstButton").attr("fileId", dataWareData.id);
+		}
+		
+		layui.use('upload', function(){
+			var $ = layui.jquery
+			,upload = layui.upload;
+			
+			  //拖拽上传
+			upload.render({
+			    elem: '#secondButton'
+			    ,url: '../../ReportManageAction/reportNeedDataDetail'
+			    ,auto: false
+			    ,bindAction: '#uploadBtn'
+		    	,accept: 'file' 
+		    	,field: 'file'
+	    	    ,exts: 'xls|xlsx'
+				,before: function(obj){ 
+   	    		    layer.load(); //上传loading
+   	    			var reportInf = $("#reportTypeDiv").find("select option:selected").val();
+   	    			var firstFileId = $("#firstButton").attr("fileId");
+	   	 			if (isEmpty(firstFileId)) {
+	   	 				$.ErrorAlert("请选择文件!");
+	   	 				return;
+	   	 			}
+   	    			this.data = {reportInf : reportInf, firstFileId : firstFileId};
+   	    		}
+			    ,done: function(res){
+			    	layer.closeAll('loading'); //关闭loading
+			    	if (res.code == 0) {
+			    		excelList = res.data.resList;
+						initExcelData(excelList, "reportTable", false);
+						goStep(3);
+			    	} else {
+			    		$.ErrorAlert(res.MINErrorMessage);
+			    	}
+			    }
+			    ,error: function(index, upload){
+			    	layer.closeAll('loading'); //关闭loading
+			    	$.ErrorAlert("操作失败!");
+			    }
+			});
+		})
+    </script>
+</body>
+
+</html>

+ 8 - 8
src/main/webapp/build/css/app.css

@@ -102,7 +102,7 @@ button {
 	line-height: 40px;
 }
 .kit-theme .kit-layout-admin .layui-header{
-	background: #00A0E8;
+	background: #012e29;
 	border-bottom: none;
 	box-shadow:0px 2px 4px 2px rgba(20,65,129,0.1);
 	position: fixed;
@@ -110,7 +110,7 @@ button {
 	top: 0px;
 }
 .layui-layout-left .layui-nav-item:hover{
-	background:#00A0E8;
+	background:#012e29;
 }
 .kit-nav .layui-nav-item .w-line{
 	height: 3px;
@@ -129,7 +129,7 @@ button {
 }
 
 .kit-nav .layui-this {
-    background-color: #00A0E8!important;
+    background-color: #012e29!important;
 }
 
 .kit-nav * {
@@ -137,7 +137,7 @@ button {
 }
 
 .layui-layout-left .layui-nav-item:hover {
-    background-color: #00A0E8 !important;
+    background-color: #012e29 !important;
 }
 
 .kit-nav .layui-nav-bar {
@@ -178,7 +178,7 @@ button {
 
 .kit-side .layui-side-scroll {
     width: auto;
-    background:#00A0E8;
+    background:#012e29;
 }
 
 .kit-side .layui-side-scroll .kit-side-fold {
@@ -585,16 +585,16 @@ button {
 	transition: all .3s;
 }
 .layui-nav-tree .layui-nav-item a:hover{
-		    background:#00A0E8;	
+		    background:#012e29;	
 }
 .delete-btn-icon img:hover{
 	transform: rotate(180deg);
 }
 .layui-layout-admin .layui-side{
-	   background:#00A0E8;
+	   background:#012e29;
 }
 .layui-layout-admin .layui-side .layui-nav {
-	    background:#00A0E8;
+	    background:#012e29;
 }
 .layui-layout-admin .layui-side .kit-side-fold{
 	background: #213046;

+ 27 - 27
src/main/webapp/js/report.js

@@ -24,11 +24,11 @@ function reportTable(excelList, typeId, isEdit,isType) {
 		var excelChildList = excelList[i];
 		for (var j = 0; j < excelChildList.length; j ++) {
 			if (isEdit) {
-				editHtml = '<td contenteditable = "true" onblur = "reportChange(this, ' + typeId + ',' + i + ', '+ j + ')">';
+				editHtml = '<td style = "width : 100px;height: 20px;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;" contenteditable = "true" onblur = "reportChange(this, ' + typeId + ',' + i + ', '+ j + ')">';
 			} else {
 				editHtml = '<td>';
 			}
-			html += editHtml + (isEmpty(excelChildList[j])?'':excelChildList[j]) + '</td>';
+			html += editHtml + '<div style = "width : 100px;height: 20px;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;">' + (isEmpty(excelChildList[j])?'':excelChildList[j]) + '</div></td>';
 		}
 		html += '</tr>';
 	}
@@ -66,48 +66,48 @@ function tableCountTQTDRB(t, typeId, rowIndex, colIndex) {
 	// 停电次数行
 	var editCountTds = $($(trsDom)[2]).find("td");
 	// 停电率数行
-	var editlvTds = $($(trsDom)[3]).find("td");
+	var editlvTds = $($(trsDom)[4]).find("td");
 	// 停电三次以上
-	var sanciTds = $($(trsDom)[4]).find("td");
+	var sanciTds = $($(trsDom)[5]).find("td");
 	
 	if ((rowIndex == 1 || rowIndex == 2 ||  rowIndex == 4) && (colIndex != 0 && colIndex != 9)) {
 		// 修改台区数量
 		if (rowIndex == 1) {
-			var editNum = $(t).html();
+			var editNum = $(t).find("div").html();
 			// 对应停电次数
-			var editCount = $(editCountTds[colIndex]).html();
+			var editCount = $(editCountTds[colIndex]).find("div").html();
 			// 对应停电率
-			$(editlvTds[colIndex]).html(accMul(accDivFun(editCount, editNum, 4), 100, 2) + "%");
+			$(editlvTds[colIndex]).find("div").html(accMul(accDivFun(editCount, editNum, 4), 100, 2) + "%");
 			// 台区总数
 			var totalNum = "0";
 			for (var i = 1; i < (editNumTds.length - 1); i ++) {
-				totalNum = accAdd($(editNumTds[i]).html(), totalNum);
+				totalNum = accAdd($(editNumTds[i]).find("div").html(), totalNum);
 			}
-			$(editNumTds[editNumTds.length - 1]).html(totalNum);
+			$(editNumTds[editNumTds.length - 1]).find("div").html(totalNum);
 			// 停电总次数
-			var totalCount = $(editCountTds[editCountTds.length - 1]).html();
-			$(editlvTds[editlvTds.length - 1]).html(accMul(accDivFun(totalCount, totalNum, 4), 100, 2) + "%");
+			var totalCount = $(editCountTds[editCountTds.length - 1]).find("div").html();
+			$(editlvTds[editlvTds.length - 1]).find("div").html(accMul(accDivFun(totalCount, totalNum, 4), 100, 2) + "%");
 		// 修改台区停电次数
 		} else if (rowIndex == 2) {
-			var editCount = $(t).html();
+			var editCount = $(t).find("div").html();
 			// 对应台区数量
-			var editNum = $(editNumTds[colIndex]).html();
+			var editNum = $(editNumTds[colIndex]).find("div").html();
 			// 对应停电率
-			$(editlvTds[colIndex]).html(accMul(accDivFun(editCount, editNum, 4), 100, 2));
+			$(editlvTds[colIndex]).find("div").html(accMul(accDivFun(editCount, editNum, 4), 100, 2));
 			// 台区总数
-			var totalNum = $(editNumTds[editNumTds.length - 1]).html();
+			var totalNum = $(editNumTds[editNumTds.length - 1]).find("div").html();
 			// 停电总次数
 			var totalCount = "0";
 			for (var i = 1; i < (editCountTds.length - 1); i ++) {
 				totalCount = accAdd($(editCountTds[i]).html(), totalCount);
 			}
-			$(editlvTds[editlvTds.length - 1]).html(accMul(accDivFun(totalCount, totalNum, 4), 100, 2) + "%");
+			$(editlvTds[editlvTds.length - 1]).find("div").html(accMul(accDivFun(totalCount, totalNum, 4), 100, 2) + "%");
 		} else if (rowIndex == 4) {
 			var sanciCount = "0";
 			for (var i = 1; i < (sanciTds.length - 1); i ++) {
-				sanciCount = accAdd($(sanciTds[i]).html(), sanciCount);
+				sanciCount = accAdd($(sanciTds[i]).find("div").html(), sanciCount);
 			}
-			$(sanciTds[sanciTds.length - 1]).html(sanciCount);
+			$(sanciTds[sanciTds.length - 1]).find("div").html(sanciCount);
 		}
 	}
 }
@@ -129,23 +129,23 @@ function tableCountTQTDZB(t, typeId, rowIndex, colIndex) {
 			var heji = "0";
 			for (var i = 1; i < (trsDom.length - 1); i ++) {
 				var tdsDom = $(trsDom[i]).find("td");
-				var val = $(tdsDom[colIndex]).html();
+				var val = $(tdsDom[colIndex]).find("div").html();
 				heji = accAdd(heji, val, 2);
 			}
-			$($(trsDom[trsDom.length - 1]).find("td")[colIndex]).html(heji);
+			$($(trsDom[trsDom.length - 1]).find("td")[colIndex]).find("div").html(heji);
 		}
 		// 管理台区总数 、1个月内累计停电台次  改变会改变频次
 		if (colIndex == 1 || colIndex == 2) {
 			// 本身频次改变
-			var zongtaishu = $($(trsDom[rowIndex]).find("td")[1]).html();
-			var tingdiantaici = $($(trsDom[rowIndex]).find("td")[2]).html();
+			var zongtaishu = $($(trsDom[rowIndex]).find("td")[1]).find("div").html();
+			var tingdiantaici = $($(trsDom[rowIndex]).find("td")[2]).find("div").html();
 			var pinci = accDivFun(tingdiantaici, zongtaishu, 2);
-			$($(trsDom[rowIndex]).find("td")[5]).html(pinci);
+			$($(trsDom[rowIndex]).find("td")[5]).find("div").html(pinci);
 			// 合计频次改变
-			var zongtaishu = $($(trsDom[trsDom.length - 1]).find("td")[1]).html();
-			var tingdiantaici = $($(trsDom[trsDom.length - 1]).find("td")[2]).html();
+			var zongtaishu = $($(trsDom[trsDom.length - 1]).find("td")[1]).find("div").html();
+			var tingdiantaici = $($(trsDom[trsDom.length - 1]).find("td")[2]).find("div").html();
 			var pinci = accDivFun(tingdiantaici, zongtaishu, 2);
-			$($(trsDom[trsDom.length - 1]).find("td")[5]).html(pinci);
+			$($(trsDom[trsDom.length - 1]).find("td")[5]).find("div").html(pinci);
 		}
 	} 
 }
@@ -171,7 +171,7 @@ function initExcelData(excelList, tableId, isEdit,isType) {
 		html += '<tr>';
 		var excelChildList = excelList[i];
 		for (var j = 0; j < excelChildList.length; j ++) {
-			html += tdHtml + (isEmpty(excelChildList[j])?"":excelChildList[j]) + '</td>';
+			html += tdHtml + '<div style = "width : 100px;height: 20px;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;">' + (isEmpty(excelChildList[j])?"":excelChildList[j]) + '</div></td>';
 		}
 		html += '</tr>';
 	}