Procházet zdrojové kódy

安全人员更新

tags/24080901
PoffyZhang před 1 rokem
rodič
revize
e6f688c9e8
3 změnil soubory, kde provedl 57 přidání a 4 odebrání
  1. +25
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/safety/manage/SafetyRiskManage.java
  2. +29
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/safety/model/vo/EqualProtectionVO.java
  3. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/safety/model/vo/SafetyMonitorVO.java

+ 25
- 4
pmapi/src/main/java/com/ningdatech/pmapi/safety/manage/SafetyRiskManage.java Zobrazit soubor

@@ -14,16 +14,15 @@ import com.ningdatech.pmapi.common.constant.BizConst;
import com.ningdatech.pmapi.common.constant.RegionConst;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
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.service.IProjectApplicationService;
import com.ningdatech.pmapi.projectlib.service.IProjectService;
import com.ningdatech.pmapi.safety.model.dto.PersonSafetyInfoDTO;
import com.ningdatech.pmapi.safety.model.dto.SupplierSafetyQualificationDTO;
import com.ningdatech.pmapi.safety.model.entity.PersonSafetyInfo;
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.ISupplierSafetyQualificationService;
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails;
@@ -55,6 +54,8 @@ public class SafetyRiskManage {

private final IPersonSafetyInfoService personSafetyInfoService;

private final IProjectApplicationService applicationService;

/**
* 列表
* @param req
@@ -132,6 +133,26 @@ public class SafetyRiskManage {
.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;
}



+ 29
- 0
pmapi/src/main/java/com/ningdatech/pmapi/safety/model/vo/EqualProtectionVO.java Zobrazit soubor

@@ -0,0 +1,29 @@
package com.ningdatech.pmapi.safety.model.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
* <p>
* 等保详情
* </p>
*
* @author ZPF
* @since 2023-08-02
*/
@Data
@ApiModel(value = "等保详情", description = "等保详情")
public class EqualProtectionVO implements Serializable {

private static final long serialVersionUID = 1L;

@ApiModelProperty("等保级别 1:一级 2:二级 3:三级 4:四级 5:五级")
private Integer secrecyGrade;

@ApiModelProperty("密码测评级别 1:一级 2:二级 3:三级 4:四级 5:五级")
private Integer passwordGrade;
}

+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/safety/model/vo/SafetyMonitorVO.java Zobrazit soubor

@@ -20,4 +20,7 @@ public class SafetyMonitorVO {

@ApiModelProperty("供应商安全资质")
private List<SupplierSafetyQualificationVO> supplierSafetyQualification;

@ApiModelProperty("等保详情")
private EqualProtectionVO equalProtection;
}

Načítá se…
Zrušit
Uložit