From b7884dd28e9fd1a6f7de17eb31a5f9f932a59e07 Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Tue, 14 Mar 2023 15:43:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A4=E8=AF=81=E6=B8=85=E5=8D=95-=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E6=93=8D=E4=BD=9C=E5=A2=9E=E5=8A=A0=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project/enums/OperatorTypeEnum.java | 8 + ...ctCertificationInventoryEOServiceImpl.java | 139 +++++++++++++++++- 2 files changed, 139 insertions(+), 8 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/OperatorTypeEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/OperatorTypeEnum.java index f317be5a2..64d746a4f 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/OperatorTypeEnum.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/OperatorTypeEnum.java @@ -59,6 +59,14 @@ public enum OperatorTypeEnum { CERTIFICATION_INVENTORY_ADD("认证清单-添加","certificationInventoryAdd"), CERTIFICATION_INVENTORY_CALL("认证清单-调取","certificationInventoryCall"), CERTIFICATION_INVENTORY_STUDIO_ISSUE("认证清单-studio发布","certificationInventoryStudioIssue"), + CERTIFICATION_INVENTORY_INITIATING_TASK("认证清单-认证工程师发起任务","certificationInventoryInitiatingTask"), + CERTIFICATION_INVENTORY_RETURNED_STUDIO_TASK("认证清单-认证工程师退回至studio任务","certificationInventoryReturnedStudioTask"), + CERTIFICATION_INVENTORY_DUTY_PERSON_ACCEPT_TASK("认证清单-责任人接受任务","certificationInventoryDutyPersonAcceptTask"), + CERTIFICATION_INVENTORY_DUTY_PERSON_REJECT_TASK("认证清单-责任人拒绝任务","certificationInventoryDutyPersonRejectTask"), + CERTIFICATION_INVENTORY_DUTY_PERSON_TRANSFER_TASK("认证清单-责任人转办任务","certificationInventoryDutyPersonTransferTask"), + CERTIFICATION_INVENTORY_DUTY_PERSON_SUBMIT_TASK("认证清单-责任人提交任务","certificationInventoryDutyPersonSubmitTask"), + CERTIFICATION_INVENTORY_REVIEW_THROUGH("认证清单-认证工程师审核通过","certificationInventoryReviewThrough"), + CERTIFICATION_INVENTORY_REVIEW_RETURNED("认证清单-认证工程师审核退回","certificationInventoryReviewReturned"), ; String name; 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 8eddd2cbd..666932732 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 @@ -1101,9 +1101,22 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl projectCertificationInventoryLogEOList = new ArrayList<>(); for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) { projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.REVIEW_AND_RETURN.getValue()); + + String contentCn = "\"" + currentUser.getUsername() + "\"" +"审核退回"; + String contentEn = "\"" + currentUser.getUsername() + "\"" +" review and returned"; + ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO = new ProjectCertificationInventoryLogEO(); + projectCertificationInventoryLogEO.setProjectCertificationInventoryId(projectCertificationInventoryEO.getId()); + projectCertificationInventoryLogEO.setContentCn(contentCn); + projectCertificationInventoryLogEO.setContentEn(contentEn); + projectCertificationInventoryLogEO.setOperatorType(OperatorTypeEnum.CERTIFICATION_INVENTORY_REVIEW_RETURNED.getValue()); + projectCertificationInventoryLogEOList.add(projectCertificationInventoryLogEO); + } + + if(CollectionUtils.isNotEmpty(projectCertificationInventoryLogEOList)){ + this.projectCertificationInventoryLogEOService.insertBatch(projectCertificationInventoryLogEOList); } ProjectLibraryBase projectLibraryBase = JSONObject.parseObject(JSONObject.toJSONString(json.get("projectLibraryBase")), ProjectLibraryBase.class); @@ -1153,8 +1166,23 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl projectCertificationInventoryLogEOList = new ArrayList<>(); + for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) { projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.REVIEW_AND_PASS.getValue()); + + String contentCn = "\"" + currentUser.getUsername() + "\"" +"审核通过"; + String contentEn = "\"" + currentUser.getUsername() + "\"" +" pass the audit"; + ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO = new ProjectCertificationInventoryLogEO(); + projectCertificationInventoryLogEO.setProjectCertificationInventoryId(projectCertificationInventoryEO.getId()); + projectCertificationInventoryLogEO.setContentCn(contentCn); + projectCertificationInventoryLogEO.setContentEn(contentEn); + projectCertificationInventoryLogEO.setOperatorType(OperatorTypeEnum.CERTIFICATION_INVENTORY_REVIEW_THROUGH.getValue()); + projectCertificationInventoryLogEOList.add(projectCertificationInventoryLogEO); + } + + if(CollectionUtils.isNotEmpty(projectCertificationInventoryLogEOList)){ + this.projectCertificationInventoryLogEOService.insertBatch(projectCertificationInventoryLogEOList); } ProjectLibraryBase projectLibraryBase = JSONObject.parseObject(JSONObject.toJSONString(json.get("projectLibraryBase")), ProjectLibraryBase.class); @@ -1311,6 +1339,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl projectCertificationInventoryLogEOList = new ArrayList<>(); List processInfoDetailEOList = new ArrayList<>(); for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) { projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue()); @@ -1320,6 +1349,19 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl projectCertificationInventoryLogEOList = new ArrayList<>(); + for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) { projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.REFUSAL_OF_RESPONSIBLE_PERSON.getValue()); + + String contentCn = "\"" + currentUser.getUsername() + "\"" +"退回了任务信息"; + String contentEn = "\"" + currentUser.getUsername() + "\"" +" returned the task information"; + ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO = new ProjectCertificationInventoryLogEO(); + projectCertificationInventoryLogEO.setProjectCertificationInventoryId(projectCertificationInventoryEO.getId()); + projectCertificationInventoryLogEO.setContentCn(contentCn); + projectCertificationInventoryLogEO.setContentEn(contentEn); + projectCertificationInventoryLogEO.setOperatorType(OperatorTypeEnum.CERTIFICATION_INVENTORY_DUTY_PERSON_REJECT_TASK.getValue()); + projectCertificationInventoryLogEOList.add(projectCertificationInventoryLogEO); + } + + if(CollectionUtils.isNotEmpty(projectCertificationInventoryLogEOList)){ + this.projectCertificationInventoryLogEOService.insertBatch(projectCertificationInventoryLogEOList); } try { @@ -1479,12 +1536,28 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl() { @Override public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) { - return p1.getEndTime().compareTo(p2.getEndTime()); + if(p1.getEndTime() != null && p2.getEndTime() != null){ + return p1.getEndTime().compareTo(p2.getEndTime()); + } + return 1; } }); + List projectCertificationInventoryLogEOList = new ArrayList<>(); for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) { projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.CERTIFICATION_RETURNED.getValue()); + + String contentCn = "\"" + currentUser.getUsername() + "\"" +"拒绝,流程退回至" + "\"" +studioEngineerUserInfo.get(0).getUsername()+"\""; + String contentEn = "\"" + currentUser.getUsername() + "\"" +" refuses, and the process returns to " + "\"" +studioEngineerUserInfo.get(0).getUsername()+"\""; + ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO = new ProjectCertificationInventoryLogEO(); + projectCertificationInventoryLogEO.setProjectCertificationInventoryId(projectCertificationInventoryEO.getId()); + projectCertificationInventoryLogEO.setContentCn(contentCn); + projectCertificationInventoryLogEO.setContentEn(contentEn); + projectCertificationInventoryLogEO.setOperatorType(OperatorTypeEnum.CERTIFICATION_INVENTORY_RETURNED_STUDIO_TASK.getValue()); + projectCertificationInventoryLogEOList.add(projectCertificationInventoryLogEO); + } + if(CollectionUtils.isNotEmpty(projectCertificationInventoryLogEOList)){ + this.projectCertificationInventoryLogEOService.insertBatch(projectCertificationInventoryLogEOList); } Map standNameAndItemName = this.getStandNameAndItemName(projectCertificationInventoryEOList); @@ -1507,7 +1580,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl() { @Override public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) { - return p1.getEndTime().compareTo(p2.getEndTime()); + if(p1.getEndTime() != null && p2.getEndTime() != null){ + return p1.getEndTime().compareTo(p2.getEndTime()); + } + return 1; } }); Date endTime = projectCertificationInventoryEOList.get(0).getEndTime(); @@ -1553,6 +1629,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl idList = Arrays.asList(ids.split(",")); List flowStatusList = new ArrayList<>(); @@ -1574,6 +1651,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl projectCertificationInventoryLogEOList = new ArrayList<>(); // 给责任人分配待办中心的任务 List processInfoDetailEOList = new ArrayList<>(); for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) { @@ -1584,6 +1662,19 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl() { @Override public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) { - return p1.getEndTime().compareTo(p2.getEndTime()); + if(p1.getEndTime() != null && p2.getEndTime() != null){ + return p1.getEndTime().compareTo(p2.getEndTime()); + } + return 1; } }); @@ -1729,7 +1823,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl() { @Override public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) { - return p1.getEndTime().compareTo(p2.getEndTime()); + if(p1.getEndTime() != null && p2.getEndTime() != null){ + return p1.getEndTime().compareTo(p2.getEndTime()); + } + return 1; } }); Date endTime = projectCertificationInventoryEOList.get(0).getEndTime(); @@ -1778,6 +1875,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl projectCertificationInventoryLogEOList = new ArrayList<>(); projectCertificationInventoryEOList.forEach(certificationInventory -> { certificationInventory.setDutyPerson(transferUserId); + + String contentCn = "\"" + currentUser.getUsername() + "\"" +"将流程发送至" +"\""+ transferUserInfo.getUsername() + "\"办理" ; + String contentEn = "\"" + currentUser.getUsername() + "\"" +" sends the process to "+"\""+ transferUserInfo.getUsername() + "\" for handling" ; + ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO = new ProjectCertificationInventoryLogEO(); + projectCertificationInventoryLogEO.setProjectCertificationInventoryId(certificationInventory.getId()); + projectCertificationInventoryLogEO.setContentCn(contentCn); + projectCertificationInventoryLogEO.setContentEn(contentEn); + projectCertificationInventoryLogEO.setOperatorType(OperatorTypeEnum.CERTIFICATION_INVENTORY_DUTY_PERSON_TRANSFER_TASK.getValue()); + projectCertificationInventoryLogEOList.add(projectCertificationInventoryLogEO); }); + + if(CollectionUtils.isNotEmpty(projectCertificationInventoryLogEOList)){ + this.projectCertificationInventoryLogEOService.insertBatch(projectCertificationInventoryLogEOList); + } + this.updateBatchById(projectCertificationInventoryEOList); Collections.sort(projectCertificationInventoryEOList, new Comparator() { @Override public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) { - return p1.getEndTime().compareTo(p2.getEndTime()); + if(p1.getEndTime() != null && p2.getEndTime() != null){ + return p1.getEndTime().compareTo(p2.getEndTime()); + } + return 1; } }); @@ -1917,7 +2034,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl() { @Override public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) { - return p1.getEndTime().compareTo(p2.getEndTime()); + if(p1.getEndTime() != null && p2.getEndTime() != null){ + return p1.getEndTime().compareTo(p2.getEndTime()); + } + return 1; } }); Date endTime = certificationInventoryEOList.get(0).getEndTime(); @@ -1979,7 +2099,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl() { @Override public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) { - return p1.getEndTime().compareTo(p2.getEndTime()); + if(p1.getEndTime() != null && p2.getEndTime() != null){ + return p1.getEndTime().compareTo(p2.getEndTime()); + } + return 1; } }); Map standNameAndItemName = this.getStandNameAndItemName(value);