认证清单对接-发布、认证工程师通过、认证工程师退回studio修改。
This commit is contained in:
+37
-14
@@ -304,14 +304,18 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
|
||||
List<String> idList = Arrays.asList(ids.split(","));
|
||||
|
||||
List<String> flowStatusList = new ArrayList<>();
|
||||
flowStatusList.add(CertificationInventoryFlowStatusEnum.LIST_TO_BE_RELEASED.getValue());
|
||||
flowStatusList.add(CertificationInventoryFlowStatusEnum.CERTIFICATION_RETURNED.getValue());
|
||||
|
||||
// 根据页面选择的认证清单数据id,查询出状态为’清单待发布‘的数据,进行发布处理
|
||||
QueryWrapper<ProjectCertificationInventoryEO> certificationQueryWrap = new QueryWrapper<>();
|
||||
certificationQueryWrap.lambda().in(ProjectCertificationInventoryEO::getId,idList);
|
||||
certificationQueryWrap.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,CertificationInventoryFlowStatusEnum.LIST_TO_BE_RELEASED.getValue());
|
||||
certificationQueryWrap.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList);
|
||||
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = this.list(certificationQueryWrap);
|
||||
|
||||
if(CollectionUtils.isEmpty(projectCertificationInventoryEOList)){
|
||||
throw new JeroBootException("无法获取要发布的数据,请重新选择!");
|
||||
throw new JeroBootException("至少选择一条数据流程状态为'清单待发布 或 认证退回'的数据!");
|
||||
}
|
||||
List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
|
||||
|
||||
@@ -338,7 +342,6 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
ProcessInfoDetailEO processInfoDetailEO = new ProcessInfoDetailEO();
|
||||
processInfoDetailEO.setUserId(userId);
|
||||
processInfoDetailEO.setTaskDefinitionKey(CertificationFlowNodeEnum.RZGCSJSRW.getKey());
|
||||
processInfoDetailEO.setEndTime(DateUtils.str2Date(endTime,DateUtils.date_sdf.get()));
|
||||
processInfoDetailEO.setCreateTime(new Date());
|
||||
processInfoDetailEO.setStatus(TaskStatusEnum.NOT_DONE.getValue());
|
||||
processInfoDetailEO.setProcessInfoId(projectLibraryId);
|
||||
@@ -373,7 +376,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
processInfoEO.setProjectLibraryId(projectLibraryId);
|
||||
processInfoEO.setActiProcInstId(projectLibraryId);
|
||||
processInfoEO.setFlowType(FlowTypeEnum.CERTIFICATION_LC.getValue());
|
||||
processInfoEO.setStatus(TodoCenterStatusEnum.LIST_TO_CONFIRM.getValue());
|
||||
// processInfoEO.setStatus(TodoCenterStatusEnum.LIST_TO_CONFIRM.getValue());
|
||||
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
processInfoEO.setCreateBy(currentUser.getId());
|
||||
@@ -397,7 +400,6 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
detail.setFlowType(FlowTypeEnum.CERTIFICATION_LC.getValue());
|
||||
detail.setTaskDefinitionKey(taskDefinitionKey);
|
||||
detail.setStatus(TaskStatusEnum.NOT_DONE.getValue());
|
||||
// detail.setEndTime(DateUtils.str2Date(endTime,DateUtils.date_sdf.get()));
|
||||
detail.setCreateTime(new Date());
|
||||
detail.setStatus(TaskStatusEnum.NOT_DONE.getValue());
|
||||
});
|
||||
@@ -406,6 +408,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
QueryWrapper<ProcessInfoDetailEO> removeWrap = new QueryWrapper<>();
|
||||
removeWrap.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,processInfoId);
|
||||
removeWrap.lambda().in(ProcessInfoDetailEO::getUserId,userIdList);
|
||||
removeWrap.lambda().eq(ProcessInfoDetailEO::getTaskDefinitionKey,taskDefinitionKey);
|
||||
// 删除用户在这个认证清单流程中其它的待办任务
|
||||
this.processInfoDetailEOService.remove(removeWrap);
|
||||
|
||||
@@ -730,8 +733,28 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
|
||||
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.CERTIFICATION_RETURNED.getValue());
|
||||
}
|
||||
|
||||
// 认证工程师发起任务,将数据的状态更新为 任务待确认。
|
||||
this.updateBatchById(projectCertificationInventoryEOList);
|
||||
|
||||
// 更新该项目认证流程中,认证工程师的任务状态。
|
||||
QueryWrapper<ProjectCertificationInventoryEO> queryCountWrap = new QueryWrapper<>();
|
||||
queryCountWrap.lambda().eq(ProjectCertificationInventoryEO::getProjectLibraryId,projectLibraryBase.getId());
|
||||
queryCountWrap.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList);
|
||||
int notDoneCount = this.count(queryCountWrap);
|
||||
// 如果还有 清单待校核、责任人拒绝 状态的数据,不做操作,如果没有 将这个项目认证流程的所有认证工程师待办任务转为已办
|
||||
if(notDoneCount == 0){
|
||||
QueryWrapper<ProcessInfoDetailEO> detailQueryWrapper = new QueryWrapper<>();
|
||||
detailQueryWrapper.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,projectLibraryBase.getId());
|
||||
detailQueryWrapper.lambda().eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.RZGCSJSRW.getKey());
|
||||
List<ProcessInfoDetailEO> detailEOList = this.processInfoDetailEOService.list(detailQueryWrapper);
|
||||
|
||||
for (ProcessInfoDetailEO detailEO : detailEOList) {
|
||||
detailEO.setStatus(TaskStatusEnum.HAVE_DONE.getValue());
|
||||
}
|
||||
|
||||
this.processInfoDetailEOService.updateBatchById(detailEOList);
|
||||
}
|
||||
}catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
log.error("认证工程师-退回认证清单任务失败:" + ex.getMessage());
|
||||
@@ -773,20 +796,23 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
}
|
||||
|
||||
try {
|
||||
// 给责任人分配待办中心的任务
|
||||
List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
|
||||
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
|
||||
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue());
|
||||
}
|
||||
|
||||
// 给责任人分配待办中心的任务
|
||||
List<String> dutyPersonList = projectCertificationInventoryEOList.stream().map(ProjectCertificationInventoryEO::getDutyPerson).distinct().collect(Collectors.toList());
|
||||
List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
|
||||
for (String dutyPerson : dutyPersonList) {
|
||||
ProcessInfoDetailEO processInfoDetailEO = new ProcessInfoDetailEO();
|
||||
processInfoDetailEO.setUserId(dutyPerson);
|
||||
processInfoDetailEO.setUserId(projectCertificationInventoryEO.getDutyPerson());
|
||||
processInfoDetailEO.setEndTime(projectCertificationInventoryEO.getEndTime());
|
||||
processInfoDetailEO.setProjectLawsInventoryId(projectCertificationInventoryEO.getId());
|
||||
processInfoDetailEOList.add(processInfoDetailEO);
|
||||
}
|
||||
|
||||
this.addProcessInfoDetailEO(processInfoDetailEOList,projectLibraryBase.getId(),CertificationFlowNodeEnum.ZRRJSRW.getKey());
|
||||
|
||||
// 认证工程师发起任务,将数据的状态更新为 任务待确认。
|
||||
this.updateBatchById(projectCertificationInventoryEOList);
|
||||
|
||||
// 更新该项目认证流程中,认证工程师的任务状态。
|
||||
QueryWrapper<ProjectCertificationInventoryEO> queryCountWrap = new QueryWrapper<>();
|
||||
queryCountWrap.lambda().eq(ProjectCertificationInventoryEO::getProjectLibraryId,projectLibraryBase.getId());
|
||||
@@ -805,9 +831,6 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
|
||||
this.processInfoDetailEOService.updateBatchById(detailEOList);
|
||||
}
|
||||
|
||||
// 认证工程师发起任务,将数据的状态更新为 任务待确认。
|
||||
this.updateBatchById(projectCertificationInventoryEOList);
|
||||
}catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
log.error("认证工程师-发起认证清单任务失败:" + ex.getMessage());
|
||||
|
||||
Reference in New Issue
Block a user