diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java index 31dba0885..55bcbb2c3 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java @@ -1105,7 +1105,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl idList = Arrays.asList(ids.split(",")); + /*List idList = Arrays.asList(ids.split(",")); for (String id : idList) { int isProjectRole = checkUserRole(projectLibraryId, currentUser.getId(), id); @@ -1143,7 +1143,52 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl> lawsInventoryList = (List>) params.get("lawsInventoryList"); + if(CollectionUtils.isNotEmpty(lawsInventoryList)){ + lawsInventoryList.forEach(lawsInventory -> { + int isProjectRole = (int) lawsInventory.get("roleCode"); + String id = (String) lawsInventory.get("id"); + + ProjectLawsInventoryEO projectLawsInventoryEO = getById(id); + + if(isProjectRole == Integer.parseInt(ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getValue())){ + projectLawsInventoryEO.setRegulationOwnerSubmitStatus(operatorResult); + projectLawsInventoryEO.setHomologationEngineerSubmitStatus(operatorResult); + }else if(isProjectRole == Integer.parseInt(ProjectRoleEnum.REGULATI_ENGINEER.getValue())){ + projectLawsInventoryEO.setRegulationOwnerSubmitStatus(operatorResult); + }else if(isProjectRole == Integer.parseInt(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue())){ + projectLawsInventoryEO.setHomologationEngineerSubmitStatus(operatorResult); + } + + //如果不是studio + if(isProjectRole != -1 && isProjectRole != Integer.parseInt(ProjectRoleEnum.STUDIO_ENGINEER.getValue())){ + + String inventoryAffirmStatus = ""; + + //如果法规工程师与认证工程师都是提交通过 把清单确认状态设置为 接受 + if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerSubmitStatus()) && StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerSubmitStatus())){ + if(projectLawsInventoryEO.getRegulationOwnerSubmitStatus().equals("0") && projectLawsInventoryEO.getHomologationEngineerSubmitStatus().equals("0")){ + inventoryAffirmStatus = InventoryAffirmStatusEnum.ACCEPTED.getValue(); + } + + //如果法规工程师与认证工程师 其中一个人是拒绝 把清单确认状态设置为 拒绝 + if(projectLawsInventoryEO.getRegulationOwnerSubmitStatus().equals("1") || projectLawsInventoryEO.getHomologationEngineerSubmitStatus().equals("1")){ + inventoryAffirmStatus = InventoryAffirmStatusEnum.REJECTED.getValue(); + } + } + + if(StringUtils.isNotEmpty(inventoryAffirmStatus)){ + projectLawsInventoryEO.setInventoryAffirmStatus(inventoryAffirmStatus); + } + super.baseMapper.updateById(projectLawsInventoryEO); + } + }); + }else { + throw new JeroBootException("请至少勾选一条法规清单进行" + result); } + } }catch (Exception ex){ log.error("批量"+result+" 更新状态失败:" + ex.getMessage()); diff --git a/jero-web/src/views/documentTools/virtualList/index.vue b/jero-web/src/views/documentTools/virtualList/index.vue index 8273419d4..c42550661 100644 --- a/jero-web/src/views/documentTools/virtualList/index.vue +++ b/jero-web/src/views/documentTools/virtualList/index.vue @@ -254,7 +254,7 @@ _this.selectedRowKeys = [] _this.getList() } else { - _this.$message.warning(_this.$t('operationFailed')) + _this.$message.warning(res.message) } }) } @@ -346,7 +346,7 @@ _this.$message.success(_this.$t('OperationSuccessful')) _this.getList() } else { - _this.$message.warning(_this.$t('operationFailed')) + _this.$message.warning(res.message) } }) } diff --git a/jero-web/src/views/projectManagement/components/listOfRegulations.vue b/jero-web/src/views/projectManagement/components/listOfRegulations.vue index ae8025722..826745a13 100644 --- a/jero-web/src/views/projectManagement/components/listOfRegulations.vue +++ b/jero-web/src/views/projectManagement/components/listOfRegulations.vue @@ -1316,9 +1316,29 @@ updateStatusBatch(num, selectedRowKeys) { let _this = this + let lawsInventoryList = [] + for (let i = 0; i < this.dataSource.length; i++) { + for (let j = 0; j < selectedRowKeys.length; j++) { + if (this.dataSource[i].id == selectedRowKeys[j]) { + let roleCode + if (this.dataSource[i].regulationOwnerId == this.userInfo().id && + this.dataSource[i].homologationEngineerId == this.userInfo().id) { + roleCode = 4 + } else if (this.dataSource[i].regulationOwnerId == this.userInfo().id) { + roleCode = 1 + } else if (this.dataSource[i].homologationEngineerId == this.userInfo().id) { + roleCode = 2 + } + lawsInventoryList.push({ + id: this.dataSource[i].id, + roleCode: roleCode + }) + } + } + } let query = { operatorType: 1, - ids: selectedRowKeys.join(','), + lawsInventoryList: lawsInventoryList, projectLibraryId: _this.$route.query.id, operatorResult: num } @@ -1685,9 +1705,11 @@ .box-input .ant-select-selection__rendered { line-height: 38px; } - .popconfirm{ - z-index: 999; - } + + .popconfirm { + z-index: 999; + } + .popconfirm .ant-popover-buttons { display: none !important; }