Commit 0f7dc1d0 authored by chenzhao's avatar chenzhao

ziliaoxiazai

parent 5d5996fb
...@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.hygf.biz.controller; ...@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.hygf.biz.controller;
import com.google.common.net.HttpHeaders; import com.google.common.net.HttpHeaders;
import com.yeejoin.amos.boot.module.hygf.api.dto.CommerceInfoDto; import com.yeejoin.amos.boot.module.hygf.api.dto.CommerceInfoDto;
import com.yeejoin.amos.boot.module.hygf.api.util.CommonResponseNewUtil;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.CommonServiceImpl; import com.yeejoin.amos.boot.module.hygf.biz.service.impl.CommonServiceImpl;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.FinancingInfoServiceImpl; import com.yeejoin.amos.boot.module.hygf.biz.service.impl.FinancingInfoServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -45,18 +46,18 @@ public class CommonController { ...@@ -45,18 +46,18 @@ public class CommonController {
@GetMapping(value = "/downInformation") @GetMapping(value = "/downInformation")
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "资料下载", notes = "资料下载") @ApiOperation(httpMethod = "GET", value = "资料下载", notes = "资料下载")
public void downList(HttpServletResponse response, @RequestParam(required = false) String surveyInformationId, public ResponseModel downList(HttpServletResponse response, @RequestParam(required = false) String surveyInformationId,
@RequestParam(required = false)String peasantHouseholdId, @RequestParam(required = false)List<String> peasantHouseholdIds,
@RequestParam(required = false)String processInstanceId) throws IOException { @RequestParam(required = false)String processInstanceId) throws IOException {
// 设置响应头 // 设置响应头
response.setContentType("application/zip"); response.setContentType("application/zip");
commonService.downZiliao(surveyInformationId,peasantHouseholdId,processInstanceId,response); commonService.downZiliao(surveyInformationId,peasantHouseholdIds,processInstanceId,response);
return CommonResponseNewUtil.success();
} }
/** /**
* 设备信息下载 * 设备信息下载
* *
...@@ -65,9 +66,9 @@ public class CommonController { ...@@ -65,9 +66,9 @@ public class CommonController {
@GetMapping(value = "/getSchedule") @GetMapping(value = "/getSchedule")
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "资料下载进度获取", notes = "资料下载进度获取") @ApiOperation(httpMethod = "GET", value = "资料下载进度获取", notes = "资料下载进度获取")
public Object getSchedule(String peasantHouseholdId) { public ResponseModel<Object> getSchedule(String peasantHouseholdId) {
return commonService.getSchedule(peasantHouseholdId); return ResponseHelper.buildResponse(commonService.getSchedule(peasantHouseholdId));
} }
......
...@@ -499,9 +499,21 @@ public class CommonServiceImpl { ...@@ -499,9 +499,21 @@ public class CommonServiceImpl {
return jsonArray; return jsonArray;
} }
public void downZiliao(String surveyInformationId, String peasantHouseholdId, String processInstanceId, HttpServletResponse response) throws IOException { public void downZiliao(String surveyInformationId, List<String> peasantHouseholdIds, String processInstanceId, HttpServletResponse response) throws IOException {
String fileName = "";
String redisKey = "";
if (peasantHouseholdIds.size()>1){
redisKey = String.join(",", peasantHouseholdIds);
}
int baifenbi = 100 / peasantHouseholdIds.size();
int currentBili = 0;
Path currentWorkingDir = Paths.get("");
// 获取当前工作目录
Path rootDir = currentWorkingDir;
Path ziLiaoDir =rootDir.resolve("批量资料");
for (String peasantHouseholdId : peasantHouseholdIds) {
SurveyInfoAllDto returnDto = surveyInformationServiceImpl.querySurveyInfo(surveyInformationId, peasantHouseholdId, processInstanceId, null); SurveyInfoAllDto returnDto = surveyInformationServiceImpl.querySurveyInfo(surveyInformationId, peasantHouseholdId, processInstanceId, null);
fileName = returnDto.getSurveyInformation().getOwnersName();
int current = 0; int current = 0;
redisUtils.set(peasantHouseholdId, MapBuilder.<String, Object>create() redisUtils.set(peasantHouseholdId, MapBuilder.<String, Object>create()
.put("value", current).build()); .put("value", current).build());
...@@ -529,10 +541,8 @@ public class CommonServiceImpl { ...@@ -529,10 +541,8 @@ public class CommonServiceImpl {
Path templateDir = Paths.get(TEMPLATE_FILE_PATH).getParent(); Path templateDir = Paths.get(TEMPLATE_FILE_PATH).getParent();
System.out.println("模版文件所在目录是: " + templateDir); System.out.println("模版文件所在目录是: " + templateDir);
Path currentWorkingDir = Paths.get("");
// 获取当前工作目录 Path tempDir =ziLiaoDir.resolve(returnDto.getSurveyInformation().getOwnersName());
Path rootDir = currentWorkingDir;
Path tempDir =rootDir.resolve(returnDto.getSurveyInformation().getOwnersName());
try { try {
Files.createDirectories(tempDir); // 创建临时目录 Files.createDirectories(tempDir); // 创建临时目录
System.out.println("Temporary directory created at: " + tempDir); System.out.println("Temporary directory created at: " + tempDir);
...@@ -543,7 +553,7 @@ public class CommonServiceImpl { ...@@ -543,7 +553,7 @@ public class CommonServiceImpl {
String templatePath = "templates/informationTemp.xlsx"; String templatePath = "templates/informationTemp.xlsx";
//String templatePath = "F:\\work\\amos-boot-zx-biz\\amos-boot-system-jxiop\\amos-boot-module-hygf-biz\\src\\main\\resources\\templates\\informationTemp.xlsx"; //String templatePath = "F:\\work\\amos-boot-zx-biz\\amos-boot-system-jxiop\\amos-boot-module-hygf-biz\\src\\main\\resources\\templates\\informationTemp.xlsx";
// String outputPath = "F:\\work\\amos-boot-zx-biz\\amos-boot-system-jxiop\\amos-boot-module-hygf-biz\\src\\main\\resources\\templates\\temp\\"+returnDto.getSurveyInformation().getOwnersName()+".xlsx"; // String outputPath = "F:\\work\\amos-boot-zx-biz\\amos-boot-system-jxiop\\amos-boot-module-hygf-biz\\src\\main\\resources\\templates\\temp\\"+returnDto.getSurveyInformation().getOwnersName()+".xlsx";
String outputPath = returnDto.getSurveyInformation().getOwnersName()+"/"+returnDto.getSurveyInformation().getOwnersName()+".xlsx"; String outputPath ="批量资料/"+ returnDto.getSurveyInformation().getOwnersName()+"/"+returnDto.getSurveyInformation().getOwnersName()+".xlsx";
Workbook workbook = null; Workbook workbook = null;
try ( InputStream fis = new ClassPathResource(templatePath).getInputStream()){ try ( InputStream fis = new ClassPathResource(templatePath).getInputStream()){
...@@ -764,10 +774,22 @@ public class CommonServiceImpl { ...@@ -764,10 +774,22 @@ public class CommonServiceImpl {
redisUtils.set(peasantHouseholdId, MapBuilder.<String, Object>create() redisUtils.set(peasantHouseholdId, MapBuilder.<String, Object>create()
.put("value", 100).build()); .put("value", 100).build());
// response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename="+returnDto.getSurveyInformation().getOwnersName()+".zip"); // response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename="+returnDto.getSurveyInformation().getOwnersName()+".zip");
String encodedFilename = URLEncoder.encode(returnDto.getSurveyInformation().getOwnersName() + ".zip", StandardCharsets.UTF_8.name()); currentBili = currentBili + baifenbi;
redisUtils.set(redisKey,MapBuilder.<String, Object>create()
.put("value", currentBili).build());
}
redisUtils.set(redisKey, MapBuilder.<String, Object>create()
.put("value", 100).build());
String encodedFilename = "";
if (peasantHouseholdIds.size() > 1){
fileName = "批量资料";
encodedFilename = URLEncoder.encode( "批量资料.zip", StandardCharsets.UTF_8.name());
}else {
encodedFilename = URLEncoder.encode( fileName+".zip", StandardCharsets.UTF_8.name());
}
response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename*=UTF-8''" + encodedFilename); response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename*=UTF-8''" + encodedFilename);
createZipFile(tempDir, returnDto.getSurveyInformation().getOwnersName(),response); createZipFile(ziLiaoDir, "批量资料/"+fileName,response);
cleanup(tempDir); cleanup(ziLiaoDir);
} }
...@@ -793,58 +815,58 @@ public class CommonServiceImpl { ...@@ -793,58 +815,58 @@ public class CommonServiceImpl {
DesignInformationDto designInformation= (DesignInformationDto)data; DesignInformationDto designInformation= (DesignInformationDto)data;
int startRowNum = 5; int startRowNum = 5;
if (null != designInformation.getAssembly()){ if (null != designInformation.getAssembly()){
List<Map<String, Object>> maps = convertList(designInformation.getAssembly());
int headerRow = startRowNum + 1; // 表头所在的行 int headerRow = startRowNum + 1; // 表头所在的行
int headerOneRow = startRowNum; // 表头所在的行 int headerOneRow = startRowNum; // 表头所在的行
int dataStartRow = startRowNum+2; // 数据开始的行 int dataStartRow = startRowNum+2; // 数据开始的行
startRowNum= dataStartRow +2; startRowNum= dataStartRow +2+maps.size();
// 假设表头内容如下: // 假设表头内容如下:
String headerOne = "组件"; String headerOne = "组件";
String[] headersNames = {"物联编码", "物料名称", "电池片规格", "功率", "类型", "边框", "总功率", "单/双面", "配置数量", "金额"}; String[] headersNames = {"物联编码", "物料名称", "电池片规格", "功率", "类型", "边框", "总功率", "单/双面", "配置数量", "金额"};
String[] headers = {"wlbm", "wlmc", "dcpgg", "gl", "lx", "bk", "zgl", "dsm", "pzsl", "price"}; String[] headers = {"wlbm", "wlmc", "dcpgg", "gl", "lx", "bk", "zgl", "dsm", "pzsl", "price"};
List<Map<String, Object>> maps = convertList(designInformation.getAssembly());
documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps); documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps);
} }
if (null != designInformation.getInverter()){ if (null != designInformation.getInverter()){
List<Map<String, Object>> maps = convertList(designInformation.getInverter());
int headerRow = startRowNum + 1; // 表头所在的行 int headerRow = startRowNum + 1; // 表头所在的行
int headerOneRow = startRowNum; // 表头所在的行 int headerOneRow = startRowNum; // 表头所在的行
int dataStartRow = startRowNum+2; // 数据开始的行 int dataStartRow = startRowNum+2; // 数据开始的行
startRowNum= dataStartRow +2; startRowNum= dataStartRow +2+maps.size();
// 假设表头内容如下: // 假设表头内容如下:
String headerOne = "逆变器"; String headerOne = "逆变器";
String[] headersNames = {"物联编码", "物料名称", "功率", "系列", "相位", "配置数量", "金额"}; String[] headersNames = {"物联编码", "物料名称", "功率", "系列", "相位", "配置数量", "金额"};
String[] headers = {"wlbm", "wlmc", "gl", "xl", "xw", "pzsl", "price"}; String[] headers = {"wlbm", "wlmc", "gl", "xl", "xw", "pzsl", "price"};
List<Map<String, Object>> maps = convertList(designInformation.getInverter());
documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps); documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps);
} }
if (null != designInformation.getElectricityMeter()){ if (null != designInformation.getElectricityMeter()){
List<Map<String, Object>> maps = convertList(designInformation.getElectricityMeter());
int headerRow = startRowNum +1 ; // 表头所在的行 int headerRow = startRowNum +1 ; // 表头所在的行
int headerOneRow = startRowNum; // 表头所在的行 int headerOneRow = startRowNum; // 表头所在的行
int dataStartRow = startRowNum+2; // 数据开始的行 int dataStartRow = startRowNum+2; // 数据开始的行
startRowNum= dataStartRow +2; startRowNum= dataStartRow +2+maps.size();
// 假设表头内容如下: // 假设表头内容如下:
String headerOne = "并网箱"; String headerOne = "并网箱";
String[] headersNames = {"物联编码", "物料名称","材质", "功率", "类型", "功能", "相位", "上网模式", "配置数量", "金额"}; String[] headersNames = {"物联编码", "物料名称","材质", "功率", "类型", "功能", "相位", "上网模式", "配置数量", "金额"};
String[] headers = {"wlbm", "wlmc","cz", "gl", "lx", "gn", "xw", "swms","pzsl", "price"}; String[] headers = {"wlbm", "wlmc","cz", "gl", "lx", "gn", "xw", "swms","pzsl", "price"};
List<Map<String, Object>> maps = convertList(designInformation.getElectricityMeter());
documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps); documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps);
} }
if (null != designInformation.getCable()){ if (null != designInformation.getCable()){
List<Map<String, Object>> maps = convertList(designInformation.getCable());
int headerRow = startRowNum +1 ; // 表头所在的行 int headerRow = startRowNum +1 ; // 表头所在的行
int headerOneRow = startRowNum; // 表头所在的行 int headerOneRow = startRowNum; // 表头所在的行
int dataStartRow = startRowNum+2; // 数据开始的行 int dataStartRow = startRowNum+2; // 数据开始的行
startRowNum= dataStartRow +2; startRowNum= dataStartRow +2+maps.size();
// 假设表头内容如下: // 假设表头内容如下:
String headerOne = "电缆"; String headerOne = "电缆";
String[] headersNames = {"物联编码", "物料名称", "型号", "规格", "配置数量"}; String[] headersNames = {"物联编码", "物料名称", "型号", "规格", "配置数量"};
String[] headers = {"wlbm", "wlmc", "xh", "gg", "pzsl"}; String[] headers = {"wlbm", "wlmc", "xh", "gg", "pzsl"};
List<Map<String, Object>> maps = convertList(designInformation.getCable());
documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps); documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps);
} }
...@@ -856,58 +878,62 @@ public class CommonServiceImpl { ...@@ -856,58 +878,62 @@ public class CommonServiceImpl {
int startRowNum = 3; int startRowNum = 3;
if (null != powerStationEngineeringInfo.getConstructionComponentInfo()){ if (null != powerStationEngineeringInfo.getConstructionComponentInfo()){
List<Map<String, Object>> maps = convertList(powerStationEngineeringInfo.getConstructionComponentInfo());
int headerRow = startRowNum + 1; // 表头所在的行 int headerRow = startRowNum + 1; // 表头所在的行
int headerOneRow = startRowNum; // 表头所在的行 int headerOneRow = startRowNum; // 表头所在的行
int dataStartRow = startRowNum+2; // 数据开始的行 int dataStartRow = startRowNum+2; // 数据开始的行
startRowNum= dataStartRow +2; startRowNum= dataStartRow +2+maps.size();
// 假设表头内容如下: // 假设表头内容如下:
String headerOne = "组件序列号"; String headerOne = "组件序列号";
String[] headersNames = {"序列号","功率","物联编码", "物料名称", "电池片规格", "类型", "边框", "单/双面"}; String[] headersNames = {"序列号","功率","物联编码", "物料名称", "电池片规格", "类型", "边框", "单/双面"};
String[] headers = {"xlh","gl","wlbm", "wlmc", "dcpgg", "lx", "bk", "dsm"}; String[] headers = {"xlh","gl","wlbm", "wlmc", "dcpgg", "lx", "bk", "dsm"};
List<Map<String, Object>> maps = convertList(powerStationEngineeringInfo.getConstructionComponentInfo());
documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps); documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps);
} }
if (null != powerStationEngineeringInfo.getConstructionInverterInfo()){ if (null != powerStationEngineeringInfo.getConstructionInverterInfo()){
List<Map<String, Object>> maps = convertList(powerStationEngineeringInfo.getConstructionInverterInfo());
int headerRow = startRowNum + 1; // 表头所在的行 int headerRow = startRowNum + 1; // 表头所在的行
int headerOneRow = startRowNum; // 表头所在的行 int headerOneRow = startRowNum; // 表头所在的行
int dataStartRow = startRowNum+2; // 数据开始的行 int dataStartRow = startRowNum+2; // 数据开始的行
startRowNum= dataStartRow +2; startRowNum= dataStartRow +2+maps.size();
// 假设表头内容如下: // 假设表头内容如下:
String headerOne = "逆变器序列号"; String headerOne = "逆变器序列号";
String[] headersNames = {"序列号","验证码","功率","物联编码", "物料名称", "系列", "相位"}; String[] headersNames = {"序列号","验证码","功率","物联编码", "物料名称", "系列", "相位"};
String[] headers = {"xlh","yzm","gl", "wlbm", "wlmc", "xl", "xw"}; String[] headers = {"xlh","yzm","gl", "wlbm", "wlmc", "xl", "xw"};
List<Map<String, Object>> maps = convertList(powerStationEngineeringInfo.getConstructionInverterInfo());
documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps); documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps);
} }
if (null != powerStationEngineeringInfo.getConstructionGridBoxInfo()){ if (null != powerStationEngineeringInfo.getConstructionGridBoxInfo()){
List<Map<String, Object>> maps = convertList(powerStationEngineeringInfo.getConstructionGridBoxInfo());
int headerRow = startRowNum +1 ; // 表头所在的行 int headerRow = startRowNum +1 ; // 表头所在的行
int headerOneRow = startRowNum; // 表头所在的行 int headerOneRow = startRowNum; // 表头所在的行
int dataStartRow = startRowNum+2; // 数据开始的行 int dataStartRow = startRowNum+2; // 数据开始的行
startRowNum= dataStartRow +2; startRowNum= dataStartRow +2+maps.size();
// 假设表头内容如下: // 假设表头内容如下:
String headerOne = "并网箱序列号"; String headerOne = "并网箱序列号";
String[] headersNames = {"序列号", "功率","物联编码", "物料名称","材质", "类型", "功能", "相位", "上网模式"}; String[] headersNames = {"序列号", "功率","物联编码", "物料名称","材质", "类型", "功能", "相位", "上网模式"};
String[] headers = {"xlh","gl","wlbm", "wlmc","cz","lx", "gn", "xw", "swms"}; String[] headers = {"xlh","gl","wlbm", "wlmc","cz","lx", "gn", "xw", "swms"};
List<Map<String, Object>> maps = convertList(powerStationEngineeringInfo.getConstructionGridBoxInfo());
documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps); documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps);
} }
if (null != powerStationEngineeringInfo.getConstructionCollectorBoxInfo()){ if (null != powerStationEngineeringInfo.getConstructionCollectorBoxInfo()){
List<Map<String, Object>> maps = convertList(powerStationEngineeringInfo.getConstructionCollectorBoxInfo());
int headerRow = startRowNum +1 ; // 表头所在的行 int headerRow = startRowNum +1 ; // 表头所在的行
int headerOneRow = startRowNum; // 表头所在的行 int headerOneRow = startRowNum; // 表头所在的行
int dataStartRow = startRowNum+2; // 数据开始的行 int dataStartRow = startRowNum+2; // 数据开始的行
startRowNum= dataStartRow +2; startRowNum= dataStartRow +2+maps.size();
// 假设表头内容如下: // 假设表头内容如下:
String headerOne = "采集器序列号"; String headerOne = "采集器序列号";
String[] headersNames = {"序列号"}; String[] headersNames = {"序列号"};
String[] headers = {"xlh"}; String[] headers = {"xlh"};
List<Map<String, Object>> maps = convertList(powerStationEngineeringInfo.getConstructionCollectorBoxInfo());
documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps); documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps);
} }
...@@ -919,17 +945,18 @@ public class CommonServiceImpl { ...@@ -919,17 +945,18 @@ public class CommonServiceImpl {
int startRowNum = 3; int startRowNum = 3;
if (null != extendedInformationDto.getContacts()){ if (null != extendedInformationDto.getContacts()){
List<Map<String, Object>> maps = convertList(extendedInformationDto.getContacts());
int headerRow = startRowNum + 1; // 表头所在的行 int headerRow = startRowNum + 1; // 表头所在的行
int headerOneRow = startRowNum; // 表头所在的行 int headerOneRow = startRowNum; // 表头所在的行
int dataStartRow = startRowNum+2; // 数据开始的行 int dataStartRow = startRowNum+2; // 数据开始的行
startRowNum= dataStartRow +1; startRowNum= dataStartRow +1+maps.size();
// 假设表头内容如下: // 假设表头内容如下:
String headerOne = "联系人"; String headerOne = "联系人";
String[] headersNames = {"姓名","关系","联系电话", "电子邮箱", "QQ", "微信"}; String[] headersNames = {"姓名","关系","联系电话", "电子邮箱", "QQ", "微信"};
String[] headers = {"userName","relation","telephone", "mailbox", "dcpgg", "qq", "wechat"}; String[] headers = {"userName","relation","telephone", "mailbox", "dcpgg", "qq", "wechat"};
List<Map<String, Object>> maps = convertList(extendedInformationDto.getContacts());
documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps); documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps);
} }
} }
...@@ -939,10 +966,11 @@ public class CommonServiceImpl { ...@@ -939,10 +966,11 @@ public class CommonServiceImpl {
int startRowNum = 3; int startRowNum = 3;
if (null != powerStationConstructionData.getAreaOrders()){ if (null != powerStationConstructionData.getAreaOrders()){
List<Map<String, Object>> maps = convertListToMap(powerStationConstructionData.getAreaOrders());
int headerRow = startRowNum + 1; // 表头所在的行 int headerRow = startRowNum + 1; // 表头所在的行
int headerOneRow = startRowNum; // 表头所在的行 int headerOneRow = startRowNum; // 表头所在的行
int dataStartRow = startRowNum+2; // 数据开始的行 int dataStartRow = startRowNum+2; // 数据开始的行
startRowNum= dataStartRow +1; startRowNum= dataStartRow +1+maps.size();
// 假设表头内容如下: // 假设表头内容如下:
String headerOne = "片区运营整改单"; String headerOne = "片区运营整改单";
...@@ -950,38 +978,40 @@ public class CommonServiceImpl { ...@@ -950,38 +978,40 @@ public class CommonServiceImpl {
String[] headers = {"rectificationIdeas","rectificationResultWeb", "auditResult", "auditIdea", "rectificationHistoryWeb"}; String[] headers = {"rectificationIdeas","rectificationResultWeb", "auditResult", "auditIdea", "rectificationHistoryWeb"};
List<Map<String, Object>> maps = convertListToMap(powerStationConstructionData.getAreaOrders());
documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps); documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps);
} }
if (null != powerStationConstructionData.getEngineeringOrders()){ if (null != powerStationConstructionData.getEngineeringOrders()){
List<Map<String, Object>> maps = convertListToMap(powerStationConstructionData.getEngineeringOrders());
int headerRow = startRowNum + 1; // 表头所在的行 int headerRow = startRowNum + 1; // 表头所在的行
int headerOneRow = startRowNum; // 表头所在的行 int headerOneRow = startRowNum; // 表头所在的行
int dataStartRow = startRowNum+2; // 数据开始的行 int dataStartRow = startRowNum+2; // 数据开始的行
startRowNum= dataStartRow +1; startRowNum= dataStartRow +1+maps.size();
// 假设表头内容如下: // 假设表头内容如下:
String headerOne = "工程整改单"; String headerOne = "工程整改单";
String[] headersNames = {"整改信息","整改结果","审核结果", "审核意见", "历史审核意见"}; String[] headersNames = {"整改信息","整改结果","审核结果", "审核意见", "历史审核意见"};
String[] headers = {"rectificationIdeas","rectificationResultWeb", "auditResult", "auditIdea", "rectificationHistoryWeb"}; String[] headers = {"rectificationIdeas","rectificationResultWeb", "auditResult", "auditIdea", "rectificationHistoryWeb"};
List<Map<String, Object>> maps = convertListToMap(powerStationConstructionData.getEngineeringOrders());
documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps); documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps);
} }
if (null != powerStationConstructionData.getDesignOrders()){ if (null != powerStationConstructionData.getDesignOrders()){
List<Map<String, Object>> maps = convertListToMap(powerStationConstructionData.getDesignOrders());
int headerRow = startRowNum + 1; // 表头所在的行 int headerRow = startRowNum + 1; // 表头所在的行
int headerOneRow = startRowNum; // 表头所在的行 int headerOneRow = startRowNum; // 表头所在的行
int dataStartRow = startRowNum+2; // 数据开始的行 int dataStartRow = startRowNum+2; // 数据开始的行
startRowNum= dataStartRow +1; startRowNum= dataStartRow +1+maps.size();
// 假设表头内容如下: // 假设表头内容如下:
String headerOne = "设计整改单"; String headerOne = "设计整改单";
String[] headersNames = {"整改信息","整改结果","审核结果", "审核意见", "历史审核意见"}; String[] headersNames = {"整改信息","整改结果","审核结果", "审核意见", "历史审核意见"};
String[] headers = {"rectificationIdeas","rectificationResultWeb", "auditResult", "auditIdea", "rectificationHistoryWeb"}; String[] headers = {"rectificationIdeas","rectificationResultWeb", "auditResult", "auditIdea", "rectificationHistoryWeb"};
List<Map<String, Object>> maps = convertListToMap(powerStationConstructionData.getDesignOrders());
documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps); documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps);
} }
} }
...@@ -992,10 +1022,11 @@ public class CommonServiceImpl { ...@@ -992,10 +1022,11 @@ public class CommonServiceImpl {
int startRowNum = 3; int startRowNum = 3;
if (null != hygfOnGrid.getAreaOrders()){ if (null != hygfOnGrid.getAreaOrders()){
List<Map<String, Object>> maps = convertListToMap(hygfOnGrid.getAreaOrders());
int headerRow = startRowNum + 1; // 表头所在的行 int headerRow = startRowNum + 1; // 表头所在的行
int headerOneRow = startRowNum; // 表头所在的行 int headerOneRow = startRowNum; // 表头所在的行
int dataStartRow = startRowNum+2; // 数据开始的行 int dataStartRow = startRowNum+2; // 数据开始的行
startRowNum= dataStartRow +1; startRowNum= dataStartRow +1+maps.size();
// 假设表头内容如下: // 假设表头内容如下:
String headerOne = "片区运营整改单"; String headerOne = "片区运营整改单";
...@@ -1003,38 +1034,40 @@ public class CommonServiceImpl { ...@@ -1003,38 +1034,40 @@ public class CommonServiceImpl {
String[] headers = {"rectificationIdeas","rectificationResultWeb", "auditResult", "auditIdea", "rectificationHistoryWeb"}; String[] headers = {"rectificationIdeas","rectificationResultWeb", "auditResult", "auditIdea", "rectificationHistoryWeb"};
List<Map<String, Object>> maps = convertListToMap(hygfOnGrid.getAreaOrders());
documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps); documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps);
} }
if (null != hygfOnGrid.getEngineeringOrders()){ if (null != hygfOnGrid.getEngineeringOrders()){
List<Map<String, Object>> maps = convertListToMap(hygfOnGrid.getEngineeringOrders());
int headerRow = startRowNum + 1; // 表头所在的行 int headerRow = startRowNum + 1; // 表头所在的行
int headerOneRow = startRowNum; // 表头所在的行 int headerOneRow = startRowNum; // 表头所在的行
int dataStartRow = startRowNum+2; // 数据开始的行 int dataStartRow = startRowNum+2; // 数据开始的行
startRowNum= dataStartRow +1; startRowNum= dataStartRow +1+maps.size();
// 假设表头内容如下: // 假设表头内容如下:
String headerOne = "工程整改单"; String headerOne = "工程整改单";
String[] headersNames = {"整改信息","整改结果","审核结果", "审核意见", "历史审核意见"}; String[] headersNames = {"整改信息","整改结果","审核结果", "审核意见", "历史审核意见"};
String[] headers = {"rectificationIdeas","rectificationResultWeb", "auditResult", "auditIdea", "rectificationHistoryWeb"}; String[] headers = {"rectificationIdeas","rectificationResultWeb", "auditResult", "auditIdea", "rectificationHistoryWeb"};
List<Map<String, Object>> maps = convertListToMap(hygfOnGrid.getEngineeringOrders());
documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps); documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps);
} }
if (null != hygfOnGrid.getDesignOrders()){ if (null != hygfOnGrid.getDesignOrders()){
List<Map<String, Object>> maps = convertListToMap(hygfOnGrid.getDesignOrders());
int headerRow = startRowNum + 1; // 表头所在的行 int headerRow = startRowNum + 1; // 表头所在的行
int headerOneRow = startRowNum; // 表头所在的行 int headerOneRow = startRowNum; // 表头所在的行
int dataStartRow = startRowNum+2; // 数据开始的行 int dataStartRow = startRowNum+2; // 数据开始的行
startRowNum= dataStartRow +1; startRowNum= dataStartRow +1+maps.size();
// 假设表头内容如下: // 假设表头内容如下:
String headerOne = "设计整改单"; String headerOne = "设计整改单";
String[] headersNames = {"整改信息","整改结果","审核结果", "审核意见", "历史审核意见"}; String[] headersNames = {"整改信息","整改结果","审核结果", "审核意见", "历史审核意见"};
String[] headers = {"rectificationIdeas","rectificationResultWeb", "auditResult", "auditIdea", "rectificationHistoryWeb"}; String[] headers = {"rectificationIdeas","rectificationResultWeb", "auditResult", "auditIdea", "rectificationHistoryWeb"};
List<Map<String, Object>> maps = convertListToMap(hygfOnGrid.getDesignOrders());
documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps); documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps);
} }
} }
...@@ -1044,10 +1077,11 @@ public class CommonServiceImpl { ...@@ -1044,10 +1077,11 @@ public class CommonServiceImpl {
int startRowNum = 3; int startRowNum = 3;
if (null != acceptanceCheck.getAreaOrders()){ if (null != acceptanceCheck.getAreaOrders()){
List<Map<String, Object>> maps = convertListToMap(acceptanceCheck.getAreaOrders());
int headerRow = startRowNum + 1; // 表头所在的行 int headerRow = startRowNum + 1; // 表头所在的行
int headerOneRow = startRowNum; // 表头所在的行 int headerOneRow = startRowNum; // 表头所在的行
int dataStartRow = startRowNum+2; // 数据开始的行 int dataStartRow = startRowNum+2; // 数据开始的行
startRowNum= dataStartRow +1; startRowNum= dataStartRow +1+maps.size();
// 假设表头内容如下: // 假设表头内容如下:
String headerOne = "片区运营整改单"; String headerOne = "片区运营整改单";
...@@ -1055,52 +1089,55 @@ public class CommonServiceImpl { ...@@ -1055,52 +1089,55 @@ public class CommonServiceImpl {
String[] headers = {"rectificationIdeas","rectificationResultWeb", "auditResult", "auditIdea", "rectificationHistoryWeb"}; String[] headers = {"rectificationIdeas","rectificationResultWeb", "auditResult", "auditIdea", "rectificationHistoryWeb"};
List<Map<String, Object>> maps = convertListToMap(acceptanceCheck.getAreaOrders());
documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps); documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps);
} }
if (null != acceptanceCheck.getFinanceOrders()){ if (null != acceptanceCheck.getFinanceOrders()){
List<Map<String, Object>> maps = convertListToMap(acceptanceCheck.getFinanceOrders());
int headerRow = startRowNum + 1; // 表头所在的行 int headerRow = startRowNum + 1; // 表头所在的行
int headerOneRow = startRowNum; // 表头所在的行 int headerOneRow = startRowNum; // 表头所在的行
int dataStartRow = startRowNum+2; // 数据开始的行 int dataStartRow = startRowNum+2; // 数据开始的行
startRowNum= dataStartRow +1; startRowNum= dataStartRow +1+maps.size();
// 假设表头内容如下: // 假设表头内容如下:
String headerOne = "投融整改单"; String headerOne = "投融整改单";
String[] headersNames = {"整改信息","整改结果","审核结果", "审核意见", "历史审核意见"}; String[] headersNames = {"整改信息","整改结果","审核结果", "审核意见", "历史审核意见"};
String[] headers = {"rectificationIdeas","rectificationResultWeb", "auditResult", "auditIdea", "rectificationHistoryWeb"}; String[] headers = {"rectificationIdeas","rectificationResultWeb", "auditResult", "auditIdea", "rectificationHistoryWeb"};
List<Map<String, Object>> maps = convertListToMap(acceptanceCheck.getFinanceOrders());
documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps); documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps);
} }
if (null != acceptanceCheck.getLegalOrders()){ if (null != acceptanceCheck.getLegalOrders()){
List<Map<String, Object>> maps = convertListToMap(acceptanceCheck.getLegalOrders());
int headerRow = startRowNum + 1; // 表头所在的行 int headerRow = startRowNum + 1; // 表头所在的行
int headerOneRow = startRowNum; // 表头所在的行 int headerOneRow = startRowNum; // 表头所在的行
int dataStartRow = startRowNum+2; // 数据开始的行 int dataStartRow = startRowNum+2; // 数据开始的行
startRowNum= dataStartRow +1; startRowNum= dataStartRow +1+maps.size();
// 假设表头内容如下: // 假设表头内容如下:
String headerOne = "法务整改单"; String headerOne = "法务整改单";
String[] headersNames = {"整改信息","整改结果","审核结果", "审核意见", "历史审核意见"}; String[] headersNames = {"整改信息","整改结果","审核结果", "审核意见", "历史审核意见"};
String[] headers = {"rectificationIdeas","rectificationResultWeb", "auditResult", "auditIdea", "rectificationHistoryWeb"}; String[] headers = {"rectificationIdeas","rectificationResultWeb", "auditResult", "auditIdea", "rectificationHistoryWeb"};
List<Map<String, Object>> maps = convertListToMap(acceptanceCheck.getLegalOrders());
documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps); documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps);
} }
if (null != acceptanceCheck.getPropertyOrders()){ if (null != acceptanceCheck.getPropertyOrders()){
List<Map<String, Object>> maps = convertListToMap(acceptanceCheck.getPropertyOrders());
int headerRow = startRowNum + 1; // 表头所在的行 int headerRow = startRowNum + 1; // 表头所在的行
int headerOneRow = startRowNum; // 表头所在的行 int headerOneRow = startRowNum; // 表头所在的行
int dataStartRow = startRowNum+2; // 数据开始的行 int dataStartRow = startRowNum+2; // 数据开始的行
startRowNum= dataStartRow +1; startRowNum= dataStartRow +1+maps.size();
// 假设表头内容如下: // 假设表头内容如下:
String headerOne = "资产整改单"; String headerOne = "资产整改单";
String[] headersNames = {"整改信息","整改结果","审核结果", "审核意见", "历史审核意见"}; String[] headersNames = {"整改信息","整改结果","审核结果", "审核意见", "历史审核意见"};
String[] headers = {"rectificationIdeas","rectificationResultWeb", "auditResult", "auditIdea", "rectificationHistoryWeb"}; String[] headers = {"rectificationIdeas","rectificationResultWeb", "auditResult", "auditIdea", "rectificationHistoryWeb"};
List<Map<String, Object>> maps = convertListToMap(acceptanceCheck.getPropertyOrders());
documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps); documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps);
} }
} }
...@@ -1644,7 +1681,6 @@ public class CommonServiceImpl { ...@@ -1644,7 +1681,6 @@ public class CommonServiceImpl {
if(100-value ==0){ if(100-value ==0){
redisUtils.del(peasantHouseholdId); redisUtils.del(peasantHouseholdId);
} }
return map; return map;
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment