Commit b2cfc526 authored by liufan's avatar liufan

优化:设备列表查询接口

parent 9383d3f0
...@@ -553,6 +553,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -553,6 +553,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
} }
// 根据当前登录用户类型及管辖机构筛选条件添加对应参数 // 根据当前登录用户类型及管辖机构筛选条件添加对应参数
if (ObjectUtils.isEmpty(map.getString("SEQUENCE_NBR")) && ObjectUtils.isEmpty(map.getString("useUnitCreditCode"))) {
if (!ValidationUtil.isEmpty(type) && type.contains("使用单位")) { if (!ValidationUtil.isEmpty(type) && type.contains("使用单位")) {
if(ValidationUtil.isEmpty(map.getString("USE_UNIT_CREDIT_CODE"))){ if(ValidationUtil.isEmpty(map.getString("USE_UNIT_CREDIT_CODE"))){
map.put("USE_UNIT_CREDIT_CODE", companyCode); map.put("USE_UNIT_CREDIT_CODE", companyCode);
...@@ -564,6 +565,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -564,6 +565,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
result.setTotal(0); result.setTotal(0);
return result; return result;
} }
}
// 默认条件【STATUS==="" || null】 // 默认条件【STATUS==="" || null】
BoolQueryBuilder meBuilder = QueryBuilders.boolQuery(); BoolQueryBuilder meBuilder = QueryBuilders.boolQuery();
...@@ -642,11 +644,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -642,11 +644,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
ubuilder.minimumShouldMatch(1); ubuilder.minimumShouldMatch(1);
boolMust.must(ubuilder); boolMust.must(ubuilder);
}else { }else {
if (!ObjectUtils.isEmpty(map.getString("USE_UNIT_CREDIT_CODE"))) { if (!ObjectUtils.isEmpty(map.getString("USE_UNIT_CREDIT_CODE")) || !ObjectUtils.isEmpty(map.getString("useUnitCreditCode"))) {
BoolQueryBuilder uuccBuilder = QueryBuilders.boolQuery(); BoolQueryBuilder uuccBuilder = QueryBuilders.boolQuery();
String param = QueryParser.escape(map.getString("USE_UNIT_CREDIT_CODE")); String uucc = !ValidationUtil.isEmpty(map.getString("USE_UNIT_CREDIT_CODE")) ? map.getString("USE_UNIT_CREDIT_CODE") : map.getString("useUnitCreditCode");
String param = QueryParser.escape(uucc);
param = param.contains("_") ? param.split("_")[0] : param; param = param.contains("_") ? param.split("_")[0] : param;
uuccBuilder.must(QueryBuilders.matchPhraseQuery("USE_UNIT_CREDIT_CODE", param)); uuccBuilder.must(QueryBuilders.termQuery("USE_UNIT_CREDIT_CODE.keyword", param));
boolMust.must(uuccBuilder); boolMust.must(uuccBuilder);
} }
if (!ObjectUtils.isEmpty(map.getString("USC_UNIT_CREDIT_CODE"))) { if (!ObjectUtils.isEmpty(map.getString("USC_UNIT_CREDIT_CODE"))) {
......
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