如果用户批量设置了工程接口人,如果责任人是空,自动带入。
This commit is contained in:
+1
-1
@@ -86,7 +86,7 @@ public class InventoryAffirmJob implements Job {
|
|||||||
queryWrapperInventory.and(queryWrapper -> {
|
queryWrapperInventory.and(queryWrapper -> {
|
||||||
queryWrapper.lambda().eq(ProjectLawsInventoryEO::getDesignFlowStatus, ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue());
|
queryWrapper.lambda().eq(ProjectLawsInventoryEO::getDesignFlowStatus, ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue());
|
||||||
queryWrapper.or(or -> {
|
queryWrapper.or(or -> {
|
||||||
or.lambda().eq(ProjectLawsInventoryEO::getDesignFlowStatus, ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue());
|
or.lambda().eq(ProjectLawsInventoryEO::getVerifyFlowStatus, ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = this.projectLawsInventoryEOMapper.selectList(queryWrapperInventory);
|
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = this.projectLawsInventoryEOMapper.selectList(queryWrapperInventory);
|
||||||
|
|||||||
+28
@@ -373,11 +373,39 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
|||||||
try {
|
try {
|
||||||
List<String> idList = Arrays.asList(ids.split(","));
|
List<String> idList = Arrays.asList(ids.split(","));
|
||||||
|
|
||||||
|
QueryWrapper<ProjectCertificationInventoryEO> pciQueryWrap = new QueryWrapper<>();
|
||||||
|
pciQueryWrap.lambda().in(ProjectCertificationInventoryEO::getId,idList);
|
||||||
|
List<ProjectCertificationInventoryEO> pciEoList = this.list(pciQueryWrap);
|
||||||
|
|
||||||
List<ProjectCertificationInventoryEO> updateList = new ArrayList<>();
|
List<ProjectCertificationInventoryEO> updateList = new ArrayList<>();
|
||||||
for (String id : idList) {
|
for (String id : idList) {
|
||||||
ProjectCertificationInventoryEO updateProjectCertificationInventoryEO = new ProjectCertificationInventoryEO();
|
ProjectCertificationInventoryEO updateProjectCertificationInventoryEO = new ProjectCertificationInventoryEO();
|
||||||
BeanUtils.copyProperties(projectCertificationInventoryEO,updateProjectCertificationInventoryEO);
|
BeanUtils.copyProperties(projectCertificationInventoryEO,updateProjectCertificationInventoryEO);
|
||||||
updateProjectCertificationInventoryEO.setId(id);
|
updateProjectCertificationInventoryEO.setId(id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 2023-03-30 17.36新增该需求。
|
||||||
|
* 如果用户批量设置了工程接口人字段
|
||||||
|
* 那就需要判断所选数据中责任人是否为空
|
||||||
|
* 如果责任人字段为空时 需要将工程接口人带入到所选数据的责任人字段中
|
||||||
|
*/
|
||||||
|
if(StringUtils.isNotBlank(projectCertificationInventoryEO.getSdt())){
|
||||||
|
List<ProjectCertificationInventoryEO> pciEoListTemp = pciEoList.stream().filter(pciEo -> {
|
||||||
|
boolean flag = false;
|
||||||
|
if (StringUtils.equals(pciEo.getId(), id)) {
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
|
if(CollectionUtils.isNotEmpty(pciEoListTemp)){
|
||||||
|
ProjectCertificationInventoryEO pciEo = pciEoListTemp.get(0);
|
||||||
|
if(StringUtils.isEmpty(pciEo.getDutyPerson())){
|
||||||
|
updateProjectCertificationInventoryEO.setDutyPerson(projectCertificationInventoryEO.getSdt());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
updateList.add(updateProjectCertificationInventoryEO);
|
updateList.add(updateProjectCertificationInventoryEO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user