Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # safety-eval-app/src/main/java/org/qinan/safetyeval/app/executor/OrgPersonnelExecutor.javadev
commit
ba382e5d6f
|
|
@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 人员信息适配层(Controller)
|
* 人员信息适配层(Controller)
|
||||||
|
|
@ -82,4 +83,10 @@ public class OrgPersonnelController {
|
||||||
public SingleResponse<String> importTemplate() {
|
public SingleResponse<String> importTemplate() {
|
||||||
return orgPersonnelApi.importTemplate();
|
return orgPersonnelApi.importTemplate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("人员查询")
|
||||||
|
@GetMapping("/getOrgPersonnel")
|
||||||
|
public SingleResponse<List<OrgPersonnelCO>> getOrgPersonnel() {
|
||||||
|
return orgPersonnelApi.getOrgPersonnel();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 法定代表人承诺书适配层(Controller)
|
* 法定代表人承诺书适配层(Controller)
|
||||||
|
|
@ -33,7 +34,9 @@ public class AppQualFilingCommitmentController {
|
||||||
@ApiOperation("分页查询法定代表人承诺书")
|
@ApiOperation("分页查询法定代表人承诺书")
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
public PageResponse<QualFilingCommitmentCO> page(@Validated QualFilingCommitmentPageQuery query) {
|
public PageResponse<QualFilingCommitmentCO> page(@Validated QualFilingCommitmentPageQuery query) {
|
||||||
query.setLegalRepPersonnelId(AuthUserContextAdapter.getCurrentUserId());
|
if (Objects.isNull(query.getLegalRepPersonnelId())) {
|
||||||
|
query.setLegalRepPersonnelId(AuthUserContextAdapter.getCurrentUserId());
|
||||||
|
}
|
||||||
return qualFilingCommitmentApi.page(query);
|
return qualFilingCommitmentApi.page(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,10 +32,13 @@ import org.qinan.safetyeval.infrastructure.adapter.auth.AuthUserContextAdapter;
|
||||||
import org.qinan.safetyeval.infrastructure.adapter.gbs.GbsUserFacadeClient;
|
import org.qinan.safetyeval.infrastructure.adapter.gbs.GbsUserFacadeClient;
|
||||||
import org.qinan.safetyeval.infrastructure.mapper.OrgPersonnelMapper;
|
import org.qinan.safetyeval.infrastructure.mapper.OrgPersonnelMapper;
|
||||||
import org.qinan.safetyeval.infrastructure.mapper.QualFilingPersonnelCertMapper;
|
import org.qinan.safetyeval.infrastructure.mapper.QualFilingPersonnelCertMapper;
|
||||||
|
import org.qinan.safetyeval.infrastructure.dataobject.OrgPersonnelDO;
|
||||||
|
import org.qinan.safetyeval.infrastructure.mapper.OrgPersonnelMapper;
|
||||||
import org.qinan.safetyeval.infrastructure.support.UserOrgIdResolver;
|
import org.qinan.safetyeval.infrastructure.support.UserOrgIdResolver;
|
||||||
import org.qinan.safetyeval.infrastructure.utils.CommonUtil;
|
import org.qinan.safetyeval.infrastructure.utils.CommonUtil;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
|
|
@ -46,6 +49,10 @@ import org.springframework.util.StringUtils;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
@ -104,6 +111,8 @@ public class OrgPersonnelExecutor implements OrgPersonnelApi {
|
||||||
private boolean gbsUserSyncFailFast;
|
private boolean gbsUserSyncFailFast;
|
||||||
@Value("${template.personnel.import.url:}")
|
@Value("${template.personnel.import.url:}")
|
||||||
private String personImportTemplateUrl;
|
private String personImportTemplateUrl;
|
||||||
|
@Autowired
|
||||||
|
private OrgPersonnelMapper orgPersonnelMapper;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -351,4 +360,15 @@ public class OrgPersonnelExecutor implements OrgPersonnelApi {
|
||||||
public SingleResponse<String> importTemplate() {
|
public SingleResponse<String> importTemplate() {
|
||||||
return SingleResponse.success(personImportTemplateUrl);
|
return SingleResponse.success(personImportTemplateUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SingleResponse<List<OrgPersonnelCO>> getOrgPersonnel() {
|
||||||
|
List<OrgPersonnelDO> orgPersonnelDOS = orgPersonnelMapper.selectList(null);
|
||||||
|
List<OrgPersonnelCO> orgPersonnelCOS = orgPersonnelDOS.stream().map(item -> {
|
||||||
|
OrgPersonnelCO orgPersonnelCO = new OrgPersonnelCO();
|
||||||
|
BeanUtils.copyProperties(item, orgPersonnelCO);
|
||||||
|
return orgPersonnelCO;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
return SingleResponse.success(orgPersonnelCOS);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,8 @@ public class InstitutionEvalReportExecutor implements InstitutionEvalReportApi {
|
||||||
entity.setFileName(cmd.getFileName());
|
entity.setFileName(cmd.getFileName());
|
||||||
entity.setSecretLevelCode(cmd.getSecretLevelCode());
|
entity.setSecretLevelCode(cmd.getSecretLevelCode());
|
||||||
entity.setSecretLevelName(resolveSecretName(cmd.getSecretLevelCode(), cmd.getSecretLevelName()));
|
entity.setSecretLevelName(resolveSecretName(cmd.getSecretLevelCode(), cmd.getSecretLevelName()));
|
||||||
|
entity.setContractFileUrls(cmd.getContractFileUrls());
|
||||||
|
entity.setProcessDocUrls(cmd.getProcessDocUrls());
|
||||||
entity.setRemarks(cmd.getRemarks());
|
entity.setRemarks(cmd.getRemarks());
|
||||||
boolean submit = Boolean.TRUE.equals(cmd.getSubmitToRegulator());
|
boolean submit = Boolean.TRUE.equals(cmd.getSubmitToRegulator());
|
||||||
entity.setSubmitFlag(submit ? 1 : 2);
|
entity.setSubmitFlag(submit ? 1 : 2);
|
||||||
|
|
|
||||||
|
|
@ -124,6 +124,8 @@ public class RegulatorEvalReportExecutor implements RegulatorEvalReportApi {
|
||||||
entity.setPageCount(cmd.getPageCount());
|
entity.setPageCount(cmd.getPageCount());
|
||||||
entity.setSecretLevelCode(cmd.getSecretLevelCode());
|
entity.setSecretLevelCode(cmd.getSecretLevelCode());
|
||||||
entity.setSecretLevelName(cmd.getSecretLevelName());
|
entity.setSecretLevelName(cmd.getSecretLevelName());
|
||||||
|
entity.setContractFileUrls(cmd.getContractFileUrls());
|
||||||
|
entity.setProcessDocUrls(cmd.getProcessDocUrls());
|
||||||
entity.setRemarks(cmd.getRemarks());
|
entity.setRemarks(cmd.getRemarks());
|
||||||
entity.setCompleteFlag(1);
|
entity.setCompleteFlag(1);
|
||||||
entity.setSubmitFlag(1);
|
entity.setSubmitFlag(1);
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,8 @@ public final class ReportProfileCoConverter {
|
||||||
co.setPageCount(entity.getPageCount());
|
co.setPageCount(entity.getPageCount());
|
||||||
co.setSecretLevelCode(entity.getSecretLevelCode());
|
co.setSecretLevelCode(entity.getSecretLevelCode());
|
||||||
co.setSecretLevelName(entity.getSecretLevelName());
|
co.setSecretLevelName(entity.getSecretLevelName());
|
||||||
|
co.setContractFileUrls(entity.getContractFileUrls());
|
||||||
|
co.setProcessDocUrls(entity.getProcessDocUrls());
|
||||||
co.setRemarks(entity.getRemarks());
|
co.setRemarks(entity.getRemarks());
|
||||||
return co;
|
return co;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,18 @@ import org.qinan.safetyeval.domain.major.gateway.BasicDisciplineMajorGateway;
|
||||||
import org.qinan.safetyeval.domain.major.model.BasicDisciplineMajorE;
|
import org.qinan.safetyeval.domain.major.model.BasicDisciplineMajorE;
|
||||||
import org.qinan.safetyeval.domain.query.OrgPersonnelCertQuery;
|
import org.qinan.safetyeval.domain.query.OrgPersonnelCertQuery;
|
||||||
import org.qinan.safetyeval.domain.query.PageResult;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -42,6 +49,9 @@ public class OrgPersonnelViewEnricher {
|
||||||
@Autowired
|
@Autowired
|
||||||
private BasicDisciplineMajorGateway basicDisciplineMajorGateway;
|
private BasicDisciplineMajorGateway basicDisciplineMajorGateway;
|
||||||
|
|
||||||
|
@Autowired(required = false)
|
||||||
|
private IndustryProfessionalStandardsGateway industryProfessionalStandardsGateway;
|
||||||
|
|
||||||
public void enrichPersonnel(OrgPersonnelCO co) {
|
public void enrichPersonnel(OrgPersonnelCO co) {
|
||||||
if (co == null) {
|
if (co == null) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -74,6 +84,43 @@ public class OrgPersonnelViewEnricher {
|
||||||
.filter(StringUtils::hasText)
|
.filter(StringUtils::hasText)
|
||||||
.collect(Collectors.joining("、"));
|
.collect(Collectors.joining("、"));
|
||||||
co.setCertNames(certNames);
|
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);
|
enrichChangeSummary(co);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import org.qinan.safetyeval.client.dto.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 人员信息接口定义(Client层)
|
* 人员信息接口定义(Client层)
|
||||||
|
|
@ -47,4 +48,8 @@ public interface OrgPersonnelApi {
|
||||||
* @return 模版下载地址
|
* @return 模版下载地址
|
||||||
*/
|
*/
|
||||||
SingleResponse<String> importTemplate();
|
SingleResponse<String> importTemplate();
|
||||||
|
|
||||||
|
SingleResponse<List<OrgPersonnelCO>> getOrgPersonnel();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,9 @@ public class OrgPersonnelCO {
|
||||||
@ApiModelProperty(value = "证书名称汇总(列表展示,非持久化)")
|
@ApiModelProperty(value = "证书名称汇总(列表展示,非持久化)")
|
||||||
private String certNames;
|
private String certNames;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "能力汇总(列表展示,非持久化,格式: 专业范围:专业能力;...)")
|
||||||
|
private String abilityNames;
|
||||||
|
|
||||||
@ApiModelProperty(value = "信息变更次数(列表展示,非持久化)")
|
@ApiModelProperty(value = "信息变更次数(列表展示,非持久化)")
|
||||||
private Integer changeCount;
|
private Integer changeCount;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,12 @@ public class EvalReportLibraryCO {
|
||||||
@ApiModelProperty("保密属性名称")
|
@ApiModelProperty("保密属性名称")
|
||||||
private String secretLevelName;
|
private String secretLevelName;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同文件URLs(JSON数组)")
|
||||||
|
private String contractFileUrls;
|
||||||
|
|
||||||
|
@ApiModelProperty("其他过程文档URLs(JSON数组)")
|
||||||
|
private String processDocUrls;
|
||||||
|
|
||||||
@ApiModelProperty("备注")
|
@ApiModelProperty("备注")
|
||||||
private String remarks;
|
private String remarks;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,12 @@ public class InstitutionEvalReportAddCmd {
|
||||||
@ApiModelProperty(value = "保密属性名称", example = "普通")
|
@ApiModelProperty(value = "保密属性名称", example = "普通")
|
||||||
private String secretLevelName;
|
private String secretLevelName;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同文件URLs(JSON数组)")
|
||||||
|
private String contractFileUrls;
|
||||||
|
|
||||||
|
@ApiModelProperty("其他过程文档URLs(JSON数组)")
|
||||||
|
private String processDocUrls;
|
||||||
|
|
||||||
@ApiModelProperty("备注")
|
@ApiModelProperty("备注")
|
||||||
private String remarks;
|
private String remarks;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,12 @@ public class RegulatorEvalReportAddCmd {
|
||||||
@ApiModelProperty(value = "保密属性名称", example = "普通")
|
@ApiModelProperty(value = "保密属性名称", example = "普通")
|
||||||
private String secretLevelName;
|
private String secretLevelName;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同文件URLs(JSON数组)")
|
||||||
|
private String contractFileUrls;
|
||||||
|
|
||||||
|
@ApiModelProperty("其他过程文档URLs(JSON数组)")
|
||||||
|
private String processDocUrls;
|
||||||
|
|
||||||
@ApiModelProperty("备注")
|
@ApiModelProperty("备注")
|
||||||
private String remarks;
|
private String remarks;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,10 @@ public class EvalReportEntity {
|
||||||
/** 保密属性名称 */
|
/** 保密属性名称 */
|
||||||
private String secretLevelName;
|
private String secretLevelName;
|
||||||
private String deleteEnum;
|
private String deleteEnum;
|
||||||
|
/** 合同文件URLs(JSON数组, 格式: [{"url":"...","name":"..."}]) */
|
||||||
|
private String contractFileUrls;
|
||||||
|
/** 其他过程文档URLs(JSON数组, 格式: [{"url":"...","name":"..."}]) */
|
||||||
|
private String processDocUrls;
|
||||||
private String remarks;
|
private String remarks;
|
||||||
private String createName;
|
private String createName;
|
||||||
private String updateName;
|
private String updateName;
|
||||||
|
|
|
||||||
|
|
@ -41,4 +41,12 @@ public interface IndustryProfessionalStandardsGateway {
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
Boolean deletedIndustryProfessionalStandardsByIds(Long[] ids);
|
Boolean deletedIndustryProfessionalStandardsByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询安全评价机构业务范围与专业能力配备标准
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
IndustryProfessionalStandardsE getById(Long id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,10 @@ public class EvalReportDO {
|
||||||
private String secretLevelCode;
|
private String secretLevelCode;
|
||||||
private String secretLevelName;
|
private String secretLevelName;
|
||||||
private String deleteEnum;
|
private String deleteEnum;
|
||||||
|
/** 合同文件URLs(JSON数组) */
|
||||||
|
private String contractFileUrls;
|
||||||
|
/** 其他过程文档URLs(JSON数组) */
|
||||||
|
private String processDocUrls;
|
||||||
private String remarks;
|
private String remarks;
|
||||||
private String createName;
|
private String createName;
|
||||||
private String updateName;
|
private String updateName;
|
||||||
|
|
|
||||||
|
|
@ -45,4 +45,20 @@ public class IndustryProfessionalStandardsGatewayImpl implements IndustryProfess
|
||||||
public Boolean deletedIndustryProfessionalStandardsByIds(Long[] ids) {
|
public Boolean deletedIndustryProfessionalStandardsByIds(Long[] ids) {
|
||||||
return industryProfessionalStandardsRepository.deletedIndustryProfessionalStandardsByIds(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
Loading…
Reference in New Issue