法规技术评估-接口完善。
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
+1
-1
@@ -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<String> result = this.workFlowFeignClient.completeTaskByPids(actiProcInstIds);
|
||||
Result<String> result = this.workFlowFeignClient.completeLawsTechnologyEvaluationTaskByPids(actiProcInstIds);
|
||||
if(result.getCode().equals(CommonConstant.SC_OK_200)){
|
||||
updateLawsTechnologyEvaluationEOList.forEach(lawsTechnologyEvaluationEO -> {
|
||||
lawsTechnologyEvaluationEO.setFlowStatus(GatherResultEnum.COMPLETED.getValue());
|
||||
|
||||
+12
-17
@@ -137,7 +137,7 @@ public class LawsTechnologyEvaluationComplianceResultEOServiceImpl extends Servi
|
||||
List<LawsTechnologyEvaluationComplianceResultEO> complianceResultEOList = this.baseMapper.selectList(queryWrapper);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(complianceResultEOList)){
|
||||
|
||||
this.disposeData(complianceResultEOList,cut);
|
||||
List<String> complianceResultIdList = complianceResultEOList.stream().map(LawsTechnologyEvaluationComplianceResultEO::getId).distinct().collect(Collectors.toList());
|
||||
QueryWrapper<LawsTechnologyEvaluationResultEO> 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");
|
||||
//文件
|
||||
|
||||
+8
-19
@@ -327,33 +327,22 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
nowFile.mkdirs();
|
||||
|
||||
HSSFSheet sheet = workbook.createSheet("sheet1");
|
||||
sheet.setDefaultColumnWidth(16);//列宽
|
||||
HSSFCellStyle cellStyle = workbook.createCellStyle();
|
||||
cellStyle.setWrapText(true);//自动换行
|
||||
cellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中
|
||||
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//水平居中
|
||||
|
||||
HSSFCellStyle cellStyleTemp = workbook.createCellStyle();
|
||||
cellStyleTemp.setWrapText(true);//自动换行
|
||||
|
||||
String explainInfo = null;
|
||||
|
||||
HSSFRichTextString explain = new HSSFRichTextString(explainInfo);
|
||||
CellStyle titleCellStyle = workbook.createCellStyle();
|
||||
titleCellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中
|
||||
titleCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//水平居中
|
||||
titleCellStyle.setWrapText(true);//自动换行
|
||||
|
||||
//表头
|
||||
Row row = sheet.createRow(0);//开始创建标题行
|
||||
String[] headerArr = title.split(",");
|
||||
for (int m = 0; m < headerArr.length; m++) {
|
||||
row.createCell(m).setCellValue(headerArr[m]);
|
||||
sheet.setColumnWidth(m,10000);
|
||||
Cell cell = row.createCell(m);
|
||||
cell.setCellStyle(titleCellStyle);
|
||||
cell.setCellValue(headerArr[m]);
|
||||
}
|
||||
|
||||
/*Row rowExplain = sheet.createRow(1);
|
||||
short height = (short) (7 * 200);
|
||||
rowExplain.setHeight((short) height);
|
||||
Cell cell = rowExplain.createCell(0);
|
||||
cell.setCellValue(explain);
|
||||
cell.setCellStyle(cellStyleTemp);*/
|
||||
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=\"" + fileOriName + ".xls");
|
||||
response.setContentType("application/force-download");
|
||||
|
||||
+3
@@ -145,4 +145,7 @@ public interface WorkFlowFeignClient {
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/startLawsTechnologyEvaluationProcess",method = RequestMethod.POST,headers = {"content-type=application/json"})
|
||||
Result<String> startLawsTechnologyEvaluationProcess(String jsonObject);
|
||||
|
||||
@RequestMapping(value = "/bat-wkflow/task/completeLawsTechnologyEvaluationTaskByPids",method = RequestMethod.GET)
|
||||
Result<String> completeLawsTechnologyEvaluationTaskByPids(@RequestParam("actiProcInstIds") String actiProcInstIds);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user