修改清单确认操作逻辑-studio再次发起清单确认,已通过的法规/认证工程师,无需办理任务。也不接受消息。
This commit is contained in:
+40
-12
@@ -216,6 +216,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
@Autowired
|
@Autowired
|
||||||
ProjectRelatedPersonnelServiceImpl projectRelatedPersonnelService;
|
ProjectRelatedPersonnelServiceImpl projectRelatedPersonnelService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IProjectLawsInventoryRejectCauseEOService projectLawsInventoryRejectCauseEOService;
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
@@ -597,9 +599,14 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
removeById(id);
|
removeById(id);
|
||||||
this.projectTaskInventoryEOService.deleteByProjectLawsInventoryIds(Arrays.asList(id.split(",")));
|
this.projectTaskInventoryEOService.deleteByProjectLawsInventoryIds(Arrays.asList(id.split(",")));
|
||||||
|
|
||||||
QueryWrapper<ConditionAssessmentEO> removeWrapper = new QueryWrapper<>();
|
//删除该条法规清单数据的 项目当前状态数据
|
||||||
removeWrapper.lambda().eq(ConditionAssessmentEO::getProjectLawsInventoryId,id);
|
QueryWrapper<ConditionAssessmentEO> conditionAssessmentRemoveWrapper = new QueryWrapper<>();
|
||||||
this.conditionAssessmentEOService.remove(removeWrapper);
|
conditionAssessmentRemoveWrapper.lambda().eq(ConditionAssessmentEO::getProjectLawsInventoryId,id);
|
||||||
|
this.conditionAssessmentEOService.remove(conditionAssessmentRemoveWrapper);
|
||||||
|
//删除该条法规清单数据的拒绝原因。
|
||||||
|
QueryWrapper<ProjectLawsInventoryRejectCauseEO> rejectCauseRemoveWrapper = new QueryWrapper<>();
|
||||||
|
rejectCauseRemoveWrapper.lambda().eq(ProjectLawsInventoryRejectCauseEO::getProjectLawsInventoryId,id);
|
||||||
|
this.projectLawsInventoryRejectCauseEOService.remove(rejectCauseRemoveWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -635,9 +642,15 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
removeByIds(ids);
|
removeByIds(ids);
|
||||||
this.projectTaskInventoryEOService.deleteByProjectLawsInventoryIds(ids);
|
this.projectTaskInventoryEOService.deleteByProjectLawsInventoryIds(ids);
|
||||||
|
|
||||||
QueryWrapper<ConditionAssessmentEO> removeWrapper = new QueryWrapper<>();
|
//删除该条法规清单数据的 项目当前状态数据
|
||||||
removeWrapper.lambda().in(ConditionAssessmentEO::getProjectLawsInventoryId,ids);
|
QueryWrapper<ConditionAssessmentEO> conditionAssessmentRemoveWrapper = new QueryWrapper<>();
|
||||||
this.conditionAssessmentEOService.remove(removeWrapper);
|
conditionAssessmentRemoveWrapper.lambda().in(ConditionAssessmentEO::getProjectLawsInventoryId,ids);
|
||||||
|
this.conditionAssessmentEOService.remove(conditionAssessmentRemoveWrapper);
|
||||||
|
|
||||||
|
//删除该条法规清单数据的拒绝原因。
|
||||||
|
QueryWrapper<ProjectLawsInventoryRejectCauseEO> rejectCauseRemoveWrapper = new QueryWrapper<>();
|
||||||
|
rejectCauseRemoveWrapper.lambda().in(ProjectLawsInventoryRejectCauseEO::getProjectLawsInventoryId,ids);
|
||||||
|
this.projectLawsInventoryRejectCauseEOService.remove(rejectCauseRemoveWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1385,14 +1398,29 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
projectLawsInventoryEO.setInventoryAffirmStatus(InventoryAffirmStatusEnum.LIST_TO_CONFIRM.getValue());
|
projectLawsInventoryEO.setInventoryAffirmStatus(InventoryAffirmStatusEnum.LIST_TO_CONFIRM.getValue());
|
||||||
projectLawsInventoryEO.setInventoryAffirmDueDate(sdf.parse(inventoryAffirmDueDate));
|
projectLawsInventoryEO.setInventoryAffirmDueDate(sdf.parse(inventoryAffirmDueDate));
|
||||||
LambdaUpdateWrapper<ProjectLawsInventoryEO> updateWrapper = new LambdaUpdateWrapper<>();
|
LambdaUpdateWrapper<ProjectLawsInventoryEO> updateWrapper = new LambdaUpdateWrapper<>();
|
||||||
updateWrapper.set(ProjectLawsInventoryEO::getRegulationOwnerSubmitStatus,null);
|
|
||||||
updateWrapper.set(ProjectLawsInventoryEO::getHomologationEngineerSubmitStatus,null);
|
|
||||||
updateWrapper.eq(ProjectLawsInventoryEO::getId,projectLawsInventoryEO.getId());
|
updateWrapper.eq(ProjectLawsInventoryEO::getId,projectLawsInventoryEO.getId());
|
||||||
super.update(projectLawsInventoryEO, updateWrapper);
|
//认证工程师标识 如果认证工程师提交状态为空, 或认证工程师拒绝过,给认证工程师任务,让他处理
|
||||||
|
boolean homologationEngineerFlag = (
|
||||||
userIdList.add(projectLawsInventoryEO.getHomologationEngineerId());
|
StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerSubmitStatus())
|
||||||
userIdList.add(projectLawsInventoryEO.getRegulationOwnerId());
|
|| StringUtils.equals(projectLawsInventoryEO.getHomologationEngineerSubmitStatus(),"1")
|
||||||
|
);
|
||||||
|
//法规工程师标识 如果法规工程师提交状态为空, 或法规工程师拒绝过,给法规工程师任务,让他处理
|
||||||
|
boolean regulationOwnerFlag = (
|
||||||
|
StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerSubmitStatus())
|
||||||
|
|| StringUtils.equals(projectLawsInventoryEO.getRegulationOwnerSubmitStatus(),"1")
|
||||||
|
);
|
||||||
|
if(homologationEngineerFlag){
|
||||||
|
updateWrapper.set(ProjectLawsInventoryEO::getHomologationEngineerSubmitStatus,null);
|
||||||
|
userIdList.add(projectLawsInventoryEO.getHomologationEngineerId());
|
||||||
|
}
|
||||||
|
if(regulationOwnerFlag){
|
||||||
|
updateWrapper.set(ProjectLawsInventoryEO::getRegulationOwnerSubmitStatus,null);
|
||||||
|
userIdList.add(projectLawsInventoryEO.getRegulationOwnerId());
|
||||||
|
}
|
||||||
|
|
||||||
|
if(homologationEngineerFlag || regulationOwnerFlag){
|
||||||
|
super.update(projectLawsInventoryEO, updateWrapper);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user