Merge remote-tracking branch 'origin/dev_20230526_Mobile' into dev_20230526_Mobile
This commit is contained in:
+7
@@ -310,4 +310,11 @@ public interface IProjectCertificationInventoryEOService extends IService<Projec
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> groupByCertificationProgress(List<ProjectCertificationInventoryEO> pciEos);
|
||||
|
||||
/**
|
||||
* 同步待办中心明细数据-认证清单 截止日期
|
||||
* @param endTime
|
||||
* @param editEndTimeCertificationInventoryEOS
|
||||
*/
|
||||
void syncProcessInfoDetailEndTime(Date endTime, List<ProjectCertificationInventoryEO> editEndTimeCertificationInventoryEOS);
|
||||
}
|
||||
|
||||
+71
-8
@@ -213,6 +213,9 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
|
||||
if(CollectionUtils.isNotEmpty(editEndTimeCertificationInventoryEOS)){
|
||||
|
||||
// 同步更新待办中心-流程明细截止日期
|
||||
this.syncProcessInfoDetailEndTime(projectCertificationInventoryEO.getEndTime(),editEndTimeCertificationInventoryEOS);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(editEndTimeCertificationInventoryEOS.get(0).getProjectLibraryId());
|
||||
if(ObjectUtils.isNotEmpty(projectLibraryBase)){
|
||||
List<String> userIdList = Arrays.asList(projectLibraryBase.getCertificationEngineer().split(","));
|
||||
@@ -609,28 +612,30 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
|
||||
QueryWrapper<ProjectCertificationInventoryEO> certificationQueryWrap = new QueryWrapper<>();
|
||||
certificationQueryWrap.lambda().in(ProjectCertificationInventoryEO::getId,idList);
|
||||
certificationQueryWrap.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList);
|
||||
// certificationQueryWrap.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList);
|
||||
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOS = this.list(certificationQueryWrap);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(projectCertificationInventoryEOS)){
|
||||
projectCertificationInventoryEOS = projectCertificationInventoryEOS.stream().filter(certificationInventory -> {
|
||||
List<ProjectCertificationInventoryEO> pciEoListTemp = projectCertificationInventoryEOS.stream().filter(certificationInventory -> {
|
||||
boolean flag = false;
|
||||
if(projectCertificationInventoryEO.getEndTime() != null && certificationInventory.getEndTime() != null){
|
||||
if(!projectCertificationInventoryEO.getEndTime().equals(certificationInventory.getEndTime())){
|
||||
flag = true;
|
||||
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(projectCertificationInventoryEOS)) {
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectCertificationInventoryEOS.get(0).getProjectLibraryId());
|
||||
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(
|
||||
projectCertificationInventoryEOS,
|
||||
pciEoListTemp,
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE14.getValue(),
|
||||
userIdList,
|
||||
userInfoList,
|
||||
@@ -638,6 +643,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
this.syncProcessInfoDetailEndTime(projectCertificationInventoryEO.getEndTime(),projectCertificationInventoryEOS);
|
||||
}
|
||||
if(CollectionUtils.isNotEmpty(updateList)){
|
||||
this.updateBatchById(updateList);
|
||||
@@ -5924,6 +5931,62 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void syncProcessInfoDetailEndTime(Date newEndTime, List<ProjectCertificationInventoryEO> pciEoList) {
|
||||
pciEoList = pciEoList.stream().filter(pciEo -> {
|
||||
boolean flag = false;
|
||||
if(!newEndTime.equals(pciEo.getEndTime())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
if(CollectionUtils.isNotEmpty(pciEoList)){
|
||||
List<String> pciIdList = pciEoList.stream().map(ProjectCertificationInventoryEO::getId).distinct().collect(Collectors.toList());
|
||||
|
||||
QueryWrapper<ProcessInfoDetailEO> pidQueryWrap = new QueryWrapper<>();
|
||||
pidQueryWrap.lambda().eq(ProcessInfoDetailEO::getFlowType,FlowTypeEnum.CERTIFICATION_LC.getValue());
|
||||
pidQueryWrap.lambda().in(ProcessInfoDetailEO::getProjectLawsInventoryId,pciIdList);
|
||||
List<ProcessInfoDetailEO> pidEoList = this.processInfoDetailEOService.list(pidQueryWrap);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(pidEoList)){
|
||||
List<ProcessInfoDetailEO> updatePidEoList = new ArrayList<>();
|
||||
for (ProjectCertificationInventoryEO pciEo : pciEoList) {
|
||||
String pciEoId = pciEo.getId();
|
||||
String flowStatus = pciEo.getFlowStatus();
|
||||
// 如果该数据为 结果待提交或审查退回的时候
|
||||
if (StringUtils.equals(flowStatus,CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
|
||||
|| StringUtils.equals(flowStatus,CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue()) ) {
|
||||
List<ProcessInfoDetailEO> pidEoListTemp = pidEoList.stream().filter(pidEo -> {
|
||||
boolean flag = (
|
||||
StringUtils.equals(pidEo.getProjectLawsInventoryId(),pciEoId)
|
||||
&& StringUtils.equals(pidEo.getStatus(),TaskStatusEnum.NOT_DONE.getValue())
|
||||
&& StringUtils.equals(pidEo.getTaskDefinitionKey(),CertificationFlowNodeEnum.ZRRTJRW.getKey())
|
||||
);
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
updatePidEoList.addAll(pidEoListTemp);
|
||||
}else if(StringUtils.equals(flowStatus,CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())){
|
||||
List<ProcessInfoDetailEO> pidEoListTemp = pidEoList.stream().filter(pidEo -> {
|
||||
boolean flag = (
|
||||
StringUtils.equals(pidEo.getProjectLawsInventoryId(),pciEoId)
|
||||
&& StringUtils.equals(flowStatus,TaskStatusEnum.NOT_DONE.getValue())
|
||||
&& StringUtils.equals(pidEo.getTaskDefinitionKey(),CertificationFlowNodeEnum.RZGCSSC.getKey())
|
||||
);
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
updatePidEoList.addAll(pidEoListTemp);
|
||||
}
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(updatePidEoList)){
|
||||
updatePidEoList.forEach(pidEo -> pidEo.setEndTime(newEndTime));
|
||||
this.processInfoDetailEOService.updateBatchById(updatePidEoList);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<Map<String, Object>>> queryDutyPersonByProjectId(Map<String, Object> params) {
|
||||
Map<String, List<Map<String, Object>>> result = new HashMap<>();
|
||||
|
||||
+1
-1
@@ -548,9 +548,9 @@
|
||||
'--' AS project_name,
|
||||
'' as year_name,
|
||||
bdl.serial_number,
|
||||
concat( bdl.serial_number, ' ', bdl.title ) AS standard_info,
|
||||
bdl.title,
|
||||
bdl.title_en,
|
||||
concat( bdl.serial_number, ' ', bdl.title ) AS standard_info,
|
||||
pi.flow_type,
|
||||
pi.create_by,
|
||||
pi.end_time,
|
||||
|
||||
Reference in New Issue
Block a user