Commit 8cb87e20 authored by chenzhao's avatar chenzhao

资料上传

parent fd56b875
...@@ -554,9 +554,11 @@ public class CommonServiceImpl { ...@@ -554,9 +554,11 @@ public class CommonServiceImpl {
for (String peasantHouseholdId : peasantHouseholdIds) { for (String peasantHouseholdId : peasantHouseholdIds) {
SurveyInfoAllDto returnDto = surveyInformationServiceImpl.querySurveyInfo(surveyInformationId, peasantHouseholdId, processInstanceId, null); SurveyInfoAllDto returnDto = surveyInformationServiceImpl.querySurveyInfo(surveyInformationId, peasantHouseholdId, processInstanceId, null);
fileName = returnDto.getSurveyInformation().getOwnersName(); fileName = returnDto.getSurveyInformation().getOwnersName();
if (!redisKey.contains(",")){
redisUtils.set(redisKey, MapBuilder.<String, Object>create()
.put("value", currentBili).build());
}
redisUtils.set(redisKey, MapBuilder.<String, Object>create()
.put("value", currentBili).build());
String powerStationInstanceId = powerStationMapper.getInstanceIdByhouseId(peasantHouseholdId); String powerStationInstanceId = powerStationMapper.getInstanceIdByhouseId(peasantHouseholdId);
String financingInstanceId = financingAuditingMapper.getInstanceIdByhouseId(peasantHouseholdId); String financingInstanceId = financingAuditingMapper.getInstanceIdByhouseId(peasantHouseholdId);
List<LinkedHashMap> powerStationWorkLog = new ArrayList<>(); List<LinkedHashMap> powerStationWorkLog = new ArrayList<>();
...@@ -859,20 +861,22 @@ public class CommonServiceImpl { ...@@ -859,20 +861,22 @@ public class CommonServiceImpl {
} }
// response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename="+returnDto.getSurveyInformation().getOwnersName()+".zip"); // response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename="+returnDto.getSurveyInformation().getOwnersName()+".zip");
currentBili = currentBili + baifenbi; if (redisKey.contains(",")){
redisUtils.set(redisKey,MapBuilder.<String, Object>create() currentBili = currentBili + baifenbi;
.put("value", currentBili).build()); redisUtils.set(redisKey,MapBuilder.<String, Object>create()
.put("value", currentBili).build());
}
} }
String encodedFilename = ""; String encodedFilename = "";
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); response.setHeader("Access-Control-Expose-Headers", "Content-Disposition");
if (peasantHouseholdIds.size() > 1){ if (peasantHouseholdIds.size() > 1){
fileName = "批量资料"; fileName = "批量资料";
encodedFilename = URLEncoder.encode( "批量资料.zip", StandardCharsets.UTF_8.name());
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName+".zip", "UTF-8")); response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName+".zip", "UTF-8"));
createZipFile(ziLiaoDir, fileName,response); createZipFile(ziLiaoDir, fileName,response);
}else { }else {
encodedFilename = URLEncoder.encode( fileName+".zip", StandardCharsets.UTF_8.name());
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName+".zip", "UTF-8")); response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName+".zip", "UTF-8"));
createZipFile(ziLiaoDir, "批量资料/"+fileName,response); createZipFile(ziLiaoDir, "批量资料/"+fileName,response);
} }
......
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