Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage

This commit is contained in:
wangzhijiang
2022-06-30 15:03:37 +08:00
7 changed files with 99 additions and 39 deletions
@@ -127,7 +127,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
// 校验认证类别参数项编号 同一nio下编号 不同类别间编号唯一 // 校验认证类别参数项编号 同一nio下编号 不同类别间编号唯一
List<CertCategoryParamsInfoEO> ccParamsInfoList = certCategoryParamsInfoEOList.stream() List<CertCategoryParamsInfoEO> ccParamsInfoList = certCategoryParamsInfoEOList.stream()
.collect(Collectors.collectingAndThen(Collectors .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 (ccParamsInfoList.size() < certCategoryParamsInfoEOList.size()) {
if (CutEnum.CN.getValue().equals(paramsInfoEO.getCut())) { if (CutEnum.CN.getValue().equals(paramsInfoEO.getCut())) {
throw new JeroBootException("不同类别间参数编号必须唯一!"); throw new JeroBootException("不同类别间参数编号必须唯一!");
@@ -212,7 +212,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
// 校验认证类别参数项编号 同一nio下编号 不同类别间编号唯一 // 校验认证类别参数项编号 同一nio下编号 不同类别间编号唯一
List<CertCategoryParamsInfoEO> ccParamsInfoList = certCategoryParamsInfoEOList.stream() List<CertCategoryParamsInfoEO> ccParamsInfoList = certCategoryParamsInfoEOList.stream()
.collect(Collectors.collectingAndThen(Collectors .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 (ccParamsInfoList.size() < certCategoryParamsInfoEOList.size()) {
if (CutEnum.CN.getValue().equals(paramsInfoEO.getCut())) { if (CutEnum.CN.getValue().equals(paramsInfoEO.getCut())) {
throw new JeroBootException("不同类别间参数编号必须唯一!"); throw new JeroBootException("不同类别间参数编号必须唯一!");
@@ -260,7 +260,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
String nioNumber = paramsInfoEO.getNioNumber(); String nioNumber = paramsInfoEO.getNioNumber();
String paramsTemplateId = paramsInfoEO.getParamsTemplateId(); String paramsTemplateId = paramsInfoEO.getParamsTemplateId();
certCategoryParamsInfoEOService.deleteByNioNumberList(Arrays.asList(nioNumber), paramsTemplateId); certCategoryParamsInfoEOService.deleteByNioNumberList(Arrays.asList(nioNumber), paramsTemplateId);
// TODO 关联删除附件模板文件信息和文件 // 关联删除附件模板文件信息和文件 ---> 不能删 发布版用的同一文件
return removeById(id); return removeById(id);
} }
@@ -280,7 +280,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
List<String> nioNumberList = paramsInfoEOList.stream().map(ParamsInfoEO::getNioNumber).collect(Collectors.toList()); List<String> nioNumberList = paramsInfoEOList.stream().map(ParamsInfoEO::getNioNumber).collect(Collectors.toList());
// 关联删除认证类别参数项 // 关联删除认证类别参数项
certCategoryParamsInfoEOService.deleteByNioNumberList(nioNumberList, paramsTemplateId); certCategoryParamsInfoEOService.deleteByNioNumberList(nioNumberList, paramsTemplateId);
// TODO 关联删除附件模板文件信息和文件 // 关联删除附件模板文件信息和文件 ---> 不能删 发布版用的同一文件
} }
return removeByIds(ids); return removeByIds(ids);
@@ -1098,11 +1098,11 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
List<String> nioNumberImport = new ArrayList<>(); // 记录导入的nio编号 List<String> nioNumberImport = new ArrayList<>(); // 记录导入的nio编号
int i = 1; //记录行号 int i = 1; //记录行号
int num = 0; //记录是第几条数据
//循环验证数据 //循环验证数据
for (ParamsInfoCnImport dto : paramsInfoEOList) { for (ParamsInfoCnImport dto : paramsInfoEOList) {
//判断此行数据是否全部为空,是则不读取 //判断此行数据是否全部为空,是则不读取
if (checkObjAllFieldsIsNull(dto)) { if (checkObjAllFieldsIsNull(dto)) {
i++;
continue; continue;
} }
@@ -1318,10 +1318,14 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
for (Map.Entry<String, List<CertCategoryParamsInfoCnImport>> ccDtoMap : certCategoryParamsInfoEOListMap.entrySet()) { for (Map.Entry<String, List<CertCategoryParamsInfoCnImport>> ccDtoMap : certCategoryParamsInfoEOListMap.entrySet()) {
String certCategory = ccDtoMap.getKey(); String certCategory = ccDtoMap.getKey();
List<CertCategoryParamsInfoCnImport> ccDtoList = ccDtoMap.getValue(); List<CertCategoryParamsInfoCnImport> ccDtoList = ccDtoMap.getValue();
List<String> ccNioNumberImport = new ArrayList<>(); // 记录导入的nio编号
int j = 1; int j = 1;
for (CertCategoryParamsInfoCnImport ccDto : ccDtoList) { for (CertCategoryParamsInfoCnImport ccDto : ccDtoList) {
//判断此行数据是否全部为空,是则不读取 //判断此行数据是否全部为空,是则不读取
if (checkObjAllFieldsIsNull(ccDto)) { if (checkObjAllFieldsIsNull(ccDto)) {
j++;
continue; continue;
} }
@@ -1351,6 +1355,20 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
} }
countError++; countError++;
} }
if (CollectionUtil.isNotEmpty(ccNioNumberImport)) {
if (ccNioNumberImport.contains(ccDto.getNioNumber())) {
if (CutEnum.CN.getValue().equals(cut)) {
errorMsg += "NIO编号重复!";
} else {
errorMsg += "NIO number already exists!";
}
countError++;
} else {
ccNioNumberImport.add(ccDto.getNioNumber());
}
} else {
ccNioNumberImport.add(ccDto.getNioNumber());
}
} }
// 编号 // 编号
String paramsNumber = ccDto.getParamsNumber(); String paramsNumber = ccDto.getParamsNumber();
@@ -1384,20 +1402,41 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
stringMessage.add(errorMsg); stringMessage.add(errorMsg);
} }
} }
certCategoryParamsInfoEOList.addAll(ccDtoList); // 校验同 nio下认证类别唯一
} List<CertCategoryParamsInfoCnImport> ccDtoAfterDistinct = ccDtoList.stream()
// 校验同 nio下认证参数编号唯一
List<CertCategoryParamsInfoCnImport> ccDtoAfterDistinct = certCategoryParamsInfoEOList.stream()
.collect(Collectors.collectingAndThen(Collectors.toCollection(() -> .collect(Collectors.collectingAndThen(Collectors.toCollection(() ->
new TreeSet<>(Comparator.comparing(o -> o.getNioNumber() + ";" + o.getCertCategory()))), ArrayList::new)); new TreeSet<>(Comparator.comparing(o -> o.getNioNumber() + ";" + o.getCertCategory()))), ArrayList::new));
if (ccDtoAfterDistinct.size() < certCategoryParamsInfoEOList.size()) { 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)) { if (CutEnum.CN.getValue().equals(cut)) {
stringMessage.add("导入数据中存在重复认证编号;"); stringMessage.add("导入数据中NIO编号:" + reduceOne + "下存在重复认证类别;");
} else { } else {
stringMessage.add("Repeat number exist in the Import Data;"); stringMessage.add("Repeat cert category exist in NIO Number: " + reduceOne + ";");
}
} }
} }
certCategoryParamsInfoEOList.addAll(ccDtoList);
}
// 校验同 nio下认证参数编号唯一
List<CertCategoryParamsInfoCnImport> ccDtoAfterDistinctTwo = certCategoryParamsInfoEOList.stream()
.collect(Collectors.collectingAndThen(Collectors.toCollection(() ->
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(); Map map = new HashMap();
if (stringMessage.isEmpty()) { if (stringMessage.isEmpty()) {
+3
View File
@@ -729,6 +729,7 @@ module.exports = {
ParameteItemCollectionList: 'Parameter item collection list', ParameteItemCollectionList: 'Parameter item collection list',
Areyousureparameteritems: 'Are you sure to submit the selected parameter items?', 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', 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', theCurrent: 'The current status of this data is',
thisbuttonCompleted: 'This button can only be operated when the status is completed', thisbuttonCompleted: 'This button can only be operated when the status is completed',
Frozenstatus: 'Frozen status, can only be viewed', Frozenstatus: 'Frozen status, can only be viewed',
@@ -771,7 +772,9 @@ module.exports = {
configure: 'Configure', configure: 'Configure',
parameter: 'Parameter', parameter: 'Parameter',
changeExtension: 'Change Extension', changeExtension: 'Change Extension',
addDetailList: 'Add',
detailedList: 'DetailedList', detailedList: 'DetailedList',
copyParamDetailList: 'Copy Parameter List',
collectionCompletionTime: 'Collection Completion Time', collectionCompletionTime: 'Collection Completion Time',
parameterTemplateName: 'Parameter Template Name', parameterTemplateName: 'Parameter Template Name',
onlyThree: 'Only letters, numbers and horizontal bars (-) can be entered', onlyThree: 'Only letters, numbers and horizontal bars (-) can be entered',
+3
View File
@@ -740,6 +740,7 @@ module.exports = {
ParameteItemCollectionList: '参数项收集清单', ParameteItemCollectionList: '参数项收集清单',
Areyousureparameteritems: '确认提交所选参数项嘛?', Areyousureparameteritems: '确认提交所选参数项嘛?',
Theselectedconfiguration: '参数清单中参数项均为待发起收集或变更时,才能添加配置', Theselectedconfiguration: '参数清单中参数项均为待发起收集或变更时,才能添加配置',
NoConfigurationNotStart: '未添加任何配置,无法开始收集,请检查',
theCurrent: '此数据当前状态为', theCurrent: '此数据当前状态为',
thisbuttonCompleted: '当状态为"已完成"时,才可操作此按钮', thisbuttonCompleted: '当状态为"已完成"时,才可操作此按钮',
Frozenstatus: '冻结状态,仅可以查看', Frozenstatus: '冻结状态,仅可以查看',
@@ -782,7 +783,9 @@ module.exports = {
configure: '配置', configure: '配置',
parameter: '参数', parameter: '参数',
changeExtension: '变更扩展', changeExtension: '变更扩展',
addDetailList: '添加清单',
detailedList: '清单', detailedList: '清单',
copyParamDetailList: '复制参数清单',
collectionCompletionTime: '收集完成时间', collectionCompletionTime: '收集完成时间',
parameterTemplateName: '参数模板名称', parameterTemplateName: '参数模板名称',
onlyThree: '只能输入字母,数字,横杠(-)三种内容', onlyThree: '只能输入字母,数字,横杠(-)三种内容',
@@ -112,7 +112,7 @@ import axios from 'axios'
import { ACCESS_TOKEN } from '@/store/mutation-types' import { ACCESS_TOKEN } from '@/store/mutation-types'
import Vue from 'vue' import Vue from 'vue'
export default { export default {
name: 'ParameterItemCollectionList', name: 'managementdetails',
data(){ data(){
return{ return{
columns:[], columns:[],
@@ -71,15 +71,15 @@
</template> </template>
<script> <script>
import TaskList from '@/views/projectManagement/components/TaskList' import TaskList from '@views/projectManagement/components/TaskList'
import listOfRegulations from '@/views/projectManagement/components/listOfRegulations' import listOfRegulations from '@views/projectManagement/components/listOfRegulations'
import ProjectDetailsName from '@/views/projectManagement/components/ProjectDetails' import ProjectDetailsName from '@views/projectManagement/components/ProjectDetails'
import ParameterItemCollectionList from '../../components/ParameterItemCollectionList' import ParameterItemCollectionList from '../components/ParameterItemCollectionList'
import nonConformance from '@/views/projectManagement/components/nonConformance' import nonConformance from '@views/projectManagement/components/nonConformance'
import updateLog from '@/components/UpdateLog/index' import updateLog from '@comp/UpdateLog'
import historicalVersionList from '@/views/projectManagement/components/historicalVersionList' import historicalVersionList from '@views/projectManagement/components/historicalVersionList'
import commentList from '@/views/projectManagement/components/commentList' import commentList from '@views/projectManagement/components/commentList'
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage' import { getAction, postAction, deleteAction, downloadFile } from '@api/manage'
export default { export default {
name: 'ProjectDetails', name: 'ProjectDetails',
@@ -24,7 +24,7 @@
<div class="table-operator"> <div class="table-operator">
<div @click="handleAdd" class="operator-text"> <div @click="handleAdd" class="operator-text">
<a-icon type="plus"/> <a-icon type="plus"/>
{{$t('add')}}{{ $t('detailedList') }} {{$t('addDetailList')}}
</div> </div>
<div @click="handleModule" class="operator-text"> <div @click="handleModule" class="operator-text">
<a-icon type="bulb"/> <a-icon type="bulb"/>
@@ -32,9 +32,9 @@
</div> </div>
<div @click="handleCody" class="operator-text"> <div @click="handleCody" class="operator-text">
<a-icon type="copy"/> <a-icon type="copy"/>
{{$t('copy')}}{{$t('parameter')}}{{ $t('detailedList') }} {{$t('copyParamDetailList')}}
</div> </div>
<div @click="handleDel" class="operator-text" v-has="'document:deleteBatch'"> <div @click="handleDel" class="operator-text">
<a-icon type="delete"/> <a-icon type="delete"/>
{{$t('BatchDelete')}} {{$t('BatchDelete')}}
</div> </div>
@@ -92,7 +92,6 @@
<project-collection-parameters v-if='drawerVisible' @areaVisible='drawerhandleCancel' :templateTitle='templatetitle' @copysubmit='copysubmit' <project-collection-parameters v-if='drawerVisible' @areaVisible='drawerhandleCancel' :templateTitle='templatetitle' @copysubmit='copysubmit'
:selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version' :url='url' :selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version' :url='url'
:projectId='this.$route.query.id'></project-collection-parameters> :projectId='this.$route.query.id'></project-collection-parameters>
</a-modal> </a-modal>
</a-card> </a-card>
</template> </template>
@@ -107,6 +106,7 @@
import axios from 'axios' import axios from 'axios'
import Vue from 'vue' import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types' import { ACCESS_TOKEN } from '@/store/mutation-types'
import eventBUs from '@/common/event'
export default { export default {
name: 'TaskParameterCollection', name: 'TaskParameterCollection',
@@ -177,7 +177,8 @@
deleteAll: 'params/manifest/deleteBatch', deleteAll: 'params/manifest/deleteBatch',
conAdd: 'params/config/addBatch', conAdd: 'params/config/addBatch',
conList: 'params/config/list', conList: 'params/config/list',
changeExtension:'params/manifest/changeExtension' changeExtension:'params/manifest/changeExtension',
verifyConfig: 'params/manifest/verifyConfig'
}, },
loading: false, loading: false,
dataSource: [], dataSource: [],
@@ -206,12 +207,20 @@
}, },
methods: { methods: {
paramsManifestClick(item) { paramsManifestClick(item) {
let _this = this
// 先调取接口判断是否有配置信息
getAction(this.url.verifyConfig, { paramsManifestId: item.id }).then((res) => {
if (res.result) {
localStorage.setItem('paramsManifest', JSON.stringify(item)) localStorage.setItem('paramsManifest', JSON.stringify(item))
let newUrl = this.$router.resolve({ let newUrl = _this.$router.resolve({
path: '/ParameterItemCollection', path: '/ParameterItemCollection',
query: item, query: item,
}) })
window.open(newUrl.href, '_blank') window.open(newUrl.href, '_blank')
} else {
_this.$message.success(_this.$t('NoConfigurationNotStart'))
}
})
}, },
deleteLib(val) { deleteLib(val) {
if(val.state === '已完成' || val.state === 'Finished' ) { if(val.state === '已完成' || val.state === 'Finished' ) {
@@ -52,8 +52,13 @@
:rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}' :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
@change='handleTableChange'> @change='handleTableChange'>
<span slot='click' slot-scope='text, record'> <span slot='click' slot-scope='text, record'>
<a class='action-edit' @click='editArea(record)' v-has="'area:edit'">{{ text }}</a>
</span> </span>
<span slot="parameterTemplateSlot" slot-scope="text,record">
<a class='action-edit' @click='parameterTemplateSlotHandler(record)'>{{ text }}</a>
</span>
</a-table> </a-table>
<div class="page" style='display: flex;justify-content: flex-end;'> <div class="page" style='display: flex;justify-content: flex-end;'>
<a-pagination <a-pagination
@@ -85,7 +90,7 @@ import ParameterTemplate from '../dialog/ParameterTemplate'
import { ACCESS_TOKEN } from '@/store/mutation-types' import { ACCESS_TOKEN } from '@/store/mutation-types'
export default { export default {
name: 'diolagArea', name: 'ProjectCollectionParameters',
components: { components: {
ParameterTemplate ParameterTemplate
}, },
@@ -115,7 +120,8 @@ export default {
title: this.$t('parameterTemplate'), title: this.$t('parameterTemplate'),
align: 'center', align: 'center',
dataIndex: 'paramsTemplateName', dataIndex: 'paramsTemplateName',
ellipsis: true ellipsis: true,
scopedSlots: { customRender: 'parameterTemplateSlot' }
} }
], ],
newVisible: false, newVisible: false,
@@ -181,7 +187,7 @@ export default {
console.log(this.areaTable,'this.areaTable') console.log(this.areaTable,'this.areaTable')
this.listVisible = false this.listVisible = false
}, },
editArea(val) { parameterTemplateSlotHandler(val) {
this.listVisibleRowDate = val this.listVisibleRowDate = val
console.log(val) console.log(val)
this.listVisible = true this.listVisible = true