From 54a342082c54841a1ee54647a8079ede756f07e2 Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Thu, 14 Jul 2022 14:21:58 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E6=B3=95=E8=A7=84=E6=8A=80=E6=9C=AF?= =?UTF-8?q?=E8=AF=84=E4=BC=B0-=E6=9D=A1=E6=AC=BE=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ologyEvaluationItemResultEOController.java | 15 ++ .../LawsTechnologyEvaluationItemResultEO.java | 4 + ...chnologyEvaluationItemResultEOService.java | 6 + ...logyEvaluationItemResultEOServiceImpl.java | 206 +++++++++++++++++- 4 files changed, 226 insertions(+), 5 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/controller/LawsTechnologyEvaluationItemResultEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/controller/LawsTechnologyEvaluationItemResultEOController.java index eb34fe50e..1a435230f 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/controller/LawsTechnologyEvaluationItemResultEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/controller/LawsTechnologyEvaluationItemResultEOController.java @@ -2,6 +2,7 @@ package com.jero.modules.lawsTechnologyEvaluation.controller; import java.util.Arrays; import java.util.List; +import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -160,6 +161,20 @@ public class LawsTechnologyEvaluationItemResultEOController extends JeroControll return super.exportXls(request, lawsTechnologyEvaluationItemResultEO, LawsTechnologyEvaluationItemResultEO.class, "法规技术评估-条款信息评估结果表"); } + /** + * 导出zip压缩包,带文件。 + * @param response + * @param request + * @param lawsTechnologyEvaluationItemResultEO + * @param params + */ + @RequestMapping(value = "/exportZip") + public void exportZip(HttpServletResponse response,HttpServletRequest request, + LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO, + @RequestParam Map params) { + this.lawsTechnologyEvaluationItemResultEOService.exportZip(response,request, lawsTechnologyEvaluationItemResultEO,params); + } + /** * 通过excel导入数据 * diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationItemResultEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationItemResultEO.java index 86ef20c82..c807864a6 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationItemResultEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationItemResultEO.java @@ -108,11 +108,15 @@ public class LawsTechnologyEvaluationItemResultEO implements Serializable { @Excel(name = "附件", width = 15) @ApiModelProperty(value = "附件") private java.lang.String accessoryFile; + @TableField(exist = false) + private java.lang.String accessoryFileName; /**符合性结果*/ @Excel(name = "符合性结果", width = 15) @ApiModelProperty(value = "符合性结果") private java.lang.String complianceResult; + @TableField(exist = false) + private java.lang.String complianceResultName; /**评估人id*/ @Excel(name = "评估人id", width = 15) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationItemResultEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationItemResultEOService.java index e0eaf3b76..7dcfb9104 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationItemResultEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationItemResultEOService.java @@ -6,7 +6,9 @@ import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluation import com.baomidou.mybatisplus.extension.service.IService; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.util.List; +import java.util.Map; /** * @Description: 法规技术评估-条款信息评估结果表 @@ -79,4 +81,8 @@ public interface ILawsTechnologyEvaluationItemResultEOService extends IService datas, String cut); + + void exportZip(HttpServletResponse response, HttpServletRequest request, LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO, Map params); + + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationItemResultEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationItemResultEOServiceImpl.java index c7ab70d02..cb1314e10 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationItemResultEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationItemResultEOServiceImpl.java @@ -1,29 +1,41 @@ package com.jero.modules.lawsTechnologyEvaluation.service.impl; +import cn.hutool.core.util.ZipUtil; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.aliyuncs.utils.IOUtils; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.jero.common.api.vo.Result; import com.jero.common.constant.enums.CutEnum; import com.jero.common.exception.JeroBootException; import com.jero.common.system.query.QueryGenerator; -import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationFlowDetailEO; +import com.jero.common.system.vo.LoginUser; +import com.jero.common.util.oss.CosBootUtil; import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationItemResultEO; +import com.jero.modules.lawsTechnologyEvaluation.enums.ComplianceResultEnum; import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluationItemResultEOMapper; import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationItemResultEOService; +import com.jero.modules.oss.entity.OSSFile; +import com.jero.modules.oss.service.IOSSFileService; import com.jero.modules.project.enums.OperatorTypeEnum; import com.jero.modules.project.enums.RequestSourceEnum; import com.jero.modules.system.entity.SysCategory; import com.jero.modules.system.service.impl.SysCategoryServiceImpl; +import com.jero.modules.system.util.PDFUtils; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.ss.usermodel.*; +import org.apache.shiro.SecurityUtils; +import org.aspectj.util.FileUtil; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Date; +import java.io.*; +import java.text.SimpleDateFormat; +import java.util.*; import java.util.stream.Collectors; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -31,6 +43,7 @@ import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; /** * @Description: 法规技术评估-条款信息评估结果表 @@ -42,8 +55,12 @@ import javax.servlet.http.HttpServletRequest; @Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class) public class LawsTechnologyEvaluationItemResultEOServiceImpl extends ServiceImpl implements ILawsTechnologyEvaluationItemResultEOService { + @Value(value = "${jero.path.upload}") + private String uploadpath; @Autowired private SysCategoryServiceImpl sysCategoryService; + @Autowired + private IOSSFileService iOSSFileService; /** * 保存 @@ -178,10 +195,189 @@ public class LawsTechnologyEvaluationItemResultEOServiceImpl extends ServiceImpl List evaluationMethodsList = Arrays.asList(evaluationMethods.split(",")); String name = getTreeName(cut, categoryList, evaluationMethodsList); data.setEvaluationMethodsName(name); + if(StringUtils.isNotEmpty(data.getComplianceResult())){ + data.setComplianceResultName(ComplianceResultEnum.getTextByValue(data.getComplianceResult(),cut)); + } + + if(StringUtils.isNotEmpty(data.getAccessoryFile())){ + List accessoryFileList = iOSSFileService.getFileInfos(data.getAccessoryFile()); + String accessoryFileName = accessoryFileList.stream().map(OSSFile::getFileName).collect(Collectors.joining(",")); + data.setAccessoryFileName(accessoryFileName); + } } } } + @Override + public void exportZip(HttpServletResponse response, HttpServletRequest request, LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO, Map params) { + String ids = (String)params.get("ids"); + String cut = (String)params.get("cut"); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(lawsTechnologyEvaluationItemResultEO, request.getParameterMap()); + if(StringUtils.isNotEmpty(ids)){ + List idList = Arrays.asList(ids.split(",")); + queryWrapper.lambda().in(LawsTechnologyEvaluationItemResultEO::getId,idList); + } + List exportData = this.baseMapper.selectList(queryWrapper); + this.disposeData(exportData,cut); + + String title = ""; + String fileName = ""; + if(StringUtils.equals(cut, CutEnum.CN.getValue())){ + title = "条款号,条款名称,条款内容,评估人,评估方式,技术文件名称,章节,符合性结果,意见,附件,反馈时间"; + fileName = "条款评估结果 " + ".xlsx"; + }else if(StringUtils.equals(cut,CutEnum.EN.getValue())){ + title = "Item num,Item name,Item Contents,Evaluator,Evaluation methods,Name of technical document,Section,Compliance results,Opinion,Accessory,Feedback time "; + fileName = "Item Evaluation results " + ".xlsx"; + } + + OutputStream os = null; + HSSFWorkbook workbook = new HSSFWorkbook(); + + String path = uploadpath + "/tempZip/itemEvaluationResults/" + System.currentTimeMillis(); + + try { + response.setHeader("Content-Disposition", + "attachment; filename=" + fileName); + response.setContentType("application/force-download"); + + HSSFSheet sheet = workbook.createSheet("sheet1"); + + CellStyle titleCellStyle = workbook.createCellStyle(); + titleCellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中 + titleCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//水平居中 + titleCellStyle.setWrapText(true);//自动换行 + + Row firstRow = sheet.createRow(0); + + //创建表头 + String[] titleArr = title.split(","); + for (int i=0; i<=5; i++){ + sheet.setColumnWidth(i,4000); + Cell cell = firstRow.createCell(i); + cell.setCellStyle(titleCellStyle); + cell.setCellValue(titleArr[i]); + } + + //设置导出数据 + if(CollectionUtils.isNotEmpty(exportData)) { + for (int dataIndex = 0; dataIndex < exportData.size(); dataIndex++) { + Row dataRow = sheet.createRow(dataIndex + 1); + dataRow.createCell(0).setCellValue(exportData.get(dataIndex).getItemNum()); + dataRow.createCell(1).setCellValue(exportData.get(dataIndex).getItemName()); + dataRow.createCell(2).setCellValue(exportData.get(dataIndex).getItemContent()); + dataRow.createCell(3).setCellValue(exportData.get(dataIndex).getCreateBy()); + dataRow.createCell(4).setCellValue(exportData.get(dataIndex).getEvaluationMethodsName()); + dataRow.createCell(5).setCellValue(exportData.get(dataIndex).getTechnicalFileName()); + dataRow.createCell(6).setCellValue(exportData.get(dataIndex).getSection()); + dataRow.createCell(7).setCellValue(exportData.get(dataIndex).getComplianceResultName()); + dataRow.createCell(8).setCellValue(exportData.get(dataIndex).getOpinion()); + dataRow.createCell(9).setCellValue(exportData.get(dataIndex).getAccessoryFileName()); + String feedBackTimeStr = disposeDate(exportData.get(dataIndex).getCreateTime()); + dataRow.createCell(10).setCellValue(feedBackTimeStr); + } + } + + + File fileTemp = new File(path); + if (fileTemp.exists()) { + fileTemp.delete(); + } + fileTemp.mkdirs(); + //excel + OutputStream excelOS = new FileOutputStream(path + File.separator + fileName); + workbook.write(excelOS); + excelOS.flush(); + + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + + for (LawsTechnologyEvaluationItemResultEO data : exportData) { + String accessoryFile = data.getAccessoryFile(); + + List fileInfosList = iOSSFileService.getFileInfos(accessoryFile); + if (fileInfosList.size() != 0) { + for (OSSFile ossFile : fileInfosList) { + String url = ossFile.getUrl(); + //判断文件是否存在 + if(StringUtils.isNotBlank(url)){ + //判断文件是否存在 + boolean b = CosBootUtil.doesObjectExist(url); + if(b){ + InputStream download = CosBootUtil.download(url); + if(url.endsWith(".pdf") || url.endsWith(".PDF")){ + String currentTime = sdf.format(new Date()); + String waterContent = loginUser.getUsername() + " " + currentTime; + File newFile = PDFUtils.PDFWatermark(download,uploadpath,ossFile.getFileName(),waterContent); + download = new FileInputStream(newFile.getPath()); + } + copyFile(download, path + File.separator + ossFile.getFileName()); + } + } + } + } + } + ZipUtil.zip(path, path + ".zip"); + //文件 + FileInputStream fis = new FileInputStream(path + ".zip"); + os = response.getOutputStream(); + + int len = 0; + while ((len = fis.read()) != -1) { + os.write(len); + } + os.flush(); + fis.close(); + excelOS.close(); + + }catch (IOException ex){ + if(CutEnum.CN.getValue().equals(cut)){ + throw new JeroBootException("下载文件失败"); + }else{ + throw new JeroBootException("Failed to download file"); + } + }finally { + IOUtils.closeQuietly(os); + File file = new File(path); + FileUtil.deleteContents(file); + File fileTemp = new File(path + ".zip"); + FileUtil.deleteContents(fileTemp); + } + } + + public static void copyFile(InputStream in, String newFile) throws IOException { + File file2 = new File(newFile); + if (!file2.exists()) { + file2.createNewFile(); + } + try (FileOutputStream ou = new FileOutputStream(newFile);) { + byte[] bs = new byte[1024]; + int count = 0; + while ((count = in.read(bs, 0, bs.length)) != -1) { + ou.write(bs, 0, count); + } + ou.flush(); + } catch (IOException e) { + e.printStackTrace(); + throw new IOException("复制文件失败!"); + } finally { + in.close(); + } + } + + public String disposeDate(Date date){ + String result = ""; + try { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + if(date != null){ + result = sdf.format(date); + } + }catch (Exception ex){ + ex.printStackTrace(); + log.error("处理日期失败:" +ex.getMessage()); + } + return result; + } + private String getTreeName(String cut, List categoryList, List evaluationMethodsList) { StringBuilder sb = new StringBuilder(); for (String evaluationMethods : evaluationMethodsList) { From 44d80720aebc943a32fb387b962bef40cbf7c765 Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Thu, 14 Jul 2022 14:39:32 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=B8=85=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/components/tableCollection/index.vue | 1 + .../components/ParameterItemCollectionList.vue | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/jero-web/src/components/tableCollection/index.vue b/jero-web/src/components/tableCollection/index.vue index 2b1172fe2..a06568ae1 100644 --- a/jero-web/src/components/tableCollection/index.vue +++ b/jero-web/src/components/tableCollection/index.vue @@ -637,6 +637,7 @@ console.log(pagination, filters, sorter, 'iiiiiiiiiiiiiiiii') }, getTableListReset() { + this.formInline = {} let params = { paramsManifestId: this.$route.query.id, pageNo: this.pageNo, diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue index 39e5754e7..50832f377 100644 --- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue +++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue @@ -608,6 +608,8 @@ }, mounted() { this.GetgetLoginUserType() + console.log(this.currentPersonRole) + // this.LoginUserType() setTimeout(() => { if (this.currentPersonRole == 'dre') { this.handlePreservation() @@ -1183,6 +1185,7 @@ let itemIn = Object.keys(selectedRowKeysValue[i]) for (let j = 0; j < itemIn.length; j++) { if (itemIn[j] !== 'sdt') { + console.log(selectedRowKeysValue[i][itemIn[j]]) if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) { postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]] for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) { @@ -1436,9 +1439,10 @@ this.$refs.CollectionTabel.getTableList() }, searchReset() { + this.formInline = {} this.$refs.CollectionTabel.getTableListReset() - this.$refs.globalAdvancedQueryRef.resetLine() - this.$refs.globalAdvancedQueryRef.emitCallback() + this.$refs.globalAdvancedQueryRef.handleReset() + // this.$refs.globalAdvancedQueryRef.emitCallback() }, // 批量删除 -- 与下发收集一致 handleDelJurisdiction() { From 63f3cdb8a03f17106ecba88c8465f8e944e1cefc Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Thu, 14 Jul 2022 15:13:17 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug55799?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/components/tableCollection/index.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jero-web/src/components/tableCollection/index.vue b/jero-web/src/components/tableCollection/index.vue index a06568ae1..34ab134c9 100644 --- a/jero-web/src/components/tableCollection/index.vue +++ b/jero-web/src/components/tableCollection/index.vue @@ -46,15 +46,15 @@ - {{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue }} - {{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue }} + {{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue }} - {{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue }} + {{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue }} @@ -438,7 +438,7 @@ if (res.data.success) { _this.$message.success(_this.$t('OperationSuccessful')) _this.areaVisiblezr = false - this.getTableList() + this.getLoginUserType() } else { _this.$message.warning(_this.$t('operationFailed')) } From ace70bd93b08c4b5909b6ca3444515ed8985a1b5 Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Thu, 14 Jul 2022 15:14:53 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E6=B3=95=E8=A7=84=E6=8A=80=E6=9C=AF?= =?UTF-8?q?=E8=AF=84=E4=BC=B0-=E5=AF=BC=E5=87=BA=E5=8F=8D=E9=A6=88?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E5=8E=8B=E7=BC=A9=E5=8C=85=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E3=80=82=20=E6=8F=90=E5=8F=96=E5=A4=8D=E5=88=B6=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=B7=A5=E5=85=B7=E7=B1=BB=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/jero/common/util/FileUtils.java | 34 +++ ...valuationComplianceResultEOController.java | 16 ++ ...echnologyEvaluationComplianceResultEO.java | 4 + .../LawsTechnologyEvaluationResultEO.java | 3 + ...gyEvaluationComplianceResultEOService.java | 7 + ...wsTechnologyEvaluationResultEOService.java | 2 + ...aluationComplianceResultEOServiceImpl.java | 202 ++++++++++++++++++ ...logyEvaluationItemResultEOServiceImpl.java | 23 +- ...chnologyEvaluationResultEOServiceImpl.java | 19 ++ 9 files changed, 289 insertions(+), 21 deletions(-) create mode 100644 jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/FileUtils.java diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/FileUtils.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/FileUtils.java new file mode 100644 index 000000000..749f1f6d0 --- /dev/null +++ b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/FileUtils.java @@ -0,0 +1,34 @@ +package com.jero.common.util; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; + +public class FileUtils { + /** + * 复制文件 + * @param in + * @param newFile + * @throws IOException + */ + public static void copyFile(InputStream in, String newFile) throws IOException { + File file2 = new File(newFile); + if (!file2.exists()) { + file2.createNewFile(); + } + try (FileOutputStream ou = new FileOutputStream(newFile);) { + byte[] bs = new byte[1024]; + int count = 0; + while ((count = in.read(bs, 0, bs.length)) != -1) { + ou.write(bs, 0, count); + } + ou.flush(); + } catch (IOException e) { + e.printStackTrace(); + throw new IOException("复制文件失败!"); + } finally { + in.close(); + } + } +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/controller/LawsTechnologyEvaluationComplianceResultEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/controller/LawsTechnologyEvaluationComplianceResultEOController.java index 4d2b69ace..391cad286 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/controller/LawsTechnologyEvaluationComplianceResultEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/controller/LawsTechnologyEvaluationComplianceResultEOController.java @@ -2,11 +2,13 @@ package com.jero.modules.lawsTechnologyEvaluation.controller; import java.util.Arrays; import java.util.List; +import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.jero.common.api.vo.Result; import com.jero.common.system.query.QueryGenerator; import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationComplianceResultEO; +import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationResultEO; import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationComplianceResultEOService; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -157,6 +159,20 @@ public class LawsTechnologyEvaluationComplianceResultEOController extends JeroCo return super.exportXls(request, lawsTechnologyEvaluationComplianceResultEO, LawsTechnologyEvaluationComplianceResultEO.class, "法规技术评估-评估人反馈-符合性结果表"); } + /** + * 导出zip压缩包,带文件。 + * @param response + * @param request + * @param lawsTechnologyEvaluationComplianceResultEO + * @param params + */ + @RequestMapping(value = "/exportZip") + public void exportZip(HttpServletResponse response,HttpServletRequest request, + LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO, + @RequestParam Map params) { + this.lawsTechnologyEvaluationComplianceResultEOService.exportZip(response,request, lawsTechnologyEvaluationComplianceResultEO,params); + } + /** * 通过excel导入数据 * diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationComplianceResultEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationComplianceResultEO.java index 870313dd1..2b3e8c3ad 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationComplianceResultEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationComplianceResultEO.java @@ -34,6 +34,8 @@ public class LawsTechnologyEvaluationComplianceResultEO implements Serializable @TableId(type = IdType.ASSIGN_ID) @ApiModelProperty(value = "主键") private java.lang.String id; + @TableField(exist = false) + private java.lang.String ids; /**创建人*/ @ApiModelProperty(value = "创建人") @@ -68,6 +70,8 @@ public class LawsTechnologyEvaluationComplianceResultEO implements Serializable @Excel(name = "符合性结果", width = 15) @ApiModelProperty(value = "符合性结果") private java.lang.String complianceResult; + @TableField(exist = false) + private java.lang.String complianceResultName; /**流程实例id*/ @Excel(name = "流程实例id", width = 15) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationResultEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationResultEO.java index 36f1b37b9..af4611933 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationResultEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationResultEO.java @@ -2,6 +2,7 @@ package com.jero.modules.lawsTechnologyEvaluation.entity; import java.io.Serializable; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; @@ -80,6 +81,8 @@ public class LawsTechnologyEvaluationResultEO implements Serializable { @Excel(name = "附件", width = 15) @ApiModelProperty(value = "附件") private java.lang.String accessoryFile; + @TableField(exist = false) + private java.lang.String accessoryFileName; /**提出时间*/ @Excel(name = "提出时间", width = 15, format = "yyyy-MM-dd") diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationComplianceResultEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationComplianceResultEOService.java index 335fc9905..6d3895958 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationComplianceResultEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationComplianceResultEOService.java @@ -2,9 +2,12 @@ package com.jero.modules.lawsTechnologyEvaluation.service; import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationComplianceResultEO; import com.baomidou.mybatisplus.extension.service.IService; +import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationResultEO; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.util.List; +import java.util.Map; /** * @Description: 法规技术评估-评估人反馈-符合性结果表 @@ -62,4 +65,8 @@ public interface ILawsTechnologyEvaluationComplianceResultEOService extends ISer List queryList(LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO, HttpServletRequest req, String cut); + + void exportZip(HttpServletResponse response, HttpServletRequest request, + LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO, + Map params); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationResultEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationResultEOService.java index 72ccf5561..d7d1d0f89 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationResultEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationResultEOService.java @@ -76,4 +76,6 @@ public interface ILawsTechnologyEvaluationResultEOService extends IService datas, String cut); } 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 c95b3d3b2..5040fe749 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 @@ -1,18 +1,41 @@ package com.jero.modules.lawsTechnologyEvaluation.service.impl; +import cn.hutool.core.util.ZipUtil; import com.alibaba.druid.util.StringUtils; +import com.aliyuncs.utils.IOUtils; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.jero.common.constant.enums.CutEnum; +import com.jero.common.exception.JeroBootException; import com.jero.common.system.query.QueryGenerator; +import com.jero.common.system.vo.LoginUser; +import com.jero.common.util.FileUtils; +import com.jero.common.util.oss.CosBootUtil; import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationComplianceResultEO; +import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationItemResultEO; import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationResultEO; +import com.jero.modules.lawsTechnologyEvaluation.enums.ComplianceResultEnum; import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluationComplianceResultEOMapper; import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationComplianceResultEOService; import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationResultEOService; +import com.jero.modules.oss.entity.OSSFile; +import com.jero.modules.oss.service.IOSSFileService; +import com.jero.modules.system.util.PDFUtils; import org.apache.commons.collections4.CollectionUtils; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.ss.usermodel.*; +import org.apache.shiro.SecurityUtils; +import org.aspectj.util.FileUtil; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; + +import java.io.*; +import java.text.SimpleDateFormat; +import java.util.Arrays; import java.util.List; import java.util.Date; +import java.util.Map; import java.util.stream.Collectors; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -20,6 +43,7 @@ import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; /** * @Description: 法规技术评估-评估人反馈-符合性结果表 @@ -30,8 +54,12 @@ import javax.servlet.http.HttpServletRequest; @Service @Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class) public class LawsTechnologyEvaluationComplianceResultEOServiceImpl extends ServiceImpl implements ILawsTechnologyEvaluationComplianceResultEOService { + @Value(value = "${jero.path.upload}") + private String uploadpath; @Autowired private ILawsTechnologyEvaluationResultEOService evaluationResultEOService; + @Autowired + private IOSSFileService iOSSFileService; /** * 保存 @@ -103,6 +131,9 @@ public class LawsTechnologyEvaluationComplianceResultEOServiceImpl extends Servi HttpServletRequest req, String cut) { QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(lawsTechnologyEvaluationComplianceResultEO, req.getParameterMap()); + if(org.apache.commons.lang3.StringUtils.isNotEmpty(lawsTechnologyEvaluationComplianceResultEO.getIds())){ + queryWrapper.lambda().in(LawsTechnologyEvaluationComplianceResultEO::getId,lawsTechnologyEvaluationComplianceResultEO.getIds().split(",")); + } List complianceResultEOList = this.baseMapper.selectList(queryWrapper); if(CollectionUtils.isNotEmpty(complianceResultEOList)){ @@ -111,6 +142,7 @@ public class LawsTechnologyEvaluationComplianceResultEOServiceImpl extends Servi QueryWrapper evaluationResultEOQueryWrapper = new QueryWrapper<>(); evaluationResultEOQueryWrapper.lambda().in(LawsTechnologyEvaluationResultEO::getComplianceResultId,complianceResultIdList); List evaluationResultEOList = this.evaluationResultEOService.list(evaluationResultEOQueryWrapper); + this.evaluationResultEOService.disposeData(evaluationResultEOList,cut); if(CollectionUtils.isNotEmpty(evaluationResultEOList)){ for (LawsTechnologyEvaluationComplianceResultEO complianceResultEO : complianceResultEOList) { @@ -129,4 +161,174 @@ public class LawsTechnologyEvaluationComplianceResultEOServiceImpl extends Servi } return complianceResultEOList; } + + + @Override + public void exportZip(HttpServletResponse response, HttpServletRequest request, + LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO, + Map params) { + String ids = (String)params.get("ids"); + String cut = (String)params.get("cut"); + + if(!StringUtils.isEmpty(ids)){ + lawsTechnologyEvaluationComplianceResultEO.setIds(ids); + } + List exportData = this.queryList(lawsTechnologyEvaluationComplianceResultEO, request, cut); + this.disposeData(exportData,cut); + + String title = ""; + String bottomTitle = ""; + String fileName = ""; + if(org.apache.commons.lang3.StringUtils.equals(cut, CutEnum.CN.getValue())){ + title = "相关章节,问题说明,附件"; + bottomTitle = "符合性结果:"; + fileName = "评估结果 " + ".xlsx"; + }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"; + } + + OutputStream os = null; + HSSFWorkbook workbook = new HSSFWorkbook(); + + String path = uploadpath + "/tempZip/itemEvaluationResults/" + System.currentTimeMillis(); + + try { + response.setHeader("Content-Disposition", + "attachment; filename=" + fileName); + response.setContentType("application/force-download"); + + //设置导出数据 + if(CollectionUtils.isNotEmpty(exportData)) { + int size = exportData.size(); + for (int i = 0; i < exportData.size(); i++){ + //使用评估人的名字命名sheet页 + HSSFSheet sheet = workbook.createSheet(exportData.get(i).getCreateBy()); + + CellStyle titleCellStyle = workbook.createCellStyle(); + titleCellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中 + titleCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//水平居中 + titleCellStyle.setWrapText(true);//自动换行 + + Row firstRow = sheet.createRow(0); + + //创建表头 + String[] titleArr = title.split(","); + for (int j=0; j<=3; j++){ + sheet.setColumnWidth(j,4000); + Cell cell = firstRow.createCell(j); + cell.setCellStyle(titleCellStyle); + cell.setCellValue(titleArr[j]); + } + + //获取这个评估人填写的评估结果 + List lawsTechnologyEvaluationResultEOList = exportData.get(i).getLawsTechnologyEvaluationResultEOList(); + int evaluationResultListSize = lawsTechnologyEvaluationResultEOList.size(); + if(CollectionUtils.isNotEmpty(lawsTechnologyEvaluationResultEOList)){ + for (int dataIndex = 0; dataIndex < lawsTechnologyEvaluationResultEOList.size(); dataIndex++) { + Row dataRow = sheet.createRow(dataIndex + 1); + dataRow.createCell(0).setCellValue(lawsTechnologyEvaluationResultEOList.get(dataIndex).getRelatedSection()); + dataRow.createCell(1).setCellValue(lawsTechnologyEvaluationResultEOList.get(dataIndex).getIssueOrSuggest()); + dataRow.createCell(2).setCellValue(lawsTechnologyEvaluationResultEOList.get(dataIndex).getAccessoryFileName()); + } + } + + //把符合性结果设置进excel表格中。 + Row bottomRow = sheet.createRow(evaluationResultListSize + 1); + Cell bottomRowFirstCell = bottomRow.getCell(0); + bottomRowFirstCell.setCellStyle(titleCellStyle); + bottomRowFirstCell.setCellValue(bottomTitle); + + Cell bottomRowSecondCell = bottomRow.getCell(1); + bottomRowSecondCell.setCellValue(exportData.get(i).getComplianceResultName()); + } + + + } + + + File fileTemp = new File(path); + if (fileTemp.exists()) { + fileTemp.delete(); + } + fileTemp.mkdirs(); + //excel + OutputStream excelOS = new FileOutputStream(path + File.separator + fileName); + workbook.write(excelOS); + excelOS.flush(); + + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + + for (LawsTechnologyEvaluationComplianceResultEO data : exportData) { + List evaluationResultEOList = data.getLawsTechnologyEvaluationResultEOList(); + if(CollectionUtils.isNotEmpty(evaluationResultEOList)){ + for (LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO : evaluationResultEOList) { + String accessoryFile = lawsTechnologyEvaluationResultEO.getAccessoryFile(); + + List fileInfosList = iOSSFileService.getFileInfos(accessoryFile); + if (fileInfosList.size() != 0) { + for (OSSFile ossFile : fileInfosList) { + String url = ossFile.getUrl(); + //判断文件是否存在 + if(org.apache.commons.lang3.StringUtils.isNotBlank(url)){ + //判断文件是否存在 + boolean b = CosBootUtil.doesObjectExist(url); + if(b){ + InputStream download = CosBootUtil.download(url); + if(url.endsWith(".pdf") || url.endsWith(".PDF")){ + String currentTime = sdf.format(new Date()); + String waterContent = loginUser.getUsername() + " " + currentTime; + File newFile = PDFUtils.PDFWatermark(download,uploadpath,ossFile.getFileName(),waterContent); + download = new FileInputStream(newFile.getPath()); + } + //复制文件 + FileUtils.copyFile(download, path + File.separator + ossFile.getFileName()); + } + } + } + } + } + } + + } + ZipUtil.zip(path, path + ".zip"); + //文件 + FileInputStream fis = new FileInputStream(path + ".zip"); + os = response.getOutputStream(); + + int len = 0; + while ((len = fis.read()) != -1) { + os.write(len); + } + os.flush(); + fis.close(); + excelOS.close(); + + }catch (IOException ex){ + if(CutEnum.CN.getValue().equals(cut)){ + throw new JeroBootException("下载文件失败"); + }else{ + throw new JeroBootException("Failed to download file"); + } + }finally { + IOUtils.closeQuietly(os); + File file = new File(path); + FileUtil.deleteContents(file); + File fileTemp = new File(path + ".zip"); + FileUtil.deleteContents(fileTemp); + } + } + + public void disposeData(List datas,String cut){ + if(CollectionUtils.isNotEmpty(datas)){ + for (LawsTechnologyEvaluationComplianceResultEO data : datas) { + if(!StringUtils.isEmpty(data.getComplianceResult())){ + data.setComplianceResultName(ComplianceResultEnum.getTextByValue(data.getComplianceResult(),cut)); + } + } + } + + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationItemResultEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationItemResultEOServiceImpl.java index cb1314e10..1369b2036 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationItemResultEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationItemResultEOServiceImpl.java @@ -10,6 +10,7 @@ import com.jero.common.constant.enums.CutEnum; import com.jero.common.exception.JeroBootException; import com.jero.common.system.query.QueryGenerator; import com.jero.common.system.vo.LoginUser; +import com.jero.common.util.FileUtils; import com.jero.common.util.oss.CosBootUtil; import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationItemResultEO; import com.jero.modules.lawsTechnologyEvaluation.enums.ComplianceResultEnum; @@ -310,7 +311,7 @@ public class LawsTechnologyEvaluationItemResultEOServiceImpl extends ServiceImpl File newFile = PDFUtils.PDFWatermark(download,uploadpath,ossFile.getFileName(),waterContent); download = new FileInputStream(newFile.getPath()); } - copyFile(download, path + File.separator + ossFile.getFileName()); + FileUtils.copyFile(download, path + File.separator + ossFile.getFileName()); } } } @@ -344,26 +345,6 @@ public class LawsTechnologyEvaluationItemResultEOServiceImpl extends ServiceImpl } } - public static void copyFile(InputStream in, String newFile) throws IOException { - File file2 = new File(newFile); - if (!file2.exists()) { - file2.createNewFile(); - } - try (FileOutputStream ou = new FileOutputStream(newFile);) { - byte[] bs = new byte[1024]; - int count = 0; - while ((count = in.read(bs, 0, bs.length)) != -1) { - ou.write(bs, 0, count); - } - ou.flush(); - } catch (IOException e) { - e.printStackTrace(); - throw new IOException("复制文件失败!"); - } finally { - in.close(); - } - } - public String disposeDate(Date date){ String result = ""; try { diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationResultEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationResultEOServiceImpl.java index fa773e1ad..6d35252bd 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationResultEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationResultEOServiceImpl.java @@ -9,6 +9,9 @@ import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluation import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluationResultEOMapper; import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationComplianceResultEOService; import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationResultEOService; +import com.jero.modules.oss.entity.OSSFile; +import com.jero.modules.oss.service.IOSSFileService; +import me.zhyd.oauth.utils.StringUtils; import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -17,6 +20,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Date; import java.util.UUID; +import java.util.stream.Collectors; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.transaction.annotation.Propagation; @@ -36,6 +40,8 @@ public class LawsTechnologyEvaluationResultEOServiceImpl extends ServiceImpl datas, String cut) { + if(CollectionUtils.isNotEmpty(datas)){ + for (LawsTechnologyEvaluationResultEO data : datas) { + if(StringUtils.isNotEmpty(data.getAccessoryFile())){ + List accessoryFileList = iOSSFileService.getFileInfos(data.getAccessoryFile()); + String accessoryFileName = accessoryFileList.stream().map(OSSFile::getFileName).collect(Collectors.joining(",")); + data.setAccessoryFileName(accessoryFileName); + } + } + } + } } From d292b1424b9ad834aa7eee0506c471bc93c1a65a Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Thu, 14 Jul 2022 15:23:21 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=B3=95=E8=A7=84?= =?UTF-8?q?=E6=8A=80=E6=9C=AF=E8=AF=84=E4=BC=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 2 + jero-web/src/common/lang/zh-cn.js | 2 + .../RegulationMonthlyManagement.vue | 47 ++++- .../components/evaluationResultsClause.vue | 185 +++++++++++++----- .../components/evaluationResultsWhole.vue | 107 +++++----- .../technologyAssessment/index.vue | 29 ++- 6 files changed, 267 insertions(+), 105 deletions(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 5a4951f95..05b8babf8 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1136,4 +1136,6 @@ module.exports = { sponsorFeedback:'Sponsor feedback', processNumber:'Process number', processName:'Process Name', + feedbackResults:'Feedback results', + theDoesNotSupportPreview:'The current file format does not support Preview', } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index 37bc3ed86..c2d881205 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1140,4 +1140,6 @@ module.exports = { sponsorFeedback:'发起人反馈', processNumber:'流程编号', processName:'流程名称', + feedbackResults:'反馈结果', + theDoesNotSupportPreview:'当前文件格式不支持预览', } \ No newline at end of file diff --git a/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyManagement.vue b/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyManagement.vue index e92a7a565..171c1e423 100644 --- a/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyManagement.vue +++ b/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyManagement.vue @@ -26,10 +26,10 @@ {{$t('uploadMonthly')}} -
- - {{$t('BatchDelete')}} -
+ + + +
{{text == 1?$t('chinese'):$t('English')}} + + {{text}} + {{record.issueStatus == 2 ? $t('release') : $t('withdraw')}} {{$t('deleteLib')}} + {{$t('download')}}
@@ -75,7 +83,9 @@ @@ -228,6 +299,7 @@ display: flex; justify-content: space-between; border-bottom: 2px #eff1f3 solid; + z-index: 1000; background: #fff; .doc-detail-title { @@ -326,9 +398,30 @@ margin-top: 2px; } + .clauseContent-text { + width: 100%; + overflow: hidden; + display: -webkit-box; + text-overflow: ellipsis; + /*! autoprefixer: off */ + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + /*! autoprefixer: on;*/ + text-justify: inter-ideograph; + word-break: break-all + } \ No newline at end of file diff --git a/jero-web/src/views/businessSupport/technologyAssessment/components/evaluationResultsWhole.vue b/jero-web/src/views/businessSupport/technologyAssessment/components/evaluationResultsWhole.vue index f645cc16e..cde7e8ce8 100644 --- a/jero-web/src/views/businessSupport/technologyAssessment/components/evaluationResultsWhole.vue +++ b/jero-web/src/views/businessSupport/technologyAssessment/components/evaluationResultsWhole.vue @@ -6,7 +6,7 @@ - {{$t('regulatoryTechnicalEvaluationResults')}} + {{$route.query.serialNumber +' '+$t('regulatoryTechnicalEvaluationResults')}}
@@ -19,18 +19,18 @@
- dskf' ;sdfl';s sd稍等景点风光大家分工法规地方官给,。不买;两个客人坦克;量大幅高开的管理骨科大夫给的快感的法律公开大家赶快来的风格 + {{$route.query.processBackground}}
- +
-
- {{$t('engineerFeedbackResults')}} +
+ {{$t('engineer')+item.createBy+$t('feedbackResults')}}
-
- +
+ {{$t('fileExport')}}
@@ -40,77 +40,77 @@ size="middle" :loading="loading" :pagination="false" - :scroll="{x: '100%'}" - :data-source="item.dataList" + :scroll="{x: '100%',y:350}" + :data-source="item.lawsTechnologyEvaluationResultEOList" :columns="columns" > + + + {{ $t('viewFile') }} + + -- +
+
+ {{$t('complianceResults')}}:{{item.complianceResultName}} +
+ \ No newline at end of file From fad922ffba7c1f6ed8e3f324b1de2e9767afe5c7 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Thu, 14 Jul 2022 16:58:47 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B7=B2=E7=9F=A5?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ParameterItemCollectionList.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue index 50832f377..73f000e8c 100644 --- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue +++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue @@ -1180,12 +1180,12 @@ selectedRowKeysValue.push(res) } }) + console.log(selectedRowKeysValue) for (let i = 0; i < selectedRowKeysValue.length; i++) { let postDateobj = {} let itemIn = Object.keys(selectedRowKeysValue[i]) for (let j = 0; j < itemIn.length; j++) { - if (itemIn[j] !== 'sdt') { - console.log(selectedRowKeysValue[i][itemIn[j]]) + if (itemIn[j] !== 'sdt' && selectedRowKeysValue[i][itemIn[j]].list) { if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) { postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]] for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) { @@ -1244,7 +1244,7 @@ let postDateobj = {} let itemIn = Object.keys(selectedRowKeysValue[i]) for (let j = 0; j < itemIn.length; j++) { - if (itemIn[j] !== 'sdt') { + if (itemIn[j] !== 'sdt' && selectedRowKeysValue[i][itemIn[j]].list) { if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) { postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]] for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) { From db50bba7f2e3fcc0920481a7b7624f5e011febb0 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Thu, 14 Jul 2022 17:19:52 +0800 Subject: [PATCH 09/12] =?UTF-8?q?=E5=B8=83=E5=B1=80=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 3 + jero-web/src/common/lang/zh-cn.js | 3 + .../documentComparison/index.vue | 2 +- .../documentTranslation/index.vue | 330 ++++++++++++++++++ 4 files changed, 337 insertions(+), 1 deletion(-) create mode 100644 jero-web/src/views/documentTools/documentTranslation/index.vue diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index d8636703c..41480baf8 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1142,4 +1142,7 @@ module.exports = { comparisonResults:'Comparison results', Published:'Published', initiateComparison:'Initiate comparison', + translationLanguage:'Translation language', + translationResults:'Translation results', + conversionTime:'Conversion time', } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index 15bbd4c33..98f362d10 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1146,4 +1146,7 @@ module.exports = { comparisonResults:'对比结果', Published:'已发布', initiateComparison:'发起对比', + translationLanguage:'翻译语言', + translationResults:'翻译结果', + conversionTime:'转换时间', } \ No newline at end of file diff --git a/jero-web/src/views/documentTools/documentComparison/index.vue b/jero-web/src/views/documentTools/documentComparison/index.vue index 034141af2..9038af696 100644 --- a/jero-web/src/views/documentTools/documentComparison/index.vue +++ b/jero-web/src/views/documentTools/documentComparison/index.vue @@ -73,7 +73,7 @@ {{$t('comparisonResults')}} - {{!record.readFlag || record.readFlag == 0 ? $t('subscribe') :$t('CancelSubscribe')}} + {{!record.state || record.state == 0 ? $t('release') :$t('withdraw')}} {{$t('edit')}} {{$t('delete')}} diff --git a/jero-web/src/views/documentTools/documentTranslation/index.vue b/jero-web/src/views/documentTools/documentTranslation/index.vue new file mode 100644 index 000000000..28593c4e6 --- /dev/null +++ b/jero-web/src/views/documentTools/documentTranslation/index.vue @@ -0,0 +1,330 @@ + + + + \ No newline at end of file From 37ad2c8e3d8b04c8c17347ae281483d6ef1ddcee Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Thu, 14 Jul 2022 17:45:04 +0800 Subject: [PATCH 10/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8A=80=E6=9C=AF?= =?UTF-8?q?=E8=AF=84=E4=BC=B0=E7=BB=86=E8=8A=82=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/evaluationResultsClause.vue | 10 ++- .../components/evaluationResultsWhole.vue | 12 +++- .../components/initiatingProcess.vue | 63 +++++++++++-------- .../technologyAssessment/index.vue | 19 ++++-- 4 files changed, 69 insertions(+), 35 deletions(-) diff --git a/jero-web/src/views/businessSupport/technologyAssessment/components/evaluationResultsClause.vue b/jero-web/src/views/businessSupport/technologyAssessment/components/evaluationResultsClause.vue index 7ddf2723d..0eb59c342 100644 --- a/jero-web/src/views/businessSupport/technologyAssessment/components/evaluationResultsClause.vue +++ b/jero-web/src/views/businessSupport/technologyAssessment/components/evaluationResultsClause.vue @@ -230,7 +230,15 @@ }, methods: { CurrentStandard() { - + let query = { + firstInitiation: '2', + whetherTobring: '1' + } + let newUrl = this.$router.resolve({ + path: '/evaluationInitiationProcess', + query: query + }) + window.open(newUrl.href, '_blank') }, onSelectChange(value) { this.selectedRowKeys = value diff --git a/jero-web/src/views/businessSupport/technologyAssessment/components/evaluationResultsWhole.vue b/jero-web/src/views/businessSupport/technologyAssessment/components/evaluationResultsWhole.vue index cde7e8ce8..8d83206c5 100644 --- a/jero-web/src/views/businessSupport/technologyAssessment/components/evaluationResultsWhole.vue +++ b/jero-web/src/views/businessSupport/technologyAssessment/components/evaluationResultsWhole.vue @@ -81,7 +81,7 @@ dataSource: [], url: { list: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationComplianceResultEO/list', - exportData:'lawsTechnologyEvaluation/lawsTechnologyEvaluationComplianceResultEO/exportZip', + exportData: 'lawsTechnologyEvaluation/lawsTechnologyEvaluationComplianceResultEO/exportZip' }, selectedRowKeys: [], loading: false, @@ -114,7 +114,15 @@ }, methods: { CurrentStandard() { - + let query = { + firstInitiation: '2', + whetherTobring: '2' + } + let newUrl = this.$router.resolve({ + path: '/evaluationInitiationProcess', + query: query + }) + window.open(newUrl.href, '_blank') }, onSelectChange(value) { diff --git a/jero-web/src/views/businessSupport/technologyAssessment/components/initiatingProcess.vue b/jero-web/src/views/businessSupport/technologyAssessment/components/initiatingProcess.vue index e5d051ce9..b89247abf 100644 --- a/jero-web/src/views/businessSupport/technologyAssessment/components/initiatingProcess.vue +++ b/jero-web/src/views/businessSupport/technologyAssessment/components/initiatingProcess.vue @@ -5,34 +5,37 @@ />
-
+
- - -
- +
+ + +
+ +
+ @@ -238,6 +241,7 @@ }, searchParmes: {}, selectedRowKeysRecord: [], + whetherDisplay: false, columns: [ { title: this.$t('standard'), @@ -293,6 +297,11 @@ } else { this.isTrue = false } + if (this.$route.query.firstInitiation == '1') { + this.whetherDisplay = true + } else { + this.whetherDisplay = false + } eventBUs.$on('searchQuery', search => { Object.keys(search).forEach(res => { if (search[res] instanceof Array) { @@ -454,7 +463,9 @@ value.startTime = startTime value.flowStatus = 'Underway' value.taskAffirmDueDate = value.endTime - value.lawsTechnologyEvaluationId = this.getUUID() + if (!value.lawsTechnologyEvaluationId){ + value.lawsTechnologyEvaluationId = this.getUUID() + } value.regulationOwnerId = this.userInfo().id value.regulationOwnerName = this.userInfo().username Object.keys(value).forEach(res => { @@ -474,14 +485,14 @@ query = { type: 6, ...value, - firstInitiation:"1", + firstInitiation: this.$route.query.firstInitiation, msg: JSON.stringify({ itemList: dataList }).replace(/\"/g, '\'') } } else { query = { type: 6, ...value, - firstInitiation:"1", + firstInitiation: this.$route.query.firstInitiation, msg: JSON.stringify({ evaluators: value.evaluators }).replace(/\"/g, '\'') } } diff --git a/jero-web/src/views/businessSupport/technologyAssessment/index.vue b/jero-web/src/views/businessSupport/technologyAssessment/index.vue index a91cd38f5..f0d7db090 100644 --- a/jero-web/src/views/businessSupport/technologyAssessment/index.vue +++ b/jero-web/src/views/businessSupport/technologyAssessment/index.vue @@ -339,6 +339,7 @@ this.$refs.ruleForm.validate(valid => { if (valid) { this.visible = false + this.formInline.firstInitiation = '1' let newUrl = this.$router.resolve({ path: '/evaluationInitiationProcess', query: this.formInline @@ -365,9 +366,12 @@ let newUrl = this.$router.resolve({ path: '/evaluationResultsWhole', query: { - id:row.id, - processBackground:row.processBackground, - serialNumber:row.serialNumber + id: row.id, + processBackground: row.processBackground, + serialNumber: row.serialNumber, + title: row.title, + technologyTerritory: row.technologyTerritory, + standId: row.standId } }) window.open(newUrl.href, '_blank') @@ -375,9 +379,12 @@ let newUrl = this.$router.resolve({ path: '/evaluationResultsClause', query: { - id:row.id, - processBackground:row.processBackground, - serialNumber:row.serialNumber + id: row.id, + processBackground: row.processBackground, + serialNumber: row.serialNumber, + title: row.title, + technologyTerritory: row.technologyTerritory, + standId: row.standId } }) window.open(newUrl.href, '_blank') From 933335d491b4319f14e8c1aaaaa433871129dd54 Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Thu, 14 Jul 2022 18:13:48 +0800 Subject: [PATCH 11/12] =?UTF-8?q?=E6=B3=95=E8=A7=84=E6=8A=80=E6=9C=AF?= =?UTF-8?q?=E8=AF=84=E4=BC=B0-=E6=8E=A5=E5=8F=A3=E5=AE=8C=E5=96=84?= =?UTF-8?q?=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); } From 832b866eecea3fe50f66bc06e2794eddcca86b4d Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Thu, 14 Jul 2022 18:14:06 +0800 Subject: [PATCH 12/12] update --- .../{job => enums}/LawsTechnologyEvaluationNodeEnum.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/{job => enums}/LawsTechnologyEvaluationNodeEnum.java (96%) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/job/LawsTechnologyEvaluationNodeEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/enums/LawsTechnologyEvaluationNodeEnum.java similarity index 96% rename from jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/job/LawsTechnologyEvaluationNodeEnum.java rename to jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/enums/LawsTechnologyEvaluationNodeEnum.java index 745cb58d4..3cc205f1c 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/job/LawsTechnologyEvaluationNodeEnum.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/enums/LawsTechnologyEvaluationNodeEnum.java @@ -1,4 +1,4 @@ -package com.jero.modules.lawsTechnologyEvaluation.job; +package com.jero.modules.lawsTechnologyEvaluation.enums; import com.alibaba.druid.util.StringUtils; import com.jero.common.constant.enums.CutEnum;