|
@@ -14,16 +14,15 @@ import com.ningdatech.pmapi.common.constant.BizConst; |
|
|
import com.ningdatech.pmapi.common.constant.RegionConst; |
|
|
import com.ningdatech.pmapi.common.constant.RegionConst; |
|
|
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; |
|
|
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; |
|
|
import com.ningdatech.pmapi.projectlib.model.entity.Project; |
|
|
import com.ningdatech.pmapi.projectlib.model.entity.Project; |
|
|
|
|
|
import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; |
|
|
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; |
|
|
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; |
|
|
|
|
|
import com.ningdatech.pmapi.projectlib.service.IProjectApplicationService; |
|
|
import com.ningdatech.pmapi.projectlib.service.IProjectService; |
|
|
import com.ningdatech.pmapi.projectlib.service.IProjectService; |
|
|
import com.ningdatech.pmapi.safety.model.dto.PersonSafetyInfoDTO; |
|
|
import com.ningdatech.pmapi.safety.model.dto.PersonSafetyInfoDTO; |
|
|
import com.ningdatech.pmapi.safety.model.dto.SupplierSafetyQualificationDTO; |
|
|
import com.ningdatech.pmapi.safety.model.dto.SupplierSafetyQualificationDTO; |
|
|
import com.ningdatech.pmapi.safety.model.entity.PersonSafetyInfo; |
|
|
import com.ningdatech.pmapi.safety.model.entity.PersonSafetyInfo; |
|
|
import com.ningdatech.pmapi.safety.model.entity.SupplierSafetyQualification; |
|
|
import com.ningdatech.pmapi.safety.model.entity.SupplierSafetyQualification; |
|
|
import com.ningdatech.pmapi.safety.model.vo.PersonSafetyInfoVO; |
|
|
|
|
|
import com.ningdatech.pmapi.safety.model.vo.ProjectMonitorVO; |
|
|
|
|
|
import com.ningdatech.pmapi.safety.model.vo.SafetyMonitorVO; |
|
|
|
|
|
import com.ningdatech.pmapi.safety.model.vo.SupplierSafetyQualificationVO; |
|
|
|
|
|
|
|
|
import com.ningdatech.pmapi.safety.model.vo.*; |
|
|
import com.ningdatech.pmapi.safety.service.IPersonSafetyInfoService; |
|
|
import com.ningdatech.pmapi.safety.service.IPersonSafetyInfoService; |
|
|
import com.ningdatech.pmapi.safety.service.ISupplierSafetyQualificationService; |
|
|
import com.ningdatech.pmapi.safety.service.ISupplierSafetyQualificationService; |
|
|
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails; |
|
|
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails; |
|
@@ -55,6 +54,8 @@ public class SafetyRiskManage { |
|
|
|
|
|
|
|
|
private final IPersonSafetyInfoService personSafetyInfoService; |
|
|
private final IPersonSafetyInfoService personSafetyInfoService; |
|
|
|
|
|
|
|
|
|
|
|
private final IProjectApplicationService applicationService; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 列表 |
|
|
* 列表 |
|
|
* @param req |
|
|
* @param req |
|
@@ -132,6 +133,26 @@ public class SafetyRiskManage { |
|
|
.collect(Collectors.toList())); |
|
|
.collect(Collectors.toList())); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
List<ProjectApplication> apps = applicationService.list(Wrappers.lambdaQuery(ProjectApplication.class) |
|
|
|
|
|
.eq(ProjectApplication::getProjectCode, project.getProjectCode()) |
|
|
|
|
|
.eq(ProjectApplication::getProjectVersion, project.getVersion())); |
|
|
|
|
|
|
|
|
|
|
|
EqualProtectionVO equalProtectionVO = new EqualProtectionVO(); |
|
|
|
|
|
|
|
|
|
|
|
if(CollUtil.isNotEmpty(apps)){ |
|
|
|
|
|
Integer maxPassWordGrade = 0; |
|
|
|
|
|
Integer maxSecerecyGrade = 0; |
|
|
|
|
|
for(ProjectApplication app : apps) { |
|
|
|
|
|
maxPassWordGrade = Math.max(maxPassWordGrade,app.getPasswordGrade()); |
|
|
|
|
|
maxSecerecyGrade = Math.max(maxSecerecyGrade,app.getSecrecyGrade()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
equalProtectionVO.setPasswordGrade(maxPassWordGrade); |
|
|
|
|
|
equalProtectionVO.setSecrecyGrade(maxSecerecyGrade); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
vo.setEqualProtection(equalProtectionVO); |
|
|
|
|
|
|
|
|
return vo; |
|
|
return vo; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|