From af589d21490fefa66b9ded34497fda903fa9c5ae Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Thu, 9 Mar 2023 15:00:44 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=AE=A4=E8=AF=81=E6=B8=85=E5=8D=95-?= =?UTF-8?q?=E8=B4=A3=E4=BB=BB=E4=BA=BA=E8=BD=AC=E5=8A=9E=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=BC=80=E5=8F=91=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ectCertificationInventoryEOController.java | 7 +++ ...rojectCertificationInventoryEOService.java | 7 +++ ...ctCertificationInventoryEOServiceImpl.java | 53 +++++++++++++++++++ 3 files changed, 67 insertions(+) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java index 613f8de45..e41ee60a8 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java @@ -227,4 +227,11 @@ public class ProjectCertificationInventoryEOController extends JeroController resetFlow(@RequestBody JSONObject json) { return this.projectCertificationInventoryEOService.resetFlow(json); } + + @AutoLog(value = "项目库-认证清单表-转办") + @ApiOperation(value="项目库-认证清单表-转办", notes="项目库-认证清单表-转办") + @PostMapping(value = "/transferTask") + public Result transferTask(@RequestBody JSONObject json) { + return this.projectCertificationInventoryEOService.transferTask(json); + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java index 9ed7ac480..a912e8105 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java @@ -142,4 +142,11 @@ public interface IProjectCertificationInventoryEOService extends IService resetFlow(JSONObject json); + + /** + * 转办任务 + * @param json + * @return + */ + Result transferTask(JSONObject json); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java index 9af255d98..9b8206178 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java @@ -1257,4 +1257,57 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl transferTask(JSONObject json) { + String ids = json.getString("ids"); + if(StringUtils.isEmpty(ids)){ + throw new JeroBootException("至少选择一条数据进行操作!"); + } + + String projectLibraryId = json.getString("projectLibraryId"); + String transferUserId = json.getString("transferUserId"); + ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.getBaseMapper().selectById(projectLibraryId); + if(ObjectUtils.isEmpty(projectLibraryBase)){ + throw new JeroBootException("无法获取项目库信息,项目库id为:" + projectLibraryId + " 请联系管理员!"); + } + + LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + List idList = Arrays.asList(ids.split(",")); + + // 流程状态为 任务待确认、待提交、 审查退回 。 能转办 + List flowStatusList = new ArrayList<>(); + flowStatusList.add(CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue()); + flowStatusList.add(CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue()); + flowStatusList.add(CertificationInventoryFlowStatusEnum.REVIEW_AND_RETURN.getValue()); + + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().in(ProjectCertificationInventoryEO::getId,idList); + queryWrapper.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList); + queryWrapper.lambda().in(ProjectCertificationInventoryEO::getDutyPerson,currentUser.getId()); + List projectCertificationInventoryEOList = this.list(queryWrapper); + + if(CollectionUtils.isEmpty(projectCertificationInventoryEOList)){ + throw new JeroBootException("至少选择一条数据流程状态为'任务待确认 或 结果待提交 或 审查退回'的数据进行转办操作!"); + } + + projectCertificationInventoryEOList.forEach(certificationInventory -> { + certificationInventory.setDutyPerson(transferUserId); + }); + this.updateBatchById(projectCertificationInventoryEOList); + + QueryWrapper detailQueryWrap = new QueryWrapper<>(); + detailQueryWrap.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,projectLibraryId); + detailQueryWrap.lambda().eq(ProcessInfoDetailEO::getUserId,currentUser.getId()); + detailQueryWrap.lambda().in(ProcessInfoDetailEO::getProjectLawsInventoryId,idList); + List processInfoDetailEOList = this.processInfoDetailEOService.list(detailQueryWrap); + if(CollectionUtils.isNotEmpty(processInfoDetailEOList)){ + processInfoDetailEOList.forEach(detail -> { + detail.setUserId(transferUserId); + }); + this.processInfoDetailEOService.updateBatchById(processInfoDetailEOList); + } + + return Result.OK("转办成功!"); + } + } From b367fb1ce83d7c009093d3b1ea5ac09c65d7eef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Thu, 9 Mar 2023 15:08:29 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=E6=B8=85=E5=8D=95?= 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 | 4 +- .../components/certificationList/index.vue | 109 +++++++++++++++--- 3 files changed, 101 insertions(+), 14 deletions(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 8d170f76b..69e4ea771 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1424,4 +1424,6 @@ module.exports = { onlyDataStatusResultReviewedCanBeSelected:'Only data with process status of result to be reviewed can be selected', confirmResetProcess:'Confirm reset process?', confirmUrging:'Confirm urging ?', + confirmWithdrawal:'Confirm withdrawal ?', + onlyListCheckedCanRecalled:'Only the data whose process status is list to be checked can be recalled', } \ 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 a26417b59..09f2b45de 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1524,5 +1524,7 @@ module.exports = { confirmReturnForApproval:'确认退回审批?', onlyDataStatusResultReviewedCanBeSelected:'只能选择流程状态为结果待审查的数据', confirmResetProcess:'确认重置流程?', - confirmUrging:'确认催办', + confirmUrging:'确认催办?', + confirmWithdrawal:'确认撤回?', + onlyListCheckedCanRecalled:'只能撤回流程状态为清单待校核的数据', } \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/components/certificationList/index.vue b/jero-web/src/views/projectManagement/components/certificationList/index.vue index 0583f5cc5..854caa94c 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/index.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/index.vue @@ -288,7 +288,8 @@ }} - + {{$t('viewFile')}} -- @@ -353,6 +354,7 @@ + import globalAdvancedQuery from '@/components/globalAdvancedQuery/index' import certificationDirectory from '../certificationDirectory' + import viewFileModel from '@/components/viewFileModel/index' import ImportFile from '@/components/ImportFile/index' import transferList from './components/transferList' import uploadFile from '@/components/uploadFile/file' @@ -454,7 +457,8 @@ uploadFile, TaskListModel, referenceDeliverablesList, - SelectedBy + SelectedBy, + viewFileModel }, data() { return { @@ -645,7 +649,9 @@ selectedRowKeys: [], selectedRowKeysList: [], isDisplayNum: 2, - long: '' + long: '', + toDoIds: [], + toDoNotConditions: [] } }, mounted() { @@ -933,9 +939,53 @@ //撤回 withdrawClick() { - + if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { + let ids = [] + let notConditions = [] + for (let i = 0; i < this.selectedRowKeysList.length; i++) { + if (this.selectedRowKeysList[i].flowStatus == 'List to be checked') { + ids.push(this.selectedRowKeysList[i].id) + } else { + notConditions.push(this.selectedRowKeysList[i].inspectionItem) + } + } + let data = '' + if (notConditions && notConditions.length > 0) { + data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyListCheckedCanRecalled') + } + if (ids && ids.length > 0) { + this.withdrawData(ids, notConditions, data) + } else { + this.failedMessage(data) + } + } else { + this.$message.warning(this.$t('selectLeastOne')) + } + }, + withdrawData(ids, notConditions, data) { + let _this = this + this.$confirm({ + content: _this.$t('confirmWithdrawal'), + onOk() { + postAction('/project/projectCertificationInventoryEO/resetFlow', { + ids: ids.join(','), + projectLibraryId: _this.$route.query.id + }).then((res) => { + if (res.success) { + _this.$message.success(_this.$t('OperationSuccessful')) + _this.selectedRowKeys = [] + _this.selectedRowKeysList = [] + _this.getList() + if (notConditions && notConditions.length > 0) { + _this.failedMessage(data) + } + } else { + _this.$message.warning(res.message) + } + }) + } + }) }, - //催办 questionClick() { let _this = this @@ -1105,25 +1155,50 @@ //转办 turnToDoClick() { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { + if (this.roleSwitchingCode == 20) { + this.turnToDoClickJC() + return + } this.$refs.SelectedByRef.getPush() } else { this.$message.warning(this.$t('selectLeastOne')) } }, - - SelectedByForm(userIds) { - let ids = JSON.parse(JSON.stringify(this.selectedRowKeys)) - let query = { - userIds: userIds, - 'projectLibraryId': this.$route.query.id, - 'ids': ids.join(',') + turnToDoClickJC() { + this.toDoIds = [] + this.toDoNotConditions = [] + for (let i = 0; i < this.selectedRowKeysList.length; i++) { + if (this.selectedRowKeysList[i].dutyPersonName == this.userInfo().username) { + this.toDoIds.push(this.selectedRowKeysList[i].id) + } else { + this.toDoNotConditions.push(this.selectedRowKeysList[i].inspectionItem) + } } - postAction('/problemKnowledgeBase/problemKnowledgeBaseEO/forward', query).then((res) => { + this.toDoData = '' + if (this.toDoNotConditions && this.toDoNotConditions.length > 0) { + this.toDoData = this.$t('operationWithoutPermission') + this.$t('inspectionItems') + '"' + this.toDoNotConditions.join('、') + '"' + this.$t('data') + } + if (this.toDoIds && this.toDoIds.length > 0) { + this.$refs.SelectedByRef.getPush() + } else { + this.failedMessage(this.toDoData) + } + }, + SelectedByForm(userIds) { + let query = { + transferUserId: userIds, + 'projectLibraryId': this.$route.query.id, + 'ids': this.toDoIds.join(',') + } + postAction('/project/projectCertificationInventoryEO/transferTask', query).then((res) => { if (res.success) { this.$message.success(this.$t('OperationSuccessful')) this.$refs.SelectedByRef.visible = false this.$refs.SelectedByRef.submitLoading = false this.getList() + if (this.toDoNotConditions && this.toDoNotConditions.length > 0) { + this.failedMessage(this.toDoData) + } } else { this.$message.warning(this.$t('operationFailed')) this.$refs.SelectedByRef.submitLoading = false @@ -1380,6 +1455,10 @@ }) } }) + }, + + viewFileClick(item) { + this.$refs.viewFileModelRef.clickButtonToUpload(item) } } } @@ -1726,6 +1805,10 @@ background: #ddf3f4; } + .viewFile { + color: #00B3BE; + cursor: pointer; + }