认证清单-批量设置修改责任人、截止日期。

This commit is contained in:
wangzhijiang
2023-07-13 11:03:26 +08:00
parent 91ba9acf4c
commit 3844e743b6
@@ -634,45 +634,58 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
updateList.add(updateProjectCertificationInventoryEO);
}
List<String> flowStatusList = new ArrayList<>();
flowStatusList.add(CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue());
QueryWrapper<ProjectCertificationInventoryEO> certificationQueryWrap = new QueryWrapper<>();
certificationQueryWrap.lambda().in(ProjectCertificationInventoryEO::getId,idList);
// certificationQueryWrap.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList);
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOS = this.list(certificationQueryWrap);
if(CollectionUtils.isNotEmpty(projectCertificationInventoryEOS)){
List<ProjectCertificationInventoryEO> pciEoListTemp = projectCertificationInventoryEOS.stream().filter(certificationInventory -> {
boolean flag = false;
if(StringUtils.equals(certificationInventory.getFlowStatus(),CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())){
if(projectCertificationInventoryEO.getEndTime() != null && certificationInventory.getEndTime() != null){
if(!projectCertificationInventoryEO.getEndTime().equals(certificationInventory.getEndTime())){
flag = true;
}
}
}
return flag;
}).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(pciEoListTemp)) {
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(pciEoListTemp.get(0).getProjectLibraryId());
if(ObjectUtils.isNotEmpty(projectLibraryBase)){
List<String> userIdList = Arrays.asList(projectLibraryBase.getCertificationEngineer().split(","));
List<SysUser> userInfoList = this.sysUserService.querySysUserListByIdList(userIdList);
this.sendMessageByTemplateId(
pciEoListTemp,
TemplateInfoEnum2.CERTIFICATION_MESSAGE14.getValue(),
userIdList,
userInfoList,
projectCertificationInventoryEO.getEndTime(),""
);
}
}
this.syncProcessInfoDetailEndTime(projectCertificationInventoryEO.getEndTime(),projectCertificationInventoryEOS);
if(projectCertificationInventoryEO.getEndTime() != null){
// 编辑截至日期处理逻辑
this.editEndTime(projectCertificationInventoryEO, pciEoList);
}
if(StringUtils.isNotEmpty(projectCertificationInventoryEO.getDutyPerson())){
// 编辑责任人处理逻辑
this.editDutyPerson(projectCertificationInventoryEO,pciEoList);
}
if(StringUtils.isNotEmpty(projectCertificationInventoryEO.getDeliverableType()) || StringUtils.isNotEmpty(projectCertificationInventoryEO.getDeliverableTemplate())){
// 编辑交付物类型交付物模板逻辑
// TODO 此处逻辑需要详细需求如何操作
}
// List<String> flowStatusList = new ArrayList<>();
// flowStatusList.add(CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue());
//
// QueryWrapper<ProjectCertificationInventoryEO> certificationQueryWrap = new QueryWrapper<>();
// certificationQueryWrap.lambda().in(ProjectCertificationInventoryEO::getId,idList);
//// certificationQueryWrap.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList);
// List<ProjectCertificationInventoryEO> projectCertificationInventoryEOS = this.list(certificationQueryWrap);
//
// if(CollectionUtils.isNotEmpty(projectCertificationInventoryEOS)){
// List<ProjectCertificationInventoryEO> pciEoListTemp = projectCertificationInventoryEOS.stream().filter(certificationInventory -> {
// boolean flag = false;
// if(StringUtils.equals(certificationInventory.getFlowStatus(),CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())){
// if(projectCertificationInventoryEO.getEndTime() != null && certificationInventory.getEndTime() != null){
// if(!projectCertificationInventoryEO.getEndTime().equals(certificationInventory.getEndTime())){
// flag = true;
// }
// }
// }
// return flag;
// }).collect(Collectors.toList());
//
// if (CollectionUtils.isNotEmpty(pciEoListTemp)) {
// ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(pciEoListTemp.get(0).getProjectLibraryId());
// if(ObjectUtils.isNotEmpty(projectLibraryBase)){
// List<String> userIdList = Arrays.asList(projectLibraryBase.getCertificationEngineer().split(","));
// List<SysUser> userInfoList = this.sysUserService.querySysUserListByIdList(userIdList);
//
// this.sendMessageByTemplateId(
// pciEoListTemp,
// TemplateInfoEnum2.CERTIFICATION_MESSAGE14.getValue(),
// userIdList,
// userInfoList,
// projectCertificationInventoryEO.getEndTime(),""
// );
// }
// }
//
// this.syncProcessInfoDetailEndTime(projectCertificationInventoryEO.getEndTime(),projectCertificationInventoryEOS);
// }
if(CollectionUtils.isNotEmpty(updateList)){
this.updateBatchById(updateList);
}