Commit 1d20be79 authored by suhuiguang's avatar suhuiguang

fix(jyjc):报检规则

1.区域匹配没区县是问题
parent 586591c6
......@@ -17,6 +17,7 @@ import org.typroject.tyboot.component.emq.EmqKeeper;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
/**
* @author Administrator
......@@ -54,42 +55,17 @@ public class RuleCommonServiceImpl {
}
public UseInfo getUseInfo(String record) {
return useInfoMapper.selectOne(Wrappers.<UseInfo>lambdaQuery().select(UseInfo::getCity, UseInfo::getCounty).eq(UseInfo::getRecord, record));
}
public String getArea(UseInfo equipUseInfo) {
if (equipUseInfo == null) {
return "";
}
// 特殊地区特殊处理,目前有韩城、杨凌,原因行政区划上是有层级的,但是业务办理时,他们与所在地市是同级别的
if (StringUtils.isEmpty(equipUseInfo.getCity()) || StringUtils.isEmpty(equipUseInfo.getCounty())) {
return "";
}
if (Arrays.asList(EXCLUSION_CITY_REGIONS).contains(equipUseInfo.getCounty())) {
return equipUseInfo.getCounty();
}
return equipUseInfo.getCity();
}
public String getArea(String city, String county) {
// 特殊地区特殊处理,目前有韩城、杨凌,原因行政区划上是有层级的,但是业务办理时,他们与所在地市是同级别的
if (StringUtils.isEmpty(city) || StringUtils.isEmpty(county)) {
return "";
if (StringUtils.isNotEmpty(city) && StringUtils.isEmpty(county)) {
return city;
}
if (Arrays.asList(EXCLUSION_CITY_REGIONS).contains(county)) {
if (Arrays.asList(EXCLUSION_CITY_REGIONS).contains(Optional.ofNullable(county).orElse(""))) {
return county;
}
return city;
}
public String getCounty(UseInfo equipUseInfo) {
if (equipUseInfo == null) {
return "";
}
return equipUseInfo.getCounty();
}
public List<TzBaseEnterpriseInfoDto> getInspectionUnitList(String openBizType) {
return enterpriseInfoMapper.getInspectionUnitList(openBizType);
}
......
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