Commit 85d8b05e authored by chenzhao's avatar chenzhao

infoDown

parent a0800a26
...@@ -57,8 +57,7 @@ public class AcceptanceRectificationOrderServiceImpl extends BaseService<Accepta ...@@ -57,8 +57,7 @@ public class AcceptanceRectificationOrderServiceImpl extends BaseService<Accepta
// private WorkflowImpl workflow; // private WorkflowImpl workflow;
@Autowired @Autowired
private WorkFlowService workFlowService; private WorkFlowService workFlowService;
@Autowired
private CommonServiceImpl commonService;
@Autowired @Autowired
private RedisUtils redisUtils; private RedisUtils redisUtils;
@Resource (type = RedisLockUtil.class) @Resource (type = RedisLockUtil.class)
......
...@@ -52,8 +52,6 @@ public class AcceptanceServiceImpl implements IAcceptanceService { ...@@ -52,8 +52,6 @@ public class AcceptanceServiceImpl implements IAcceptanceService {
private PeasantHouseholdMapper peasantHouseholdMapper; private PeasantHouseholdMapper peasantHouseholdMapper;
@Autowired @Autowired
private AcceptanceCheckItemMapper acceptanceCheckItemMapper; private AcceptanceCheckItemMapper acceptanceCheckItemMapper;
@Autowired
private CommonServiceImpl commonService;
@Resource(type = RedisLockUtil.class) @Resource(type = RedisLockUtil.class)
private RedisLockUtil redisLockUtil; private RedisLockUtil redisLockUtil;
......
...@@ -79,7 +79,7 @@ import java.util.zip.ZipOutputStream; ...@@ -79,7 +79,7 @@ import java.util.zip.ZipOutputStream;
@Service @Service
@Slf4j @Slf4j
public class CommonServiceImpl { public class CommonServiceImpl {
// @Autowired // @Autowired
// private TaskV2FeignService taskV2FeignService; // private TaskV2FeignService taskV2FeignService;
@Autowired @Autowired
private RedisUtils redisUtils; private RedisUtils redisUtils;
...@@ -539,8 +539,8 @@ public class CommonServiceImpl { ...@@ -539,8 +539,8 @@ public class CommonServiceImpl {
} }
public void downZiliao(String surveyInformationId, List<String> peasantHouseholdIds, String processInstanceId, HttpServletResponse response) throws IOException { public void downZiliao(String surveyInformationId, List<String> peasantHouseholdIds, String processInstanceId, HttpServletResponse response) throws IOException {
String fileName = ""; String fileName = "";
String redisKey = ""; String redisKey = "";
if (peasantHouseholdIds.size()>1){ if (peasantHouseholdIds.size()>1){
redisKey = String.join(",", peasantHouseholdIds); redisKey = String.join(",", peasantHouseholdIds);
}else { }else {
...@@ -552,7 +552,7 @@ public class CommonServiceImpl { ...@@ -552,7 +552,7 @@ public class CommonServiceImpl {
// 获取当前工作目录 // 获取当前工作目录
Path rootDir = currentWorkingDir; Path rootDir = currentWorkingDir;
Path ziLiaoDir =rootDir.resolve("批量资料"); Path ziLiaoDir =rootDir.resolve("批量资料");
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(",")){ if (!redisKey.contains(",")){
...@@ -584,8 +584,8 @@ public class CommonServiceImpl { ...@@ -584,8 +584,8 @@ public class CommonServiceImpl {
System.out.println("模版文件所在目录是: " + templateDir); System.out.println("模版文件所在目录是: " + templateDir);
Path tempDir = createUniqueDirectory(ziLiaoDir, returnDto.getSurveyInformation().getOwnersName()); Path tempDir = createUniqueDirectory(ziLiaoDir, returnDto.getSurveyInformation().getOwnersName());
String wenjianjia = tempDir.toString().replace("\\","/"); String wenjianjia = tempDir.toString().replace("\\","/");
try { try {
Files.createDirectories(tempDir); // 创建临时目录 Files.createDirectories(tempDir); // 创建临时目录
System.out.println("Temporary directory created at: " + tempDir); System.out.println("Temporary directory created at: " + tempDir);
...@@ -662,21 +662,21 @@ public class CommonServiceImpl { ...@@ -662,21 +662,21 @@ public class CommonServiceImpl {
redisUtils.set(redisKey, MapBuilder.<String, Object>create() redisUtils.set(redisKey, MapBuilder.<String, Object>create()
.put("value", currentBili).build()); .put("value", currentBili).build());
} }
List<HygfRectificationOrder> areaOrdersCon =new ArrayList<>(); List<HygfRectificationOrder> areaOrdersCon =new ArrayList<>();
if (ObjectUtils.isNotEmpty(returnDto.getHygfOnGrid())) { if (ObjectUtils.isNotEmpty(returnDto.getHygfOnGrid())) {
areaOrdersCon = Optional.ofNullable(returnDto.getPowerStationConstructionData().getAreaOrders()) areaOrdersCon = Optional.ofNullable(returnDto.getPowerStationConstructionData().getAreaOrders())
.orElse(new ArrayList<>()); .orElse(new ArrayList<>());
addNonNullList(areaOrdersCon, returnDto.getPowerStationConstructionData().getDesignOrders()); addNonNullList(areaOrdersCon, returnDto.getPowerStationConstructionData().getDesignOrders());
addNonNullList(areaOrdersCon, returnDto.getPowerStationConstructionData().getEngineeringOrders()); addNonNullList(areaOrdersCon, returnDto.getPowerStationConstructionData().getEngineeringOrders());
} }
// 主方法或代码块 // 主方法或代码块
List<HygfRectificationOrder> areaOrders =new ArrayList<>(); List<HygfRectificationOrder> areaOrders =new ArrayList<>();
if (ObjectUtils.isNotEmpty(returnDto.getHygfOnGrid())) { if (ObjectUtils.isNotEmpty(returnDto.getHygfOnGrid())) {
areaOrders = Optional.ofNullable(returnDto.getHygfOnGrid().getAreaOrders()) areaOrders = Optional.ofNullable(returnDto.getHygfOnGrid().getAreaOrders())
.orElse(new ArrayList<>()); .orElse(new ArrayList<>());
addNonNullList(areaOrders, returnDto.getHygfOnGrid().getDesignOrders()); addNonNullList(areaOrders, returnDto.getHygfOnGrid().getDesignOrders());
addNonNullList(areaOrders, returnDto.getHygfOnGrid().getEngineeringOrders()); addNonNullList(areaOrders, returnDto.getHygfOnGrid().getEngineeringOrders());
} }
List<HygfRectificationOrder> areaOrdersAcc = new ArrayList<>(); List<HygfRectificationOrder> areaOrdersAcc = new ArrayList<>();
if (ObjectUtils.isNotEmpty(returnDto.getAcceptanceCheck())){ if (ObjectUtils.isNotEmpty(returnDto.getAcceptanceCheck())){
areaOrdersAcc = Optional.ofNullable(returnDto.getAcceptanceCheck().getAreaOrders()) areaOrdersAcc = Optional.ofNullable(returnDto.getAcceptanceCheck().getAreaOrders())
...@@ -687,8 +687,8 @@ public class CommonServiceImpl { ...@@ -687,8 +687,8 @@ public class CommonServiceImpl {
} }
List<Future<?>> futures = new ArrayList<>(); List<Future<?>> futures = new ArrayList<>();
String finalRedisKey = redisKey; String finalRedisKey = redisKey;
futures.add(executorService.submit(() -> { futures.add(executorService.submit(() -> {
try { try {
downloadAndZipImages(returnDto.getSurveyInformation(),"基本信息附件",tempDir,urlPath); downloadAndZipImages(returnDto.getSurveyInformation(),"基本信息附件",tempDir,urlPath);
if (!finalRedisKey.contains(",")){ if (!finalRedisKey.contains(",")){
...@@ -771,8 +771,8 @@ public class CommonServiceImpl { ...@@ -771,8 +771,8 @@ public class CommonServiceImpl {
e.printStackTrace(); e.printStackTrace();
} }
})); }));
List<HygfRectificationOrder> finalAreaOrdersCon = areaOrdersCon; List<HygfRectificationOrder> finalAreaOrdersCon = areaOrdersCon;
futures.add(executorService.submit(() -> { futures.add(executorService.submit(() -> {
try { try {
downloadAndZipImages(finalAreaOrdersCon,"施工信息整改单附件",tempDir,urlPath); downloadAndZipImages(finalAreaOrdersCon,"施工信息整改单附件",tempDir,urlPath);
if (!finalRedisKey.contains(",")){ if (!finalRedisKey.contains(",")){
...@@ -800,8 +800,8 @@ public class CommonServiceImpl { ...@@ -800,8 +800,8 @@ public class CommonServiceImpl {
e.printStackTrace(); e.printStackTrace();
} }
})); }));
List<HygfRectificationOrder> finalAreaOrders = areaOrders; List<HygfRectificationOrder> finalAreaOrders = areaOrders;
futures.add(executorService.submit(() -> { futures.add(executorService.submit(() -> {
try { try {
downloadAndZipImages(finalAreaOrders,"并网信息整改单附件",tempDir,urlPath); downloadAndZipImages(finalAreaOrders,"并网信息整改单附件",tempDir,urlPath);
if (!finalRedisKey.contains(",")){ if (!finalRedisKey.contains(",")){
...@@ -829,8 +829,8 @@ public class CommonServiceImpl { ...@@ -829,8 +829,8 @@ public class CommonServiceImpl {
e.printStackTrace(); e.printStackTrace();
} }
})); }));
List<HygfRectificationOrder> finalAreaOrdersAcc = areaOrdersAcc; List<HygfRectificationOrder> finalAreaOrdersAcc = areaOrdersAcc;
futures.add(executorService.submit(() -> { futures.add(executorService.submit(() -> {
try { try {
downloadAndZipImages(finalAreaOrdersAcc,"验收信息整改单附件",tempDir,urlPath); downloadAndZipImages(finalAreaOrdersAcc,"验收信息整改单附件",tempDir,urlPath);
if (!finalRedisKey.contains(",")){ if (!finalRedisKey.contains(",")){
...@@ -862,11 +862,11 @@ public class CommonServiceImpl { ...@@ -862,11 +862,11 @@ 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");
if (redisKey.contains(",")){ if (redisKey.contains(",")){
currentBili = currentBili + baifenbi; currentBili = currentBili + baifenbi;
redisUtils.set(redisKey,MapBuilder.<String, Object>create() redisUtils.set(redisKey,MapBuilder.<String, Object>create()
.put("value", currentBili).build()); .put("value", currentBili).build());
} }
} }
String encodedFilename = ""; String encodedFilename = "";
...@@ -888,7 +888,7 @@ public class CommonServiceImpl { ...@@ -888,7 +888,7 @@ public class CommonServiceImpl {
cleanup(ziLiaoDir); cleanup(ziLiaoDir);
} }
public void test (HttpServletResponse response) throws UnsupportedEncodingException { public void test (HttpServletResponse response) throws UnsupportedEncodingException {
String fileName = "批量资料"; String fileName = "批量资料";
Path currentWorkingDir = Paths.get(""); Path currentWorkingDir = Paths.get("");
// 获取当前工作目录 // 获取当前工作目录
...@@ -900,9 +900,9 @@ public class CommonServiceImpl { ...@@ -900,9 +900,9 @@ public class CommonServiceImpl {
} }
private void fillSheet(Sheet sheet, Object data) { private void fillSheet(Sheet sheet, Object data) {
if (Objects.isNull(data)){ if (Objects.isNull(data)){
return; return;
} }
int startRow = 1; int startRow = 1;
for (int i = 0; i < sheet.getLastRowNum() + 1; i++) { for (int i = 0; i < sheet.getLastRowNum() + 1; i++) {
Row row = sheet.getRow(i); Row row = sheet.getRow(i);
...@@ -1396,13 +1396,13 @@ public class CommonServiceImpl { ...@@ -1396,13 +1396,13 @@ public class CommonServiceImpl {
// 计算ZIP文件的总大小 // 计算ZIP文件的总大小
long totalSize = getTotalFileSize(folderPath); long totalSize = getTotalFileSize(folderPath);
double totalNum = (double) (totalSize/1024/1024); double totalNum = (double) (totalSize/1024/1024);
if (totalNum > 500 ){ if (totalNum > 500 ){
this.cleanup(folderPath); this.cleanup(folderPath);
response.setHeader("content-error", URLEncoder.encode("所选文件总大小不得超过500M,当前所选文件总大小为"+totalNum+"M", "UTF-8")); response.setHeader("content-error", URLEncoder.encode("所选文件总大小不得超过500M,当前所选文件总大小为"+totalNum+"M", "UTF-8"));
response.setContentType("text/plain"); response.setContentType("text/plain");
throw new BadRequest("所选文件总大小不得超过500M,当前所选文件总大小为"+totalNum+"M"); throw new BadRequest("所选文件总大小不得超过500M,当前所选文件总大小为"+totalNum+"M");
} }
// response.setContentLengthLong((int) totalSize); // response.setContentLengthLong((int) totalSize);
addFolderToZip(zipFilePath, folderPath, zos,response); addFolderToZip(zipFilePath, folderPath, zos,response);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
...@@ -1582,137 +1582,137 @@ public class CommonServiceImpl { ...@@ -1582,137 +1582,137 @@ public class CommonServiceImpl {
return fields; return fields;
} }
void documentSpecialProcessing (Sheet sheet, int headerRow,int headerOneRow,int dataStartRow, String[] headersNames, String[] headers, String headerOne, List<Map<String, Object>> data){ void documentSpecialProcessing (Sheet sheet, int headerRow,int headerOneRow,int dataStartRow, String[] headersNames, String[] headers, String headerOne, List<Map<String, Object>> data){
// 创建表头样式 // 创建表头样式
CellStyle headerStyle = sheet.getWorkbook().createCellStyle(); CellStyle headerStyle = sheet.getWorkbook().createCellStyle();
Font headerFont = sheet.getWorkbook().createFont(); Font headerFont = sheet.getWorkbook().createFont();
headerFont.setBold(true); // 加粗字体 headerFont.setBold(true); // 加粗字体
headerFont.setFontHeightInPoints((short) 12); // 字体大小 headerFont.setFontHeightInPoints((short) 12); // 字体大小
headerStyle.setFillForegroundColor(IndexedColors.PALE_BLUE.getIndex()); headerStyle.setFillForegroundColor(IndexedColors.PALE_BLUE.getIndex());
headerStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND); headerStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
headerStyle.setAlignment(HorizontalAlignment.CENTER); // 居中对齐 headerStyle.setAlignment(HorizontalAlignment.CENTER); // 居中对齐
headerStyle.setFont(headerFont); // 设置字体样式 headerStyle.setFont(headerFont); // 设置字体样式
// 设置边框 // 设置边框
headerStyle.setBorderTop(BorderStyle.THIN); headerStyle.setBorderTop(BorderStyle.THIN);
headerStyle.setBorderBottom(BorderStyle.THIN); headerStyle.setBorderBottom(BorderStyle.THIN);
headerStyle.setBorderLeft(BorderStyle.THIN); headerStyle.setBorderLeft(BorderStyle.THIN);
headerStyle.setBorderRight(BorderStyle.THIN); headerStyle.setBorderRight(BorderStyle.THIN);
// 写入表头 // 写入表头
Row headerRowObjectOne = sheet.getRow(headerOneRow); Row headerRowObjectOne = sheet.getRow(headerOneRow);
if (headerRowObjectOne == null) { if (headerRowObjectOne == null) {
headerRowObjectOne = sheet.createRow(headerOneRow); headerRowObjectOne = sheet.createRow(headerOneRow);
Cell cell = headerRowObjectOne.getCell(0); Cell cell = headerRowObjectOne.getCell(0);
if (cell == null) { if (cell == null) {
cell = headerRowObjectOne.createCell(0); cell = headerRowObjectOne.createCell(0);
} }
cell.setCellValue(headerOne); cell.setCellValue(headerOne);
cell.setCellStyle(headerStyle); cell.setCellStyle(headerStyle);
} }
// 写入表头 // 写入表头
Row headerRowObject = sheet.getRow(headerRow); Row headerRowObject = sheet.getRow(headerRow);
if (headerRowObject == null) { if (headerRowObject == null) {
headerRowObject = sheet.createRow(headerRow); headerRowObject = sheet.createRow(headerRow);
} }
for (int i = 0; i < headersNames.length; i++) { for (int i = 0; i < headersNames.length; i++) {
Cell headerCell = headerRowObject.getCell(i); Cell headerCell = headerRowObject.getCell(i);
if (headerCell == null) { if (headerCell == null) {
headerCell = headerRowObject.createCell(i); headerCell = headerRowObject.createCell(i);
} }
headerCell.setCellValue(headersNames[i]); headerCell.setCellValue(headersNames[i]);
headerCell.setCellStyle(headerStyle); headerCell.setCellStyle(headerStyle);
} }
// 从第四行开始填充数据 // 从第四行开始填充数据
for (int dataIndex = 0; dataIndex < data.size(); dataIndex++) { for (int dataIndex = 0; dataIndex < data.size(); dataIndex++) {
Row dataRow = sheet.createRow(dataStartRow + dataIndex); Row dataRow = sheet.createRow(dataStartRow + dataIndex);
Map<String, Object> result = (Map<String, Object>) data.get(dataIndex); Map<String, Object> result = (Map<String, Object>) data.get(dataIndex);
Map<String, Object> rowData = new HashMap<>(); Map<String, Object> rowData = new HashMap<>();
if (result.containsKey("map")){ if (result.containsKey("map")){
rowData = (Map<String, Object>)result.get("map"); rowData = (Map<String, Object>)result.get("map");
}else { }else {
rowData = result; rowData = result;
} }
for (int i = 0; i < headersNames.length; i++) { for (int i = 0; i < headersNames.length; i++) {
Cell dataCell = dataRow.createCell(i); Cell dataCell = dataRow.createCell(i);
if (rowData.containsKey(headers[i])) { if (rowData.containsKey(headers[i])) {
Object value = rowData.get(headers[i]); Object value = rowData.get(headers[i]);
if (value instanceof List<?>) { if (value instanceof List<?>) {
List<String> urls = (List<String>) value; List<String> urls = (List<String>) value;
if (!urls.isEmpty()) { if (!urls.isEmpty()) {
try { try {
XSSFDrawing drawing = ((XSSFSheet) sheet).getDrawingPatriarch(); XSSFDrawing drawing = ((XSSFSheet) sheet).getDrawingPatriarch();
if (drawing == null) { if (drawing == null) {
drawing = ((XSSFSheet) sheet).createDrawingPatriarch(); drawing = ((XSSFSheet) sheet).createDrawingPatriarch();
} }
// 设置单元格为空 // 设置单元格为空
dataCell.setCellStyle(sheet.getWorkbook().createCellStyle()); dataCell.setCellStyle(sheet.getWorkbook().createCellStyle());
dataCell.setCellType(CellType.STRING); dataCell.setCellType(CellType.STRING);
dataCell.setCellValue(""); dataCell.setCellValue("");
// 计算第一个图片的位置 // 计算第一个图片的位置
int colWidth = 0; int colWidth = 0;
int rowHeight = 0; int rowHeight = 0;
int pictureIdx = -1; int pictureIdx = -1;
for (int j = 0; j < urls.size(); j++) { for (int j = 0; j < urls.size(); j++) {
String url = urls.get(j); String url = urls.get(j);
InputStream inputStream = new URL(url).openStream(); InputStream inputStream = new URL(url).openStream();
pictureIdx = ((XSSFWorkbook) sheet.getWorkbook()).addPicture(inputStream, XSSFWorkbook.PICTURE_TYPE_JPEG); pictureIdx = ((XSSFWorkbook) sheet.getWorkbook()).addPicture(inputStream, XSSFWorkbook.PICTURE_TYPE_JPEG);
// 输出调试信息 // 输出调试信息
System.out.println("Picture index: " + pictureIdx); System.out.println("Picture index: " + pictureIdx);
// 创建图片对象 // 创建图片对象
XSSFClientAnchor anchor = new XSSFClientAnchor( XSSFClientAnchor anchor = new XSSFClientAnchor(
0, 0, 0, 0, (short) i, dataIndex + dataStartRow, 0, 0, 0, 0, (short) i, dataIndex + dataStartRow,
(short) (i + colWidth / 100), dataIndex + dataStartRow + rowHeight / 100 (short) (i + colWidth / 100), dataIndex + dataStartRow + rowHeight / 100
); );
Picture pict = drawing.createPicture(anchor, pictureIdx); Picture pict = drawing.createPicture(anchor, pictureIdx);
pict.resize(); pict.resize();
// 计算图片的宽度和高度 // 计算图片的宽度和高度
int picWidth = 100; // 图片宽度百分比 int picWidth = 100; // 图片宽度百分比
int picHeight = 100; // 图片高度百分比 int picHeight = 100; // 图片高度百分比
colWidth += picWidth; colWidth += picWidth;
rowHeight += picHeight; rowHeight += picHeight;
} }
// 检查是否需要合并单元格 // 检查是否需要合并单元格
if (colWidth > 100) { if (colWidth > 100) {
// 合并单元格 // 合并单元格
sheet.addMergedRegion(new CellRangeAddress(dataIndex + dataStartRow, dataIndex + dataStartRow, i, i + (colWidth / 100) - 1)); sheet.addMergedRegion(new CellRangeAddress(dataIndex + dataStartRow, dataIndex + dataStartRow, i, i + (colWidth / 100) - 1));
} }
// 调整单元格的宽度和高度 // 调整单元格的宽度和高度
sheet.setColumnWidth(i, (colWidth * 256) / 100); sheet.setColumnWidth(i, (colWidth * 256) / 100);
dataRow.setHeightInPoints(rowHeight); dataRow.setHeightInPoints(rowHeight);
} catch (Exception e) { } catch (Exception e) {
// 处理异常情况 // 处理异常情况
System.err.println("Failed to download or insert images: " + value); System.err.println("Failed to download or insert images: " + value);
e.printStackTrace(); e.printStackTrace();
} }
} else { } else {
dataCell.setCellValue(""); // 假设所有数据都是字符串格式 dataCell.setCellValue(""); // 假设所有数据都是字符串格式
} }
} else if( value instanceof Date) { } else if( value instanceof Date) {
String s = DateUtils.date2LongStr((Date) value); String s = DateUtils.date2LongStr((Date) value);
dataCell.setCellValue(s); dataCell.setCellValue(s);
} }
else { else {
dataCell.setCellValue(null == value?"":value.toString()); // 假设所有数据都是字符串格式 dataCell.setCellValue(null == value?"":value.toString()); // 假设所有数据都是字符串格式
} }
} else { } else {
dataCell.setCellValue(""); // 假设所有数据都是字符串格式 dataCell.setCellValue(""); // 假设所有数据都是字符串格式
} }
} }
} }
//原始方法 //原始方法
// for (int dataIndex = 0; dataIndex < data.size(); dataIndex++) { // for (int dataIndex = 0; dataIndex < data.size(); dataIndex++) {
...@@ -1833,33 +1833,33 @@ public class CommonServiceImpl { ...@@ -1833,33 +1833,33 @@ public class CommonServiceImpl {
return null; return null;
} }
List<LinkedHashMap> flowLoggernew = new ArrayList<>(); List<LinkedHashMap> flowLoggernew = new ArrayList<>();
try { try {
Map<String, Object> flowLoggerMap = workflowFeignClient.getFlowLogger(processInstanceId).getResult(); Map<String, Object> flowLoggerMap = workflowFeignClient.getFlowLogger(processInstanceId).getResult();
List<LinkedHashMap> flowLogger = (List<LinkedHashMap>) flowLoggerMap.get("flowLogger"); List<LinkedHashMap> flowLogger = (List<LinkedHashMap>) flowLoggerMap.get("flowLogger");
if (flowLogger.size() > 0) { if (flowLogger.size() > 0) {
Collections.reverse(flowLogger); Collections.reverse(flowLogger);
} }
for (LinkedHashMap linkedHashMap : flowLogger) { for (LinkedHashMap linkedHashMap : flowLogger) {
if (linkedHashMap.get("operateDate") != null if (linkedHashMap.get("operateDate") != null
&& !linkedHashMap.get("operateDate").toString().isEmpty()) { && !linkedHashMap.get("operateDate").toString().isEmpty()) {
LinkedHashMap linke = new LinkedHashMap(); LinkedHashMap linke = new LinkedHashMap();
linke.put("approvalStatue", linkedHashMap.get("approvalStatue").toString()); linke.put("approvalStatue", linkedHashMap.get("approvalStatue").toString());
// 审核意见 // 审核意见
List<LinkedHashMap> approvalSuggestion = (List<LinkedHashMap>) linkedHashMap List<LinkedHashMap> approvalSuggestion = (List<LinkedHashMap>) linkedHashMap
.get("approvalSuggestion"); .get("approvalSuggestion");
if (approvalSuggestion != null && !approvalSuggestion.isEmpty()) { if (approvalSuggestion != null && !approvalSuggestion.isEmpty()) {
linke.put("approvalSuggestion", approvalSuggestion.get(0).get("message")); linke.put("approvalSuggestion", approvalSuggestion.get(0).get("message"));
}
linke.put("taskName", linkedHashMap.get("taskName").toString());
linke.put("operator", linkedHashMap.get("operator").toString());
linke.put("operateDate", linkedHashMap.get("operateDate").toString());
flowLoggernew.add(linke);
} }
linke.put("taskName", linkedHashMap.get("taskName").toString());
linke.put("operator", linkedHashMap.get("operator").toString());
linke.put("operateDate", linkedHashMap.get("operateDate").toString());
flowLoggernew.add(linke);
} }
} catch (Exception e) {
e.printStackTrace();
} }
} catch (Exception e) {
e.printStackTrace();
}
return flowLoggernew; return flowLoggernew;
} }
...@@ -1870,7 +1870,7 @@ public class CommonServiceImpl { ...@@ -1870,7 +1870,7 @@ public class CommonServiceImpl {
up5.eq(ConstructionRecords::getWorkOrderPowerStationId,workOrderPowerStationId); up5.eq(ConstructionRecords::getWorkOrderPowerStationId,workOrderPowerStationId);
up5.eq(ConstructionRecords::getWorkOrderId,workOrderId); up5.eq(ConstructionRecords::getWorkOrderId,workOrderId);
up5.orderByAsc(ConstructionRecords::getRecDate); up5.orderByAsc(ConstructionRecords::getRecDate);
return constructionRecordsMapper.selectList(up5); return constructionRecordsMapper.selectList(up5);
} }
List<ConstructionGirdRecords> getConstructionRecordsBasic (String peasantHouseholdId) { List<ConstructionGirdRecords> getConstructionRecordsBasic (String peasantHouseholdId) {
......
...@@ -91,8 +91,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS ...@@ -91,8 +91,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
// WorkflowImpl workflow; // WorkflowImpl workflow;
@Autowired @Autowired
WorkFlowService workFlowService; WorkFlowService workFlowService;
@Autowired
CommonServiceImpl commonService;
@Autowired @Autowired
HouseholdContractMapper householdContractMapper; HouseholdContractMapper householdContractMapper;
@Resource (type = RedisLockUtil.class) @Resource (type = RedisLockUtil.class)
......
...@@ -140,8 +140,7 @@ public class SurveyInformationServiceImpl ...@@ -140,8 +140,7 @@ public class SurveyInformationServiceImpl
// WorkflowImpl workflow; // WorkflowImpl workflow;
@Autowired @Autowired
WorkFlowService workFlowService; WorkFlowService workFlowService;
@Autowired
CommonServiceImpl commonService;
@Autowired @Autowired
HygfRectificationOrderServiceImpl rectificationOrderService; HygfRectificationOrderServiceImpl rectificationOrderService;
private static final String PROCESSKEY = "ProcessEngineering"; private static final String PROCESSKEY = "ProcessEngineering";
......
...@@ -142,9 +142,6 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn ...@@ -142,9 +142,6 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
@Autowired @Autowired
WorkFlowService workFlowService; WorkFlowService workFlowService;
@Autowired @Autowired
@Lazy
CommonServiceImpl commonService;
@Autowired
AmosRequestContext amosRequestContext; AmosRequestContext amosRequestContext;
@Autowired @Autowired
......
...@@ -129,8 +129,6 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W ...@@ -129,8 +129,6 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
BasicGridAcceptanceServiceImpl basicGridAcceptanceService; BasicGridAcceptanceServiceImpl basicGridAcceptanceService;
@Autowired @Autowired
AcceptanceCheckServiceImpl acceptanceCheckService; AcceptanceCheckServiceImpl acceptanceCheckService;
@Autowired
CommonServiceImpl commonService;
private static final String PROCESSKEY = "ProcessEngineering"; private static final String PROCESSKEY = "ProcessEngineering";
......
...@@ -47,8 +47,6 @@ public class TestController extends BaseController { ...@@ -47,8 +47,6 @@ public class TestController extends BaseController {
@Autowired @Autowired
IndicatorDataMapper indicatorDataMapper; IndicatorDataMapper indicatorDataMapper;
@Autowired @Autowired
CommonServiceImpl commonService;
@Autowired
HealthStatusIndicatorServiceImpl healthStatusIndicatorService; HealthStatusIndicatorServiceImpl healthStatusIndicatorService;
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
......
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