Commit 71eb54b1 authored by suhuiguang's avatar suhuiguang

1.企业详情已有bug修改

parent a1104876
...@@ -212,15 +212,8 @@ public class TzBaseEnterpriseInfoServiceImpl ...@@ -212,15 +212,8 @@ public class TzBaseEnterpriseInfoServiceImpl
if ("监管机构".equals(companyType)) { if ("监管机构".equals(companyType)) {
unitLicencesCollect = unitLicences; unitLicencesCollect = unitLicences;
} else { } else {
Predicate<BaseUnitLicence> certTypePredicate;
if (INSPECTION_AND_TESTING_INSTITUTIONS.equals(companyType)) {
certTypePredicate = baseUnitLicence -> INSPECTION_AGENCY.equals(baseUnitLicence.getCertType()) ||
TESTING_INSTITUTIONS.equals(baseUnitLicence.getCertType());
} else {
certTypePredicate = baseUnitLicence -> companyType.contains(baseUnitLicence.getCertType());
}
unitLicencesCollect = unitLicences.stream() unitLicencesCollect = unitLicences.stream()
.filter(certTypePredicate) .filter(baseUnitLicence -> COMPANY_TYPE_CERT_TYPE_MAP.get(companyType).contains((baseUnitLicence.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