|
@@ -1,5 +1,6 @@
|
|
|
package com.jeeplus.modules.sg.managementcenter.reserveManagement.utils;
|
|
|
|
|
|
+import com.jeeplus.modules.sg.managementcenter.reserveManagement.entity.ExportScheme;
|
|
|
import com.jeeplus.modules.sg.managementcenter.reserveManagement.entity.ReserveManagement;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.poi.ss.usermodel.Cell;
|
|
@@ -9,8 +10,11 @@ import org.apache.poi.xssf.usermodel.XSSFCellStyle;
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
+import javax.xml.crypto.Data;
|
|
|
import java.io.*;
|
|
|
import java.net.URLEncoder;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
public class ReserveExportUtil {
|
|
@@ -234,111 +238,117 @@ public class ReserveExportUtil {
|
|
|
* @param workbook
|
|
|
* @param list
|
|
|
*/
|
|
|
- public void exportJlModule(HttpServletResponse response, XSSFWorkbook workbook, List<ReserveManagement> list){
|
|
|
+ public void exportJlModule(HttpServletResponse response, XSSFWorkbook workbook, List<ExportScheme> list){
|
|
|
try {
|
|
|
int index = 1;//第一列序号
|
|
|
int rowNum = 4;//数据起始列
|
|
|
Sheet sheet = workbook.getSheetAt(0);
|
|
|
for(int i=0;i<list.size();i++){
|
|
|
Row row = sheet.createRow(rowNum+i);
|
|
|
- Cell cell28 = crateCell(workbook,row,0); //交底牵头部门
|
|
|
- Cell cell29 = crateCell(workbook,row,1); //交底参与部门
|
|
|
- Cell cell30 = crateCell(workbook,row,2); //是否完成交底
|
|
|
- Cell cell31 = crateCell(workbook,row,3); //项目管理中心人员
|
|
|
- Cell cell32 = crateCell(workbook,row,4); //设计院人员
|
|
|
- Cell cell33 = crateCell(workbook,row,5); //经研所人员
|
|
|
- Cell cell34 = crateCell(workbook,row,6); //区域中心人员
|
|
|
- Cell cell35 = crateCell(workbook,row,7); //不停电作业中心人员
|
|
|
- Cell cell36 = crateCell(workbook,row,8); //作业方式
|
|
|
- Cell cell37 = crateCell(workbook,row,9); //交底完成日期
|
|
|
- Cell cell38 = crateCell(workbook,row,10); //备注
|
|
|
- Cell cell39 = crateCell(workbook,row,11); //立项说明
|
|
|
- Cell cell40 = crateCell(workbook,row,12); //不具备立项条件说明
|
|
|
- Cell cell41 = crateCell(workbook,row,13); //方案变更说明
|
|
|
- Cell cell42 = crateCell(workbook,row,14); //政处难度初判
|
|
|
- Cell cell43 = crateCell(workbook,row,15); //是否有资本设备
|
|
|
- Cell cell44 = crateCell(workbook,row,16); //是否有变电站新出线
|
|
|
- Cell cell45 = crateCell(workbook,row,17); //是否已实施
|
|
|
- Cell cell46 = crateCell(workbook,row,18); //现场情况描述
|
|
|
- Cell cell47 = crateCell(workbook,row,19); //是否有实施必要性
|
|
|
- Cell cell48 = crateCell(workbook,row,20); //实施无必要描述
|
|
|
- Cell cell49 = crateCell(workbook,row,21); //是否存在前置条件
|
|
|
- Cell cell50 = crateCell(workbook,row,22); //前置条件描述
|
|
|
- Cell cell51= crateCell(workbook,row,23); //是否存在施工方案问题
|
|
|
- Cell cell52 = crateCell(workbook,row,24); //施工方案问题描述
|
|
|
- Cell cell53 = crateCell(workbook,row,25); //现场是否存在安全隐患
|
|
|
- Cell cell54 = crateCell(workbook,row,26); //安全隐患描述
|
|
|
- Cell cell55 = crateCell(workbook,row,27); //是否需要定制物资
|
|
|
- Cell cell56 = crateCell(workbook,row,28); //定制物资描述
|
|
|
- Cell cell57 = crateCell(workbook,row,29); //是否有拆旧物资
|
|
|
- Cell cell58 = crateCell(workbook,row,30); //作业方式
|
|
|
- Cell cell59 = crateCell(workbook,row,31); //停电问题描述
|
|
|
- Cell cell60 = crateCell(workbook,row,32); //是否有土建工作量
|
|
|
- Cell cell61 = crateCell(workbook,row,33); //是否有立杆工作量
|
|
|
- Cell cell62 = crateCell(workbook,row,34); //总工作量描述
|
|
|
- Cell cell63 = crateCell(workbook,row,35); //区域中心
|
|
|
- Cell cell64 = crateCell(workbook,row,36); //供电所辖区
|
|
|
- Cell cell65 = crateCell(workbook,row,37); //政处地点
|
|
|
- Cell cell66 = crateCell(workbook,row,38); //政处类型
|
|
|
- Cell cell67 = crateCell(workbook,row,39); //政处对象
|
|
|
- Cell cell68 = crateCell(workbook,row,40); //政处描述
|
|
|
- Cell cell69 = crateCell(workbook,row,41); //是否需规划报批
|
|
|
- Cell cell70 = crateCell(workbook,row,42); //是否需办理安评航评手续
|
|
|
- Cell cell71 = crateCell(workbook,row,43); //政处难点提醒
|
|
|
+ Cell cell1 = crateCell(workbook,row,0); //项目储备编号
|
|
|
+ Cell cell2 = crateCell(workbook,row,1); //项目名称
|
|
|
+ Cell cell28 = crateCell(workbook,row,2); //交底牵头部门
|
|
|
+ Cell cell29 = crateCell(workbook,row,3); //交底参与部门
|
|
|
+ Cell cell30 = crateCell(workbook,row,4); //是否完成交底
|
|
|
+ Cell cell31 = crateCell(workbook,row,5); //项目管理中心人员
|
|
|
+ Cell cell32 = crateCell(workbook,row,6); //设计院人员
|
|
|
+ Cell cell33 = crateCell(workbook,row,7); //经研所人员
|
|
|
+ Cell cell34 = crateCell(workbook,row,8); //区域中心人员
|
|
|
+ Cell cell35 = crateCell(workbook,row,9); //不停电作业中心人员
|
|
|
+ Cell cell36 = crateCell(workbook,row,10); //作业方式
|
|
|
+ Cell cell37 = crateCell(workbook,row,11); //交底完成日期
|
|
|
+ Cell cell38 = crateCell(workbook,row,12); //备注
|
|
|
+ Cell cell39 = crateCell(workbook,row,13); //立项说明
|
|
|
+ Cell cell40 = crateCell(workbook,row,14); //不具备立项条件说明
|
|
|
+ Cell cell41 = crateCell(workbook,row,15); //方案变更说明
|
|
|
+ Cell cell42 = crateCell(workbook,row,16); //政处难度初判
|
|
|
+ Cell cell43 = crateCell(workbook,row,17); //是否有资本设备
|
|
|
+ Cell cell44 = crateCell(workbook,row,18); //是否有变电站新出线
|
|
|
+ Cell cell45 = crateCell(workbook,row,19); //是否已实施
|
|
|
+ Cell cell46 = crateCell(workbook,row,20); //现场情况描述
|
|
|
+ Cell cell47 = crateCell(workbook,row,21); //是否有实施必要性
|
|
|
+ Cell cell48 = crateCell(workbook,row,22); //实施无必要描述
|
|
|
+ Cell cell49 = crateCell(workbook,row,23); //是否存在前置条件
|
|
|
+ Cell cell50 = crateCell(workbook,row,24); //前置条件描述
|
|
|
+ Cell cell51= crateCell(workbook,row,25); //是否存在施工方案问题
|
|
|
+ Cell cell52 = crateCell(workbook,row,26); //施工方案问题描述
|
|
|
+ Cell cell53 = crateCell(workbook,row,27); //现场是否存在安全隐患
|
|
|
+ Cell cell54 = crateCell(workbook,row,28); //安全隐患描述
|
|
|
+ Cell cell55 = crateCell(workbook,row,29); //是否需要定制物资
|
|
|
+ Cell cell56 = crateCell(workbook,row,30); //定制物资描述
|
|
|
+ Cell cell57 = crateCell(workbook,row,31); //是否有拆旧物资
|
|
|
+ Cell cell58 = crateCell(workbook,row,32); //作业方式
|
|
|
+ Cell cell59 = crateCell(workbook,row,33); //停电问题描述
|
|
|
+ Cell cell60 = crateCell(workbook,row,34); //是否有土建工作量
|
|
|
+ Cell cell61 = crateCell(workbook,row,35); //是否有立杆工作量
|
|
|
+ Cell cell62 = crateCell(workbook,row,36); //总工作量描述
|
|
|
+ Cell cell63 = crateCell(workbook,row,37); //区域中心
|
|
|
+ Cell cell64 = crateCell(workbook,row,38); //供电所辖区
|
|
|
+ Cell cell65 = crateCell(workbook,row,39); //政处地点
|
|
|
+ Cell cell66 = crateCell(workbook,row,40); //政处类型
|
|
|
+ Cell cell67 = crateCell(workbook,row,41); //政处对象
|
|
|
+ Cell cell68 = crateCell(workbook,row,42); //政处描述
|
|
|
+ Cell cell69 = crateCell(workbook,row,43); //是否需规划报批
|
|
|
+ Cell cell70 = crateCell(workbook,row,44); //是否需办理安评航评手续
|
|
|
+ Cell cell71 = crateCell(workbook,row,45); //政处难点提醒
|
|
|
|
|
|
- ReserveManagement reserveManagement = list.get(i);
|
|
|
+ ExportScheme exportScheme = list.get(i);
|
|
|
|
|
|
- cell28.setCellValue(reserveManagement.getDisclosureToCoordinate());
|
|
|
- cell29.setCellValue(reserveManagement.getDisclosureParticipate());
|
|
|
- cell30.setCellValue(reserveManagement.getWhetherFinishDisclosure());
|
|
|
- cell31.setCellValue(reserveManagement.getProjectManagementPeople());
|
|
|
- cell32.setCellValue(reserveManagement.getDesigningInstitutePeople());
|
|
|
- cell33.setCellValue(reserveManagement.getIfoPeople());
|
|
|
- cell34.setCellValue(reserveManagement.getRegionalCenterPeople());
|
|
|
- cell35.setCellValue(reserveManagement.getUninterruptedOperationPeople());
|
|
|
- cell36.setCellValue(reserveManagement.getWorkMode());
|
|
|
+ cell1.setCellValue(exportScheme.getProjectReserveId());
|
|
|
+ cell2.setCellValue(exportScheme.getProjectName());
|
|
|
+ cell28.setCellValue(exportScheme.getDisclosureToCoordinate());
|
|
|
+ cell29.setCellValue(exportScheme.getDisclosureParticipate());
|
|
|
+ cell30.setCellValue(exportScheme.getWhetherFinishDisclosure());
|
|
|
+ cell31.setCellValue(exportScheme.getProjectManagementPeople());
|
|
|
+ cell32.setCellValue(exportScheme.getDesigningInstitutePeople());
|
|
|
+ cell33.setCellValue(exportScheme.getIfoPeople());
|
|
|
+ cell34.setCellValue(exportScheme.getRegionalCenterPeople());
|
|
|
+ cell35.setCellValue(exportScheme.getUninterruptedOperationPeople());
|
|
|
+ cell36.setCellValue(exportScheme.getWorkMode());
|
|
|
|
|
|
- String dateStr = reserveManagement.getDisclosureFinishDateStr();
|
|
|
- if(StringUtils.isNotBlank(dateStr)){
|
|
|
- cell37.setCellValue(dateStr);
|
|
|
- }else{
|
|
|
+ Date dateStr = exportScheme.getDisclosureFinishDate();
|
|
|
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ String format = simpleDateFormat.format(dateStr);
|
|
|
+ if (StringUtils.isNotBlank(format)) {
|
|
|
+ cell37.setCellValue(format);
|
|
|
+ } else {
|
|
|
cell37.setCellValue("");
|
|
|
}
|
|
|
|
|
|
- cell38.setCellValue(reserveManagement.getDisclosureRemarks());
|
|
|
- cell39.setCellValue(reserveManagement.getProjectDescription());
|
|
|
- cell40.setCellValue(reserveManagement.getDoNotPossessProjectDescription());
|
|
|
- cell41.setCellValue(reserveManagement.getChangedProgramsExplain());
|
|
|
- cell42.setCellValue(reserveManagement.getInitialDifficulty());
|
|
|
- cell43.setCellValue(reserveManagement.getCapitalEquipment());
|
|
|
- cell44.setCellValue(reserveManagement.getSubstationNewLine());
|
|
|
- cell45.setCellValue(reserveManagement.getWhetherImplement());
|
|
|
- cell46.setCellValue(reserveManagement.getFieldDescription());
|
|
|
- cell47.setCellValue(reserveManagement.getNecessaryOfImplementation());
|
|
|
- cell48.setCellValue(reserveManagement.getUnnecessaryDescription());
|
|
|
- cell49.setCellValue(reserveManagement.getPrecondition());
|
|
|
- cell50.setCellValue(reserveManagement.getConditionsDescribed());
|
|
|
- cell51.setCellValue(reserveManagement.getConstructionSchemeProblem());
|
|
|
- cell52.setCellValue(reserveManagement.getProblemDescriptionOfConstructionScheme());
|
|
|
- cell53.setCellValue(reserveManagement.getExistingSecurityThreat());
|
|
|
- cell54.setCellValue(reserveManagement.getSafetyHazardDescription());
|
|
|
- cell55.setCellValue(reserveManagement.getCustomizedMaterials());
|
|
|
- cell56.setCellValue(reserveManagement.getMaterialDescription());
|
|
|
- cell57.setCellValue(reserveManagement.getDismantlingTheOldMaterial());
|
|
|
- cell58.setCellValue(reserveManagement.getOperatingType());
|
|
|
- cell59.setCellValue(reserveManagement.getProblemDescription());
|
|
|
- cell60.setCellValue(reserveManagement.getCivilWork());
|
|
|
- cell61.setCellValue(reserveManagement.getVerticalRodWorkload());
|
|
|
- cell62.setCellValue(reserveManagement.getTotalWorkloadDescription());
|
|
|
- cell63.setCellValue(reserveManagement.getRegionalCenter());
|
|
|
- cell64.setCellValue(reserveManagement.getPowerSupplyArea());
|
|
|
- cell65.setCellValue(reserveManagement.getZhengLocation());
|
|
|
- cell66.setCellValue(reserveManagement.getZhengType());
|
|
|
- cell67.setCellValue(reserveManagement.getZhengObject());
|
|
|
- cell68.setCellValue(reserveManagement.getZhengDescribe());
|
|
|
- cell69.setCellValue(reserveManagement.getProjectApproval());
|
|
|
- cell70.setCellValue(reserveManagement.getCourseEvaluationProcedures());
|
|
|
- cell71.setCellValue(reserveManagement.getZhengDifficultyWarn());
|
|
|
+ cell38.setCellValue(exportScheme.getDisclosureRemarks());
|
|
|
+ cell39.setCellValue(exportScheme.getProjectDescription());
|
|
|
+ cell40.setCellValue(exportScheme.getDoNotPossessProjectDescription());
|
|
|
+ cell41.setCellValue(exportScheme.getChangedProgramsExplain());
|
|
|
+ cell42.setCellValue(exportScheme.getInitialDifficulty());
|
|
|
+ cell43.setCellValue(exportScheme.getCapitalEquipment());
|
|
|
+ cell44.setCellValue(exportScheme.getSubstationNewLine());
|
|
|
+ cell45.setCellValue(exportScheme.getWhetherImplement());
|
|
|
+ cell46.setCellValue(exportScheme.getFieldDescription());
|
|
|
+ cell47.setCellValue(exportScheme.getNecessaryOfImplementation());
|
|
|
+ cell48.setCellValue(exportScheme.getUnnecessaryDescription());
|
|
|
+ cell49.setCellValue(exportScheme.getPrecondition());
|
|
|
+ cell50.setCellValue(exportScheme.getConditionsDescribed());
|
|
|
+ cell51.setCellValue(exportScheme.getConstructionSchemeProblem());
|
|
|
+ cell52.setCellValue(exportScheme.getProblemDescriptionOfConstructionScheme());
|
|
|
+ cell53.setCellValue(exportScheme.getExistingSecurityThreat());
|
|
|
+ cell54.setCellValue(exportScheme.getSafetyHazardDescription());
|
|
|
+ cell55.setCellValue(exportScheme.getCustomizedMaterials());
|
|
|
+ cell56.setCellValue(exportScheme.getMaterialDescription());
|
|
|
+ cell57.setCellValue(exportScheme.getDismantlingTheOldMaterial());
|
|
|
+ cell58.setCellValue(exportScheme.getOperatingType());
|
|
|
+ cell59.setCellValue(exportScheme.getProblemDescription());
|
|
|
+ cell60.setCellValue(exportScheme.getCivilWork());
|
|
|
+ cell61.setCellValue(exportScheme.getVerticalRodWorkload());
|
|
|
+ cell62.setCellValue(exportScheme.getTotalWorkloadDescription());
|
|
|
+ cell63.setCellValue(exportScheme.getRegionalCenter());
|
|
|
+ cell64.setCellValue(exportScheme.getPowerSupplyArea());
|
|
|
+ cell65.setCellValue(exportScheme.getZhengLocation());
|
|
|
+ cell66.setCellValue(exportScheme.getZhengType());
|
|
|
+ cell67.setCellValue(exportScheme.getZhengObject());
|
|
|
+ cell68.setCellValue(exportScheme.getZhengDescribe());
|
|
|
+ cell69.setCellValue(exportScheme.getProjectApproval());
|
|
|
+ cell70.setCellValue(exportScheme.getCourseEvaluationProcedures());
|
|
|
+ cell71.setCellValue(exportScheme.getZhengDifficultyWarn());
|
|
|
}
|
|
|
|
|
|
String str = URLEncoder.encode("方案交底结论数据.xlsx", "UTF8");
|