diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java index a02b651ac..e4a311b2e 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java @@ -127,7 +127,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl ccParamsInfoList = certCategoryParamsInfoEOList.stream() .collect(Collectors.collectingAndThen(Collectors - .toCollection(() -> new TreeSet<>(Comparator.comparing(o -> o.getCertCategory() + ";" + o.getParamsNumber()))), ArrayList::new)); + .toCollection(() -> new TreeSet<>(Comparator.comparing(o -> o.getParamsNumber()))), ArrayList::new)); if (ccParamsInfoList.size() < certCategoryParamsInfoEOList.size()) { if (CutEnum.CN.getValue().equals(paramsInfoEO.getCut())) { throw new JeroBootException("不同类别间参数编号必须唯一!"); @@ -212,7 +212,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl ccParamsInfoList = certCategoryParamsInfoEOList.stream() .collect(Collectors.collectingAndThen(Collectors - .toCollection(() -> new TreeSet<>(Comparator.comparing(o -> o.getCertCategory() + ";" + o.getParamsNumber()))), ArrayList::new)); + .toCollection(() -> new TreeSet<>(Comparator.comparing(o -> o.getParamsNumber()))), ArrayList::new)); if (ccParamsInfoList.size() < certCategoryParamsInfoEOList.size()) { if (CutEnum.CN.getValue().equals(paramsInfoEO.getCut())) { throw new JeroBootException("不同类别间参数编号必须唯一!"); @@ -260,7 +260,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl 不能删 发布版用的同一文件 return removeById(id); } @@ -280,7 +280,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl nioNumberList = paramsInfoEOList.stream().map(ParamsInfoEO::getNioNumber).collect(Collectors.toList()); // 关联删除认证类别参数项 certCategoryParamsInfoEOService.deleteByNioNumberList(nioNumberList, paramsTemplateId); - // TODO 关联删除附件模板文件信息和文件 + // 关联删除附件模板文件信息和文件 ---> 不能删 发布版用的同一文件 } return removeByIds(ids); @@ -1098,11 +1098,11 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl nioNumberImport = new ArrayList<>(); // 记录导入的nio编号 int i = 1; //记录行号 - int num = 0; //记录是第几条数据 //循环验证数据 for (ParamsInfoCnImport dto : paramsInfoEOList) { //判断此行数据是否全部为空,是则不读取 if (checkObjAllFieldsIsNull(dto)) { + i++; continue; } @@ -1318,10 +1318,14 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl> ccDtoMap : certCategoryParamsInfoEOListMap.entrySet()) { String certCategory = ccDtoMap.getKey(); List ccDtoList = ccDtoMap.getValue(); + + List ccNioNumberImport = new ArrayList<>(); // 记录导入的nio编号 + int j = 1; for (CertCategoryParamsInfoCnImport ccDto : ccDtoList) { //判断此行数据是否全部为空,是则不读取 if (checkObjAllFieldsIsNull(ccDto)) { + j++; continue; } @@ -1351,6 +1355,20 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl ccDtoAfterDistinct = ccDtoList.stream() + .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> + new TreeSet<>(Comparator.comparing(o -> o.getNioNumber() + ";" + o.getCertCategory()))), ArrayList::new)); + if (ccDtoAfterDistinct.size() < ccDtoList.size()) { + // 取差集 + String reduceOne = ccDtoList.stream() + .filter(e->!ccDtoAfterDistinct.contains(e)).map(CertCategoryParamsInfoCnImport::getNioNumber).collect(Collectors.joining(",")); + if (StringUtils.isNotBlank(reduceOne)) { + if (CutEnum.CN.getValue().equals(cut)) { + stringMessage.add("导入数据中NIO编号:" + reduceOne + "下存在重复认证类别;"); + } else { + stringMessage.add("Repeat cert category exist in NIO Number: " + reduceOne + ";"); + } + } + } + certCategoryParamsInfoEOList.addAll(ccDtoList); } // 校验同 nio下认证参数编号唯一 - List ccDtoAfterDistinct = certCategoryParamsInfoEOList.stream() + List ccDtoAfterDistinctTwo = certCategoryParamsInfoEOList.stream() .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> - new TreeSet<>(Comparator.comparing(o -> o.getNioNumber() + ";" + o.getCertCategory()))), ArrayList::new)); - if (ccDtoAfterDistinct.size() < certCategoryParamsInfoEOList.size()) { - if(CutEnum.CN.getValue().equals(cut)) { - stringMessage.add("导入数据中存在重复认证编号;"); - } else { - stringMessage.add("Repeat number exist in the Import Data;"); + new TreeSet<>(Comparator.comparing(o -> o.getNioNumber() + ";" + o.getParamsNumber()))), ArrayList::new)); + if (ccDtoAfterDistinctTwo.size() < certCategoryParamsInfoEOList.size()) { + // 取差集 + String reduceTwo = certCategoryParamsInfoEOList.stream() + .filter(e->!ccDtoAfterDistinctTwo.contains(e)).map(CertCategoryParamsInfoCnImport::getNioNumber).collect(Collectors.joining(",")); + if (StringUtils.isNotBlank(reduceTwo)) { + if (CutEnum.CN.getValue().equals(cut)) { + stringMessage.add("导入数据中NIO编号:" + reduceTwo + "下存在重复认证编号;"); + } else { + stringMessage.add("Repeat number exist in NIO Number: " + reduceTwo + ";"); + } } } - Map map = new HashMap(); if (stringMessage.isEmpty()) { map.put("result", true); diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 9d0b387a8..864996229 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -729,6 +729,7 @@ module.exports = { ParameteItemCollectionList: 'Parameter item collection list', Areyousureparameteritems: 'Are you sure to submit the selected parameter items?', Theselectedconfiguration: 'The configuration can only be added when the parameter items in the parameter list are to be collected or changed', + NoConfigurationNotStart: 'No configuration added, unable to start collection, please check', theCurrent: 'The current status of this data is', thisbuttonCompleted: 'This button can only be operated when the status is completed', Frozenstatus: 'Frozen status, can only be viewed', @@ -771,7 +772,9 @@ module.exports = { configure: 'Configure', parameter: 'Parameter', changeExtension: 'Change Extension', + addDetailList: 'Add', detailedList: 'DetailedList', + copyParamDetailList: 'Copy Parameter List', collectionCompletionTime: 'Collection Completion Time', parameterTemplateName: 'Parameter Template Name', onlyThree: 'Only letters, numbers and horizontal bars (-) can be entered', diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index 5866766a0..be54f48e2 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -740,6 +740,7 @@ module.exports = { ParameteItemCollectionList: '参数项收集清单', Areyousureparameteritems: '确认提交所选参数项嘛?', Theselectedconfiguration: '参数清单中参数项均为待发起收集或变更时,才能添加配置', + NoConfigurationNotStart: '未添加任何配置,无法开始收集,请检查', theCurrent: '此数据当前状态为', thisbuttonCompleted: '当状态为"已完成"时,才可操作此按钮', Frozenstatus: '冻结状态,仅可以查看', @@ -782,7 +783,9 @@ module.exports = { configure: '配置', parameter: '参数', changeExtension: '变更扩展', + addDetailList: '添加清单', detailedList: '清单', + copyParamDetailList: '复制参数清单', collectionCompletionTime: '收集完成时间', parameterTemplateName: '参数模板名称', onlyThree: '只能输入字母,数字,横杠(-)三种内容', diff --git a/jero-web/src/views/parameter/managementdetails/index.vue b/jero-web/src/views/parameter/managementdetails/index.vue index d09c296c8..6b6852905 100644 --- a/jero-web/src/views/parameter/managementdetails/index.vue +++ b/jero-web/src/views/parameter/managementdetails/index.vue @@ -112,7 +112,7 @@ import axios from 'axios' import { ACCESS_TOKEN } from '@/store/mutation-types' import Vue from 'vue' export default { - name: 'ParameterItemCollectionList', + name: 'managementdetails', data(){ return{ columns:[], diff --git a/jero-web/src/views/projectManagement/ParameterItemCollection/ProjectDetails/index.vue b/jero-web/src/views/projectManagement/ParameterItemCollection/index.vue similarity index 92% rename from jero-web/src/views/projectManagement/ParameterItemCollection/ProjectDetails/index.vue rename to jero-web/src/views/projectManagement/ParameterItemCollection/index.vue index 8ada0ce43..b43b77d8c 100644 --- a/jero-web/src/views/projectManagement/ParameterItemCollection/ProjectDetails/index.vue +++ b/jero-web/src/views/projectManagement/ParameterItemCollection/index.vue @@ -71,15 +71,15 @@