From 398febf154f571064469d5e00b0fb96f10e7838b Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Mon, 18 Jul 2022 09:39:35 +0800 Subject: [PATCH 01/60] =?UTF-8?q?=E6=B3=95=E8=A7=84=E7=AC=A6=E5=90=88?= =?UTF-8?q?=E6=80=A7=E7=9C=8B=E6=9D=BF=E6=9B=B4=E6=8D=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../regulationsKanban/components/addModel.vue | 6 ++-- .../src/views/regulationsKanban/index.vue | 30 +++++++++---------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/jero-web/src/views/regulationsKanban/components/addModel.vue b/jero-web/src/views/regulationsKanban/components/addModel.vue index 6039934a4..3bf72e72d 100644 --- a/jero-web/src/views/regulationsKanban/components/addModel.vue +++ b/jero-web/src/views/regulationsKanban/components/addModel.vue @@ -235,12 +235,10 @@ export default { loadData() { let _this = this let params = { - pageNo: this.pageNo, - pageSize: this.pageSize, - paramsManifestId:this.paramsManifestId, + id:this.paramsManifestId, ...this.formData } - getAction('params/report/exportHistoryPage', params).then((res) => { + getAction('project/lawsComplianceBoard/queryComplianceResultList', params).then((res) => { if (res.success) { this.areaTable = res.result.records this.total = res.result.total diff --git a/jero-web/src/views/regulationsKanban/index.vue b/jero-web/src/views/regulationsKanban/index.vue index bbbf53682..5c49ea3e2 100644 --- a/jero-web/src/views/regulationsKanban/index.vue +++ b/jero-web/src/views/regulationsKanban/index.vue @@ -18,7 +18,7 @@ {{$t('title')}} + v-model="queryParam.title"> @@ -26,7 +26,7 @@
{{ $t('status') }}
- @@ -37,7 +37,7 @@
{{ $t('technicalField') }}
- @@ -130,7 +130,7 @@ export default { fieldList: [ { type: 'string', - value: 'standard', + value: 'serialNumber', text: this.$t('standard') }, { @@ -140,18 +140,18 @@ export default { }, { type: '', - value: 'status', + value: ' state', text: this.$t('status'), dictCode: 'implement_type'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框 }, - { - type: 'string', - value: 'category', - text: this.$t('category') - }, + // { + // type: 'string', + // value: 'technologyTerritory', + // text: this.$t('category') + // }, { type: '', - value: 'technicalField', + value: 'technologyTerritory', text: this.$t('technicalField'), dictCode: 'implement_type'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框 }, @@ -160,7 +160,7 @@ export default { dataSource: [], confirmLoading: false, url: { - list: 'params/report/page' + list: 'project/lawsComplianceBoard/page' }, total: 0, pageSize: 10, @@ -170,7 +170,7 @@ export default { { title: this.$t('standard'), align: 'center', - dataIndex: 'standard' + dataIndex: 'serialNumber' }, { title: this.$t('title'), @@ -180,7 +180,7 @@ export default { { title: this.$t('status'), align: 'center', - dataIndex: 'status' + dataIndex: 'state' }, // { // title: this.$t('category'), @@ -190,7 +190,7 @@ export default { { title: this.$t('technicalField'), align: 'center', - dataIndex: 'technicalField' + dataIndex: 'technologyTerritory' }, { title: this.$t('RegulatoryProcessEvaluationResults'), From f66688cd3f4a43cb6e13941c0ab9faafde633108 Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Mon, 18 Jul 2022 10:25:13 +0800 Subject: [PATCH 02/60] =?UTF-8?q?=E6=B3=95=E8=A7=84=E7=AC=A6=E5=90=88?= =?UTF-8?q?=E6=80=A7=E7=9C=8B=E6=9D=BF-=E5=AF=BC=E5=87=BA=E7=AC=A6?= =?UTF-8?q?=E5=90=88=E6=80=A7=E7=BB=93=E6=9E=9C=E3=80=81=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E7=AC=A6=E5=90=88=E6=80=A7=E7=BB=93=E6=9E=9C=E6=98=8E=E7=BB=86?= =?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 --- .../LawsComplianceBoardController.java | 24 +++ .../mapper/LawsComplianceBoardMapper.java | 9 +- .../mapper/xml/LawsComplianceBoardMapper.xml | 37 ++++ .../service/ILawsComplianceBoardService.java | 18 ++ .../impl/LawsComplianceBoardServiceImpl.java | 161 ++++++++++++++++++ 5 files changed, 248 insertions(+), 1 deletion(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/LawsComplianceBoardController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/LawsComplianceBoardController.java index b5167fba8..0c5724ec6 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/LawsComplianceBoardController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/LawsComplianceBoardController.java @@ -14,6 +14,8 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.util.Map; @Api(tags="法规符合性看板") @@ -42,4 +44,26 @@ public class LawsComplianceBoardController { JSONObject result = this.lawsComplianceBoardService.queryComplianceResultList(params); return Result.OK(result); } + + /** + * 导出符合性结果 + * @param response + * @param request + * @param params + */ + @RequestMapping(value = "/exportComplianceResult") + public void exportComplianceResult(HttpServletResponse response, HttpServletRequest request,@RequestParam Map params){ + this.lawsComplianceBoardService.exportComplianceResult(response,request,params); + } + + /** + * 导出符合性结果明细 + * @param response + * @param request + * @param params + */ + @RequestMapping(value = "/exportComplianceResultDetail") + public void exportComplianceResultDetail(HttpServletResponse response, HttpServletRequest request,@RequestParam Map params){ + this.lawsComplianceBoardService.exportComplianceResultDetail(response,request,params); + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/LawsComplianceBoardMapper.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/LawsComplianceBoardMapper.java index cc7849ae8..3cbc308d1 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/LawsComplianceBoardMapper.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/LawsComplianceBoardMapper.java @@ -8,7 +8,7 @@ import java.util.Map; public interface LawsComplianceBoardMapper { /** - * 查询出 启动过 设计、prehomo、验证符合性、法规技术评估、法规意见收集其中一个流程 的数据 + * 分页查询出 启动过 设计、prehomo、验证符合性、法规技术评估、法规意见收集其中一个流程 的数据 * @param page * @param params * @return @@ -21,4 +21,11 @@ public interface LawsComplianceBoardMapper { * @return */ List> queryComplianceResultList(@Param("params") Map params); + + /** + * 查询出 启动过 设计、prehomo、验证符合性、法规技术评估、法规意见收集其中一个流程 的数据列表 + * @param params + * @return + */ + List> queryList(Map params); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/xml/LawsComplianceBoardMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/xml/LawsComplianceBoardMapper.xml index 08027e0bf..84fbb04fa 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/xml/LawsComplianceBoardMapper.xml +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/xml/LawsComplianceBoardMapper.xml @@ -62,4 +62,41 @@ and pni.project_name like CONCAT(CONCAT('%',#{params.projectName}),'%') + + + + + where 1=1 + + + and id ${idOperator} #{id} + + + and type ${typeOperator} #{type} + + + diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/ILawsComplianceBoardService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/ILawsComplianceBoardService.java index 12260ef23..f3aea42f7 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/ILawsComplianceBoardService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/ILawsComplianceBoardService.java @@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.jero.common.api.vo.Result; import net.sf.json.JSONObject; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.util.Map; public interface ILawsComplianceBoardService { @@ -15,4 +17,20 @@ public interface ILawsComplianceBoardService { * @return */ JSONObject queryComplianceResultList(Map params); + + /** + * 导出符合性结果 + * @param response + * @param request + * @param params + */ + void exportComplianceResult(HttpServletResponse response, HttpServletRequest request, Map params); + + /** + * 导出符合性结果明细 + * @param response + * @param request + * @param params + */ + void exportComplianceResultDetail(HttpServletResponse response, HttpServletRequest request, Map params); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/LawsComplianceBoardServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/LawsComplianceBoardServiceImpl.java index c95840dda..a477675b0 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/LawsComplianceBoardServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/LawsComplianceBoardServiceImpl.java @@ -3,6 +3,8 @@ package com.jero.modules.project.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.jero.common.constant.enums.CutEnum; +import com.jero.common.exception.JeroBootException; import com.jero.modules.document.enums.FieldTypeEnum; import com.jero.modules.document.service.IBussDocumentLibraryEOService; import com.jero.modules.document.vo.QueryConditionVO; @@ -16,12 +18,19 @@ import com.jero.modules.system.util.StringUtils; import net.sf.json.JSONObject; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.ObjectUtils; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.ss.usermodel.*; import org.jetbrains.annotations.NotNull; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.*; +import java.util.Arrays; import java.util.List; import java.util.Map; @@ -83,6 +92,145 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi return result; } + @Override + public void exportComplianceResult(HttpServletResponse response, HttpServletRequest request, Map params) { + String cut = (String) params.get("cut"); + String condition = this.getConditionStr(params); + params.put("condition",condition); + List> exportData = this.lawsComplianceBoardMapper.queryList(params); + if(CollectionUtils.isNotEmpty(exportData)){ + String title = ""; + String fileName = ""; + if(StringUtils.equals(cut, CutEnum.CN.getValue())){ + title = "编号,标题,状态,技术领域,责任领域,相关项目,设计符合性,Pre-Homo确认,验证符合性"; + fileName = "符合性结果" + ".xlsx"; + }else if(StringUtils.equals(cut,CutEnum.EN.getValue())){ + title = "Serial number,Title,State,Technology territory,Responsible Field,Relevant project,Design conformance,Pre-Homo Confirm,Verify conformance"; + fileName = "Compliance results" + ".xlsx"; + } + OutputStream os = null; + HSSFWorkbook workbook = new HSSFWorkbook(); + + 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);//自动换行 + + //创建表头 + String[] firstLineTitleArr = title.split(","); + Row firstRow = sheet.createRow(0); + + //设置居中、表头值。 + for (int i = 0; i <= firstLineTitleArr.length; i++){ + Cell cell = firstRow.createCell(i); + cell.setCellStyle(titleCellStyle); + cell.setCellValue(firstLineTitleArr[i]); + } + + //设置导出数据 + if(CollectionUtils.isNotEmpty(exportData)) { + int rowIndex = 1; + for (int dataIndex = 0; dataIndex < exportData.size(); dataIndex++) { + Row dataRow = sheet.createRow(rowIndex); + dataRow.createCell(0).setCellValue(exportData.get(dataIndex).get("serialNumber").toString()); + dataRow.createCell(1).setCellValue(exportData.get(dataIndex).get("title").toString()); + dataRow.createCell(2).setCellValue(exportData.get(dataIndex).get("state").toString()); + dataRow.createCell(3).setCellValue(exportData.get(dataIndex).get("technologyTerritory").toString()); + + dataRow.createCell(4).setCellValue(exportData.get(dataIndex).get("dutyTerritory").toString()); + dataRow.createCell(5).setCellValue(exportData.get(dataIndex).get("projectName").toString()); + dataRow.createCell(6).setCellValue(exportData.get(dataIndex).get("designStatus").toString()); + dataRow.createCell(7).setCellValue(exportData.get(dataIndex).get("prehomoStats").toString()); + dataRow.createCell(8).setCellValue(exportData.get(dataIndex).get("verifyStatus").toString()); + rowIndex ++; + } + } + os = response.getOutputStream(); + workbook.write(os); + os.flush(); + }catch (IOException ex){ + if(CutEnum.CN.getValue().equals(cut)){ + throw new JeroBootException("下载文件失败"); + }else{ + throw new JeroBootException("Failed to download file"); + } + } + } + } + + @Override + public void exportComplianceResultDetail(HttpServletResponse response, HttpServletRequest request, Map params) { + String cut = (String) params.get("cut"); + List> exportData = this.lawsComplianceBoardMapper.queryComplianceResultList(params); + if(CollectionUtils.isNotEmpty(exportData)){ + String title = ""; + String fileName = ""; + if(StringUtils.equals(cut, CutEnum.CN.getValue())){ + title = "责任领域,相关项目,设计符合性,Pre-Homo确认,验证符合性"; + fileName = "符合性结果" + ".xlsx"; + }else if(StringUtils.equals(cut,CutEnum.EN.getValue())){ + title = "Responsible Field,Relevant project,Design conformance,Pre-Homo Confirm,Verify conformance"; + fileName = "Compliance results" + ".xlsx"; + } + OutputStream os = null; + HSSFWorkbook workbook = new HSSFWorkbook(); + + 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);//自动换行 + + //创建表头 + String[] firstLineTitleArr = title.split(","); + Row firstRow = sheet.createRow(0); + + //设置居中、表头值。 + for (int i = 0; i <= firstLineTitleArr.length; i++){ + Cell cell = firstRow.createCell(i); + cell.setCellStyle(titleCellStyle); + cell.setCellValue(firstLineTitleArr[i]); + } + + //设置导出数据 + if(CollectionUtils.isNotEmpty(exportData)) { + int rowIndex = 1; + for (int dataIndex = 0; dataIndex < exportData.size(); dataIndex++) { + Row dataRow = sheet.createRow(rowIndex); + dataRow.createCell(0).setCellValue(exportData.get(dataIndex).get("dutyTerritory").toString()); + dataRow.createCell(1).setCellValue(exportData.get(dataIndex).get("projectName").toString()); + dataRow.createCell(2).setCellValue(exportData.get(dataIndex).get("designStatus").toString()); + dataRow.createCell(3).setCellValue(exportData.get(dataIndex).get("prehomoStats").toString()); + dataRow.createCell(4).setCellValue(exportData.get(dataIndex).get("verifyStatus").toString()); + rowIndex ++; + } + } + os = response.getOutputStream(); + workbook.write(os); + os.flush(); + }catch (IOException ex){ + if(CutEnum.CN.getValue().equals(cut)){ + throw new JeroBootException("下载文件失败"); + }else{ + throw new JeroBootException("Failed to download file"); + } + } + } + } + @NotNull public String getConditionStr(Map parameter) { @@ -184,6 +332,19 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi } } + String ids = (String) parameter.get("ids"); + if(StringUtils.isNotEmpty(ids)){ + List idList = Arrays.asList(ids.split(",")); + String idStr = ""; + for (String id : idList) { + idStr += "'"+id+"',"; + } + if(StringUtils.isNotEmpty(idStr)){ + idStr = idStr.substring(0,idStr.length()-1); + conditionSb.append(" and id in("+idStr+")"); + } + } + //处理列表表头排序 /*if (StringUtils.isNotBlank((String) parameter.get("orderByField"))) { conditionSb.append(" order by " + (String) parameter.get("orderByField")); From 4573e4dc24bf61324f038b94716c2369b936ced0 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Mon, 18 Jul 2022 10:57:25 +0800 Subject: [PATCH 03/60] =?UTF-8?q?=E5=B8=83=E5=B1=80=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E5=AF=B9=E6=AF=94?= 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 + jero-web/src/components/layouts/TabLayout.vue | 1 + jero-web/src/config/router.config.js | 5 + .../components/initiateComparison.vue | 445 ++++++++++++++++++ .../documentComparison/index.vue | 5 +- 6 files changed, 461 insertions(+), 1 deletion(-) create mode 100644 jero-web/src/views/documentTools/documentComparison/components/initiateComparison.vue diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index fbec2b870..299e1f65d 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1151,4 +1151,7 @@ module.exports = { CommentsCollectionResultsForReference:'Comments Collection Results For Reference', TechnicalEvaluationResultsForReference:'Technical Evaluation Results For Reference', ComplianceConfirmationRecord:'Compliance Confirmation Record', + noComparisonDocumentSelected:'No comparison document selected', + RemarkInfo:'Remarks Info', + initiateDocumentComparison:'Initiate Document Comparison', } \ 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 ac2cf6d24..7a52eeddf 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1155,4 +1155,7 @@ module.exports = { CommentsCollectionResultsForReference:'意见收集结果参考', TechnicalEvaluationResultsForReference:'技术评估结果参考', ComplianceConfirmationRecord:'符合性确认记录', + noComparisonDocumentSelected:'未选择对比文档', + RemarkInfo:'备注信息', + initiateDocumentComparison:'发起文档对比', } \ No newline at end of file diff --git a/jero-web/src/components/layouts/TabLayout.vue b/jero-web/src/components/layouts/TabLayout.vue index 216d49f12..42889f88b 100644 --- a/jero-web/src/components/layouts/TabLayout.vue +++ b/jero-web/src/components/layouts/TabLayout.vue @@ -97,6 +97,7 @@ this.$route.path == '/handshakeProcess' || this.$route.path == '/projectStatusAndProgress' || this.$route.path == '/TaskPlanList' || + this.$route.path == '/initiateDocumentComparison' || this.$route.path == '/evaluationProcess' || this.$route.path == '/evaluationResultsClause' || this.$route.path == '/evaluationResultsWhole' || diff --git a/jero-web/src/config/router.config.js b/jero-web/src/config/router.config.js index 648696c1d..827486c44 100644 --- a/jero-web/src/config/router.config.js +++ b/jero-web/src/config/router.config.js @@ -382,6 +382,11 @@ export const constantRouterMap = [ name: 'evaluationProcess', component: () => import(/* webpackChunkName: "user" */ '@/views/processCenter/processForm/evaluationProcess/index') }, + { + path: '/initiateDocumentComparison', + name: 'initiateDocumentComparison', + component: () => import(/* webpackChunkName: "user" */ '@/views/documentTools/documentComparison/components/initiateComparison') + }, { path: '/handshakeProcess', name: 'handshakeProcess', diff --git a/jero-web/src/views/documentTools/documentComparison/components/initiateComparison.vue b/jero-web/src/views/documentTools/documentComparison/components/initiateComparison.vue new file mode 100644 index 000000000..5d8f4bae2 --- /dev/null +++ b/jero-web/src/views/documentTools/documentComparison/components/initiateComparison.vue @@ -0,0 +1,445 @@ + + + + + \ 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 9038af696..af40eee99 100644 --- a/jero-web/src/views/documentTools/documentComparison/index.vue +++ b/jero-web/src/views/documentTools/documentComparison/index.vue @@ -260,7 +260,10 @@ }, initiatingProcessClick(){ - + let newUrl = this.$router.resolve({ + path: '/initiateDocumentComparison', + }) + window.open(newUrl.href, '_blank') }, deleteData(val){ let _this = this From 15c4c47649efa1eef173e0b70e2a007d4f08d92c Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Mon, 18 Jul 2022 11:18:15 +0800 Subject: [PATCH 04/60] =?UTF-8?q?=E6=B3=95=E8=A7=84=E7=AC=A6=E5=90=88?= =?UTF-8?q?=E6=80=A7=E7=9C=8B=E6=9D=BF=E6=9B=B4=E6=8D=A2=E6=8E=A5=E5=8F=A3?= 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 + .../regulationsKanban/components/addModel.vue | 28 ++++++--- .../src/views/regulationsKanban/index.vue | 61 ++++++++++++++++--- 4 files changed, 78 insertions(+), 15 deletions(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index fbec2b870..6330d07f4 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1151,4 +1151,6 @@ module.exports = { CommentsCollectionResultsForReference:'Comments Collection Results For Reference', TechnicalEvaluationResultsForReference:'Technical Evaluation Results For Reference', ComplianceConfirmationRecord:'Compliance Confirmation Record', + Deriveconformanceresults:'Derive Conformance Results', + Regulatorycompliancekanban:'Regulatory Compliance Kanban', } \ 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 ac2cf6d24..0772fdc44 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1155,4 +1155,6 @@ module.exports = { CommentsCollectionResultsForReference:'意见收集结果参考', TechnicalEvaluationResultsForReference:'技术评估结果参考', ComplianceConfirmationRecord:'符合性确认记录', + Deriveconformanceresults:'导出符合性结果', + Regulatorycompliancekanban:'法规符合性看板', } \ No newline at end of file diff --git a/jero-web/src/views/regulationsKanban/components/addModel.vue b/jero-web/src/views/regulationsKanban/components/addModel.vue index 3bf72e72d..d826e6458 100644 --- a/jero-web/src/views/regulationsKanban/components/addModel.vue +++ b/jero-web/src/views/regulationsKanban/components/addModel.vue @@ -100,7 +100,7 @@ export default { columns: [ { title: this.$t('areaOfResponsibility'), - dataIndex: 'areaOfResponsibility', + dataIndex: 'dutyTerritory', width: 120, align: 'center', ellipsis: true @@ -109,28 +109,28 @@ export default { title: this.$t('RelatedItems'), align: 'center', width: 120, - dataIndex: 'RelatedItems', + dataIndex: 'projectName', ellipsis: true }, { title: this.$t('designComplianceReview'), align: 'center', width: 250, - dataIndex: 'designComplianceReview', + dataIndex: 'designStatus', ellipsis: true }, { title: this.$t('preHomeConfirmation'), align: 'center', width: 270, - dataIndex: 'preHomeConfirmation', + dataIndex: 'prehomoStatsu', ellipsis: true }, { title: this.$t('verificationComplianceReview'), align: 'center', width: 270, - dataIndex: 'verificationComplianceReview', + dataIndex: 'verifyStatus', scopedSlots: { customRender: 'file' }, ellipsis: true } @@ -234,10 +234,20 @@ export default { }, loadData() { let _this = this + let queryParam = JSON.parse(JSON.stringify(this.formData)) + if(!this.formData.dutyTerritory){ + this.formData.dutyTerritory = '' + } + if(!this.formData.projectNameId){ + this.formData.projectNameId = '' + } let params = { id:this.paramsManifestId, - ...this.formData + dutyTerritory:this.formData.dutyTerritory, + projectName:this.formData.projectName, + projectNameId:this.formData.projectNameId, } + getAction('project/lawsComplianceBoard/queryComplianceResultList', params).then((res) => { if (res.success) { this.areaTable = res.result.records @@ -247,7 +257,11 @@ export default { }, //导出 handleExportXls(){ - + let query = { + id:this.paramsManifestId, + ...this.formData + } + downloadFile('/project/lawsComplianceBoard/exportComplianceResultDetail', this.$t('complianceResults')+'.xls', query, this.Deselect) }, searchQuery() { this.loadData() diff --git a/jero-web/src/views/regulationsKanban/index.vue b/jero-web/src/views/regulationsKanban/index.vue index 5c49ea3e2..99d84b38b 100644 --- a/jero-web/src/views/regulationsKanban/index.vue +++ b/jero-web/src/views/regulationsKanban/index.vue @@ -29,7 +29,7 @@ + :triggerChange="false" :dictCode="'state'"/>
@@ -37,10 +37,21 @@
{{ $t('technicalField') }}
- + + + + +
@@ -56,6 +67,14 @@ +
+
+
+ + {{ $t('Deriveconformanceresults') }} +
+
+
{ + if (res.success) { + this.CategoryTreeList = res.result + } else { + this.CategoryTreeList = [] + } + }) + }, handleToggleSearch() { this.toggleSearchStatus = !this.toggleSearchStatus }, onSelectChange(value) { - this.selectedRowKeys = value this.selectedRowKeysArray = this.selectedRowKeys.join(',') }, + deriveconformanceresults(){ + let query = { + ...this.queryParam, + ids: this.selectedRowKeys.join(',') + } + downloadFile('/project/lawsComplianceBoard/exportComplianceResult', this.$t('complianceResults')+'.xls', query, this.Deselect) + }, // 导出历史 handlecody(e) { this.drawerVisible = true @@ -309,20 +347,27 @@ export default { this.getList() }, getList() { + if (this.queryParam.technologyTerritory) { + this.queryParam.technologyTerritory = this.queryParam.technologyTerritory.join(',') + } + let queryParam = JSON.parse(JSON.stringify(this.queryParam)) let query = { pageNo: this.pageNo, pageSize: this.pageSize, ...this.queryParamQuery, ...this.queryParam } + + console.log(this.queryParam.technologyTerritory) this.loading = true getAction(this.url.list, query).then((res) => { - if (res.success) { + if (res) { if (res.result.current > 1 && res.result.records.length == 0) { this.pageNo = res.result.current - 1 this.getList() return } + console.log(res.result) this.dataSource = res.result.records || [] this.total = res.result.total From 66acb9c18cfa4c2efd0311d0687d647c63d254aa Mon Sep 17 00:00:00 2001 From: liyawei Date: Mon, 18 Jul 2022 11:51:20 +0800 Subject: [PATCH 05/60] =?UTF-8?q?=E8=AE=A4=E8=AF=81-=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E9=A1=B9=E6=94=B6=E9=9B=86-=E5=8F=98=E6=9B=B4=EF=BC=9A?= =?UTF-8?q?=E8=B4=A3=E4=BB=BB=E9=A2=86=E5=9F=9Fbug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../collect/entity/ParamsCollectManifestBaseEO.java | 3 --- .../impl/ParamsCollectManifestEOServiceImpl.java | 12 ++++++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestBaseEO.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestBaseEO.java index ab5cc26e9..8e42caf35 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestBaseEO.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestBaseEO.java @@ -1,8 +1,6 @@ package com.jero.modules.cert.collect.entity; -import com.baomidou.mybatisplus.annotation.FieldStrategy; import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; @@ -121,7 +119,6 @@ public class ParamsCollectManifestBaseEO implements Serializable { /**工程接口人*/ @Excel(name = "工程接口人", width = 15) @ApiModelProperty(value = "工程接口人") - @TableField(updateStrategy = FieldStrategy.IGNORED) private String sdt; /**填写人*/ diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java index 3821d7723..3afdc6d0f 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java @@ -382,7 +382,11 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl Date: Mon, 18 Jul 2022 13:54:37 +0800 Subject: [PATCH 06/60] =?UTF-8?q?=E5=B8=83=E5=B1=80=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E5=AF=B9=E6=AF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 4 + jero-web/src/common/lang/zh-cn.js | 4 + jero-web/src/components/layouts/TabLayout.vue | 1 + jero-web/src/config/router.config.js | 5 + .../components/documentDataComparison.vue | 385 ++++++++++++++++++ .../documentComparison/index.vue | 2 +- 6 files changed, 400 insertions(+), 1 deletion(-) create mode 100644 jero-web/src/views/documentTools/documentComparison/components/documentDataComparison.vue diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 3d6d5c93d..9c6d5420c 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1154,6 +1154,10 @@ module.exports = { noComparisonDocumentSelected:'No comparison document selected', RemarkInfo:'Remarks Info', initiateDocumentComparison:'Initiate Document Comparison', + comparativeComments:'Comparative Comments', + viewTheComparisonResults:'View The Comparison Results', + addFullTextComment:'Add Full Text Comment', + turnOffAutomaticMatching:'Turn Off Automatic Matching', Deriveconformanceresults:'Derive Conformance Results', Regulatorycompliancekanban:'Regulatory Compliance Kanban', } \ 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 18530b213..303b3ba6a 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1160,4 +1160,8 @@ module.exports = { noComparisonDocumentSelected:'未选择对比文档', RemarkInfo:'备注信息', initiateDocumentComparison:'发起文档对比', + comparativeComments:'对比评论', + viewTheComparisonResults:'查看对比结果', + addFullTextComment:'添加全文评论', + turnOffAutomaticMatching:'关闭自动匹配', } \ No newline at end of file diff --git a/jero-web/src/components/layouts/TabLayout.vue b/jero-web/src/components/layouts/TabLayout.vue index 42889f88b..042a5d153 100644 --- a/jero-web/src/components/layouts/TabLayout.vue +++ b/jero-web/src/components/layouts/TabLayout.vue @@ -97,6 +97,7 @@ this.$route.path == '/handshakeProcess' || this.$route.path == '/projectStatusAndProgress' || this.$route.path == '/TaskPlanList' || + this.$route.path == '/documentDataComparison' || this.$route.path == '/initiateDocumentComparison' || this.$route.path == '/evaluationProcess' || this.$route.path == '/evaluationResultsClause' || diff --git a/jero-web/src/config/router.config.js b/jero-web/src/config/router.config.js index 827486c44..2f59d7f5e 100644 --- a/jero-web/src/config/router.config.js +++ b/jero-web/src/config/router.config.js @@ -387,6 +387,11 @@ export const constantRouterMap = [ name: 'initiateDocumentComparison', component: () => import(/* webpackChunkName: "user" */ '@/views/documentTools/documentComparison/components/initiateComparison') }, + { + path: '/documentDataComparison', + name: 'documentDataComparison', + component: () => import(/* webpackChunkName: "user" */ '@/views/documentTools/documentComparison/components/documentDataComparison') + }, { path: '/handshakeProcess', name: 'handshakeProcess', diff --git a/jero-web/src/views/documentTools/documentComparison/components/documentDataComparison.vue b/jero-web/src/views/documentTools/documentComparison/components/documentDataComparison.vue new file mode 100644 index 000000000..4b0eee9f0 --- /dev/null +++ b/jero-web/src/views/documentTools/documentComparison/components/documentDataComparison.vue @@ -0,0 +1,385 @@ + + + + + \ 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 af40eee99..6f9e548a4 100644 --- a/jero-web/src/views/documentTools/documentComparison/index.vue +++ b/jero-web/src/views/documentTools/documentComparison/index.vue @@ -261,7 +261,7 @@ }, initiatingProcessClick(){ let newUrl = this.$router.resolve({ - path: '/initiateDocumentComparison', + path: '/documentDataComparison', }) window.open(newUrl.href, '_blank') }, From f63feeb9d7fe3737402d8cdb241b22116456fe4c Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Mon, 18 Jul 2022 13:56:22 +0800 Subject: [PATCH 07/60] =?UTF-8?q?=E6=B3=95=E8=A7=84=E7=AC=A6=E5=90=88?= =?UTF-8?q?=E6=80=A7=E7=9C=8B=E6=9D=BF=E6=9F=A5=E8=AF=A2=E5=A4=84=E7=90=86?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/xml/LawsComplianceBoardMapper.xml | 21 +- .../service/ILawsComplianceBoardService.java | 8 + .../impl/LawsComplianceBoardServiceImpl.java | 208 ++++++++++++++++-- 3 files changed, 211 insertions(+), 26 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/xml/LawsComplianceBoardMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/xml/LawsComplianceBoardMapper.xml index 84fbb04fa..737cec12d 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/xml/LawsComplianceBoardMapper.xml +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/xml/LawsComplianceBoardMapper.xml @@ -38,7 +38,7 @@ pyni.year_name as "yearName", pti.design_status as "designStatus", pti.design_p_id as "designPId", - pti.prehomo_status as "prehomoStatsu", + pti.prehomo_status as "prehomoStatus", pti.prehomo_p_id as "prehomoPId", pti.verify_status as "verifyStatus", pti.verify_p_id as "verifyPId", @@ -50,17 +50,26 @@ LEFT JOIN project_name_info pni ON ( pni.id = plb.project_name_id ) LEFT JOIN project_year_name_info pyni ON ( pyni.id = plb.year_name_id ) WHERE - pli.stand_id = #{params.id} - AND( pti.design_p_id IS NOT NULL OR pti.prehomo_p_id IS NOT NULL OR pti.verify_p_id IS NOT NULL ) - + 1=1 + + and pli.stand_id = #{params.id} + + and ( pti.design_p_id is not null or pti.prehomo_p_id is not null or pti.verify_p_id is not null ) + and pli.duty_territory like CONCAT(CONCAT('%',#{params.dutyTerritory}),'%') - + and pni.id like CONCAT(CONCAT('%',#{params.projectNameId}),'%') - + and pni.project_name like CONCAT(CONCAT('%',#{params.projectName}),'%') + + and pli.stand_id in + + #{item} + + diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/LawsComplianceBoardServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/LawsComplianceBoardServiceImpl.java index 10c3931f0..1a9c4150c 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/LawsComplianceBoardServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/LawsComplianceBoardServiceImpl.java @@ -97,7 +97,7 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi map.setValue(""); } }); - if(StringUtils.isNotEmpty(dataMap.get("state").toString())){ + if(dataMap.get("state") != null){ String state_dicText = ""; if(StringUtils.equals(cut,CutEnum.CN.getValue())){ state_dicText = stateSysDictItems.stream().filter(sysDictItem -> { @@ -118,7 +118,7 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi } dataMap.put("state_dicText",state_dicText); } - if(StringUtils.isNotEmpty(dataMap.get("technologyTerritory").toString())){ + if(dataMap.get("technologyTerritory") != null){ String technologyTerritory_dictText = disposeTechnologyTerritory(technologyTerritoryList, dataMap.get("technologyTerritory").toString(), cut); dataMap.put("technologyTerritory_dicText",technologyTerritory_dictText); } @@ -153,33 +153,39 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi if(CollectionUtils.isNotEmpty(complianceResultList)){ List dutyTerritoryDictItemList = sysDictItemService.selectItemsByDictCode("duty_territory"); for (Map complianceResult : complianceResultList) { - if (StringUtils.isNotEmpty(complianceResult.get("designStatus").toString())) { + if (complianceResult.get("designStatus") != null) { String textByValue = DesignComplianceStatusEnum.getTextByValue(complianceResult.get("designStatus").toString(), cut); complianceResult.put("designStatus_dicText",textByValue); } - if (StringUtils.isNotEmpty(complianceResult.get("prehomoStatus").toString())) { + if (complianceResult.get("prehomoStatus") != null) { String textByValue = DesignComplianceStatusEnum.getTextByValue(complianceResult.get("prehomoStatus").toString(), cut); complianceResult.put("prehomoStatus_dicText",textByValue); } - if (StringUtils.isNotEmpty(complianceResult.get("verifyStatus").toString())) { + if (complianceResult.get("verifyStatus") != null) { String textByValue = DesignComplianceStatusEnum.getTextByValue(complianceResult.get("verifyStatus").toString(), cut); complianceResult.put("verifyStatus_dicText",textByValue); } - if (StringUtils.isNotEmpty(complianceResult.get("dutyTerritory").toString())) { + if (complianceResult.get("dutyTerritory") != null) { String dutyTerritory_dicText = ""; if (CutEnum.EN.getValue().equals(cut)) { dutyTerritory_dicText = dutyTerritoryDictItemList.stream().filter(dictItem -> { boolean flag = false; - if(StringUtils.equals(dictItem.getItemValue(),complianceResult.get("dutyTerritory").toString())){ - flag = true; + String[] dutyTerritoryArr = complianceResult.get("dutyTerritory").toString().split(","); + for (String duty : dutyTerritoryArr) { + if(StringUtils.equals(dictItem.getItemValue(),duty)){ + flag = true; + } } return flag; }).map(SysDictItem::getEnName).collect(Collectors.joining(",")); } else { dutyTerritory_dicText = dutyTerritoryDictItemList.stream().filter(dictItem -> { boolean flag = false; - if(StringUtils.equals(dictItem.getItemValue(),complianceResult.get("dutyTerritory").toString())){ - flag = true; + String[] dutyTerritoryArr = complianceResult.get("dutyTerritory").toString().split(","); + for (String duty : dutyTerritoryArr) { + if(StringUtils.equals(dictItem.getItemValue(),duty)){ + flag = true; + } } return flag; }).map(SysDictItem::getItemText).collect(Collectors.joining(",")); @@ -193,9 +199,16 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi @Override public void exportComplianceResult(HttpServletResponse response, HttpServletRequest request, Map params) { String cut = (String) params.get("cut"); + String exportAll = (String) params.get("exportAll"); String condition = this.getConditionStr(params); - params.put("condition",condition); - List> exportData = this.lawsComplianceBoardMapper.queryList(params); + params.put("condition",StringUtils.isNotEmpty(condition) ? condition : ""); + List> exportData = new ArrayList<>(); + if(StringUtils.equals(exportAll,"no")){ + IPage page = this.queryPageList(params); + exportData = page.getRecords(); + }else { + exportData = this.lawsComplianceBoardMapper.queryList(params); + } this.disposeData(exportData,cut); if(CollectionUtils.isNotEmpty(exportData)){ List idList = new ArrayList<>(); @@ -206,6 +219,7 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi List> complianceResultList = new ArrayList<>(); if(CollectionUtils.isNotEmpty(idList)){ complianceResultList = this.lawsComplianceBoardMapper.queryComplianceResultList(params); + this.disposeComplianceResult(complianceResultList,cut); } String title = ""; @@ -237,7 +251,8 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi Row firstRow = sheet.createRow(0); //设置居中、表头值。 - for (int i = 0; i <= firstLineTitleArr.length; i++){ + for (int i = 0; i < firstLineTitleArr.length; i++){ + sheet.setColumnWidth(i,5000); Cell cell = firstRow.createCell(i); cell.setCellStyle(titleCellStyle); cell.setCellValue(firstLineTitleArr[i]); @@ -247,46 +262,40 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi if(CollectionUtils.isNotEmpty(exportData)) { int rowIndex = 1; for (int dataIndex = 0; dataIndex < exportData.size(); dataIndex++) { - Row dataRow = sheet.createRow(rowIndex); List> byStandIdcomplianceResultList = new ArrayList<>(); if(CollectionUtils.isNotEmpty(complianceResultList)){ - int finalDataIndex = dataIndex; - byStandIdcomplianceResultList = complianceResultList.stream().filter(comlianceResult -> { - boolean flag = false; - if (StringUtils.equals(comlianceResult.get("standId").toString(), exportData.get(finalDataIndex).get("id").toString())) { - flag = true; + for (Map comlianceResult : complianceResultList) { + if (StringUtils.equals(comlianceResult.get("standId").toString(), exportData.get(dataIndex).get("id").toString())) { + byStandIdcomplianceResultList.add(comlianceResult); } - return flag; - }).collect(Collectors.toList()); + } } if(CollectionUtils.isNotEmpty(byStandIdcomplianceResultList)){ int byStandIdComlianceResultSize = byStandIdcomplianceResultList.size(); for (int i=0; i 1 && i != (byStandIdComlianceResultSize - 1)){ + rowIndex ++; + } } }else { - dataRow.createCell(0).setCellValue(exportData.get(dataIndex).get("serialNumber").toString()); - dataRow.createCell(1).setCellValue(exportData.get(dataIndex).get("title").toString()); - dataRow.createCell(2).setCellValue(exportData.get(dataIndex).get("state_dicText").toString()); - dataRow.createCell(3).setCellValue(exportData.get(dataIndex).get("technologyTerritory_dicText").toString()); - - /*dataRow.createCell(4).setCellValue(exportData.get(dataIndex).get("dutyTerritory").toString()); - dataRow.createCell(5).setCellValue(exportData.get(dataIndex).get("projectName").toString()); - dataRow.createCell(6).setCellValue(exportData.get(dataIndex).get("designStatus").toString()); - dataRow.createCell(7).setCellValue(exportData.get(dataIndex).get("prehomoStats").toString()); - dataRow.createCell(8).setCellValue(exportData.get(dataIndex).get("verifyStatus").toString());*/ + Row dataRow = sheet.createRow(rowIndex); + dataRow.createCell(0).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("serialNumber"))); + dataRow.createCell(1).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("title"))); + dataRow.createCell(2).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("state_dicText"))); + dataRow.createCell(3).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("technologyTerritory_dicText"))); } rowIndex ++; } @@ -304,10 +313,24 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi } } + /** + * 验证值是否是null + * @param str + * @return + */ + public String checkValueIsNotNull(Object str){ + String result = ""; + if(str != null){ + result = str.toString(); + } + return result; + } + @Override public void exportComplianceResultDetail(HttpServletResponse response, HttpServletRequest request, Map params) { String cut = (String) params.get("cut"); List> exportData = this.lawsComplianceBoardMapper.queryComplianceResultList(params); + this.disposeComplianceResult(exportData,cut); if(CollectionUtils.isNotEmpty(exportData)){ String title = ""; String fileName = ""; @@ -338,7 +361,8 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi Row firstRow = sheet.createRow(0); //设置居中、表头值。 - for (int i = 0; i <= firstLineTitleArr.length; i++){ + for (int i = 0; i < firstLineTitleArr.length; i++){ + sheet.setColumnWidth(i,5000); Cell cell = firstRow.createCell(i); cell.setCellStyle(titleCellStyle); cell.setCellValue(firstLineTitleArr[i]); @@ -349,11 +373,11 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi int rowIndex = 1; for (int dataIndex = 0; dataIndex < exportData.size(); dataIndex++) { Row dataRow = sheet.createRow(rowIndex); - dataRow.createCell(0).setCellValue(exportData.get(dataIndex).get("dutyTerritory_dicText").toString()); - dataRow.createCell(1).setCellValue(exportData.get(dataIndex).get("projectName").toString()); - dataRow.createCell(2).setCellValue(exportData.get(dataIndex).get("designStatus_dicText").toString()); - dataRow.createCell(3).setCellValue(exportData.get(dataIndex).get("prehomoStats_dicText").toString()); - dataRow.createCell(4).setCellValue(exportData.get(dataIndex).get("verifyStatus_dicText").toString()); + dataRow.createCell(0).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("dutyTerritory_dicText"))); + dataRow.createCell(1).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("projectName"))); + dataRow.createCell(2).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("designStatus_dicText"))); + dataRow.createCell(3).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("prehomoStatus_dicText"))); + dataRow.createCell(4).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("verifyStatus_dicText"))); rowIndex ++; } } From a4ffe63129e09144a063da59b623e6dc44e464b9 Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Mon, 18 Jul 2022 15:53:44 +0800 Subject: [PATCH 12/60] =?UTF-8?q?=E6=B3=95=E8=A7=84=E7=AC=A6=E5=90=88?= =?UTF-8?q?=E6=80=A7=E7=9C=8B=E6=9D=BF=E9=AB=98=E7=BA=A7=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../regulationsKanban/components/addModel.vue | 126 ++---------------- .../src/views/regulationsKanban/index.vue | 46 ++----- 2 files changed, 23 insertions(+), 149 deletions(-) diff --git a/jero-web/src/views/regulationsKanban/components/addModel.vue b/jero-web/src/views/regulationsKanban/components/addModel.vue index 0c3cf5453..4235b2707 100644 --- a/jero-web/src/views/regulationsKanban/components/addModel.vue +++ b/jero-web/src/views/regulationsKanban/components/addModel.vue @@ -20,7 +20,7 @@ - {{element.projectName}} @@ -163,35 +163,19 @@ export default { pageNo: 1, pageSize: 10, listVisible: false, - listVisibleRowDate: {} } }, props: { - version: { - type: Number, - default: '', - required: false - }, - projectId: { - type: String, - default: '', - require: true - }, item: { - type: String, + type: Object, default: '', require: true }, paramsManifestId: { - type: Object, + type: String, default: '', require: true }, - url: { - type: Object, - default: '', - require: true - } }, mounted() { this.loadData() @@ -205,27 +189,6 @@ export default { } }) }, - // 清单列表传出数据 - listVisibleRow(val) { - this.selectedRowKeys = [] - let newAreaTable=JSON.parse(JSON.stringify(this.areaTable)) - newAreaTable.forEach((item, index) => { - if( item.id == this.listVisibleRowDate.id ) { - let _obj = {...item} - _obj.paramsTemplateId = val[0].id - _obj.paramsTemplateName = val[0].paramsTemplateName - this.areaTable.splice(index, 1,_obj) - } - }) - console.log(this.areaTable,'this.areaTable') - this.listVisible = false - }, - // 下载文件 - editArea(val) { - // this.listVisibleRowDate = val - console.log(val) - // this.listVisible = true - }, pageOnChange(page, pageSize) { this.pageNo = page this.loadData() @@ -254,34 +217,22 @@ export default { } }) }, - - dowloadfile(item){ - let query = { - id: item.exportFileId - } - downloadFile('/sys/common/downLoadFile', item.exportFileName, query, this.Deselect) - }, loadData() { - let _this = this - let queryParam = JSON.parse(JSON.stringify(this.formData)) - if(!this.formData.dutyTerritory){ - this.formData.dutyTerritory = '' - } - if(!this.formData.projectNameId){ - this.formData.projectNameId = '' - } let params = { id:this.paramsManifestId, - dutyTerritory:this.formData.dutyTerritory, + dutyTerritory:this.formData.dutyTerritory?this.formData.dutyTerritory:'', projectName:this.formData.projectName, - projectNameId:this.formData.projectNameId, + projectNameId:this.formData.projectNameId?this.formData.projectNameId:'', } - + this.loading = true getAction('project/lawsComplianceBoard/queryComplianceResultList', params).then((res) => { if (res.success) { this.areaTable = res.result.complianceResultList this.opinionGather = res.result.opinionGather this.technologyEvaluation = res.result.technologyEvaluation + this.loading = false + }else{ + this.loading = false } }) }, @@ -315,65 +266,6 @@ export default { this.newVisible = true this.form = {} }, - //新增 - handleSubmit() { - let _this = this - if (this.selectedRowKeys.length == 0) { - this.$message.warning(this.$t('pleaseSelectData')) - } else if (this.selectedRowKeys.length > 1) { - this.$message.warning(this.$t('OnlyOneSelected')) - } else { - this.$refs.ruleForm.validate(valid => { - if (valid) { - this.flag = true - this.spinLoading = true - this.confirmLoading = true - let _tt = { - paramsTemplateId: this.selectedRowKeysDate[0].paramsTemplateId, - projectId: this.selectedRowKeysDate[0].projectId, - title: this.selectedRowKeysDate[0].title, - paramsTemplatePublishVersion: this.selectedRowKeysDate[0].paramsTemplatePublishVersion, - sourceManifestId: this.selectedRowKeysDate[0].id, - } - axios({ - url: `/jero-boot/params/manifest/copy`, - method: 'post', - data: _tt, - transformRequest: [function (data) { - let ret = '' - for (let it in data) { - ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&' - } - return ret - }], - headers: { - 'Content-Type': 'application/x-www-form-urlencoded', - 'X-Access-Token':_this.token - } - }) - .then( (res) =>{ - if (res.data.success) { - _this.$emit('copysubmit') - _this.$message.success(res.data.message) - _this.flag = false - _this.spinLoading = false - _this.confirmLoading = false - }else{ - _this.$message.warning(res.data.message) - _this.flag = false - _this.spinLoading = false - _this.confirmLoading = false - } - }) - .catch( (error) =>{ - console.log(error); - }); - } else { - return false - } - }) - } - }, }, watch: { selectedRowKeyS(val) { diff --git a/jero-web/src/views/regulationsKanban/index.vue b/jero-web/src/views/regulationsKanban/index.vue index 33a4a91ba..f667ad23f 100644 --- a/jero-web/src/views/regulationsKanban/index.vue +++ b/jero-web/src/views/regulationsKanban/index.vue @@ -148,38 +148,7 @@ export default { { required: true, message: this.$t('PleaseEnter') + this.$t('templateName'), trigger: 'change' } ] }, - fieldList: [ - { - type: 'string', - value: 'serialNumber', - text: this.$t('standard') - }, - { - type: 'string', - value: 'title', - text: this.$t('title') - }, - { - type: '', - value: ' state', - text: this.$t('status'), - dictCode: 'state'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框 - }, - // { - // type: 'string', - // value: 'technologyTerritory', - // text: this.$t('category') - // }, - { - type: 'tree', - value: 'technologyTerritory', - text: this.$t('technicalField'), - tree:this.CategoryTreeList - // value: 'technologyTerritory', - // text: this.$t('technicalField'), - // dictCode: 'implement_type'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框 - }, - ], + fieldList: [], visible: false, dataSource: [], confirmLoading: false, @@ -235,8 +204,21 @@ export default { mounted() { this.getList() this.getSysCategoryTree() + this.queryConditionInventory() }, methods: { + queryConditionInventory() { + let query = { + flag: 1 + } + getAction('/project/projectLawsInventoryEO/queryConditionInventory', query).then((res) => { + if (res.success) { + this.fieldList = res.result || [] + } else { + this.fieldList = [] + } + }) + }, handleCancel() { this.areaVisible = false }, From 436f3f950ecf583f2b2098241a1540bca9319c35 Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Mon, 18 Jul 2022 15:57:46 +0800 Subject: [PATCH 13/60] update --- .../service/impl/LawsComplianceBoardServiceImpl.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/LawsComplianceBoardServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/LawsComplianceBoardServiceImpl.java index 1a9c4150c..b0a3c53e1 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/LawsComplianceBoardServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/LawsComplianceBoardServiceImpl.java @@ -157,7 +157,7 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi String textByValue = DesignComplianceStatusEnum.getTextByValue(complianceResult.get("designStatus").toString(), cut); complianceResult.put("designStatus_dicText",textByValue); } - if (complianceResult.get("prehomoStatus") != null) { + if (complianceResult.get("prehomoStatus") != null && complianceResult.get("prehomoStatus") != "") { String textByValue = DesignComplianceStatusEnum.getTextByValue(complianceResult.get("prehomoStatus").toString(), cut); complianceResult.put("prehomoStatus_dicText",textByValue); } @@ -192,6 +192,13 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi } complianceResult.put("dutyTerritory_dicText",dutyTerritory_dicText); } + + Map dataMap = (Map) complianceResult; + dataMap.entrySet().forEach(map -> { + if(map.getValue() == null){ + map.setValue(""); + } + }); } } } From 090885635630d08c80208dece2f5d35a0951a363 Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Mon, 18 Jul 2022 16:00:15 +0800 Subject: [PATCH 14/60] =?UTF-8?q?=E6=B3=95=E8=A7=84=E7=AC=A6=E5=90=88?= =?UTF-8?q?=E6=80=A7=E7=9C=8B=E6=9D=BF=E6=90=9C=E7=B4=A2=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/views/regulationsKanban/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jero-web/src/views/regulationsKanban/index.vue b/jero-web/src/views/regulationsKanban/index.vue index f667ad23f..530f40f8d 100644 --- a/jero-web/src/views/regulationsKanban/index.vue +++ b/jero-web/src/views/regulationsKanban/index.vue @@ -330,8 +330,8 @@ export default { pageNo: this.pageNo, pageSize: this.pageSize, ...this.queryParamQuery, - technologyTerritory: this.territory, - serialNumber:this.queryParam.serialNumber, + technology_territory: this.territory, + serial_number:this.queryParam.serialNumber, title:this.queryParam.title, state:this.queryParam.state From 3884daed8bb10f4d71fb011dab3a15fc4285d837 Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Mon, 18 Jul 2022 16:16:15 +0800 Subject: [PATCH 15/60] =?UTF-8?q?=E6=B3=95=E8=A7=84=E7=AC=A6=E5=90=88?= =?UTF-8?q?=E6=80=A7=E7=9C=8B=E6=9D=BF=E6=90=9C=E7=B4=A2=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../regulationsKanban/components/addModel.vue | 2 +- jero-web/src/views/regulationsKanban/index.vue | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/jero-web/src/views/regulationsKanban/components/addModel.vue b/jero-web/src/views/regulationsKanban/components/addModel.vue index 4235b2707..67d93b664 100644 --- a/jero-web/src/views/regulationsKanban/components/addModel.vue +++ b/jero-web/src/views/regulationsKanban/components/addModel.vue @@ -221,7 +221,7 @@ export default { let params = { id:this.paramsManifestId, dutyTerritory:this.formData.dutyTerritory?this.formData.dutyTerritory:'', - projectName:this.formData.projectName, + projectName:this.formData.projectName?this.formData.projectName:'', projectNameId:this.formData.projectNameId?this.formData.projectNameId:'', } this.loading = true diff --git a/jero-web/src/views/regulationsKanban/index.vue b/jero-web/src/views/regulationsKanban/index.vue index 530f40f8d..9e9882973 100644 --- a/jero-web/src/views/regulationsKanban/index.vue +++ b/jero-web/src/views/regulationsKanban/index.vue @@ -8,8 +8,8 @@
{{ $t('standard') }}
- +
@@ -17,8 +17,8 @@
{{$t('title')}}
- +
@@ -164,17 +164,20 @@ export default { { title: this.$t('standard'), align: 'center', - dataIndex: 'serialNumber' + dataIndex: 'serialNumber', + width: 180 }, { title: this.$t('title'), align: 'center', - dataIndex: 'title' + dataIndex: 'title', + width: 180 }, { title: this.$t('status'), align: 'center', - dataIndex: 'state_dicText' + dataIndex: 'state_dicText', + width: 180 }, // { // title: this.$t('category'), From e94a7e01e3b46e00d039cbfea407a4e8900efe40 Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Mon, 18 Jul 2022 16:45:04 +0800 Subject: [PATCH 16/60] update --- .../controller/LawsComplianceBoardController.java | 9 +++------ .../mapper/xml/LawsComplianceBoardMapper.xml | 13 +------------ .../impl/LawsComplianceBoardServiceImpl.java | 12 ++++++------ 3 files changed, 10 insertions(+), 24 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/LawsComplianceBoardController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/LawsComplianceBoardController.java index 0c5724ec6..5fe107e70 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/LawsComplianceBoardController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/LawsComplianceBoardController.java @@ -9,10 +9,7 @@ import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import net.sf.json.JSONObject; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -29,8 +26,8 @@ public class LawsComplianceBoardController { @AutoLog(value = "项目库-法规符合性看板列表分页查询") @ApiOperation(value="项目库-法规符合性看板列表分页查询", notes="项目库-法规符合性看板列表分页查询") - @GetMapping(value = "/page") - public JSONObject queryPageList(@RequestParam Map params){ + @PostMapping(value = "/page") + public JSONObject queryPageList(@RequestBody Map params){ IPage infoPage = this.lawsComplianceBoardService.queryPageList(params); Result ok = Result.OK(infoPage); JSONObject jsonResult = JSONObject.fromObject(ok); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/xml/LawsComplianceBoardMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/xml/LawsComplianceBoardMapper.xml index 118d8ae48..1e4382b0e 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/xml/LawsComplianceBoardMapper.xml +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/xml/LawsComplianceBoardMapper.xml @@ -70,6 +70,7 @@ #{item} + order by pli.create_time desc - - - where 1=1 - - - and id ${idOperator} #{id} - - - and type ${typeOperator} #{type} - - - diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/LawsComplianceBoardServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/LawsComplianceBoardServiceImpl.java index b0a3c53e1..2dc99dc80 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/LawsComplianceBoardServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/LawsComplianceBoardServiceImpl.java @@ -431,7 +431,7 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi if (value.contains("%")) { value = value.replace("%", "/%"); } - conditionSb.append(" and " + key + " like concat(concat('%','" + value + "'),'%') ESCAPE '/'"); + conditionSb.append(" and bdl." + key + " like concat(concat('%','" + value + "'),'%') ESCAPE '/'"); } else if (FieldTypeEnum.PULL_SINGLE.getValue().equals(fieldType) || FieldTypeEnum.PULL_MORE.getValue().equals(fieldType) || FieldTypeEnum.TREE.getValue().equals(fieldType)) { @@ -439,27 +439,27 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi StringBuilder condition = new StringBuilder(); for (String valueTemp : value.split(",")) { valueSb.append("'" + valueTemp + "',"); - condition.append(" or " + key + " like concat(concat('%','" + valueTemp + "'),'%')"); + condition.append(" or bdl." + key + " like concat(concat('%','" + valueTemp + "'),'%')"); } condition.append(")"); String substring = valueSb.substring(0, valueSb.length() - 1); //下拉单选或下拉多选 - conditionSb.append(" and (" + key + " in(" + substring + ")" + condition.toString()); + conditionSb.append(" and (bdl." + key + " in(" + substring + ")" + condition.toString()); } else if (FieldTypeEnum.DATE_SINGLE.getValue().equals(fieldType)) { //日期(区分单日期还时间范围) if (value.contains(",")) { - conditionSb.append(" and " + "date_format(" + key + ",'%Y-%m-%d') >= '" + value.split(",")[0] + "'" + conditionSb.append(" and " + "date_format(bdl." + key + ",'%Y-%m-%d') >= '" + value.split(",")[0] + "'" + " and " + "date_format(" + key + ",'%Y-%m-%d') <= '" + value.split(",")[1] + "'"); } else { - conditionSb.append(" and " + "date_format(" + key + ",'%Y-%m-%d') = '" + value + "'"); + conditionSb.append(" and " + "date_format(bdl." + key + ",'%Y-%m-%d') = '" + value + "'"); } } else if (FieldTypeEnum.PERSON.getValue().equals(fieldType)) { //输入框 LIKE CONCAT("%", '/%', "%") ESCAPE '/' if (value.contains("%")) { value = value.replace("%", "/%"); } - conditionSb.append(" and " + key + " like concat(concat('%','" + value + "'),'%') ESCAPE '/'"); + conditionSb.append(" and bdl." + key + " like concat(concat('%','" + value + "'),'%') ESCAPE '/'"); } } } From 1fac5e03929078cdc545b452cea0ed8dd972b6d2 Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Mon, 18 Jul 2022 16:51:11 +0800 Subject: [PATCH 17/60] =?UTF-8?q?=E5=88=97=E8=A1=A8=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../collectionOfRegulatoryOpinions/index.vue | 7 ++----- .../technologyAssessment/index.vue | 6 ++---- jero-web/src/views/regulationsKanban/index.vue | 17 +++++++++++------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue index 07191fe99..b5c89571c 100644 --- a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue +++ b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue @@ -225,7 +225,7 @@ }, searchReset() { this.queryParam = {} - this.serialNumber = '' + this.$route.query.serialNumber = '' this.pageNo = 1 this.getList() }, @@ -245,13 +245,10 @@ queryParam[val] = queryParam[val].join(',') } }) - if(this.$route.query.serialNumber){ - this.serialNumber = this.$route.query.serialNumber - } let query = { pageNo: this.pageNo, pageSize: this.pageSize, - serialNumber: this.serialNumber, + serialNumber: this.$route.query.serialNumber?this.$route.query.serialNumber:'', ...queryParam } this.loading = true diff --git a/jero-web/src/views/businessSupport/technologyAssessment/index.vue b/jero-web/src/views/businessSupport/technologyAssessment/index.vue index 1aaadb1fb..3c1a9f42c 100644 --- a/jero-web/src/views/businessSupport/technologyAssessment/index.vue +++ b/jero-web/src/views/businessSupport/technologyAssessment/index.vue @@ -298,6 +298,7 @@ }, searchReset() { this.queryParam = {} + this.$route.query.serialNumber = '' this.pageNo = 1 this.getList() }, @@ -317,13 +318,10 @@ queryParam[val] = queryParam[val].join(',') } }) - if(this.$route.query.serialNumber){ - this.serialNumber = this.$route.query.serialNumber - } let query = { pageNo: this.pageNo, pageSize: this.pageSize, - serialNumber: this.serialNumber, + serialNumber: this.$route.query.serialNumber?this.$route.query.serialNumber:'', ...queryParam } this.loading = true diff --git a/jero-web/src/views/regulationsKanban/index.vue b/jero-web/src/views/regulationsKanban/index.vue index 9e9882973..157836add 100644 --- a/jero-web/src/views/regulationsKanban/index.vue +++ b/jero-web/src/views/regulationsKanban/index.vue @@ -200,6 +200,7 @@ export default { queryParam: {}, areaVisible: false, paramsTemplateName: '', + queryConditionVOList: [], drawerVisible: false, titleTag: '' } @@ -290,6 +291,8 @@ export default { }, searchReset() { this.queryParam = {} + this.territory = '' + this.queryConditionVOList = [] this.$refs.globalAdvancedQueryRef.resetLine() this.$refs.globalAdvancedQueryRef.emitCallback() }, @@ -313,14 +316,15 @@ export default { handleSuperQuery(params, matchType) { let sqp = {} if (!params || (params && params.length == 0)) { - sqp['superQueryParams'] = '' + this.queryConditionVOList = [] this.$refs.globalAdvancedQueryRef.superQueryFlag = false } else { this.$refs.globalAdvancedQueryRef.superQueryFlag = true - sqp['superQueryParams'] = encodeURI(JSON.stringify(params)) - sqp['superQueryMatchType'] = matchType + this.queryConditionVOList = params + this.queryConditionVOList.forEach(res => { + res.type = matchType + }) } - this.queryParamQuery = sqp this.getList() }, getList() { @@ -329,10 +333,11 @@ export default { this.territory = this.queryParam.technologyTerritory.join(',') } // let queryParam = JSON.parse(JSON.stringify(this.queryParam)) + let queryConditionVOList = JSON.parse(JSON.stringify(this.queryConditionVOList)) let query = { pageNo: this.pageNo, pageSize: this.pageSize, - ...this.queryParamQuery, + queryConditionVOList: JSON.stringify(queryConditionVOList), technology_territory: this.territory, serial_number:this.queryParam.serialNumber, title:this.queryParam.title, @@ -340,7 +345,7 @@ export default { } this.loading = true - getAction(this.url.list, query).then((res) => { + postAction(this.url.list, query).then((res) => { if (res) { if (res.result.current > 1 && res.result.records.length == 0) { this.pageNo = res.result.current - 1 From e3274a9e705b2a234ec6d4558e5a258d9316108f Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Mon, 18 Jul 2022 17:08:08 +0800 Subject: [PATCH 18/60] =?UTF-8?q?=E6=B3=95=E8=A7=84=E7=AC=A6=E5=90=88?= =?UTF-8?q?=E6=80=A7=E7=9C=8B=E6=9D=BF-=E9=AB=98=E7=BA=A7=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=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/LawsComplianceBoardServiceImpl.java | 85 ++++++++++++++++++- 1 file changed, 84 insertions(+), 1 deletion(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/LawsComplianceBoardServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/LawsComplianceBoardServiceImpl.java index 2dc99dc80..8277a6789 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/LawsComplianceBoardServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/LawsComplianceBoardServiceImpl.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.jero.common.constant.enums.CutEnum; import com.jero.common.exception.JeroBootException; +import com.jero.common.system.query.QueryRuleEnum; import com.jero.modules.document.enums.FieldTypeEnum; import com.jero.modules.document.service.IBussDocumentLibraryEOService; import com.jero.modules.document.vo.QueryConditionVO; @@ -495,7 +496,7 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi String queryConditionVOListStr = (String) parameter.get("queryConditionVOList"); List queryConditionVOList = com.alibaba.fastjson.JSONObject.parseArray(queryConditionVOListStr, QueryConditionVO.class); if(ObjectUtils.isNotEmpty(queryConditionVOList)){ - String queryCondition = this.bussDocumentLibraryEOService.sqlJoint(queryConditionVOList); + String queryCondition = this.sqlJoint(queryConditionVOList); if(StringUtils.isNotBlank(queryCondition)){ conditionSb.append(" and " + queryCondition); } @@ -530,6 +531,88 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi return condition; } + public String sqlJoint(List queryConditionVOList){ + StringBuilder sb = new StringBuilder(); + if(queryConditionVOList.size() != 0){ + int count =0; + for (QueryConditionVO queryConditionVO : queryConditionVOList) { + String type = queryConditionVO.getType();//and或or + String rule = queryConditionVO.getRule(); + String ruleLike = ""; + if(QueryRuleEnum.LEFT_LIKE.getCondition().equals(rule) || QueryRuleEnum.RIGHT_LIKE.getCondition().equals(rule)){ + ruleLike = QueryRuleEnum.LIKE.getCondition(); + } + String field = queryConditionVO.getField(); + String val = queryConditionVO.getVal(); + //如果查询字段对应的搜索条件值为空,则不作处理 + if(StringUtils.isNotBlank(val)) { + field = "bdl." + field; + count++;//从第二个查询条件开始拼接type(and或or) + if (count > 1) { + sb.append(" " + type + " "); + } + sb.append(" " + field + " "); + //查询类型 + String ruleTemp = queryType(rule); + if (StringUtils.isNotBlank(ruleLike)) { + sb.append(ruleLike + " "); + } else { + sb.append(ruleTemp + " "); + } + //like和in需要特殊处理 + if (QueryRuleEnum.IN.getCondition().equals(rule)) { + if (val.contains(",")) { + StringBuilder sbTemp = new StringBuilder(); + for (String valTemp : val.split(",")) { + sbTemp.append("'" + valTemp + "' ,"); + } + if (StringUtils.isNotBlank(sbTemp)) { + String substring = sbTemp.substring(0, sbTemp.length() - 1); + sb.append("(" + substring + ")"); + } + } + sb.append("('" + val + "')"); + } else if (QueryRuleEnum.LIKE.getCondition().equals(rule)) { + sb.append("'%" + val + "%'"); + } else if (QueryRuleEnum.LEFT_LIKE.getCondition().equals(rule)) { + sb.append("'%" + val + "'"); + } else if (QueryRuleEnum.RIGHT_LIKE.getCondition().equals(rule)) { + sb.append("'" + val + "%'"); + } else { + sb.append("'" + val + "'"); + } + } + } + } + return sb.toString(); + } + + public String queryType(String rule){ + String value =""; + if(QueryRuleEnum.GT.getCondition().equals(rule)){ + value = QueryRuleEnum.GT.getValue(); + }else if(QueryRuleEnum.GE.getCondition().equals(rule)){ + value = QueryRuleEnum.GE.getValue(); + }else if(QueryRuleEnum.LT.getCondition().equals(rule)){ + value = QueryRuleEnum.LT.getValue(); + }else if(QueryRuleEnum.LE.getCondition().equals(rule)){ + value = QueryRuleEnum.LE.getValue(); + }else if(QueryRuleEnum.EQ.getCondition().equals(rule)){ + value = QueryRuleEnum.EQ.getValue(); + }else if(QueryRuleEnum.NE.getCondition().equals(rule)){ + value = QueryRuleEnum.NE.getValue(); + }else if(QueryRuleEnum.LIKE.getCondition().equals(rule)){ + value = QueryRuleEnum.LIKE.getValue(); + }else if(QueryRuleEnum.LEFT_LIKE.getCondition().equals(rule)){ + value = QueryRuleEnum.LEFT_LIKE.getValue(); + }else if(QueryRuleEnum.RIGHT_LIKE.getCondition().equals(rule)){ + value = QueryRuleEnum.RIGHT_LIKE.getValue(); + }else if(QueryRuleEnum.IN.getCondition().equals(rule)){ + value = QueryRuleEnum.IN.getValue(); + } + return value; + } + /** * 处理技术领域展示字段 * @param technologyTerritoryList From 8c7639249894afc6217ca3e1f19b67f361d572ce Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Mon, 18 Jul 2022 17:34:10 +0800 Subject: [PATCH 19/60] =?UTF-8?q?=E5=B8=83=E5=B1=80=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E5=AF=B9=E6=AF=94?= 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 + .../components/comparisonResults.vue | 289 +++++++++++++++++- .../documentComparison/index.vue | 21 +- 4 files changed, 300 insertions(+), 14 deletions(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index ea00ab8e6..8c5a086db 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1161,4 +1161,6 @@ module.exports = { Deriveconformanceresults:'Derive Conformance Results', Regulatorycompliancekanban:'Regulatory Compliance Kanban', exportComparisonReport:'Export Comparison Report', + comparisonDifferenceComment:'Comparison Difference Comment', + fullTextComments:'Full text comments', } \ 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 ace33b547..fafc73e2e 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1165,4 +1165,6 @@ module.exports = { addFullTextComment:'添加全文评论', turnOffAutomaticMatching:'关闭自动匹配', exportComparisonReport:'导出对比报告', + comparisonDifferenceComment:'对比差异评论', + fullTextComments:'全文评论', } \ No newline at end of file diff --git a/jero-web/src/views/documentTools/documentComparison/components/comparisonResults.vue b/jero-web/src/views/documentTools/documentComparison/components/comparisonResults.vue index e5299048a..9c73a544e 100644 --- a/jero-web/src/views/documentTools/documentComparison/components/comparisonResults.vue +++ b/jero-web/src/views/documentTools/documentComparison/components/comparisonResults.vue @@ -11,7 +11,7 @@
- + {{$t('exportComparisonReport')}}
-
+
@@ -37,11 +37,165 @@
- +
- + + +
+
+
+
+ 第10条 + 光反射器 +
+
+ 12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板 + sdf kdsf kljsfkldsfdsfdsf +
+
+
+
+ 第10条 + 光反射器 +
+
+ 12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板收到反是馈就但是罚款决定书发的科技示范 +
+
+
+
+ + {{$t('comparisonDifferenceComment')}}: +
+
+ 差异是各单位在结构上的差别程度成员在时间横轴上的位置的差别程经理与其他的差别程度 横轴上的位置的差别程经理与其他的差别程度差异 +
+
+
+ +
+
+
+ + +
+
+
+
+ 第10条 + 光反射器 +
+
+ 12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板 + sdf kdsf kljsfkldsfdsfdsf +
+
+
+
+ 第10条 + 光反射器 +
+
+ 12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板收到反是馈就但是罚款决定书发的科技示范 +
+
+
+
+ + {{$t('comparisonDifferenceComment')}}: +
+
+ 差异是各单位在结构上的差别程度成员在时间横轴上的位置的差别程经理与其他的差别程度 横轴上的位置的差别程经理与其他的差别程度差异 +
+
+
+ +
+
+
+ + +
+
+
+
+ 第10条 + 光反射器 +
+
+ 12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板 + sdf kdsf kljsfkldsfdsfdsf +
+
+
+
+ 第10条 + 光反射器 +
+
+ 12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板收到反是馈就但是罚款决定书发的科技示范 +
+
+
+
+ + {{$t('comparisonDifferenceComment')}}: +
+
+ 差异是各单位在结构上的差别程度成员在时间横轴上的位置的差别程经理与其他的差别程度 横轴上的位置的差别程经理与其他的差别程度差异 +
+
+
+ +
+
+ + +
+
+
+ {{$t('fullTextComments')}}: 文字占位符评论文字内容文字占位符评论文 + 字内容文字占位符评论文字内容文字 + 占位符评论文字内容文字占位符评论文字内容文字占 + 文字占位符评论文字内容文字占位符评论文 + 字内容文字占位符评论文字内容文字 + 占位符评论文字内容文字占位符评论文字内容文字占 + 文字占位符评论文字内容文字占位符评论文 + 字内容文字占位符评论文字内容文字 + 占位符评论文字内容文字占位符评论文字内容文字占 + 文字占位符评论文字内容文字占位符评论文 + 字内容文字占位符评论文字内容文字 + 占位符评论文字内容文字占位符评论文字内容文字占 + 文字占位符评论文字内容文字占位符评论文 + 字内容文字占位符评论文字内容文字 + 占位符评论文字内容文字占位符评论文字内容文字占 +
+
+ +
+
@@ -132,7 +286,7 @@ } .detail-content { - padding: 24px 32px; + padding: 24px 32px 0 32px; box-sizing: border-box; } @@ -182,4 +336,129 @@ } } + .detail-content-content { + width: 100%; + height: auto; + position: relative; + margin-bottom: 24px; + } + + .detail-checkbox { + margin-left: 28px; + float: left; + position: absolute; + top: 50%; + transform: translate(-50%, -50%); + } + + .detail-content-content-text { + width: calc(100% - 56px); + margin-left: 56px; + border: 1px solid #EFF1F3; + border-radius: 4px; + overflow: hidden; + + .detail-content-content-text-left { + width: calc(100% - 128px); + float: left; + border-right: 1px solid #EFF1F3; + padding: 24px; + box-sizing: border-box; + overflow: hidden; + } + + .detail-content-content-text-right { + width: 128px; + float: left; + height: auto; + text-align: center; + + .text-button-one { + display: inline-block; + width: 128px; + position: absolute; + top: 50%; + transform: translate(-50%, -50%); + } + + .text-button { + margin-right: 8px; + + } + } + } + + .detail-content-left { + width: 50%; + display: inline-block; + float: left; + padding-right: 24px; + border-right: 1px #EFF1F3 solid; + } + + .detail-content-right { + width: 50%; + display: inline-block; + float: left; + padding-left: 24px; + } + + .detail-content-left-top { + font-size: 16px; + font-family: Blue Sky Noto; + font-weight: 400; + color: #040B29; + } + + .detail-content-left-button { + font-size: 14px; + font-weight: 400; + color: #040B29; + margin-top: 10px; + } + + .detail-content-bottom { + width: 100%; + margin-top: 14px; + padding: 24px; + box-sizing: border-box; + background: rgba(4, 11, 41, 0.0300); + border-radius: 4px; + float: left; + } + + .detail-content-bottom-left { + width: 115px; + font-size: 14px; + font-weight: 400; + color: #040B29; + float: left; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + } + + .detail-content-bottom-right { + width: calc(50% - 115px); + float: left; + font-size: 14px; + font-weight: 400; + color: #040B29; + } + + .detail-content-content-text-left-text { + width: 100%; + font-size: 14px; + font-weight: 400; + color: #040B29; + overflow: hidden; + display: -webkit-box; + text-overflow: ellipsis; + /*! autoprefixer: off */ + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + /*! autoprefixer: on;*/ + text-justify: inter-ideograph; + word-break: break-all + } \ 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 8a0f581dd..cb3f06ed6 100644 --- a/jero-web/src/views/documentTools/documentComparison/index.vue +++ b/jero-web/src/views/documentTools/documentComparison/index.vue @@ -106,10 +106,10 @@ //url传参严格按照当前命名 url: { list: '', - deleteBatch:'', + deleteBatch: '' }, loading: false, - dataSource: [], + dataSource: [{}], selectedRowKeys: [], total: 0, pageSize: 10, @@ -203,7 +203,7 @@ } }, mounted() { - this.getList() + // this.getList() }, methods: { searchQuery() { @@ -251,21 +251,24 @@ this.selectedRowKeys = value }, comparisonResultsClick() { - + let newUrl = this.$router.resolve({ + path: '/comparisonResults' + }) + window.open(newUrl.href, '_blank') }, subscribe() { }, - edit(){ + edit() { }, - initiatingProcessClick(){ + initiatingProcessClick() { let newUrl = this.$router.resolve({ - path: '/comparisonResults', + path: '/initiateDocumentComparison' }) window.open(newUrl.href, '_blank') }, - deleteData(val){ + deleteData(val) { let _this = this this.$confirm({ content: _this.$t('ConfirmDelete'), @@ -280,7 +283,7 @@ }) } }) - }, + } } } From 7207132f01247a6ec5e2f54e39cdcfc3a5494e12 Mon Sep 17 00:00:00 2001 From: liyawei Date: Mon, 18 Jul 2022 18:21:52 +0800 Subject: [PATCH 20/60] =?UTF-8?q?=E8=AE=A4=E8=AF=81-=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E9=A1=B9=E6=94=B6=E9=9B=86-=E9=A3=9E=E4=B9=A6=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/ParamsManifestEOMapper.java | 2 + .../mapper/xml/ParamsManifestEOMapper.xml | 12 +++++ .../service/IParamsManifestEOService.java | 3 ++ .../ParamsCollectManifestEOServiceImpl.java | 44 +++++++++++++++---- .../impl/ParamsManifestEOServiceImpl.java | 6 +++ 5 files changed, 59 insertions(+), 8 deletions(-) diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/ParamsManifestEOMapper.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/ParamsManifestEOMapper.java index 280efb58f..a64cf9c60 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/ParamsManifestEOMapper.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/ParamsManifestEOMapper.java @@ -23,4 +23,6 @@ public interface ParamsManifestEOMapper extends BaseMapper { List listInfoAll(@Param("idList") List idList); + ParamsManifestVO getProjectById(@Param("projectId") String projectId); + } diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsManifestEOMapper.xml b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsManifestEOMapper.xml index 5ed28fbca..77c21dc38 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsManifestEOMapper.xml +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsManifestEOMapper.xml @@ -112,4 +112,16 @@ + + \ No newline at end of file diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/IParamsManifestEOService.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/IParamsManifestEOService.java index 972245644..624f50336 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/IParamsManifestEOService.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/IParamsManifestEOService.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import com.jero.modules.cert.collect.entity.ParamsManifestEO; import com.jero.modules.cert.collect.vo.ParamsManifestHistoryVO; +import com.jero.modules.cert.collect.vo.ParamsManifestVO; import com.jero.modules.cert.template.entity.ParamsTemplateEO; import java.util.List; @@ -79,4 +80,6 @@ public interface IParamsManifestEOService extends IService { IPage getAllManifest(IPage page, String projectName); ParamsManifestEO copy(ParamsManifestEO paramsManifestEO, String sourceManifestId); + + ParamsManifestVO getProjectById(String projectId); } diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java index 3afdc6d0f..418d04fe3 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java @@ -2,12 +2,14 @@ package com.jero.modules.cert.collect.service.impl; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.ObjectUtil; +import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.google.common.collect.Lists; import com.jero.common.constant.CommonConstant; +import com.jero.common.constant.WebsocketConst; import com.jero.common.constant.enums.CutEnum; import com.jero.common.constant.enums.MessageTypeEnum; import com.jero.common.constant.enums.YesOrNoEnum; @@ -16,10 +18,7 @@ import com.jero.common.system.query.QueryGenerator; import com.jero.common.system.vo.LoginUser; import com.jero.generater.modules.online.cgform.entity.OnlCgformField; import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl; -import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO; -import com.jero.modules.cert.collect.entity.ParamsConfigDataEO; -import com.jero.modules.cert.collect.entity.ParamsConfigEO; -import com.jero.modules.cert.collect.entity.ParamsManifestEO; +import com.jero.modules.cert.collect.entity.*; import com.jero.modules.cert.collect.enums.*; import com.jero.modules.cert.collect.mapper.ParamsCollectManifestEOMapper; import com.jero.modules.cert.collect.service.IParamsCollectManifestEOService; @@ -28,6 +27,7 @@ import com.jero.modules.cert.collect.service.IParamsConfigEOService; import com.jero.modules.cert.collect.service.IParamsManifestEOService; import com.jero.modules.cert.collect.vo.ParamsCollectManifestVO; import com.jero.modules.cert.collect.vo.ParamsConfigDataVO; +import com.jero.modules.cert.collect.vo.ParamsManifestVO; import com.jero.modules.cert.report.entity.*; import com.jero.modules.cert.report.service.*; import com.jero.modules.cert.template.entity.CertCategoryParamsInfoPublishEO; @@ -37,6 +37,7 @@ import com.jero.modules.cert.template.service.ICertCategoryParamsInfoPublishEOSe import com.jero.modules.cert.template.service.IParamsInfoPublishEOService; import com.jero.modules.feishu.service.IFeishuService; import com.jero.modules.feishu.vo.FeishuMsgVo; +import com.jero.modules.message.websocket.WebSocket; import com.jero.modules.ocr.service.WebSocketServer; import com.jero.modules.ocr.util.LineHumpUtil; import com.jero.modules.oss.entity.OSSFile; @@ -62,6 +63,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import java.io.IOException; import java.lang.reflect.Field; @@ -120,7 +122,10 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl updateEOList = new ArrayList<>(); StringBuilder connectBuilder = new StringBuilder(); connectBuilder.append("You are required to fill in "); - for (int i=0; i queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.in(ParamsCollectManifestEO::getId, Arrays.asList(paramsCollectManifestIdStr)) + .orderByAsc(ParamsCollectManifestEO::getDeadline).orderByAsc(ParamsCollectManifestEO::getNioNumber); + List paramsCollectManifestEOList = list(queryWrapper); + Date deadline = paramsCollectManifestEOList.get(0).getDeadline(); + int i = 0; + for (ParamsCollectManifestEO paramsCollectManifestEO : paramsCollectManifestEOList) { if (i < 3) { connectBuilder.append(paramsCollectManifestEO.getNioNumber()).append("-").append(paramsCollectManifestEO.getParamsName()).append(","); } + i++; ParamsCollectManifestEO updateEO = new ParamsCollectManifestEO(); - updateEO.setId(paramsCollectManifestIdStr[i]); + updateEO.setId(paramsCollectManifestEO.getId()); updateEO.setDre(dre); // 设置填写人 updateEO.setState(CollectManifestStateEnum.WAIT_FILL.getValue()); // 设置状态为:待填写 updateEOList.add(updateEO); @@ -1295,6 +1311,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImplthe link,"; String content = connectBuilder.substring(0, connectBuilder.toString().length()-1) + " and other parameter items, please enter the link to handle it."; String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length()-1) + " please enter " + href + " to handle it."; + String msgTitle = "You have a homo parameter task to complete"; + // 发送系统消息 SysAnnouncement sysAnnouncement = new SysAnnouncement(); sysAnnouncement.setDelFlag("0"); @@ -1302,11 +1320,18 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl Date: Tue, 19 Jul 2022 09:14:45 +0800 Subject: [PATCH 21/60] =?UTF-8?q?=E8=AE=A4=E8=AF=81-=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E9=A1=B9=E6=94=B6=E9=9B=86-=E5=8F=98=E6=9B=B4=EF=BC=9A?= =?UTF-8?q?=E4=B8=80=E9=94=AE=E4=B8=8B=E5=8F=91=E6=94=B6=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ParamsCollectManifestEOController.java | 25 +- .../IParamsCollectManifestEOService.java | 5 +- .../ParamsCollectManifestEOServiceImpl.java | 320 +++++++++++++++--- 3 files changed, 286 insertions(+), 64 deletions(-) diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java index 682af6d01..925d7a8a8 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java @@ -381,13 +381,24 @@ public class ParamsCollectManifestEOController extends JeroController issueCollection(ParamsCollectManifestVO paramsCollectManifestVO) { - boolean isSuccess = paramsCollectManifestEOService.issueCollection(paramsCollectManifestVO); - if (isSuccess) { - return Result.OK("下发收集成功!"); - } else { - return Result.error("下发收集失败!"); - } + public Result> issueCollection(ParamsCollectManifestVO paramsCollectManifestVO) { + List msgList = paramsCollectManifestEOService.issueCollection(paramsCollectManifestVO); + return Result.OK(msgList); + } + + /** + * 一键下发收集 + * + * @param paramsCollectManifestVO + * @return + */ + @AutoLog(value = "参数项收集清单-一键下发收集") + @ApiOperation(value="参数项收集清单-一键下发收集", notes="参数项收集清单-一键下发收集") + @PostMapping(value = "/issueCollectionAll") +// @RequiresPermissions("params:collectManifest:issue") + public Result> issueCollectionAll(ParamsCollectManifestVO paramsCollectManifestVO) { + List msgList = paramsCollectManifestEOService.issueCollectionAll(paramsCollectManifestVO); + return Result.OK(msgList); } /** diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/IParamsCollectManifestEOService.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/IParamsCollectManifestEOService.java index b86067b96..73681d6b6 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/IParamsCollectManifestEOService.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/IParamsCollectManifestEOService.java @@ -126,7 +126,10 @@ public interface IParamsCollectManifestEOService extends IService issueCollection(ParamsCollectManifestVO paramsCollectManifestVO); + + // 一键下发收集 + List issueCollectionAll(ParamsCollectManifestVO paramsCollectManifestVO); // 配置-下拉选项 List> getConfigLabelList(ParamsCollectManifestVO paramsCollectManifestVO); diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java index 418d04fe3..4a80c1927 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java @@ -1351,82 +1351,290 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl issueCollection(ParamsCollectManifestVO paramsCollectManifestVO) { if (StringUtils.isEmpty(paramsCollectManifestVO.getIds()) - || StringUtils.isEmpty(paramsCollectManifestVO.getProjectId()) || StringUtils.isEmpty(paramsCollectManifestVO.getParamsManifestId())) { + || StringUtils.isEmpty(paramsCollectManifestVO.getProjectId()) + || StringUtils.isEmpty(paramsCollectManifestVO.getParamsManifestId()) + || StringUtils.isEmpty(paramsCollectManifestVO.getCut()) + || paramsCollectManifestVO.getDeadline() == null ) { throw new JeroBootException("参数不能为空!"); } String paramsCollectManifestIds = paramsCollectManifestVO.getIds(); String projectId = paramsCollectManifestVO.getProjectId(); String paramsManifestId = paramsCollectManifestVO.getParamsManifestId(); + String cut = paramsCollectManifestVO.getCut(); + Date deadline = paramsCollectManifestVO.getDeadline(); + LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人 + ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(projectId); // 获取项目信息 + + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String[] paramsCollectManifestIdStr = paramsCollectManifestIds.split(","); List updateEOList = new ArrayList<>(); + List> msgMapList = new ArrayList<>(); + List updateEOIdList = new ArrayList<>(); - for (int i=0; i paramsCollectManifestEOList = listByIds(Arrays.asList(paramsCollectManifestIdStr)); + paramsCollectManifestEOList = paramsCollectManifestEOList.stream().sorted(Comparator.comparing(ParamsCollectManifestBaseEO::getNioNumber)).collect(Collectors.toList()); // 按NIO编号升序 + for (ParamsCollectManifestEO paramsCollectManifestEO : paramsCollectManifestEOList) { + // 判断参数项状态 + if (CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(paramsCollectManifestEO.getState())) { + if (StringUtils.isNotBlank(paramsCollectManifestEO.getSdt())) { + ParamsCollectManifestEO updateEO = new ParamsCollectManifestEO(); + updateEO.setId(paramsCollectManifestEO.getId()); + updateEO.setState(CollectManifestStateEnum.WAIT_SDT.getValue()); // 设置状态为:待工程接口人处理 + updateEO.setDeadline(deadline); + updateEOList.add(updateEO); + + updateEOIdList.add(paramsCollectManifestEO.getId()); + } else { + Map msgMap = new HashMap<>(); + msgMap.put("nioNumber", paramsCollectManifestEO.getNioNumber()); + msgMap.put("state", paramsCollectManifestEO.getState()); + msgMap.put("type", "1"); + msgMapList.add(msgMap); + } + + } else { + Map msgMap = new HashMap<>(); + msgMap.put("nioNumber", paramsCollectManifestEO.getNioNumber()); + msgMap.put("state", paramsCollectManifestEO.getState()); + msgMap.put("type", "2"); + msgMapList.add(msgMap); + } } boolean isSuccess = updateBatchById(updateEOList); - // 消息内容 - List paramsCollectManifestEOList = listByIds(Arrays.asList(paramsCollectManifestIdStr)); - List sdtList = paramsCollectManifestEOList.stream().map(ParamsCollectManifestEO::getSdt).distinct().collect(Collectors.toList()); - if (CollectionUtil.isEmpty(sdtList)) { - throw new JeroBootException("没有可下发的工程接口人!"); - } - for(String sdt : sdtList) { + if (isSuccess) { + // 消息内容 + List afterUpdateEOList = listByIds(updateEOIdList); + List sdtList = afterUpdateEOList.stream() + .map(ParamsCollectManifestEO::getSdt) + .distinct() + .collect(Collectors.toList()); + if (CollectionUtil.isEmpty(sdtList)) { + throw new JeroBootException("没有可下发的工程接口人!"); + } + for (String sdt : sdtList) { - StringBuilder connectBuilder = new StringBuilder(); - connectBuilder.append("You are required to fill in "); - for (int i=0; ithe link,"; + String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length() - 1) + " and other parameter items, please enter " + href + " and fill in the relevant information."; + String msgTitle = "You have a homo parameter task to complete"; + + // 发送系统消息 + SysAnnouncement sysAnnouncement = new SysAnnouncement(); + sysAnnouncement.setDelFlag("0"); + sysAnnouncement.setSendStatus("0"); + sysAnnouncement.setSendTime(new Date()); + sysAnnouncement.setMsgCategory(MessageTypeEnum.HOMO_TASK.getValue());//消息类型 + sysAnnouncement.setMsgType(CommonConstant.MSG_TYPE_UESR);//指定用户 + sysAnnouncement.setTitile(msgTitle); + sysAnnouncement.setMsgContent(content); + sysAnnouncement.setMsgContentInfo(contentInfo); + sysAnnouncement.setUserIds(sysUser.getId()); + sysAnnouncementService.saveAnnouncement(sysAnnouncement); + + JSONObject obj = new JSONObject(); + obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC); + obj.put(WebsocketConst.MSG_ID, paramsManifestId); + obj.put(WebsocketConst.MSG_TXT, contentInfo); + webSocket.sendMessage(obj.toJSONString()); + + // 发送飞书消息 + try { + FeishuMsgVo feishuMsgVo = new FeishuMsgVo(); + feishuMsgVo.setTitle(MessageTypeEnum.HOMO_TASK.getName()); + feishuMsgVo.setContent(content); + feishuMsgVo.setUrl(hrefFeishu); + feishuMsgVo.setTaskType(MessageTypeEnum.HOMO_TASK.getName()); + feishuMsgVo.setProject(projectInfo.getProjectName()); // 车型-年款 区域 + feishuMsgVo.setInitiator(currentUser.getUsername()); + feishuMsgVo.setDueDate(sdf.format(deadline)); // 最早时间 + feishuService.sendCardMsg(thirdIds, feishuMsgVo); + } catch (IOException e) { + log.error("飞书消息推送失败"); + } + } + } + + return getMsgOfIssueCollection(msgMapList, cut); + } + + @Override + public List issueCollectionAll(ParamsCollectManifestVO paramsCollectManifestVO) { + if (StringUtils.isEmpty(paramsCollectManifestVO.getProjectId()) + || StringUtils.isEmpty(paramsCollectManifestVO.getParamsManifestId()) + || StringUtils.isEmpty(paramsCollectManifestVO.getCut()) + || paramsCollectManifestVO.getDeadline() == null ) { + throw new JeroBootException("参数不能为空!"); + } + String projectId = paramsCollectManifestVO.getProjectId(); + String paramsManifestId = paramsCollectManifestVO.getParamsManifestId(); + String cut = paramsCollectManifestVO.getCut(); + Date deadline = paramsCollectManifestVO.getDeadline(); + + LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人 + ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(projectId); // 获取项目信息 + + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + List updateEOList = new ArrayList<>(); + List> msgMapList = new ArrayList<>(); + List updateEOIdList = new ArrayList<>(); + + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(ParamsCollectManifestEO::getParamsManifestId, paramsManifestId) + .notIn(ParamsCollectManifestEO::getControlType, ControlTypeEnum.Title.getValue()) + .orderByAsc(ParamsCollectManifestEO::getNioNumber); + List paramsCollectManifestEOList = list(queryWrapper); + for (ParamsCollectManifestEO paramsCollectManifestEO : paramsCollectManifestEOList) { + // 判断参数项状态 + if (CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(paramsCollectManifestEO.getState())) { + if (StringUtils.isNotBlank(paramsCollectManifestEO.getSdt())) { + ParamsCollectManifestEO updateEO = new ParamsCollectManifestEO(); + updateEO.setId(paramsCollectManifestEO.getId()); + updateEO.setState(CollectManifestStateEnum.WAIT_SDT.getValue()); // 设置状态为:待工程接口人处理 + updateEO.setDeadline(deadline); + updateEOList.add(updateEO); + + updateEOIdList.add(paramsCollectManifestEO.getId()); + } else { + Map msgMap = new HashMap<>(); + msgMap.put("nioNumber", paramsCollectManifestEO.getNioNumber()); + msgMap.put("state", paramsCollectManifestEO.getState()); + msgMap.put("state", "1"); + msgMapList.add(msgMap); + } + + } else { + Map msgMap = new HashMap<>(); + msgMap.put("nioNumber", paramsCollectManifestEO.getNioNumber()); + msgMap.put("state", paramsCollectManifestEO.getState()); + msgMap.put("type", "2"); + msgMapList.add(msgMap); + } + } + boolean isSuccess = updateBatchById(updateEOList); + + if (isSuccess) { + // 消息内容 + List afterUpdateEOList = listByIds(updateEOIdList); + List sdtList = afterUpdateEOList.stream() + .map(ParamsCollectManifestEO::getSdt) + .distinct() + .collect(Collectors.toList()); + if (CollectionUtil.isEmpty(sdtList)) { + throw new JeroBootException("没有可下发的工程接口人!"); + } + for (String sdt : sdtList) { + + StringBuilder connectBuilder = new StringBuilder(); + connectBuilder.append("You are required to fill in "); + for (int i = 0; i < afterUpdateEOList.size(); i++) { + ParamsCollectManifestEO paramsCollectManifestEO = afterUpdateEOList.get(i); + if (sdt.equals(paramsCollectManifestEO.getSdt()) && i < 3) { + connectBuilder.append(paramsCollectManifestEO.getNioNumber()).append("-").append(paramsCollectManifestEO.getParamsName()).append(","); + } + } + String content = connectBuilder.substring(0, connectBuilder.toString().length() - 1) + " and other parameter items, please enter the link to handle it."; + + SysUser sysUser = sysUserService.getUserByName(sdt); + String[] thirdIds = new String[1]; + thirdIds[0] = sysUser.getThirdId(); + String hrefFeishu = backUrl + "/ParameterItemCollection?id=" + paramsManifestId + "&projectId=" + projectId; + String href = "the link,"; + String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length() - 1) + " and other parameter items, please enter " + href + " and fill in the relevant information."; + String msgTitle = "You have a homo parameter task to complete"; + + // 发送系统消息 + SysAnnouncement sysAnnouncement = new SysAnnouncement(); + sysAnnouncement.setDelFlag("0"); + sysAnnouncement.setSendStatus("0"); + sysAnnouncement.setSendTime(new Date()); + sysAnnouncement.setMsgCategory(MessageTypeEnum.HOMO_TASK.getValue());//消息类型 + sysAnnouncement.setMsgType(CommonConstant.MSG_TYPE_UESR);//指定用户 + sysAnnouncement.setTitile(msgTitle); + sysAnnouncement.setMsgContent(content); + sysAnnouncement.setMsgContentInfo(contentInfo); + sysAnnouncement.setUserIds(sysUser.getId()); + sysAnnouncementService.saveAnnouncement(sysAnnouncement); + + JSONObject obj = new JSONObject(); + obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC); + obj.put(WebsocketConst.MSG_ID, paramsManifestId); + obj.put(WebsocketConst.MSG_TXT, contentInfo); + webSocket.sendMessage(obj.toJSONString()); + + // 发送飞书消息 + try { + FeishuMsgVo feishuMsgVo = new FeishuMsgVo(); + feishuMsgVo.setTitle(MessageTypeEnum.HOMO_TASK.getName()); + feishuMsgVo.setContent(content); + feishuMsgVo.setUrl(hrefFeishu); + feishuMsgVo.setTaskType(MessageTypeEnum.HOMO_TASK.getName()); + feishuMsgVo.setProject(projectInfo.getProjectName()); // 车型-年款 区域 + feishuMsgVo.setInitiator(currentUser.getUsername()); + feishuMsgVo.setDueDate(sdf.format(deadline)); + feishuService.sendCardMsg(thirdIds, feishuMsgVo); + } catch (IOException e) { + log.error("飞书消息推送失败"); } } - String content = connectBuilder.substring(0, connectBuilder.toString().length()-1) + " and other parameter items, please enter the link to handle it."; - - SysUser sysUser = sysUserService.getUserByName(sdt); - String[] thirdIds = new String[1]; - thirdIds[0] = sysUser.getThirdId(); - String hrefFeishu = backUrl + "/ParameterItemCollection?id=" + paramsManifestId + "&projectId=" + projectId; - String href = "the link,"; - String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length()-1) + " and other parameter items, please enter " + href + " and fill in the relevant information."; - String msgTitle = "You have a homo parameter task to complete"; - - // TODO 为什么不用SendMessageUtils工具类呢? - // 发送系统消息 - SysAnnouncement sysAnnouncement = new SysAnnouncement(); - sysAnnouncement.setDelFlag("0"); - sysAnnouncement.setSendStatus("0"); - sysAnnouncement.setSendTime(new Date()); - sysAnnouncement.setMsgCategory(MessageTypeEnum.HOMO_TASK.getValue());//消息类型 - sysAnnouncement.setMsgType(CommonConstant.MSG_TYPE_UESR);//指定用户 - sysAnnouncement.setTitile(msgTitle); - sysAnnouncement.setMsgContent(content); - sysAnnouncement.setMsgContentInfo(contentInfo); - sysAnnouncement.setUserIds(sysUser.getId()); - sysAnnouncementService.saveAnnouncement(sysAnnouncement); - - // 发送飞书消息 - try { - FeishuMsgVo feishuMsgVo = new FeishuMsgVo(); - feishuMsgVo.setTitle(MessageTypeEnum.HOMO_TASK.getName()); - feishuMsgVo.setContent(content); - feishuMsgVo.setUrl(hrefFeishu); - feishuMsgVo.setTaskType(MessageTypeEnum.HOMO_TASK.getName()); - feishuService.sendCardMsg(thirdIds, feishuMsgVo); - } catch (IOException e) { - log.error("飞书消息推送失败"); - } } - return isSuccess; + return getMsgOfIssueCollection(msgMapList, cut); } + private List getMsgOfIssueCollection(List> msgMapList, String cut) { + List msgList = new ArrayList<>(); + Map collectManifestStateEnumMap = CollectManifestStateEnum.toMap(cut); + + for (Map msgMap : msgMapList) { + String nioNumber = msgMap.get("nioNumber"); + String state = msgMap.get("state"); + String stateName = collectManifestStateEnumMap.get(state); + String type = msgMap.get("type"); + StringBuilder stringBuilder = new StringBuilder(); + if ("1".equals(type)) { + if (CutEnum.EN.getValue().equals(cut)) { + stringBuilder.append("NIO number is ").append("").append(nioNumber).append("").append(" ,the sdt has not been filled in. Please fill in the sdt before issuing and collecting."); + } else { + stringBuilder.append("NIO编号为").append("").append(nioNumber).append("").append("工程接口人没有填写,请填写完工程接口人再进行下发收集。"); + } + + } else { + if (CutEnum.EN.getValue().equals(cut)) { + stringBuilder.append("NIO number is ").append(nioNumber).append(",state is ").append("").append(stateName).append("").append(",no operation permission for this button."); + } else { + stringBuilder.append("NIO编号为").append(nioNumber).append(",状态为").append("").append(stateName).append("").append(",没有此按钮的操作权限。"); + } + + } + + msgList.add(stringBuilder.toString()); + } + if (CutEnum.EN.getValue().equals(cut)) { + msgList.add("Homologation Engineer can operate when data state is 'Wait Collect'、'Sdt Back' or 'Change'"); + } else { + msgList.add("认证工程师数据状态为 '待发起收集'、'工程接口人退回'或'变更' 时,才有权限操作此按钮。"); + } + return msgList; + } + + @Override public List> getConfigLabelList(ParamsCollectManifestVO paramsCollectManifestVO) { String paramsManifestId = paramsCollectManifestVO.getParamsManifestId(); From f7fc4db5604aff9445da499116d15282f3698d57 Mon Sep 17 00:00:00 2001 From: liyawei Date: Tue, 19 Jul 2022 10:27:44 +0800 Subject: [PATCH 22/60] =?UTF-8?q?=E8=AE=A4=E8=AF=81-=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E9=A1=B9=E6=94=B6=E9=9B=86-=E5=8F=98=E6=9B=B4=EF=BC=9A?= =?UTF-8?q?=E4=B8=80=E9=94=AE=E4=B8=8B=E5=8F=91=E6=94=B6=E9=9B=86=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ParamsCollectManifestEOServiceImpl.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java index 4a80c1927..9adfe5327 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java @@ -1626,10 +1626,12 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImplHomologation Engineer can operate when data state is 'Wait Collect'、'Sdt Back' or 'Change'"); - } else { - msgList.add("认证工程师数据状态为 '待发起收集'、'工程接口人退回'或'变更' 时,才有权限操作此按钮。"); + if (CollectionUtil.isNotEmpty(msgMapList)) { + if (CutEnum.EN.getValue().equals(cut)) { + msgList.add("Homologation Engineer can operate when data state is 'Wait Collect'、'Sdt Back' or 'Change'"); + } else { + msgList.add("认证工程师数据状态为 '待发起收集'、'工程接口人退回'或'变更' 时,才有权限操作此按钮。"); + } } return msgList; } From bf7957a7763385d6e55d5a66de1720774c73285d Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Tue, 19 Jul 2022 11:36:06 +0800 Subject: [PATCH 23/60] =?UTF-8?q?=E5=8F=82=E6=95=B0=E9=A1=B9=E6=B8=85?= =?UTF-8?q?=E5=8D=95=E5=A2=9E=E5=8A=A0=E4=B8=80=E9=94=AE=E4=B8=8B=E5=8F=91?= =?UTF-8?q?=E6=94=B6=E9=9B=86=E5=8A=9F=E8=83=BD=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=88=AA=E6=AD=A2=E6=97=B6=E9=97=B4=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 1 + jero-web/src/common/lang/zh-cn.js | 1 + .../src/components/TaskCutOffTime/index.vue | 227 ++++++++++- .../components/TaskCutOffTime/indexonekey.vue | 358 ++++++++++++++++++ .../ParameterItemCollectionList.vue | 167 ++++---- 5 files changed, 667 insertions(+), 87 deletions(-) create mode 100644 jero-web/src/components/TaskCutOffTime/indexonekey.vue diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 8c5a086db..57b46d2cc 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -770,6 +770,7 @@ module.exports = { SynchronousReportLibrary: 'Synchronous Report Library', FreezeConfiguration: 'Freeze Configuration', distributionAndCollection: 'Distribution And Collection', + OneclickCollection: 'One-click Collection', deleteConfiguration: 'Delete Configuration', addConfiguration: 'Add Configuration', electricMachinery: 'ElectricMachinery', diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index fafc73e2e..97cc4ea13 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -785,6 +785,7 @@ module.exports = { SynchronousReportLibrary: '同步上报库', FreezeConfiguration: '冻结配置', distributionAndCollection: '下发收集', + OneclickCollection: '一键下发收集', deleteConfiguration: '删除配置', addConfiguration: '添加配置', electricMachinery: '电机', diff --git a/jero-web/src/components/TaskCutOffTime/index.vue b/jero-web/src/components/TaskCutOffTime/index.vue index 52b1da1ed..9feec59ec 100644 --- a/jero-web/src/components/TaskCutOffTime/index.vue +++ b/jero-web/src/components/TaskCutOffTime/index.vue @@ -2,7 +2,7 @@
- - {{$t('cutoffTime')}} - - + +
+
+ * + + {{$t('cutoffTime')}} +
+ + + +
+ + + + +
@@ -22,6 +41,32 @@ {{ $t('cancel') }} {{ $t('submit') }}
+ + + + +
+ + + + +
+
+
+ +
@@ -43,7 +88,9 @@ export default { selectedRowKeysDate: {}, loading: false, editId: '', + visibleoperationFailed:false, newVisible: false, + NotSelectedRowKeysValue:[], labelCol: { xs: { span: 24 }, sm: { span: 7 } @@ -53,7 +100,11 @@ export default { sm: { span: 14 } }, form: {}, - rules: {}, + rules: { + legalTaskConfirmation:[ + { required: true, message: this.$t('PleaseSelect')+this.$t('cutoffTime'), trigger: 'change' } + ] + }, areaTable: [], flag: false, //表单提交标识 spinLoading: false, @@ -105,19 +156,90 @@ export default { }, //保存 handleSubmit() { - let _this = this - let param = {ids: this.selectedRowKeysArray, deadline: `${this.pickerDate}`, } - this.confirmLoading = true - postAction('/params/collectManifest/updateDeadlineBatch', param).then((res) => { - if (res.success) { - this.$emit('areaVisibleTaskCutOffTimeflag', false) - this.$message.success(_this.$t('OperationSuccessful')) - this.confirmLoading = false - } else { - this.$message.warning(_this.$t('operationFailed')) - this.confirmLoading = false + // let _this = this + // let param = {ids: this.selectedRowKeysArray, deadline: `${this.pickerDate}`, } + // this.confirmLoading = true + // postAction('/params/collectManifest/updateDeadlineBatch', param).then((res) => { + // if (res.success) { + // this.$emit('areaVisibleTaskCutOffTimeflag', false) + // this.$message.success(_this.$t('OperationSuccessful')) + // this.confirmLoading = false + // } else { + // this.$message.warning(_this.$t('operationFailed')) + // this.confirmLoading = false + // } + // }) + this.$refs.ruleForm.validate(valid => { + if(valid){ + let long = localStorage.getItem('language') + let cut = '' + if (long && long == 'zh-cn') { + this.cut = 'cn' + } else if (long && long == 'en-us') { + this.cut = 'en' } - }) + // let _array = [] + // this.selectedRowKeysValue.forEach((item, index) => { + // _array.push(item.id) + // }) + let _this = this + let param = { + paramsManifestId: this.$route.query.id, + projectId: this.$route.query.projectId, + ids: this.selectedRowKeysArray, + cut: this.cut, + deadline: `${this.pickerDate}` + + } + this.textLoading = true + axios({ + url: '/jero-boot/params/collectManifest/issueCollection', + method: 'post', + data: param, + transformRequest: [function(data) { + let ret = '' + for (let it in data) { + ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&' + } + return ret + }], + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + 'X-Access-Token': _this.token + } + }) + .then((res) => { + if (res.data.success) { + // _this.$message.success(this.$t('OperationSuccessful')) + if(res.data.result.length == 0){ + this.visibleoperationFailed = false + _this.$message.success(this.$t('OperationSuccessful')) + this.$emit('areaVisibleTaskCutOffTimeflag', false) + this.$emit('GetgetTableList') + + }else{ + this.NotSelectedRowKeysValue = res.data.result + this.visibleoperationFailed = true + } + + // this.$emit('areaVisibleTaskCutOffTimeflag', false) + // this.$emit('GetgetTableList') + } else { + _this.$message.warning(this.$t('operationFailed')) + } + }) + .catch((error) => { + this.textLoading = false + }) + } + }) + }, + // 错误数据的弹框 + cancleoperationFailed() { + this.visibleoperationFailed = false + this.$emit('areaVisibleTaskCutOffTimeflag', false) + this.$emit('GetgetTableList') + // this.GetgetTableList() }, onChange(val) { this.pickerDate = moment(val).format('YYYY-MM-DD HH:mm:ss') @@ -131,7 +253,10 @@ export default { + + + \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue index 5a20c86ad..112095941 100644 --- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue +++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue @@ -131,10 +131,10 @@ {{$t('SynchronousReportLibrary')}}
-
- - {{$t('TaskCutOffTime')}} -
+ + + +
@@ -154,6 +154,11 @@ {{$t('distributionAndCollection')}}
+ +
+ + {{$t('OneclickCollection')}} +
@@ -257,12 +262,19 @@ @GetgetLoginUserType='GetgetLoginUserType' @areaVisibleAssignedbyflag='areaVisibleAssignedbyflag' @areaVisible='areaVisibleAssignedby = false'/> - - + + + + + + + { - _array.push(item.id) - }) - let _this = this - let param = { - paramsManifestId: this.$route.query.id, - projectId: this.$route.query.projectId, - ids: _array.join(',') - } - this.textLoading = true - axios({ - url: '/jero-boot/params/collectManifest/issueCollection', - method: 'post', - data: param, - transformRequest: [function(data) { - let ret = '' - for (let it in data) { - ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&' - } - return ret - }], - headers: { - 'Content-Type': 'application/x-www-form-urlencoded', - 'X-Access-Token': _this.token - } - }) - .then((res) => { - if (res.data.success) { - _this.$message.success(this.$t('OperationSuccessful')) - _this.areaVisible = false - this.textLoading = false - _this.GetgetTableList() - } else { - this.textLoading = false - _this.$message.warning(this.$t('operationFailed')) - } - }) - .catch((error) => { - this.textLoading = false - }) + // 一键下发收集 + defOneclickCollection() { + this.OneclickCollection = true }, + // // 下发收集---请求接口 + // distributionAndCollection() { + // + // let _array = [] + // this.selectedRowKeysValue.forEach((item, index) => { + // _array.push(item.id) + // }) + // let _this = this + // let param = { + // paramsManifestId: this.$route.query.id, + // projectId: this.$route.query.projectId, + // ids: _array.join(',') + // } + // this.textLoading = true + // axios({ + // url: '/jero-boot/params/collectManifest/issueCollection', + // method: 'post', + // data: param, + // transformRequest: [function(data) { + // let ret = '' + // for (let it in data) { + // ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&' + // } + // return ret + // }], + // headers: { + // 'Content-Type': 'application/x-www-form-urlencoded', + // 'X-Access-Token': _this.token + // } + // }) + // .then((res) => { + // if (res.data.success) { + // _this.$message.success(this.$t('OperationSuccessful')) + // _this.areaVisible = false + // this.textLoading = false + // _this.GetgetTableList() + // } else { + // this.textLoading = false + // _this.$message.warning(this.$t('operationFailed')) + // } + // }) + // .catch((error) => { + // this.textLoading = false + // }) + // }, // 同步上报库 权限 handleSynchronousReportLibraryJurisdiction() { let homoJurisdictionSynchronousLibrary = this.homoJurisdictionSynchronousLibrary() @@ -1412,20 +1437,26 @@ this.areaVisibleAssignedby = val }, // 截止时间 - TaskCutOffTimeLibrary() { - let dreTaskCutOffTimeLibrary = this.dreTaskCutOffTimeLibrary() - if (dreTaskCutOffTimeLibrary == 1) { - this.areaVisibleTaskCutOffTime = true - } else if (dreTaskCutOffTimeLibrary == 0) { - this.visibleoperationFailed = true - this.jurisdiction = 'HOMOJZSJ' - } - }, + // TaskCutOffTimeLibrary() { + // let dreTaskCutOffTimeLibrary = this.dreTaskCutOffTimeLibrary() + // if (dreTaskCutOffTimeLibrary == 1) { + // this.areaVisibleTaskCutOffTime = true + // } else if (dreTaskCutOffTimeLibrary == 0) { + // this.visibleoperationFailed = true + // this.jurisdiction = 'HOMOJZSJ' + // } + // }, // 截至时间确定弹框关闭 areaVisibleTaskCutOffTimeflag(val) { + console.log(val) this.areaVisibleTaskCutOffTime = val this.$refs.CollectionTabel.getTableList() }, + areaVisibleTaskCutOffTimeAll(val){ + console.log(val) + this.OneclickCollection = val + this.$refs.CollectionTabel.getTableList() + }, //引用参数 referenceparameter() { let dreJurisdictionreferenceParameter = this.dreJurisdictionreferenceParameter() From 0110fde5de65e3f95c4d7c50c2b2748c8d5460ba Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Tue, 19 Jul 2022 14:08:53 +0800 Subject: [PATCH 24/60] =?UTF-8?q?=E4=B8=8B=E5=8F=91=E6=94=B6=E9=9B=86?= =?UTF-8?q?=E5=BC=B9=E6=A1=86=E8=AE=BE=E7=BD=AE=E5=9B=BA=E5=AE=9A=E9=AB=98?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/components/TaskCutOffTime/index.vue | 7 +++++++ .../src/components/TaskCutOffTime/indexonekey.vue | 10 +++++++++- .../components/ParameterItemCollectionList.vue | 11 ++++++----- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/jero-web/src/components/TaskCutOffTime/index.vue b/jero-web/src/components/TaskCutOffTime/index.vue index 9feec59ec..c8f892d6d 100644 --- a/jero-web/src/components/TaskCutOffTime/index.vue +++ b/jero-web/src/components/TaskCutOffTime/index.vue @@ -49,6 +49,7 @@ :maskClosable="false" :footer="null" @cancel='cancleoperationFailed' + :body-style="bodystyle" > @@ -113,6 +114,7 @@ export default { pageNo: 1, pageSize: 10, pickerDate: '', + bodystyle:{} } }, props: { @@ -124,6 +126,11 @@ export default { }, mounted() { this.loadData() + this.bodystyle = { + height: '480px', + overflow: 'hidden', + overflowY: 'scroll', + } }, methods: { loadData() { diff --git a/jero-web/src/components/TaskCutOffTime/indexonekey.vue b/jero-web/src/components/TaskCutOffTime/indexonekey.vue index e5494b253..4a2538ec0 100644 --- a/jero-web/src/components/TaskCutOffTime/indexonekey.vue +++ b/jero-web/src/components/TaskCutOffTime/indexonekey.vue @@ -48,7 +48,9 @@ v-model="visibleoperationFailed" :maskClosable="false" :footer="null" + class='modelbox' @cancel='cancleoperationFailed' + :body-style="bodystyle" > @@ -113,6 +115,7 @@ export default { pageNo: 1, pageSize: 10, pickerDate: '', + bodystyle:{} } }, props: { @@ -124,6 +127,11 @@ export default { }, mounted() { this.loadData() + this.bodystyle = { + height: '480px', + overflow: 'hidden', + overflowY: 'scroll', + } }, methods: { loadData() { @@ -273,6 +281,7 @@ export default { display: flex; justify-content: center; } + + \ No newline at end of file diff --git a/jero-web/src/views/externalReports/index.vue b/jero-web/src/views/externalReports/index.vue new file mode 100644 index 000000000..157836add --- /dev/null +++ b/jero-web/src/views/externalReports/index.vue @@ -0,0 +1,480 @@ + + + + + diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue index 811b60cf9..f82aea684 100644 --- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue +++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue @@ -192,6 +192,12 @@ {{$t('CompulsoryWithdrawal')}}
+ +
+ + {{$t('export')}} +
- + - + @@ -554,7 +560,8 @@ { type: 'string', value: 'paramsBatch', - text: this.$t('parameterBatch') + text: this.$t('parameterBatch'), + dictCode: 'params_batch' }, ], selectedRowKeys: [], @@ -799,6 +806,17 @@ return flag } }, + //导出 + handleExport(){ + let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) + let query = { + ...this.queryParam, + ...this.queryParamQuery, + ids: selectedRowKeys.join(','), + dummyInventoryBaseId: this.$route.query.id + } + downloadFile(this.url.exportData, this.$route.query.name + this.$t('VirtualList') + '.zip', query, this.Deselect) + }, // 高级搜索 handleSuperQuery(params, matchType) { let sqp = {} From f59d0f8b9b269336146f3bb73d7403f4a8f257b6 Mon Sep 17 00:00:00 2001 From: liyawei Date: Thu, 21 Jul 2022 13:41:42 +0800 Subject: [PATCH 35/60] =?UTF-8?q?=E8=AE=A4=E8=AF=81-=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E9=A1=B9=E6=94=B6=E9=9B=86=E6=B8=85=E5=8D=95-=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=EF=BC=9A=E6=B7=BB=E5=8A=A0=E5=AF=BC=E5=87=BA=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ParamsCollectManifestEOController.java | 9 +- .../mapper/ParamsCollectManifestEOMapper.java | 3 + .../xml/ParamsCollectManifestEOMapper.xml | 8 + .../IParamsCollectManifestEOService.java | 4 + .../ParamsCollectManifestEOServiceImpl.java | 360 +++++++++++++++++- .../collect/vo/ParamsCollectManifestVO.java | 5 +- 6 files changed, 386 insertions(+), 3 deletions(-) diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java index 925d7a8a8..6ee8b20a4 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java @@ -522,7 +522,14 @@ public class ParamsCollectManifestEOController extends JeroController listInfo(@Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO); + List> listInfoForExport(@Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO); + // 查询控件类型为 标题的 参数项 List listInfoOfTitle(@Param("paramsManifestId") String paramsManifestId); diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml index 873d1399a..9a10df792 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml @@ -80,6 +80,14 @@ order by del_flag desc, add_flag desc, change_flag desc, nio_number asc + + + + UPDATE + sys_user + SET + username = #{username}, + realname = #{realname}, + status = #{status}, + del_flag = #{delFlag}, + third_id = #{thirdId}, + work_no = #{workNo}, + worker_type = #{workerType}, + create_time = #{createTime}, + update_time = #{updateTime}, + job_code = #{jobCode}, + job_title = #{jobTitle}, + org_code = #{orgCode}, + email = #{email}, + telephone = #{telephone} + WHERE + id = #{id} + + diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SysUserServiceImpl.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SysUserServiceImpl.java index e457b8b91..9ea7b911d 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SysUserServiceImpl.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SysUserServiceImpl.java @@ -562,7 +562,7 @@ public class SysUserServiceImpl extends ServiceImpl impl } } - updateById(sysUser); + this.baseMapper.updateByIdPP(sysUser); } From 603de44f9a3eddb61aa222a39d1293c07a5976b5 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Fri, 22 Jul 2022 15:09:50 +0800 Subject: [PATCH 51/60] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A6=85=E9=81=93?= =?UTF-8?q?=E5=B7=B2=E7=9F=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/listEditModel.vue | 120 +++++++++--------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/jero-web/src/views/projectManagement/components/listEditModel.vue b/jero-web/src/views/projectManagement/components/listEditModel.vue index eef2f448c..38f185c66 100644 --- a/jero-web/src/views/projectManagement/components/listEditModel.vue +++ b/jero-web/src/views/projectManagement/components/listEditModel.vue @@ -985,77 +985,77 @@ }, getProject(row, res, callback) { //设计符合性确认-发起人 - if (row.designInitiator == 1) { - this.designInitiatorList = res.result.lawEngineerList || [] - } else if (row.designInitiator == 2) { - this.designInitiatorList = res.result.certificationEngineerList || [] - } else if (row.designInitiator == 3) { - this.designInitiatorList = res.result.engineeringInterfacePersonList || [] - } else if (row.designInitiator == 0) { - this.designInitiatorList = res.result.studioPersonList || [] - } else if (!row.designInitiator || row.designInitiator == '') { + // if (row.designInitiator == 1) { + // this.designInitiatorList = res.result.lawEngineerList || [] + // } else if (row.designInitiator == 2) { + // this.designInitiatorList = res.result.certificationEngineerList || [] + // } else if (row.designInitiator == 3) { + // this.designInitiatorList = res.result.engineeringInterfacePersonList || [] + // } else if (row.designInitiator == 0) { + // this.designInitiatorList = res.result.studioPersonList || [] + // } else if (!row.designInitiator || row.designInitiator == '') { this.designInitiatorList = res.result.allPersonList || [] - } + // } //设计符合性确认-责任人 - if (row.designDuty == 1) { - this.designDutyList = res.result.lawEngineerList || [] - } else if (row.designDuty == 2) { - this.designDutyList = res.result.certificationEngineerList || [] - } else if (row.designDuty == 3) { - this.designDutyList = res.result.engineeringInterfacePersonList || [] - } else if (row.designInitiator == 0) { - this.designDutyList = res.result.studioPersonList || [] - } else if (!row.designDuty || row.designDuty == '') { + // if (row.designDuty == 1) { + // this.designDutyList = res.result.lawEngineerList || [] + // } else if (row.designDuty == 2) { + // this.designDutyList = res.result.certificationEngineerList || [] + // } else if (row.designDuty == 3) { + // this.designDutyList = res.result.engineeringInterfacePersonList || [] + // } else if (row.designInitiator == 0) { + // this.designDutyList = res.result.studioPersonList || [] + // } else if (!row.designDuty || row.designDuty == '') { this.designDutyList = res.result.allPersonList || [] - } + // } //prehomo确认-发起人 - if (row.prehomoInitiator == 1) { - this.prehomoInitiatorList = res.result.lawEngineerList || [] - } else if (row.prehomoInitiator == 2) { - this.prehomoInitiatorList = res.result.certificationEngineerList || [] - } else if (row.prehomoInitiator == 3) { - this.prehomoInitiatorList = res.result.engineeringInterfacePersonList || [] - } else if (row.designInitiator == 0) { - this.prehomoInitiatorList = res.result.studioPersonList || [] - } else if (!row.prehomoInitiator || row.prehomoInitiator == '') { + // if (row.prehomoInitiator == 1) { + // this.prehomoInitiatorList = res.result.lawEngineerList || [] + // } else if (row.prehomoInitiator == 2) { + // this.prehomoInitiatorList = res.result.certificationEngineerList || [] + // } else if (row.prehomoInitiator == 3) { + // this.prehomoInitiatorList = res.result.engineeringInterfacePersonList || [] + // } else if (row.designInitiator == 0) { + // this.prehomoInitiatorList = res.result.studioPersonList || [] + // } else if (!row.prehomoInitiator || row.prehomoInitiator == '') { this.prehomoInitiatorList = res.result.allPersonList || [] - } + // } //prehomo确认-责任人 - if (row.prehomoDuty == 1) { - this.prehomoDutyList = res.result.lawEngineerList || [] - } else if (row.prehomoDuty == 2) { - this.prehomoDutyList = res.result.certificationEngineerList || [] - } else if (row.prehomoDuty == 3) { - this.prehomoDutyList = res.result.engineeringInterfacePersonList || [] - } else if (row.designInitiator == 0) { - this.prehomoDutyList = res.result.studioPersonList || [] - } else if (!row.prehomoDuty || row.prehomoDuty == '') { + // if (row.prehomoDuty == 1) { + // this.prehomoDutyList = res.result.lawEngineerList || [] + // } else if (row.prehomoDuty == 2) { + // this.prehomoDutyList = res.result.certificationEngineerList || [] + // } else if (row.prehomoDuty == 3) { + // this.prehomoDutyList = res.result.engineeringInterfacePersonList || [] + // } else if (row.designInitiator == 0) { + // this.prehomoDutyList = res.result.studioPersonList || [] + // } else if (!row.prehomoDuty || row.prehomoDuty == '') { this.prehomoDutyList = res.result.allPersonList || [] - } + // } //验证符合性确认-发起人 - if (row.verifyInitiator == 1) { - this.verifyInitiatorList = res.result.lawEngineerList || [] - } else if (row.verifyInitiator == 2) { - this.verifyInitiatorList = res.result.certificationEngineerList || [] - } else if (row.verifyInitiator == 3) { - this.verifyInitiatorList = res.result.engineeringInterfacePersonList || [] - } else if (row.designInitiator == 0) { - this.verifyInitiatorList = res.result.studioPersonList || [] - } else if (!row.verifyInitiator || row.verifyInitiator == '') { + // if (row.verifyInitiator == 1) { + // this.verifyInitiatorList = res.result.lawEngineerList || [] + // } else if (row.verifyInitiator == 2) { + // this.verifyInitiatorList = res.result.certificationEngineerList || [] + // } else if (row.verifyInitiator == 3) { + // this.verifyInitiatorList = res.result.engineeringInterfacePersonList || [] + // } else if (row.designInitiator == 0) { + // this.verifyInitiatorList = res.result.studioPersonList || [] + // } else if (!row.verifyInitiator || row.verifyInitiator == '') { this.verifyInitiatorList = res.result.allPersonList || [] - } + // } //验证符合性确认-责任人 - if (row.verifyDuty == 1) { - this.verifyDutyList = res.result.lawEngineerList || [] - } else if (row.verifyDuty == 2) { - this.verifyDutyList = res.result.certificationEngineerList || [] - } else if (row.verifyDuty == 3) { - this.verifyDutyList = res.result.engineeringInterfacePersonList || [] - } else if (row.designInitiator == 0) { - this.verifyDutyList = res.result.studioPersonList || [] - } else if (!row.verifyDuty || row.verifyDuty == '') { + // if (row.verifyDuty == 1) { + // this.verifyDutyList = res.result.lawEngineerList || [] + // } else if (row.verifyDuty == 2) { + // this.verifyDutyList = res.result.certificationEngineerList || [] + // } else if (row.verifyDuty == 3) { + // this.verifyDutyList = res.result.engineeringInterfacePersonList || [] + // } else if (row.designInitiator == 0) { + // this.verifyDutyList = res.result.studioPersonList || [] + // } else if (!row.verifyDuty || row.verifyDuty == '') { this.verifyDutyList = res.result.allPersonList || [] - } + // } callback() }, getData(row, res) { From 4628439169b53d27c544c480c9d3bd86969044b0 Mon Sep 17 00:00:00 2001 From: zer0Black Date: Fri, 22 Jul 2022 15:15:51 +0800 Subject: [PATCH 52/60] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E5=90=8D=E5=8D=95=E5=AF=BC=E5=85=A5=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E5=A4=A7=E5=B0=8F=E5=86=99=E9=94=99=E8=AF=AF=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jero/modules/document/enums/SearchEnum.java | 2 -- .../impl/ProjectRelatedPersonnelServiceImpl.java | 15 ++++----------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/enums/SearchEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/enums/SearchEnum.java index 279e77bcd..3b1ea5267 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/enums/SearchEnum.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/enums/SearchEnum.java @@ -12,8 +12,6 @@ public enum SearchEnum { FULL_TEXT_SEARCH_CN("全部中文","fulltextsearchcn"), FULL_TEXT_SEARCH_EN("全部英文","fulltextsearchen"); - - String name; String value; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectRelatedPersonnelServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectRelatedPersonnelServiceImpl.java index 66e03ed80..8f2136160 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectRelatedPersonnelServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectRelatedPersonnelServiceImpl.java @@ -55,14 +55,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.File; import java.io.IOException; import java.io.OutputStream; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Comparator; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.TreeSet; +import java.util.*; import java.util.stream.Collectors; /** @@ -1047,7 +1040,7 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl data.equals(e.getUsername())) + lawEngineerId = lawEngineerUsers.stream().filter(e -> data.toLowerCase().equals(e.getUsername().toLowerCase())) .map(sysUser -> sysUser.getId()).collect(Collectors.joining(",")); } midId.append(lawEngineerId).append(","); @@ -1081,7 +1074,7 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl data.equals(e.getUsername())) + engineeringInterfacePersonId = engineeringInterfacePersonUsers.stream().filter(e -> data.toLowerCase().equals(e.getUsername().toLowerCase())) .map(sysUser -> sysUser.getId()).collect(Collectors.joining(",")); } midId.append(engineeringInterfacePersonId).append(","); @@ -1130,7 +1123,7 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl data.equals(e.getUsername())) + certificationEngineerId = certificationEngineerUsers.stream().filter(e -> data.toLowerCase().equals(e.getUsername().toLowerCase())) .map(sysUser -> sysUser.getId()).collect(Collectors.joining(",")); } midId.append(certificationEngineerId).append(","); From c7dbf58f6856cb92e1ac33d2cfefc693b69d4b59 Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Fri, 22 Jul 2022 15:30:42 +0800 Subject: [PATCH 53/60] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BB=84=E7=BB=87=E6=9C=BA=E6=9E=84=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 1 + jero-web/src/common/lang/zh-cn.js | 1 + jero-web/src/views/system/UserList.vue | 49 +++++++++++++++++++++++++- 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 423f7bcbd..bfdf0cd66 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1168,4 +1168,5 @@ module.exports = { fullTextComments:'Full text comments', fileDeclaration:'file Declaration', FileForDetails:'File For Details', + Theorganization:'The Organization', } \ 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 30aeaec72..c369d321b 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1172,4 +1172,5 @@ module.exports = { fullTextComments:'全文评论', fileDeclaration:'文件说明', FileForDetails:'文件详情', + Theorganization:'组织机构', } \ No newline at end of file diff --git a/jero-web/src/views/system/UserList.vue b/jero-web/src/views/system/UserList.vue index 45f381221..93c62e384 100644 --- a/jero-web/src/views/system/UserList.vue +++ b/jero-web/src/views/system/UserList.vue @@ -57,6 +57,28 @@
+ +
+
+ {{ $t('Theorganization') }} +
+ + + + + +
+
@@ -141,7 +163,7 @@ import DepartmentAllocation from './modules/departmentAllocation' import UserModal from './modules/UserModal' import PasswordModal from './modules/PasswordModal' - import { putAction, getFileAccessHttpUrl } from '@/api/manage' + import {getAction, putAction, getFileAccessHttpUrl } from '@/api/manage' import { frozenBatch } from '@/api/api' import { JeroListMixin } from '@/mixins/JeroListMixin' import JInput from '@/components/jero/JInput' @@ -174,6 +196,18 @@ departmentvisible: false, // 部门配置得弹框 selectedRowKeys: [], selectedRowKeysvalue: [], + CategoryTreeList:[], + ipagination: { + current: 1, + pageSize: 10, + pageSizeOptions: ['10', '30', '50', '100'], + showTotal: (total, range) => { + return range[0] + '-' + range[1] + ' 共' + total + '条' + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 + }, columns: [ { title: this.$t('serialNumber'), @@ -259,6 +293,7 @@ list: '/sys/user/page', delete: '/sys/user/delete', deleteBatch: '/sys/user/deleteBatch', + getSysCategoryTree: '/sys/sysDepart/queryTreeList', exportXlsUrl: '/sys/user/exportXls', importExcelUrl: 'sys/user/importExcel' } @@ -269,6 +304,9 @@ return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` } }, + mounted() { + this.getSysCategoryTree() + }, methods: { // 重置密码 resetPassword(val) { @@ -368,6 +406,15 @@ }) } }, + getSysCategoryTree() { + getAction(this.url.getSysCategoryTree, {}).then((res) => { + if (res.success) { + this.CategoryTreeList = res.result + } else { + this.CategoryTreeList = [] + } + }) + }, handleMenuClick(e) { if (e.key == 1) { this.batchDel() From fa0a81eadf7d0f465019827764206177f7428b27 Mon Sep 17 00:00:00 2001 From: zer0Black Date: Fri, 22 Jul 2022 15:34:53 +0800 Subject: [PATCH 54/60] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=A7=92=E8=89=B2=E4=B8=BA=20=E2=80=9C?= =?UTF-8?q?=E4=B8=80=E8=88=AC=E7=94=A8=E6=88=B7=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jero/modules/system/service/impl/SysUserServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SysUserServiceImpl.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SysUserServiceImpl.java index e457b8b91..2783d1166 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SysUserServiceImpl.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SysUserServiceImpl.java @@ -519,7 +519,7 @@ public class SysUserServiceImpl extends ServiceImpl impl sysUserDepartMapper.insert(sysUserDepart); // 添加用户角色关系 - SysUserRole userRole = new SysUserRole(sysUser.getId(), "1534020318437208065"); // 新增用户默认角色均为工程师 + SysUserRole userRole = new SysUserRole(sysUser.getId(), "1550369502225551361"); // 新增用户默认角色均为一般用户 sysUserRoleMapper.insert(userRole); // 添加用户信息 From 52e3945af56f118686621570f6361aea453a7dbb Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Fri, 22 Jul 2022 15:43:42 +0800 Subject: [PATCH 55/60] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BB=84=E7=BB=87=E6=9C=BA=E6=9E=84=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=9D=A1=E4=BB=B6?= 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/views/system/UserList.vue | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 8422c9267..c1c5b2d4a 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -38,7 +38,7 @@ module.exports = { serialNumber: 'Number', userAccount: 'User Account', userName: 'User Name', - Department: 'Department', + department: 'Department', status: 'Status', Operation: 'Operation', aRcord: 'A Rcord', diff --git a/jero-web/src/views/system/UserList.vue b/jero-web/src/views/system/UserList.vue index 93c62e384..3e6482650 100644 --- a/jero-web/src/views/system/UserList.vue +++ b/jero-web/src/views/system/UserList.vue @@ -59,8 +59,8 @@
-
- {{ $t('Theorganization') }} +
+ {{ $t('department') }}
From c2f828377ea4b8b7e2d40f5f3a26ce6d9132161c Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Fri, 22 Jul 2022 17:30:44 +0800 Subject: [PATCH 56/60] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=9D=A1=E4=BB=B6=E5=B1=95=E5=BC=80=E6=94=B6?= =?UTF-8?q?=E8=B5=B7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/views/system/UserList.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jero-web/src/views/system/UserList.vue b/jero-web/src/views/system/UserList.vue index 3e6482650..b44f2bb1a 100644 --- a/jero-web/src/views/system/UserList.vue +++ b/jero-web/src/views/system/UserList.vue @@ -84,7 +84,7 @@ {{$t('query')}} {{$t('reset')}} - {{ toggleSearchStatus ? $t('open') : $t('away') }} + {{ toggleSearchStatus ? $t('away') : $t('open') }} From fcbb1b55b7954db9ff9c0034ec393a802acd59b9 Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Fri, 22 Jul 2022 17:59:08 +0800 Subject: [PATCH 57/60] =?UTF-8?q?=E6=96=87=E6=A1=A3=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=E5=BC=80=E5=8F=91=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-boot/db/蔚来标准sql/dev_third_record.sql | 55 ++++++ .../DocTranslationEOController.java | 5 +- .../entity/DocTranslationEO.java | 19 +- .../enums/ReleaseConditionEnum.java | 63 ++++++ .../enums/TranslationResultEnum.java | 63 ++++++ .../impl/DocTranslationEOServiceImpl.java | 23 ++- .../utils/TranslationDocumentUtils.java | 180 ++++++++++++++++++ .../feishu/service/IFeishuService.java | 8 + .../service/impl/FeishuServiceImpl.java | 68 +++++++ ...sOpinionAssessmentResultEOServiceImpl.java | 3 + .../impl/LawsOpinionGatherEOServiceImpl.java | 3 + .../impl/LawsProcessHistoryEOServiceImpl.java | 3 + .../src/main/resources/application-dev.yml | 8 +- 13 files changed, 490 insertions(+), 11 deletions(-) create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/enums/ReleaseConditionEnum.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/enums/TranslationResultEnum.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/utils/TranslationDocumentUtils.java diff --git a/jero-boot/db/蔚来标准sql/dev_third_record.sql b/jero-boot/db/蔚来标准sql/dev_third_record.sql index 69d24c766..6268531d7 100644 --- a/jero-boot/db/蔚来标准sql/dev_third_record.sql +++ b/jero-boot/db/蔚来标准sql/dev_third_record.sql @@ -439,3 +439,58 @@ CREATE TABLE `laws_weilai`.`doc_translation` ( `target_file_id` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '目标文件id', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文档翻译表' ROW_FORMAT = Dynamic; + +-- 文档翻译-源语言数据字典 +INSERT INTO `laws_weilai`.`sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `type`, `dict_en_name`, `is_tag_dict`, `is_read_only`, `attribute_type`, `order_num`) VALUES ('1550306517749547010', '文档翻译-翻译语言-源语言', 'source_language', '文档翻译-翻译语言-源语言', 0, 'admin', '2022-07-22 10:27:32', 'admin', '2022-07-22 10:29:17', NULL, NULL, 1, 0, '1', 2); + +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('155030756958032691412', '1550306517749547010', '中文', 'zh', '中文', 2, 1, 'admin', '2022-07-22 10:31:43', 'admin', '2022-07-22 10:31:59', 1, NULL, NULL, '0', 'Chinese'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('155030763691987763313', '1550306517749547010', '英文', 'en', '英文', 1, 1, 'admin', '2022-07-22 10:31:59', NULL, NULL, 1, NULL, NULL, '0', 'English'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('155030778369954611414', '1550306517749547010', '日语', 'ja', '日语', 3, 1, 'admin', '2022-07-22 10:32:34', NULL, NULL, 1, NULL, NULL, '0', 'Japanese'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('155030790598028493015', '1550306517749547010', '俄语', 'ru', '俄语', 4, 1, 'admin', '2022-07-22 10:33:03', NULL, NULL, 1, NULL, NULL, '0', 'Russian'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('155030797657042124916', '1550306517749547010', '德语', 'de', '德语', 5, 1, 'admin', '2022-07-22 10:33:20', 'admin', '2022-07-22 10:34:58', 1, NULL, NULL, '0', 'German'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503088022275522577', '1550306517749547010', '法语', 'fr', '法语', 6, 1, 'admin', '2022-07-22 10:36:36', NULL, NULL, 1, NULL, NULL, '0', 'French'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503112074344038418', '1550306517749547010', '意大利语', 'it', '意大利语', 7, 1, 'admin', '2022-07-22 10:46:10', NULL, NULL, 1, NULL, NULL, '0', 'Italian'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503112704622100509', '1550306517749547010', '波兰语', 'pl', '波兰语', 8, 1, 'admin', '2022-07-22 10:46:25', NULL, NULL, 1, NULL, NULL, '0', 'Polish'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503114101073674251', '1550306517749547010', '泰语', 'th', '泰语', 9, 1, 'admin', '2022-07-22 10:46:58', NULL, NULL, 1, NULL, NULL, '0', 'Thai language'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503115557294080012', '1550306517749547010', '印地语', 'hi', '印地语', 11, 1, 'admin', '2022-07-22 10:47:33', NULL, NULL, 1, NULL, NULL, '0', 'Hindi'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503116395022417943', '1550306517749547010', '印尼语', 'id', '印尼语', 12, 1, 'admin', '2022-07-22 10:47:53', NULL, NULL, 1, NULL, NULL, '0', 'Indonesian'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503117185522892814', '1550306517749547010', '西班牙语', 'es', '西班牙语', 13, 1, 'admin', '2022-07-22 10:48:12', NULL, NULL, 1, NULL, NULL, '0', 'Spanish language'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503118402584084505', '1550306517749547010', '葡萄牙语', 'pt', '葡萄牙语', 17, 1, 'admin', '2022-07-22 10:48:41', 'admin', '2022-07-22 10:49:21', 1, NULL, NULL, '0', 'Portuguese'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503119403009474586', '1550306517749547010', '朝鲜语', 'ko', '朝鲜语', 15, 1, 'admin', '2022-07-22 10:49:05', NULL, NULL, 1, NULL, NULL, '0', 'Korean'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503120084961361947', '1550306517749547010', '越南语', 'vi', '越南语', 16, 1, 'admin', '2022-07-22 10:49:21', NULL, NULL, 1, NULL, NULL, '0', 'Vietnamese'); + +-- 文档翻译-目标语言数据字典 +INSERT INTO `laws_weilai`.`sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `type`, `dict_en_name`, `is_tag_dict`, `is_read_only`, `attribute_type`, `order_num`) VALUES ('1550306581909815297', '文档翻译-翻译语言-目标语言', 'target_language', '文档翻译-翻译语言-目标语言', 0, 'admin', '2022-07-22 10:27:47', 'admin', '2022-07-22 10:29:13', NULL, NULL, 1, 0, '1', 1); + +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503075695803269141', '1550306581909815297', '中文', 'zh', '中文', 2, 1, 'admin', '2022-07-22 10:31:43', 'admin', '2022-07-22 10:31:59', 1, NULL, NULL, '0', 'Chinese'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503076369198776331', '1550306581909815297', '英文', 'en', '英文', 1, 1, 'admin', '2022-07-22 10:31:59', NULL, NULL, 1, NULL, NULL, '0', 'English'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503077836995461141', '1550306581909815297', '日语', 'ja', '日语', 3, 1, 'admin', '2022-07-22 10:32:34', NULL, NULL, 1, NULL, NULL, '0', 'Japanese'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503079059802849301', '1550306581909815297', '俄语', 'ru', '俄语', 4, 1, 'admin', '2022-07-22 10:33:03', NULL, NULL, 1, NULL, NULL, '0', 'Russian'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503079765704212491', '1550306581909815297', '德语', 'de', '德语', 5, 1, 'admin', '2022-07-22 10:33:20', 'admin', '2022-07-22 10:34:58', 1, NULL, NULL, '0', 'German'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550308802227552257', '1550306581909815297', '法语', 'fr', '法语', 6, 1, 'admin', '2022-07-22 10:36:36', NULL, NULL, 1, NULL, NULL, '0', 'French'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550311207434403841', '1550306581909815297', '意大利语', 'it', '意大利语', 7, 1, 'admin', '2022-07-22 10:46:10', NULL, NULL, 1, NULL, NULL, '0', 'Italian'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550311270462210050', '1550306581909815297', '波兰语', 'pl', '波兰语', 8, 1, 'admin', '2022-07-22 10:46:25', NULL, NULL, 1, NULL, NULL, '0', 'Polish'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550311410107367425', '1550306581909815297', '泰语', 'th', '泰语', 9, 1, 'admin', '2022-07-22 10:46:58', NULL, NULL, 1, NULL, NULL, '0', 'Thai language'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550311555729408001', '1550306581909815297', '印地语', 'hi', '印地语', 11, 1, 'admin', '2022-07-22 10:47:33', NULL, NULL, 1, NULL, NULL, '0', 'Hindi'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550311639502241794', '1550306581909815297', '印尼语', 'id', '印尼语', 12, 1, 'admin', '2022-07-22 10:47:53', NULL, NULL, 1, NULL, NULL, '0', 'Indonesian'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550311718552289281', '1550306581909815297', '西班牙语', 'es', '西班牙语', 13, 1, 'admin', '2022-07-22 10:48:12', NULL, NULL, 1, NULL, NULL, '0', 'Spanish language'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550311840258408450', '1550306581909815297', '葡萄牙语', 'pt', '葡萄牙语', 17, 1, 'admin', '2022-07-22 10:48:41', 'admin', '2022-07-22 10:49:21', 1, NULL, NULL, '0', 'Portuguese'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550311940300947458', '1550306581909815297', '朝鲜语', 'ko', '朝鲜语', 15, 1, 'admin', '2022-07-22 10:49:05', NULL, NULL, 1, NULL, NULL, '0', 'Korean'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550312008496136194', '1550306581909815297', '越南语', 'vi', '越南语', 16, 1, 'admin', '2022-07-22 10:49:21', NULL, NULL, 1, NULL, NULL, '0', 'Vietnamese'); + +-- 文档翻译-发布情况数据字典 +INSERT INTO `laws_weilai`.`sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `type`, `dict_en_name`, `is_tag_dict`, `is_read_only`, `attribute_type`, `order_num`) VALUES ('1550314527293128705', '文档翻译-发布情况', 'release_condition', '文档翻译-发布情况', 0, 'admin', '2022-07-22 10:59:21', 'admin', '2022-07-22 11:01:07', NULL, NULL, 1, 0, '1', 2); + +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550314666682433537', '1550314527293128705', '已发布', 'published', '已发布', 1, 1, 'admin', '2022-07-22 10:59:55', NULL, NULL, 1, NULL, NULL, '0', 'Have published'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550314731320852482', '1550314527293128705', '草稿', 'draft', '草稿', 2, 1, 'admin', '2022-07-22 11:00:10', NULL, NULL, 1, NULL, NULL, '0', 'Draft'); + +-- 文档翻译-翻译结果数据字典 +INSERT INTO `laws_weilai`.`sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `type`, `dict_en_name`, `is_tag_dict`, `is_read_only`, `attribute_type`, `order_num`) VALUES ('1550314971079852034', '文档翻译-翻译结果', 'translation_result', '文档翻译-翻译结果', 0, 'admin', '2022-07-22 11:01:07', NULL, NULL, NULL, NULL, 1, 0, '1', 1); + +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550315090797871105', '1550314971079852034', '翻译中', 'In the translation', '翻译中', 1, 1, 'admin', '2022-07-22 11:01:36', NULL, NULL, 1, NULL, NULL, '0', 'In the translation'); +INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550315193285689345', '1550314971079852034', '翻译完成', 'Translation done', '翻译完成', 2, 1, 'admin', '2022-07-22 11:02:00', NULL, NULL, 1, NULL, NULL, '0', 'Translation done'); + +-- 文档翻译表-增加字段 编号、标题 +ALTER TABLE `laws_weilai`.`doc_translation` + ADD COLUMN `serial_number` varchar(255) NULL COMMENT '编号' AFTER `buss_document_library_id`, + ADD COLUMN `title` varchar(255) NULL COMMENT '标题' AFTER `serial_number`; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/controller/DocTranslationEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/controller/DocTranslationEOController.java index 3383c9982..1ffb02b43 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/controller/DocTranslationEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/controller/DocTranslationEOController.java @@ -35,7 +35,7 @@ import com.jero.common.aspect.annotation.AutoLog; public class DocTranslationEOController extends JeroController { @Autowired private IDocTranslationEOService docTranslationEOService; - + /** * 分页列表查询 * @@ -51,11 +51,12 @@ public class DocTranslationEOController extends JeroController queryPageList(DocTranslationEO docTranslationEO, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + @RequestParam(name="cut", defaultValue="cn") String cut, HttpServletRequest req) { QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(docTranslationEO, req.getParameterMap()); Page page = new Page(pageNo, pageSize); IPage pageList = docTranslationEOService.page(page, queryWrapper); - return Result.OK(pageList); + return Result.OK(cut,pageList); } /** diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/entity/DocTranslationEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/entity/DocTranslationEO.java index b6ca2dbff..442d9d205 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/entity/DocTranslationEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/entity/DocTranslationEO.java @@ -1,8 +1,6 @@ package com.jero.modules.docTranslation.entity; import java.io.Serializable; -import java.io.UnsupportedEncodingException; -import java.math.BigDecimal; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; @@ -15,8 +13,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; - /** * @Description: 文档翻译表 @@ -66,7 +62,18 @@ public class DocTranslationEO implements Serializable { @ApiModelProperty(value = "文档库id") private java.lang.String bussDocumentLibraryId; + /**编号*/ + @Excel(name = "编号", width = 15) + @ApiModelProperty(value = "编号") + private String serialNumber; + + /**标题*/ + @Excel(name = "标题", width = 15) + @ApiModelProperty(value = "标题") + private String title; + /**文本状态*/ + @Dict(dicCode = "state") @Excel(name = "文本状态", width = 15) @ApiModelProperty(value = "文本状态") private java.lang.String textStatus; @@ -77,16 +84,19 @@ public class DocTranslationEO implements Serializable { private java.lang.String fileName; /**翻译前语言(源语言)*/ + @Dict(dicCode = "source_language") @Excel(name = "翻译前语言(源语言)", width = 15) @ApiModelProperty(value = "翻译前语言(源语言)") private java.lang.String sourceLanguage; /**翻译后语言(目标语言)*/ + @Dict(dicCode = "target_language") @Excel(name = "翻译后语言(目标语言)", width = 15) @ApiModelProperty(value = "翻译后语言(目标语言)") private java.lang.String targetLanguage; /**翻译结果*/ + @Dict(dicCode = "translation_result") @Excel(name = "翻译结果", width = 15) @ApiModelProperty(value = "翻译结果") private java.lang.String translationResult; @@ -99,6 +109,7 @@ public class DocTranslationEO implements Serializable { private java.util.Date translationTime; /**发布情况*/ + @Dict(dicCode = "release_condition") @Excel(name = "发布情况", width = 15) @ApiModelProperty(value = "发布情况") private java.lang.String releaseCondition; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/enums/ReleaseConditionEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/enums/ReleaseConditionEnum.java new file mode 100644 index 000000000..bba19ad94 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/enums/ReleaseConditionEnum.java @@ -0,0 +1,63 @@ +package com.jero.modules.docTranslation.enums; + +import com.jero.common.constant.enums.CutEnum; +import org.apache.commons.lang3.StringUtils; + +/** + * 发布情况枚举类 + */ +public enum ReleaseConditionEnum { + + PUBLISHED("已发布","published","Have published"), + DRAFT("草稿","draft","Draft"), + ; + + + String cnName; + String enName; + String value; + + private ReleaseConditionEnum(String cnName, String value, String enName) { + this.cnName = cnName; + this.value = value; + this.enName = enName; + } + + public String getCnName() { + return cnName; + } + + public void setCnName(String cnName) { + this.cnName = cnName; + } + + public String getEnName() { + return enName; + } + + public void setEnName(String enName) { + this.enName = enName; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public static String getTextByValue(String value,String cut) { + ReleaseConditionEnum[] values = values(); + for (ReleaseConditionEnum releaseConditionEnum : values) { + if (releaseConditionEnum.value.equals(value)) { + if(StringUtils.equals(cut, CutEnum.CN.getValue())){ + return releaseConditionEnum.cnName; + }else if(StringUtils.equals(cut, CutEnum.EN.getValue())){ + return releaseConditionEnum.enName; + } + } + } + return null; + } +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/enums/TranslationResultEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/enums/TranslationResultEnum.java new file mode 100644 index 000000000..18c3a13f9 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/enums/TranslationResultEnum.java @@ -0,0 +1,63 @@ +package com.jero.modules.docTranslation.enums; + +import com.jero.common.constant.enums.CutEnum; +import org.apache.commons.lang3.StringUtils; + +/** + * 翻译结果枚举类 + */ +public enum TranslationResultEnum { + + IN_THE_TRANSLATION("翻译中","In the translation","In the translation"), + TRANSLATION_DONE("翻译完成","Translation done","Translation done"), + ; + + + String cnName; + String enName; + String value; + + private TranslationResultEnum(String cnName, String value, String enName) { + this.cnName = cnName; + this.value = value; + this.enName = enName; + } + + public String getCnName() { + return cnName; + } + + public void setCnName(String cnName) { + this.cnName = cnName; + } + + public String getEnName() { + return enName; + } + + public void setEnName(String enName) { + this.enName = enName; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public static String getTextByValue(String value,String cut) { + TranslationResultEnum[] values = values(); + for (TranslationResultEnum translationResultEnum : values) { + if (translationResultEnum.value.equals(value)) { + if(StringUtils.equals(cut, CutEnum.CN.getValue())){ + return translationResultEnum.cnName; + }else if(StringUtils.equals(cut, CutEnum.EN.getValue())){ + return translationResultEnum.enName; + } + } + } + return null; + } +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/service/impl/DocTranslationEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/service/impl/DocTranslationEOServiceImpl.java index 344364cc1..20b0115d2 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/service/impl/DocTranslationEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/service/impl/DocTranslationEOServiceImpl.java @@ -1,12 +1,19 @@ package com.jero.modules.docTranslation.service.impl; import com.jero.modules.docTranslation.entity.DocTranslationEO; +import com.jero.modules.docTranslation.enums.ReleaseConditionEnum; +import com.jero.modules.docTranslation.enums.TranslationResultEnum; import com.jero.modules.docTranslation.mapper.DocTranslationEOMapper; import com.jero.modules.docTranslation.service.IDocTranslationEOService; +import com.jero.modules.docTranslation.utils.TranslationDocumentUtils; +import com.jero.modules.oss.entity.OSSFile; import org.springframework.stereotype.Service; -import java.util.List; -import java.util.Date; + +import java.util.*; + import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; /** * @Description: 文档翻译表 @@ -15,6 +22,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; * @Version: V1.0 */ @Service +@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class) public class DocTranslationEOServiceImpl extends ServiceImpl implements IDocTranslationEOService { /** @@ -28,7 +36,16 @@ public class DocTranslationEOServiceImpl extends ServiceImpl sourceFileList = iossFileService.getFileInfos(sourceFileId); + + if(CollectionUtils.isNotEmpty(sourceFileList)){ + OSSFile sourceOssFile = sourceFileList.get(0); + String translateFrontText = ReadWordUtil.readWord(sourceOssFile.getUrl(),uploadpath); + + String translateAfter =""; + StringBuffer translateAfterSb = new StringBuffer(); + + String tenantAccessToken = ""; + try { + tenantAccessToken = feishuService.getTenantAccessToken(); + } catch (IOException e) { + e.printStackTrace(); + } + + Map feishuTranslateParamsMap = new HashMap<>(); + feishuTranslateParamsMap.put("sourceLanguage",docTranslationEO.getSourceLanguage()); + feishuTranslateParamsMap.put("targetLanguage",docTranslationEO.getTargetLanguage()); + feishuTranslateParamsMap.put("tenantAccessToken",tenantAccessToken); + + //分隔长度 + int splitLength = 1000; + if(translateFrontText.length() > splitLength){ + //计算出能分隔几次 + int translateArrLength = translateFrontText.length() / splitLength + 1; + String translateFrontTextSplit = ""; + for (int i = 0; i < translateArrLength; i ++){ + if(i == 0){ + translateFrontTextSplit = translateFrontText.substring(0,splitLength); + }else { + //如果长度不够根据splitLength再截取一次。 + if(translateFrontText.length() < i*splitLength+(splitLength+1)){ + translateFrontTextSplit = translateFrontText.substring(i*(splitLength + 1),translateFrontText.length()); + }else { + translateFrontTextSplit = translateFrontText.substring(i*(splitLength + 1),i*splitLength+(splitLength+1)); + } + } + + feishuTranslateParamsMap.put("translateFrontText",translateFrontTextSplit); + translateAfter = feishuService.translateText(feishuTranslateParamsMap); + translateAfterSb.append(translateAfter); + } + }else { + feishuTranslateParamsMap.put("translateFrontText",translateFrontText); + translateAfter = feishuService.translateText(feishuTranslateParamsMap); + translateAfterSb.append(translateAfter); + } + + logger.debug("源文本:\n" + translateFrontText); + logger.debug("翻译后文本:\n" + translateAfter); + + //翻译后的文件路径 + String translateAfterFilePath = uploadpath + "/tempZip/translationTempFile"; + try { + translateAfterFile = createTranslateAfterFile(translateAfterFilePath, translateAfterSb.toString(),sourceOssFile.getFileName()); + } catch (Exception ex) { + ex.printStackTrace(); + logger.error("翻译文档-写入文档失败:" + ex.getMessage()); + } + } + + return translateAfterFile; + } + + /** + * 创建翻译后的文件,把翻译后的语言放进去。 + * @param translateAfterFilePath + * @throws Exception + */ + public static OSSFile createTranslateAfterFile(String translateAfterFilePath,String translateAfter,String fileName) throws Exception{ + OSSFile ossFile = null; + File newFilePath = new File(translateAfterFilePath); + if (!newFilePath.exists()) { + newFilePath.mkdirs(); + } + translateAfterFilePath = translateAfterFilePath + "/" + fileName; + File newFile = new File(translateAfterFilePath); + if (!newFile.exists()) { + newFile.createNewFile(); + } + try { + FileOutputStream out = new FileOutputStream(newFile); + + MultipartFile multipartFile = createMfileByPath(translateAfterFilePath); + ossFile = iossFileService.uploadLocalOfCos(multipartFile, "", null, null); + out.write(translateAfter.getBytes("UTF-8")); + out.close(); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + }finally { + //将翻译后的本地文件删除 + File file = new File(translateAfterFilePath); + FileUtil.deleteContents(file); + } + return ossFile; + } + + /** + * 根据路径创建文件 + * @param translateAfterFilePath + * @return + */ + private static MultipartFile createMfileByPath(String translateAfterFilePath) { + MultipartFile mFile = null; + try { + File file = new File(translateAfterFilePath); + FileInputStream fileInputStream = new FileInputStream(file); + + String fileName = file.getName(); + fileName = fileName.substring((fileName.lastIndexOf(File.separator) + 1)); + mFile = new MockMultipartFile(fileName, fileName, ContentType.APPLICATION_OCTET_STREAM.toString(), fileInputStream); + } catch (Exception ex) { + ex.printStackTrace(); + logger.error("封装文件出现错误:{}", ex.getMessage()); + } + return mFile; + } +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/IFeishuService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/IFeishuService.java index 425e8aad1..0a857879d 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/IFeishuService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/IFeishuService.java @@ -3,6 +3,7 @@ package com.jero.modules.feishu.service; import com.jero.modules.feishu.vo.FeishuMsgVo; import java.io.IOException; +import java.util.Map; /** * @Author: liyawei @@ -35,4 +36,11 @@ public interface IFeishuService { * @return */ String sendCardMsg(String[] userIds, FeishuMsgVo feishuMsgVo) throws IOException; + + /** + * 翻译文本 + * @param params + * @return + */ + String translateText(Map params); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/impl/FeishuServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/impl/FeishuServiceImpl.java index f5aa0fc96..df3ed86d6 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/impl/FeishuServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/impl/FeishuServiceImpl.java @@ -37,6 +37,9 @@ public class FeishuServiceImpl implements IFeishuService { @Value("${Feishu.batchSendMessageUrl}") private String batchSendMessageUrl; + @Value("${Feishu.translateTextUrl}") + private String translateTextUrl; + /** * 获取token * @return @@ -238,4 +241,69 @@ public class FeishuServiceImpl implements IFeishuService { return tokenJson.get("msg").toString(); } + /** + * 翻译文本 + * 参数: + * params:{ + * "translateFrontText":"翻译前文本", + * "sourceLanguage":"源语言", + * "targetLanguage":"目标语言", + * "tenantAccessToken":"登录令牌(飞书token)", + * } + */ + @Override + public String translateText(Map params) { + String result = null; + + String translateFrontText = (String) params.get("translateFrontText"); + String sourceLanguage = (String) params.get("sourceLanguage"); + String targetLanguage = (String) params.get("targetLanguage"); + String tenantAccessToken = (String) params.get("tenantAccessToken"); + + Map headerMap = new HashMap<>(); + headerMap.put("Content-Type", "application/json; charset=utf-8"); + headerMap.put("Authorization", "Bearer "+tenantAccessToken); + + List> glossaryList = new ArrayList<>(); + Map glossaryMap = new HashMap<>(); + glossaryMap.put("from","飞书"); + glossaryMap.put("to","Lark"); + glossaryList.add(glossaryMap); + + Map paramsMap = new HashMap<>(); + //请求级术语表,携带术语,仅在本次翻译中生效(最多能携带 128个术语词) + paramsMap.put("glossary", glossaryList); + //源语言 + paramsMap.put("source_language", sourceLanguage); + //源文本 + paramsMap.put("text", translateFrontText); + //目标语言 + paramsMap.put("target_language", targetLanguage); + + try { + String response = null; + response = HttpRequestUtil.getResponseOfPOST(translateTextUrl, headerMap, JSON.toJSONString(paramsMap)); + //返回结果样例: {"code":0,"data":{"text":"Try using Lark."},"msg":"Success"} + JSONObject translateAfterJson = JSONObject.parseObject(response); + + if(response != null && translateAfterJson != null){ + if(!translateAfterJson.get("code").toString().equals("0")) { + result = null; + } + result = JSONObject.parseObject(translateAfterJson.get("data").toString()).getString("text"); + }else { + //如果出现了异常,把翻译前的文本返回 + result = translateFrontText; + } + + } catch (IOException ex) { + //如果出现了异常,把翻译前的文本返回 + result = translateFrontText; + ex.printStackTrace(); + log.error("飞书翻译-文本翻译失败:{}",ex.getMessage()); + } + + return result; + } + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsOpinionAssessmentResultEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsOpinionAssessmentResultEOServiceImpl.java index 3679cf031..5e5acc773 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsOpinionAssessmentResultEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsOpinionAssessmentResultEOServiceImpl.java @@ -36,6 +36,8 @@ import java.util.*; import java.util.stream.Collectors; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -47,6 +49,7 @@ import javax.servlet.http.HttpServletResponse; * @Version: V1.0 */ @Service +@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class) public class LawsOpinionAssessmentResultEOServiceImpl extends ServiceImpl implements ILawsOpinionAssessmentResultEOService { @Value(value = "${jero.path.upload}") diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsOpinionGatherEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsOpinionGatherEOServiceImpl.java index 3107550fb..d966397cb 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsOpinionGatherEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsOpinionGatherEOServiceImpl.java @@ -23,6 +23,8 @@ import java.util.Date; import java.util.stream.Collectors; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; /** * @Description: 法规意见收集表 @@ -31,6 +33,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; * @Version: V1.0 */ @Service +@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class) public class LawsOpinionGatherEOServiceImpl extends ServiceImpl implements ILawsOpinionGatherEOService { @Autowired 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 ec91475dc..f6fbb3dba 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 @@ -28,6 +28,8 @@ import java.util.Date; import java.util.stream.Collectors; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletRequest; @@ -38,6 +40,7 @@ import javax.servlet.http.HttpServletRequest; * @Version: V1.0 */ @Service +@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class) public class LawsProcessHistoryEOServiceImpl extends ServiceImpl implements ILawsProcessHistoryEOService { @Autowired diff --git a/jero-boot/jero-boot-single-startup/src/main/resources/application-dev.yml b/jero-boot/jero-boot-single-startup/src/main/resources/application-dev.yml index 05c434846..79646a533 100644 --- a/jero-boot/jero-boot-single-startup/src/main/resources/application-dev.yml +++ b/jero-boot/jero-boot-single-startup/src/main/resources/application-dev.yml @@ -410,14 +410,18 @@ people: ## Feishu Feishu: # 测试 - appId: cli_a16d47ca9f381013 - appSecret: DSfCrj70xku2VUjqwHBIuuY6HZnz7ppe +# appId: cli_a16d47ca9f381013 +# appSecret: DSfCrj70xku2VUjqwHBIuuY6HZnz7ppe + + appId: cli_a25c9fdae5bc100c + appSecret: zIS7BLzcWaFvlpdz7CqRJbwVml4g4ESy # 正式 # appId: cli_a2a1a6014679500d # appSecret: AeHwisC82S0fhiREJg6bkdxhIZMevnZZ getTenantAccessTokenUrl: https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal batchSendMessageUrl: https://open.feishu.cn/open-apis/message/v4/batch_send/ + translateTextUrl: https://open.feishu.cn/open-apis/translation/v1/text/translate local-tool: uri: http://139.9.235.66:9022 opensso: From d0206ac2a741e031ca9bd16eae01883815415b43 Mon Sep 17 00:00:00 2001 From: liyawei Date: Fri, 22 Jul 2022 18:22:55 +0800 Subject: [PATCH 58/60] =?UTF-8?q?=E8=AE=A4=E8=AF=81-=E4=B8=8A=E6=8A=A5?= =?UTF-8?q?=E5=BA=93-=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AF=BC=E5=87=BAexcel?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ParamsReportDetailEOServiceImpl.java | 35 ++- .../jero/modules/project/util/ExcelUtil.java | 268 ++++++++++++++++++ 2 files changed, 291 insertions(+), 12 deletions(-) create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/util/ExcelUtil.java diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java index 54b443582..9bf90f6c1 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java @@ -1,7 +1,5 @@ package com.jero.modules.cert.report.service.impl; -import cn.afterturn.easypoi.excel.ExcelExportUtil; -import cn.afterturn.easypoi.excel.entity.TemplateExportParams; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ZipUtil; @@ -30,6 +28,7 @@ import com.jero.modules.cert.template.enums.ControlTypeEnum; import com.jero.modules.ocr.util.LineHumpUtil; import com.jero.modules.oss.entity.OSSFile; import com.jero.modules.oss.service.IOSSFileService; +import com.jero.modules.project.util.ExcelUtil; import com.jero.modules.project.util.WordUtil; import com.jero.modules.split.common.ReadExcel; import com.jero.modules.system.entity.SysDictItem; @@ -37,7 +36,6 @@ import com.jero.modules.system.service.ISysDictItemService; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.apache.poi.hssf.util.HSSFColor; -import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.util.IOUtils; import org.apache.poi.xssf.usermodel.*; import org.aspectj.util.FileUtil; @@ -753,6 +751,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl allParamsInfoList = queryForExportCustom(paramsReportDetailVO); - Map params = allParamsInfoList.get(0); + HashMap params = (HashMap) allParamsInfoList.get(0); String templateUrl = ""; ParamsExportTemplateEO paramsExportTemplateEO = paramsExportTemplateEOService.getById(paramsReportDetailVO.getExportTemplateId()); @@ -807,25 +806,37 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl allRelevFileList = (List) allParamsInfoList.get(2).get("fileListAll"); + if (allRelevFileList != null && !allRelevFileList.isEmpty()) { + allRelevFileList = allRelevFileList.stream().distinct().collect(Collectors.toList()); + downLoadFileList(allRelevFileList,fileNowPath + File.separator + "导出文件"); + } + // 拿取模板 String repFileName = fileName.replaceAll("/","_"); wordOS = new FileOutputStream(fileNowPath + File.separator + repFileName); if (CosBootUtil.doesObjectExist(templateUrl)) { InputStream wordTemplate = CosBootUtil.download(templateUrl); - com.qcloud.cos.utils.IOUtils.copy(wordTemplate, wordOS); +// com.qcloud.cos.utils.IOUtils.copy(wordTemplate, wordOS); + + ExcelUtil.variableReplace(wordTemplate, wordOS, params); + } // 替换占位符内容 - TemplateExportParams templateExportParams = new TemplateExportParams(); - templateExportParams.setTemplateUrl(fileNowPath + File.separator + repFileName); - Workbook workbook = ExcelExportUtil.exportExcel(templateExportParams, params); + // poi方式 +// TemplateExportParams templateExportParams = new TemplateExportParams(); +// templateExportParams.setTemplateUrl(fileNowPath + File.separator + repFileName); +// Workbook workbook = ExcelExportUtil.exportExcel(templateExportParams, params); - OutputStream word = new FileOutputStream(fileNowPath + File.separator + repFileName); - workbook.write(word); + +// OutputStream word = new FileOutputStream(fileNowPath + File.separator + repFileName); +// workbook.write(word); wordOS.flush(); wordOS.close(); - word.flush(); - word.close(); +// word.flush(); +// word.close(); // 打包导出压缩包 response.setHeader("Content-Disposition", diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/util/ExcelUtil.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/util/ExcelUtil.java new file mode 100644 index 000000000..ca8984ee3 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/util/ExcelUtil.java @@ -0,0 +1,268 @@ +package com.jero.modules.project.util; + +import org.apache.commons.io.FileUtils; +import org.docx4j.XmlUtils; +import org.docx4j.dml.*; +import org.docx4j.dml.spreadsheetdrawing.*; +import org.docx4j.openpackaging.io.SaveToZipFile; +import org.docx4j.openpackaging.packages.SpreadsheetMLPackage; +import org.docx4j.openpackaging.parts.DrawingML.Drawing; +import org.docx4j.openpackaging.parts.PartName; +import org.docx4j.openpackaging.parts.SpreadsheetML.JaxbSmlPart; +import org.docx4j.openpackaging.parts.SpreadsheetML.WorksheetPart; +import org.docx4j.openpackaging.parts.WordprocessingML.BinaryPartAbstractImage; +import org.docx4j.relationships.Relationship; + +import javax.xml.bind.JAXBException; +import javax.xml.bind.util.JAXBResult; +import javax.xml.transform.Source; +import javax.xml.transform.Templates; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.stream.StreamSource; +import java.io.File; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.HashMap; +import java.util.Map; + +public class ExcelUtil { + + public static void main(String[] args) throws Exception { + String inputfilepath = "D:\\text\\072001自定义模板.xlsx"; + SpreadsheetMLPackage pkg = SpreadsheetMLPackage.load(new File(inputfilepath)); + WorksheetPart worksheet = pkg.getWorkbookPart().getWorksheet(0); + JAXBResult result = XmlUtils.prepareJAXBResult(worksheet.getJAXBContext()); + Map transformParameters = new HashMap<>(); + transformParameters.put("NIO 07200103", "dfasdfas"); + +// InputStream smlPart = pkg.getParts().get(new PartName("/xl/sharedStrings.xml")); // 获取所有sheet + + Source xsltSource = new StreamSource(new File("D:\\text\\sharedStrings.xml")); + TransformerFactory transFact = TransformerFactory.newInstance(); + Templates cachedXSLT = transFact.newTemplates(xsltSource); + + pkg.getWorkbookPart().transform(cachedXSLT,transformParameters,result); + +// variableReplace(); +// xlsx4JAddImage(); + } + + public static void xlsx4JAddImage() throws Exception { + + String inputfilepath = "D:\\text\\072001自定义模板.xlsx"; + String outputfilepath = "D:\\text\\mytest.xlsx"; + String imagefilePath = "D:\\text\\jpg2.jpg" ; + + SpreadsheetMLPackage pkg = SpreadsheetMLPackage.createPackage(); + WorksheetPart worksheet = pkg.createWorksheetPart(new PartName("/xl/worksheets/sheet1.xml"), "Sheet1", 1); + + + // Create Drawing part and add to sheet + Drawing drawingPart = new Drawing(); + Relationship drawingRel = worksheet.addTargetPart(drawingPart); + + // Add anchor XML to worksheet + org.xlsx4j.sml.CTDrawing drawing = org.xlsx4j.jaxb.Context.getsmlObjectFactory().createCTDrawing(); + worksheet.getJaxbElement().setDrawing(drawing); + drawing.setId( drawingRel.getId() ); + + // Create image part and add to Drawing part + BinaryPartAbstractImage imagePart + = BinaryPartAbstractImage.createImagePart(pkg, drawingPart, + FileUtils.readFileToByteArray(new File(imagefilePath) )); + String imageRelID = imagePart.getSourceRelationship().getId(); + + // Create and set drawing part content + // Take your pick .. + // .. build it using code + drawingPart.setJaxbElement( + buildDrawingPartContentUsingCode(imageRelID)); + // .. or build it from an XML string +// drawingPart.setJaxbElement( +// buildDrawingPartContentFromXmlString(imageRelID)); + + + // Save the xlsx + SaveToZipFile saver = new SaveToZipFile(pkg); + saver.save(outputfilepath); + System.out.println("\n\n done .. " + outputfilepath); + } + + public static void variableReplace(InputStream is, OutputStream os, HashMap mappings) throws Exception { + + SpreadsheetMLPackage opcPackagepkg = SpreadsheetMLPackage.load(is); + + // Be sure to get the part which actually contains your variables! + JaxbSmlPart smlPart = (JaxbSmlPart)opcPackagepkg.getParts().get(new PartName("/xl/sharedStrings.xml")); // 获取所有sheet + //JaxbSmlPart smlPart = (JaxbSmlPart)opcPackagepkg.getParts().get(new PartName("/xl/worksheets/sheet1.xml")); + smlPart.variableReplace(mappings); + + // Save it + opcPackagepkg.save(os); + } + + /** + * This code generated using http://webapp.docx4java.org/OnlineDemo/PartsList.html + * "Method 1" + */ + public static CTDrawing buildDrawingPartContentUsingCode(String imageRelID) { + + org.docx4j.dml.spreadsheetdrawing.ObjectFactory dmlspreadsheetdrawingObjectFactory = new org.docx4j.dml.spreadsheetdrawing.ObjectFactory(); + + CTDrawing drawing = dmlspreadsheetdrawingObjectFactory.createCTDrawing(); +// JAXBElement drawingWrapped = dmlspreadsheetdrawingObjectFactory.createWsDr(drawing); + // Create object for twoCellAnchor + CTTwoCellAnchor twocellanchor = dmlspreadsheetdrawingObjectFactory.createCTTwoCellAnchor(); + drawing.getEGAnchor().add( twocellanchor); + // Create object for clientData + CTAnchorClientData anchorclientdata = dmlspreadsheetdrawingObjectFactory.createCTAnchorClientData(); + twocellanchor.setClientData(anchorclientdata); + // Create object for pic + CTPicture picture = dmlspreadsheetdrawingObjectFactory.createCTPicture(); + twocellanchor.setPic(picture); + org.docx4j.dml.ObjectFactory dmlObjectFactory = new org.docx4j.dml.ObjectFactory(); + // Create object for blipFill + CTBlipFillProperties blipfillproperties = dmlObjectFactory.createCTBlipFillProperties(); + picture.setBlipFill(blipfillproperties); + // Create object for blip + CTBlip blip = dmlObjectFactory.createCTBlip(); + blipfillproperties.setBlip(blip); + blip.setCstate(org.docx4j.dml.STBlipCompression.NONE); + blip.setEmbed( imageRelID ); + // Create object for extLst + CTOfficeArtExtensionList officeartextensionlist = dmlObjectFactory.createCTOfficeArtExtensionList(); + blip.setExtLst(officeartextensionlist); + // Create object for ext + CTOfficeArtExtension officeartextension = dmlObjectFactory.createCTOfficeArtExtension(); + officeartextensionlist.getExt().add( officeartextension); + officeartextension.setUri( "{28A0092B-C50C-407E-A947-70E740481C1C}"); + blip.setLink( ""); + // Create object for stretch + CTStretchInfoProperties stretchinfoproperties = dmlObjectFactory.createCTStretchInfoProperties(); + blipfillproperties.setStretch(stretchinfoproperties); + // Create object for fillRect + CTRelativeRect relativerect = dmlObjectFactory.createCTRelativeRect(); + stretchinfoproperties.setFillRect(relativerect); + relativerect.setR( new Integer(0) ); + relativerect.setT( new Integer(0) ); + relativerect.setL( new Integer(0) ); + relativerect.setB( new Integer(0) ); + // Create object for spPr + CTShapeProperties shapeproperties = dmlObjectFactory.createCTShapeProperties(); + picture.setSpPr(shapeproperties); + // Create object for xfrm + CTTransform2D transform2d = dmlObjectFactory.createCTTransform2D(); + shapeproperties.setXfrm(transform2d); + transform2d.setRot( new Integer(0) ); + // Create object for off + CTPoint2D point2d = dmlObjectFactory.createCTPoint2D(); + transform2d.setOff(point2d); + point2d.setY( 0 ); + point2d.setX( 0 ); + // Create object for ext + CTPositiveSize2D positivesize2d = dmlObjectFactory.createCTPositiveSize2D(); + transform2d.setExt(positivesize2d); + positivesize2d.setCx( 714375 ); + positivesize2d.setCy( 714375 ); + // Create object for prstGeom + CTPresetGeometry2D presetgeometry2d = dmlObjectFactory.createCTPresetGeometry2D(); + shapeproperties.setPrstGeom(presetgeometry2d); + // Create object for avLst + CTGeomGuideList geomguidelist = dmlObjectFactory.createCTGeomGuideList(); + presetgeometry2d.setAvLst(geomguidelist); + presetgeometry2d.setPrst(org.docx4j.dml.STShapeType.RECT); + // Create object for nvPicPr + CTPictureNonVisual picturenonvisual = dmlspreadsheetdrawingObjectFactory.createCTPictureNonVisual(); + picture.setNvPicPr(picturenonvisual); + // Create object for cNvPr + CTNonVisualDrawingProps nonvisualdrawingprops = dmlObjectFactory.createCTNonVisualDrawingProps(); + picturenonvisual.setCNvPr(nonvisualdrawingprops); + nonvisualdrawingprops.setDescr( ""); + nonvisualdrawingprops.setName( "Picture 1"); + nonvisualdrawingprops.setId( 2 ); + // Create object for cNvPicPr + CTNonVisualPictureProperties nonvisualpictureproperties = dmlObjectFactory.createCTNonVisualPictureProperties(); + picturenonvisual.setCNvPicPr(nonvisualpictureproperties); + // Create object for picLocks + CTPictureLocking picturelocking = dmlObjectFactory.createCTPictureLocking(); + nonvisualpictureproperties.setPicLocks(picturelocking); + picture.setMacro( ""); + // Create object for to + CTMarker marker = dmlspreadsheetdrawingObjectFactory.createCTMarker(); + twocellanchor.setTo(marker); + marker.setCol(1); + marker.setColOff( 104775 ); + marker.setRow(3); + marker.setRowOff( 142875 ); + // Create object for from + CTMarker marker2 = dmlspreadsheetdrawingObjectFactory.createCTMarker(); + twocellanchor.setFrom(marker2); + marker2.setCol(0); + marker2.setColOff( 0 ); + marker2.setRow(0); + marker2.setRowOff( 0 ); + twocellanchor.setEditAs(STEditAs.fromValue("name")); + +// return drawingWrapped; + return drawing; + } + + /** + * This code generated using http://webapp.docx4java.org/OnlineDemo/PartsList.html + * "Method 2" + */ + public static CTDrawing buildDrawingPartContentFromXmlString(String imageRelID) throws JAXBException { + + String openXML = "" + + "" + + "" + + "0" + + "0" + + "0" + + "0" + +"" + + "" + + "1" + + "104775" + + "3" + + "142875" + +"" + + "" + + "" + + "" + + "" + + "" + +"" + +"" + + "" + + "" + + "" + + "" + + "" + +"" + +"" + +"" + + "" + + "" + +"" + +"" + + "" + + "" + + "" + + "" + +"" + + "" + + "" + +"" + +"" + +"" + + "" + +"" + +""; + + return (CTDrawing) XmlUtils.unwrap( + XmlUtils.unmarshalString(openXML)); + + } + +} From 2715dd2b682f6ae7f6cea2dd4db48db60d1eb8a6 Mon Sep 17 00:00:00 2001 From: zer0Black Date: Sun, 24 Jul 2022 17:22:01 +0800 Subject: [PATCH 59/60] =?UTF-8?q?=E8=AE=A4=E8=AF=81=E6=94=B6=E9=9B=86?= =?UTF-8?q?=E7=9A=84=E5=8F=82=E6=95=B0=E5=AF=BC=E5=87=BA=20=E5=B7=A5?= =?UTF-8?q?=E7=A8=8B=E6=8E=A5=E5=8F=A3=E4=BA=BA=E8=A7=92=E8=89=B2=E5=8F=AA?= =?UTF-8?q?=E7=9C=8B=E5=88=B0=E8=87=AA=E5=B7=B1=E7=9A=84=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ParamsCollectManifestEOServiceImpl.java | 29 +++++++++++++++++-- .../collect/vo/ParamsCollectManifestVO.java | 3 ++ .../ParameterItemCollectionList.vue | 6 ++-- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java index 50ebb976f..78ca3a4a4 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java @@ -2157,8 +2157,17 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl> dataList = paramsCollectManifestEOMapper.listInfoForExport(queryEO); // 查询导出数据 + if (dataList == null || dataList.isEmpty()){ + // 没有查到数据,进行提示 + if (CutEnum.EN.getValue().equals(paramsCollectManifestVO.getCut())) { + throw new JeroBootException("No data, unable to export"); + } else { + throw new JeroBootException("无数据,无法导出"); + } + } List paramsConfigEOList = paramsConfigEOService.queryList(paramsManifestId); // 查询所有配置列 diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/vo/ParamsCollectManifestVO.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/vo/ParamsCollectManifestVO.java index 1421ccb64..cc37935f7 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/vo/ParamsCollectManifestVO.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/vo/ParamsCollectManifestVO.java @@ -74,4 +74,7 @@ public class ParamsCollectManifestVO { private String exportName; // 导出文件名 + @ApiModelProperty(value = "用户类型") + private String userTypes; // 用户类型 + } diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue index b1076e198..273116a1a 100644 --- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue +++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue @@ -822,11 +822,13 @@ paramsTemplateId: this.$route.query.paramsTemplateId, paramsTemplatePublishVersion:1, cut: this.cut, + userTypes: this.currentPersonRole, exportName:this.$route.query.projectName + '(' + this.$route.query.title + ')' } - console.log(query) getAction('/params/collectManifest/exportAll', query).then((res) => { - + if (res && !res.success) { + this.$message.error(res.message) + } this.textLoading = false }) }, From 8674a7d52f782d21e8cea1053ef8d16ccceafbfa Mon Sep 17 00:00:00 2001 From: zer0Black Date: Sun, 24 Jul 2022 17:31:06 +0800 Subject: [PATCH 60/60] =?UTF-8?q?=E5=B7=A6=E4=B8=8A=E8=A7=92=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E7=9A=84=E6=A8=AA=E7=BA=BF=E7=BC=A9=E7=9F=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ParameterItemCollectionList.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue index 273116a1a..682fbe51a 100644 --- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue +++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue @@ -3,7 +3,7 @@
- {{$t('ParameteItemCollectionList')}}({{$t(this.$route.query.projectName)}})——{{$t(this.paramsManifest.title)}} + {{$t('ParameteItemCollectionList')}}({{$t(this.$route.query.projectName)}}) — {{$t(this.paramsManifest.title)}}