新增监管端和机构端首页数据

dev
huwei 2026-08-04 15:59:28 +08:00
parent 360533f73e
commit b4400b384e
22 changed files with 14974 additions and 0 deletions

View File

@ -91,6 +91,8 @@ public class InstitutionEvalReportExecutor implements InstitutionEvalReportApi {
entity.setFileName(cmd.getFileName());
entity.setSecretLevelCode(cmd.getSecretLevelCode());
entity.setSecretLevelName(resolveSecretName(cmd.getSecretLevelCode(), cmd.getSecretLevelName()));
entity.setContractFileUrls(cmd.getContractFileUrls());
entity.setProcessDocUrls(cmd.getProcessDocUrls());
entity.setRemarks(cmd.getRemarks());
boolean submit = Boolean.TRUE.equals(cmd.getSubmitToRegulator());
entity.setSubmitFlag(submit ? 1 : 2);

View File

@ -124,6 +124,8 @@ public class RegulatorEvalReportExecutor implements RegulatorEvalReportApi {
entity.setPageCount(cmd.getPageCount());
entity.setSecretLevelCode(cmd.getSecretLevelCode());
entity.setSecretLevelName(cmd.getSecretLevelName());
entity.setContractFileUrls(cmd.getContractFileUrls());
entity.setProcessDocUrls(cmd.getProcessDocUrls());
entity.setRemarks(cmd.getRemarks());
entity.setCompleteFlag(1);
entity.setSubmitFlag(1);

View File

@ -45,6 +45,8 @@ public final class ReportProfileCoConverter {
co.setPageCount(entity.getPageCount());
co.setSecretLevelCode(entity.getSecretLevelCode());
co.setSecretLevelName(entity.getSecretLevelName());
co.setContractFileUrls(entity.getContractFileUrls());
co.setProcessDocUrls(entity.getProcessDocUrls());
co.setRemarks(entity.getRemarks());
return co;
}

View File

@ -16,11 +16,18 @@ import org.qinan.safetyeval.domain.gateway.OrgPositionGateway;
import org.qinan.safetyeval.domain.gateway.OrgResignApplyGateway;
import org.qinan.safetyeval.domain.query.OrgPersonnelCertQuery;
import org.qinan.safetyeval.domain.query.PageResult;
import org.qinan.safetyeval.domain.constant.IndustryEnum;
import org.qinan.safetyeval.domain.constant.ProfessionalCapabilityEnum;
import org.qinan.safetyeval.domain.standards.gateway.IndustryProfessionalStandardsGateway;
import org.qinan.safetyeval.domain.standards.model.IndustryProfessionalStandardsE;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
/**
@ -47,6 +54,9 @@ public class OrgPersonnelViewEnricher {
@Autowired(required = false)
private OrgResignApplyGateway orgResignApplyGateway;
@Autowired(required = false)
private IndustryProfessionalStandardsGateway industryProfessionalStandardsGateway;
public void enrichPersonnel(OrgPersonnelCO co) {
if (co == null) {
return;
@ -75,6 +85,43 @@ public class OrgPersonnelViewEnricher {
.filter(StringUtils::hasText)
.collect(Collectors.joining("、"));
co.setCertNames(certNames);
// 构建能力汇总: "专业范围:专业能力;专业范围:专业能力"
// 当 professionalCapabilityCode 为空时,尝试通过 industryProfessionalStandardsId 查标准表获取
List<OrgPersonnelCertEntity> records = certPage.getRecords();
Map<Long, String> standardsCodeCache = new HashMap<>();
if (industryProfessionalStandardsGateway != null) {
records.stream()
.filter(c -> !StringUtils.hasText(c.getProfessionalCapabilityCode())
&& c.getIndustryProfessionalStandardsId() != null)
.map(OrgPersonnelCertEntity::getIndustryProfessionalStandardsId)
.distinct()
.forEach(sid -> {
IndustryProfessionalStandardsE standards = industryProfessionalStandardsGateway.getById(sid);
if (standards != null && StringUtils.hasText(standards.getProfessionalCapabilityCode())) {
standardsCodeCache.put(sid, standards.getProfessionalCapabilityCode());
}
});
}
String abilityNames = records.stream()
.filter(c -> StringUtils.hasText(c.getBusinessScope()))
.map(c -> {
String code = c.getProfessionalCapabilityCode();
if (!StringUtils.hasText(code) && standardsCodeCache.containsKey(c.getIndustryProfessionalStandardsId())) {
code = standardsCodeCache.get(c.getIndustryProfessionalStandardsId());
}
if (!StringUtils.hasText(code)) {
return null;
}
// 转换 code 为中文名称
IndustryEnum industryEnum = IndustryEnum.ofCode(c.getBusinessScope());
String scopeName = industryEnum != null ? industryEnum.getValue() : c.getBusinessScope();
ProfessionalCapabilityEnum capEnum = ProfessionalCapabilityEnum.ofCode(code);
String capName = capEnum != null ? capEnum.getValue() : code;
return scopeName + "" + capName;
})
.filter(Objects::nonNull)
.collect(Collectors.joining(""));
co.setAbilityNames(abilityNames);
}
enrichChangeSummary(co);
}

View File

@ -129,6 +129,9 @@ public class OrgPersonnelCO {
@ApiModelProperty(value = "证书名称汇总(列表展示,非持久化)")
private String certNames;
@ApiModelProperty(value = "能力汇总(列表展示,非持久化,格式: 专业范围:专业能力;...")
private String abilityNames;
@ApiModelProperty(value = "信息变更次数(列表展示,非持久化)")
private Integer changeCount;

View File

@ -91,6 +91,12 @@ public class EvalReportLibraryCO {
@ApiModelProperty("保密属性名称")
private String secretLevelName;
@ApiModelProperty("合同文件URLs(JSON数组)")
private String contractFileUrls;
@ApiModelProperty("其他过程文档URLs(JSON数组)")
private String processDocUrls;
@ApiModelProperty("备注")
private String remarks;
}

View File

@ -63,6 +63,12 @@ public class InstitutionEvalReportAddCmd {
@ApiModelProperty(value = "保密属性名称", example = "普通")
private String secretLevelName;
@ApiModelProperty("合同文件URLs(JSON数组)")
private String contractFileUrls;
@ApiModelProperty("其他过程文档URLs(JSON数组)")
private String processDocUrls;
@ApiModelProperty("备注")
private String remarks;

View File

@ -70,6 +70,12 @@ public class RegulatorEvalReportAddCmd {
@ApiModelProperty(value = "保密属性名称", example = "普通")
private String secretLevelName;
@ApiModelProperty("合同文件URLs(JSON数组)")
private String contractFileUrls;
@ApiModelProperty("其他过程文档URLs(JSON数组)")
private String processDocUrls;
@ApiModelProperty("备注")
private String remarks;
}

View File

@ -41,6 +41,10 @@ public class EvalReportEntity {
/** 保密属性名称 */
private String secretLevelName;
private String deleteEnum;
/** 合同文件URLs(JSON数组, 格式: [{"url":"...","name":"..."}]) */
private String contractFileUrls;
/** 其他过程文档URLs(JSON数组, 格式: [{"url":"...","name":"..."}]) */
private String processDocUrls;
private String remarks;
private String createName;
private String updateName;

View File

@ -41,4 +41,12 @@ public interface IndustryProfessionalStandardsGateway {
* @return
*/
Boolean deletedIndustryProfessionalStandardsByIds(Long[] ids);
/**
* ID
*
* @param id
* @return
*/
IndustryProfessionalStandardsE getById(Long id);
}

View File

@ -42,6 +42,10 @@ public class EvalReportDO {
private String secretLevelCode;
private String secretLevelName;
private String deleteEnum;
/** 合同文件URLs(JSON数组) */
private String contractFileUrls;
/** 其他过程文档URLs(JSON数组) */
private String processDocUrls;
private String remarks;
private String createName;
private String updateName;

View File

@ -45,4 +45,20 @@ public class IndustryProfessionalStandardsGatewayImpl implements IndustryProfess
public Boolean deletedIndustryProfessionalStandardsByIds(Long[] ids) {
return industryProfessionalStandardsRepository.deletedIndustryProfessionalStandardsByIds(ids);
}
@Override
public IndustryProfessionalStandardsE getById(Long id) {
IndustryProfessionalStandardsDO doObj = industryProfessionalStandardsRepository.getById(id);
if (doObj == null) {
return null;
}
IndustryProfessionalStandardsE entity = new IndustryProfessionalStandardsE();
entity.setId(doObj.getId());
entity.setProfessionalCapabilityCode(doObj.getProfessionalCapabilityCode());
entity.setProfessionalCapabilityName(doObj.getProfessionalCapabilityName());
entity.setIndustryCode(doObj.getIndustryCode());
entity.setPersonNum(doObj.getPersonNum());
entity.setEnv(doObj.getEnv());
return entity;
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long