法规清单关联平台件--统计取进度最慢的
This commit is contained in:
+64
@@ -0,0 +1,64 @@
|
|||||||
|
package com.jero.modules.project.enums;
|
||||||
|
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计符合性确认流程状态顺序枚举类
|
||||||
|
*/
|
||||||
|
public enum FlowStateDesignEnum {
|
||||||
|
LIST_TO_BE_CHECKED("任务待发起","Task to be initiated","List to be checked"),
|
||||||
|
TASK_TO_BE_CONFIRMED("任务待确认","Task to be confirmed","Task to be confirmed"),
|
||||||
|
REFUSAL_OF_RESPONSIBLE_PERSON("责任人拒绝","Rejected by the responsible person","Duty Person Rejected"),
|
||||||
|
RESULTS_TO_BE_SUBMITTED("结果待提交","Results to be submitted","Results to be submitted"),
|
||||||
|
RESULTS_TO_BE_REVIEWED("结果待审查","Results to be reviewed","Results to be reviewed"),
|
||||||
|
TO_TRACK("待追踪","To be tracked","To be tracked"),
|
||||||
|
CONFORMITY("符合","Compliance","Compliance"),
|
||||||
|
INCONFORMITY("不符合","Non-Compliance","Non-Compliance"),
|
||||||
|
UNINVOLVED("不涉及","NA","NA"),
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
|
String nameCn;
|
||||||
|
String nameEn;
|
||||||
|
String value;
|
||||||
|
|
||||||
|
private FlowStateDesignEnum(String nameCn, String nameEn, String value) {
|
||||||
|
this.nameCn = nameCn;
|
||||||
|
this.nameEn = nameEn;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNameCn() {
|
||||||
|
return nameCn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNameCn(String nameCn) {
|
||||||
|
this.nameCn = nameCn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNameEn() {
|
||||||
|
return nameEn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNameEn(String nameEn) {
|
||||||
|
this.nameEn = nameEn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<String> getValueInfo() {
|
||||||
|
List<String> result = new LinkedList<>();
|
||||||
|
FlowStateDesignEnum[] values = values();
|
||||||
|
for (FlowStateDesignEnum flowStateEnum : values) {
|
||||||
|
result.add(flowStateEnum.getValue());
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
+40
-17
@@ -38,6 +38,7 @@ import com.jero.modules.project.enums.CertificationInventoryFlowStatusEnum;
|
|||||||
import com.jero.modules.project.enums.CertificationProgressEnum;
|
import com.jero.modules.project.enums.CertificationProgressEnum;
|
||||||
import com.jero.modules.project.enums.ComplianceFlowStatusEnum;
|
import com.jero.modules.project.enums.ComplianceFlowStatusEnum;
|
||||||
import com.jero.modules.project.enums.DesignComplianceStatusEnum;
|
import com.jero.modules.project.enums.DesignComplianceStatusEnum;
|
||||||
|
import com.jero.modules.project.enums.FlowStateDesignEnum;
|
||||||
import com.jero.modules.project.enums.FlowStateEnum;
|
import com.jero.modules.project.enums.FlowStateEnum;
|
||||||
import com.jero.modules.project.enums.HSStatisticalNodesEnum;
|
import com.jero.modules.project.enums.HSStatisticalNodesEnum;
|
||||||
import com.jero.modules.project.enums.OperatorTypeEnum;
|
import com.jero.modules.project.enums.OperatorTypeEnum;
|
||||||
@@ -2778,30 +2779,52 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
|
|||||||
LambdaQueryWrapper<ProjectLawsInventoryEO> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ProjectLawsInventoryEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.in(ProjectLawsInventoryEO::getId,idList);
|
queryWrapper.in(ProjectLawsInventoryEO::getId,idList);
|
||||||
projectLawsInventoryPlatFormList = projectLawsInventoryEOMapper.selectList(queryWrapper);
|
projectLawsInventoryPlatFormList = projectLawsInventoryEOMapper.selectList(queryWrapper);
|
||||||
|
List<String> valueInfo = FlowStateDesignEnum.getValueInfo();
|
||||||
for (ProjectLawsInventoryEO projectLawsInventoryEO : projectLawsInventoryEOList) {
|
for (ProjectLawsInventoryEO projectLawsInventoryEO : projectLawsInventoryEOList) {
|
||||||
|
//每条法规关联的平台件
|
||||||
List<LawsInventoryPlatformEO> collect = lawsInventoryPlatformEOList.stream()
|
List<LawsInventoryPlatformEO> collect = lawsInventoryPlatformEOList.stream()
|
||||||
.filter(e -> e.getLawsInventoryId().equals(projectLawsInventoryEO.getId())).collect(Collectors.toList());
|
.filter(e -> e.getLawsInventoryId().equals(projectLawsInventoryEO.getId())).collect(Collectors.toList());
|
||||||
if(ObjectUtils.isNotEmpty(collect)){
|
if(ObjectUtils.isNotEmpty(collect)){
|
||||||
yesList.add(projectLawsInventoryEO);
|
List<String> platformLawsInventoryIdList = collect.stream().map(LawsInventoryPlatformEO::getPlatformLawsInventoryId).collect(Collectors.toList());
|
||||||
}else{
|
//关联的平台件数据
|
||||||
noList.add(projectLawsInventoryEO);
|
List<ProjectLawsInventoryEO> platformList = projectLawsInventoryPlatFormList.stream()
|
||||||
|
.filter(e -> platformLawsInventoryIdList.contains(e.getId())).collect(Collectors.toList());
|
||||||
|
for (ProjectLawsInventoryEO lawsInventoryEO : platformList) {
|
||||||
|
for (String value : valueInfo) {
|
||||||
|
if(value.equals(lawsInventoryEO.getDesignFlowStatus())){
|
||||||
|
projectLawsInventoryEO.setDesignFlowStatus(value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (String value : valueInfo) {
|
||||||
|
if(value.equals(lawsInventoryEO.getVerifyFlowStatus())){
|
||||||
|
projectLawsInventoryEO.setVerifyFlowStatus(value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if(ObjectUtils.isNotEmpty(collect)){
|
||||||
|
// yesList.add(projectLawsInventoryEO);
|
||||||
|
// }else{
|
||||||
|
// noList.add(projectLawsInventoryEO);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(ObjectUtils.isNotEmpty(projectLawsInventoryEOList)
|
// if(ObjectUtils.isNotEmpty(projectLawsInventoryEOList)
|
||||||
&& ObjectUtils.isNotEmpty(yesList)
|
// && ObjectUtils.isNotEmpty(yesList)
|
||||||
&& yesList.size() != projectLawsInventoryEOList.size()
|
// && yesList.size() != projectLawsInventoryEOList.size()
|
||||||
){
|
// ){
|
||||||
//法规清单有数据且部分关联平台件数据
|
// //法规清单有数据且部分关联平台件数据
|
||||||
projectLawsInventoryEOList = noList;
|
// projectLawsInventoryEOList = noList;
|
||||||
projectLawsInventoryEOList.addAll(projectLawsInventoryPlatFormList);
|
// projectLawsInventoryEOList.addAll(projectLawsInventoryPlatFormList);
|
||||||
}else if(ObjectUtils.isNotEmpty(projectLawsInventoryEOList)
|
// }else if(ObjectUtils.isNotEmpty(projectLawsInventoryEOList)
|
||||||
&& ObjectUtils.isNotEmpty(yesList)
|
// && ObjectUtils.isNotEmpty(yesList)
|
||||||
&& yesList.size() == projectLawsInventoryEOList.size()){
|
// && yesList.size() == projectLawsInventoryEOList.size()){
|
||||||
//法规清单有数据且全部关联了平台件
|
// //法规清单有数据且全部关联了平台件
|
||||||
projectLawsInventoryEOList = projectLawsInventoryPlatFormList;
|
// projectLawsInventoryEOList = projectLawsInventoryPlatFormList;
|
||||||
|
// }
|
||||||
}
|
|
||||||
return projectLawsInventoryEOList;
|
return projectLawsInventoryEOList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user