From 933335d491b4319f14e8c1aaaaa433871129dd54 Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Thu, 14 Jul 2022 18:13:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=95=E8=A7=84=E6=8A=80=E6=9C=AF=E8=AF=84?= =?UTF-8?q?=E4=BC=B0-=E6=8E=A5=E5=8F=A3=E5=AE=8C=E5=96=84=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/LawsProcessHistoryEOServiceImpl.java | 2 +- .../job/LawsTechnologyEvaluationJob.java | 2 +- ...aluationComplianceResultEOServiceImpl.java | 29 ++++++++----------- ...LawsTechnologyEvaluationEOServiceImpl.java | 27 +++++------------ .../feginClient/WorkFlowFeignClient.java | 3 ++ 5 files changed, 25 insertions(+), 38 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsProcessHistoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsProcessHistoryEOServiceImpl.java index 0196e3a53..ec91475dc 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsProcessHistoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsProcessHistoryEOServiceImpl.java @@ -11,7 +11,7 @@ import com.jero.modules.lawsOpinionGather.enums.LawsOpinionGatherNodeEnum; import com.jero.modules.lawsOpinionGather.enums.OperatorRoleCodeEnum; import com.jero.modules.lawsOpinionGather.mapper.LawsProcessHistoryEOMapper; import com.jero.modules.lawsOpinionGather.service.ILawsProcessHistoryEOService; -import com.jero.modules.lawsTechnologyEvaluation.job.LawsTechnologyEvaluationNodeEnum; +import com.jero.modules.lawsTechnologyEvaluation.enums.LawsTechnologyEvaluationNodeEnum; import com.jero.modules.project.enums.OperatorTypeEnum; import com.jero.modules.project.enums.RequestSourceEnum; import com.jero.modules.system.entity.SysUser; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/job/LawsTechnologyEvaluationJob.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/job/LawsTechnologyEvaluationJob.java index 43d11a9a9..63f308573 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/job/LawsTechnologyEvaluationJob.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/job/LawsTechnologyEvaluationJob.java @@ -63,7 +63,7 @@ public class LawsTechnologyEvaluationJob implements Job { if(CollectionUtils.isNotEmpty(lawsTechnologyEvaluationFlowDetailEOList)){ String actiProcInstIds = lawsTechnologyEvaluationFlowDetailEOList.stream().map(LawsTechnologyEvaluationFlowDetailEO::getActiProcInstId).distinct().collect(Collectors.joining(",")); - Result result = this.workFlowFeignClient.completeTaskByPids(actiProcInstIds); + Result result = this.workFlowFeignClient.completeLawsTechnologyEvaluationTaskByPids(actiProcInstIds); if(result.getCode().equals(CommonConstant.SC_OK_200)){ updateLawsTechnologyEvaluationEOList.forEach(lawsTechnologyEvaluationEO -> { lawsTechnologyEvaluationEO.setFlowStatus(GatherResultEnum.COMPLETED.getValue()); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationComplianceResultEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationComplianceResultEOServiceImpl.java index 5040fe749..59b68e181 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationComplianceResultEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationComplianceResultEOServiceImpl.java @@ -137,7 +137,7 @@ public class LawsTechnologyEvaluationComplianceResultEOServiceImpl extends Servi List complianceResultEOList = this.baseMapper.selectList(queryWrapper); if(CollectionUtils.isNotEmpty(complianceResultEOList)){ - + this.disposeData(complianceResultEOList,cut); List complianceResultIdList = complianceResultEOList.stream().map(LawsTechnologyEvaluationComplianceResultEO::getId).distinct().collect(Collectors.toList()); QueryWrapper evaluationResultEOQueryWrapper = new QueryWrapper<>(); evaluationResultEOQueryWrapper.lambda().in(LawsTechnologyEvaluationResultEO::getComplianceResultId,complianceResultIdList); @@ -179,14 +179,17 @@ public class LawsTechnologyEvaluationComplianceResultEOServiceImpl extends Servi String title = ""; String bottomTitle = ""; String fileName = ""; + String sheetName = ""; if(org.apache.commons.lang3.StringUtils.equals(cut, CutEnum.CN.getValue())){ title = "相关章节,问题说明,附件"; bottomTitle = "符合性结果:"; fileName = "评估结果 " + ".xlsx"; + sheetName = "反馈结果"; }else if(org.apache.commons.lang3.StringUtils.equals(cut,CutEnum.EN.getValue())){ title = "Related section,Problem description,Accessory"; bottomTitle = "Compliance results:"; fileName = "Evaluation results " + ".xlsx"; + sheetName = "Feedback result"; } OutputStream os = null; @@ -201,10 +204,12 @@ public class LawsTechnologyEvaluationComplianceResultEOServiceImpl extends Servi //设置导出数据 if(CollectionUtils.isNotEmpty(exportData)) { - int size = exportData.size(); + //创建表头 + String[] titleArr = title.split(","); + for (int i = 0; i < exportData.size(); i++){ //使用评估人的名字命名sheet页 - HSSFSheet sheet = workbook.createSheet(exportData.get(i).getCreateBy()); + HSSFSheet sheet = workbook.createSheet(exportData.get(i).getCreateBy() + " " + sheetName); CellStyle titleCellStyle = workbook.createCellStyle(); titleCellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中 @@ -212,11 +217,8 @@ public class LawsTechnologyEvaluationComplianceResultEOServiceImpl extends Servi titleCellStyle.setWrapText(true);//自动换行 Row firstRow = sheet.createRow(0); - - //创建表头 - String[] titleArr = title.split(","); - for (int j=0; j<=3; j++){ - sheet.setColumnWidth(j,4000); + for (int j=0; j<3; j++){ + sheet.setColumnWidth(j,10000); Cell cell = firstRow.createCell(j); cell.setCellStyle(titleCellStyle); cell.setCellValue(titleArr[j]); @@ -236,18 +238,12 @@ public class LawsTechnologyEvaluationComplianceResultEOServiceImpl extends Servi //把符合性结果设置进excel表格中。 Row bottomRow = sheet.createRow(evaluationResultListSize + 1); - Cell bottomRowFirstCell = bottomRow.getCell(0); + Cell bottomRowFirstCell = bottomRow.createCell(0); bottomRowFirstCell.setCellStyle(titleCellStyle); - bottomRowFirstCell.setCellValue(bottomTitle); - - Cell bottomRowSecondCell = bottomRow.getCell(1); - bottomRowSecondCell.setCellValue(exportData.get(i).getComplianceResultName()); + bottomRowFirstCell.setCellValue(bottomTitle + " " + exportData.get(i).getComplianceResultName()); } - - } - File fileTemp = new File(path); if (fileTemp.exists()) { fileTemp.delete(); @@ -291,7 +287,6 @@ public class LawsTechnologyEvaluationComplianceResultEOServiceImpl extends Servi } } } - } ZipUtil.zip(path, path + ".zip"); //文件 diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationEOServiceImpl.java index df16067d3..333d1ad29 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationEOServiceImpl.java @@ -327,33 +327,22 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl startLawsTechnologyEvaluationProcess(String jsonObject); + + @RequestMapping(value = "/bat-wkflow/task/completeLawsTechnologyEvaluationTaskByPids",method = RequestMethod.GET) + Result completeLawsTechnologyEvaluationTaskByPids(@RequestParam("actiProcInstIds") String actiProcInstIds); }