认证清单-批量设置修改责任人、截止日期。
This commit is contained in:
+51
-38
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user