Commit 111e9a77 authored by suhuiguang's avatar suhuiguang

fact(综合搜索):数据同步调整

1.空指针增强处理
parent d084a2e0
...@@ -23,7 +23,9 @@ public class BaseEnterpriseUpdate { ...@@ -23,7 +23,9 @@ public class BaseEnterpriseUpdate {
public final String jcjgCode = "1233-2"; public final String jcjgCode = "1233-2";
public String updateJyjcUnitType(String oldUnitType, List<EsBaseEnterpriseInfo.License> unitLicences) { public String updateJyjcUnitType(String oldUnitType, List<EsBaseEnterpriseInfo.License> unitLicences) {
if(oldUnitType == null || oldUnitType.isEmpty()) {
return oldUnitType;
}
// 如果单位类型中包含检验检测机构、检测单位、检验单位,且有资质信息,则更新单位类型 // 如果单位类型中包含检验检测机构、检测单位、检验单位,且有资质信息,则更新单位类型
if ((oldUnitType.contains(jyjcjg) || oldUnitType.contains(jydw) || oldUnitType.contains(jcdw)) && !ListUtils.isEmpty(unitLicences)) { if ((oldUnitType.contains(jyjcjg) || oldUnitType.contains(jydw) || oldUnitType.contains(jcdw)) && !ListUtils.isEmpty(unitLicences)) {
long jydwCount = unitLicences.stream().filter(e -> jyjgCode.equals(e.getCertTypeCode()) || jydw.equals(e.getCertType())).count(); long jydwCount = unitLicences.stream().filter(e -> jyjgCode.equals(e.getCertTypeCode()) || jydw.equals(e.getCertType())).count();
......
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