67022 引用交付物问题4处理。
This commit is contained in:
+30
-1
@@ -3143,6 +3143,9 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
|
||||
@Override
|
||||
public Result<?> citeDeliverable(JSONObject json) {
|
||||
String resultMsg = "引用交付物成功!";
|
||||
String cut = json.getString("cut");
|
||||
|
||||
String projectCertificationInventoryIds = json.getString("projectCertificationInventoryIds");
|
||||
if(StringUtils.isEmpty(projectCertificationInventoryIds)){
|
||||
throw new JeroBootException("请选择需要引用的认证清单数据!");
|
||||
@@ -3165,6 +3168,13 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
List<ProjectCertificationInventoryEO> citeProjectCertificationInventoryEOList = this.baseMapper.selectList(citeQueryWrapper);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(citeProjectCertificationInventoryEOList)){
|
||||
|
||||
|
||||
// citeProjectCertificationInventoryEOList.stream().map(ProjectCertificationInventoryEO::getInspectionItem).distinct().collect(Collectors.joining(","));
|
||||
// return Result.OK("所选检验项目"+""+"暂未维护,需要进行手动填写。");
|
||||
//The review passed data in the selected reference project is empty, please reselect!
|
||||
// 没有引用的数据 检验项目集合,给到前端进行展示。
|
||||
List<String> noCiteInspectionItem = new ArrayList<>();
|
||||
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
|
||||
for (ProjectCertificationInventoryEO citeProjectCertificationInventoryEO : citeProjectCertificationInventoryEOList) {
|
||||
// 匹配数据 类别、检验项目、配置项、标准编号、交付物类型完全一致,并且数据的状态为 审查完成
|
||||
@@ -3178,15 +3188,34 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
if(flag){
|
||||
projectCertificationInventoryEO.setDeliveryResult(citeProjectCertificationInventoryEO.getDeliveryResult());
|
||||
break;
|
||||
}else {
|
||||
noCiteInspectionItem.add(projectCertificationInventoryEO.getInspectionItem());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.updateBatchById(projectCertificationInventoryEOList);
|
||||
|
||||
// 如果有 (没有引用的数据 检验项目集合,给到前端进行展示。)
|
||||
if(CollectionUtils.isNotEmpty(noCiteInspectionItem)){
|
||||
String noCiteInspectionItemStr = noCiteInspectionItem.stream().distinct().collect(Collectors.joining(","));
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
resultMsg = "所选检验项目"+noCiteInspectionItemStr+"暂未维护,需要进行手动填写。";
|
||||
}else {
|
||||
resultMsg = "The selected inspection characteristic "+noCiteInspectionItemStr+" is not currently maintained and needs to be manually filled in.";
|
||||
}
|
||||
}
|
||||
}else {
|
||||
// 如果引用的项目中没有审查完成的数据 ,提示用户。
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
resultMsg = "所选引用项目中审查通过数据为空,请重新选择!";
|
||||
}else {
|
||||
resultMsg = "The review passed data in the selected reference project is empty, please reselect!";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Result.OK("引用交付物成功!");
|
||||
return Result.OK(resultMsg);
|
||||
}
|
||||
|
||||
private void setProjectCertificationInventoryPermission(String userId, String projectId,String certificationInventoryId,Date now, List<ProjectUserPermission> adds, String belong) {
|
||||
|
||||
Reference in New Issue
Block a user