Commit b1ba7baf authored by yangyang's avatar yangyang

refactor(amos-boot-module-tcm): 优化企业信息查询逻辑- 修复了企业类型为"制造"时,许可证信息无法显示的问题

- 优化了证书类型过滤逻辑,确保正确显示相关证书信息
parent 0014ec2c
...@@ -214,13 +214,15 @@ public class TzBaseEnterpriseInfoServiceImpl ...@@ -214,13 +214,15 @@ public class TzBaseEnterpriseInfoServiceImpl
List<BaseUnitLicenceDto> unitLicenceDtos = new ArrayList<>(); List<BaseUnitLicenceDto> unitLicenceDtos = new ArrayList<>();
List<BaseUnitLicence> unitLicencesCollect = Optional.ofNullable(unitLicences).orElse(Collections.emptyList()); List<BaseUnitLicence> unitLicencesCollect = Optional.ofNullable(unitLicences).orElse(Collections.emptyList());
if (!"监管机构".equals(companyType)) { if (!"监管机构".equals(companyType)) {
// List<String> certTypeList = Arrays.asList(Optional.ofNullable(COMPANY_TYPE_CERT_TYPE_MAP.get(companyType)) List<String> certTypeList = Arrays.asList(Optional.ofNullable(COMPANY_TYPE_CERT_TYPE_MAP.get(companyType))
// .orElse("") .orElse("")
// .split(",")); .split(","));
// 充装、检验检测、制造、设计、安改维 // 充装、检验检测、制造、设计、安改维
List<String> certTypeList = Arrays.asList("1231","1233","1234","1235","1236");
unitLicencesCollect = unitLicencesCollect.stream() unitLicencesCollect = unitLicencesCollect.stream()
.filter(unit -> unit.getCertTypeCode() != null && certTypeList.contains(unit.getCertTypeCode())) .filter(unit -> unit.getCertTypeCode() != null && (certTypeList.contains(unit.getCertTypeCode())
|| "1235".equals(unit.getCertTypeCode())
|| "1236".equals(unit.getCertTypeCode()))
)
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
if (!ValidationUtil.isEmpty(unitLicencesCollect)) { if (!ValidationUtil.isEmpty(unitLicencesCollect)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment