From 398febf154f571064469d5e00b0fb96f10e7838b Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Mon, 18 Jul 2022 09:39:35 +0800 Subject: [PATCH 01/31] =?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/31] =?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/31] =?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/31] =?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/31] =?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/31] =?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/31] =?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/31] =?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/31] 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/31] =?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/31] =?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/31] 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/31] =?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/31] =?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/31] =?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/31] =?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/31] =?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/31] =?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/31] =?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/31] =?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; } +