Commit b2cfc526 authored by liufan's avatar liufan

优化:设备列表查询接口

parent 9383d3f0
......@@ -553,16 +553,18 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
// 根据当前登录用户类型及管辖机构筛选条件添加对应参数
if (!ValidationUtil.isEmpty(type) && type.contains("使用单位")) {
if(ValidationUtil.isEmpty(map.getString("USE_UNIT_CREDIT_CODE"))){
map.put("USE_UNIT_CREDIT_CODE", companyCode);
if (ObjectUtils.isEmpty(map.getString("SEQUENCE_NBR")) && ObjectUtils.isEmpty(map.getString("useUnitCreditCode"))) {
if (!ValidationUtil.isEmpty(type) && type.contains("使用单位")) {
if(ValidationUtil.isEmpty(map.getString("USE_UNIT_CREDIT_CODE"))){
map.put("USE_UNIT_CREDIT_CODE", companyCode);
}
} else if (!ValidationUtil.isEmpty(type) && type.contains("安装改造维修单位")) {
map.put("USC_UNIT_CREDIT_CODE", companyCode);
}else {
result.setRecords(new ArrayList<>());
result.setTotal(0);
return result;
}
} else if (!ValidationUtil.isEmpty(type) && type.contains("安装改造维修单位")) {
map.put("USC_UNIT_CREDIT_CODE", companyCode);
}else {
result.setRecords(new ArrayList<>());
result.setTotal(0);
return result;
}
// 默认条件【STATUS==="" || null】
......@@ -642,11 +644,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
ubuilder.minimumShouldMatch(1);
boolMust.must(ubuilder);
}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();
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;
uuccBuilder.must(QueryBuilders.matchPhraseQuery("USE_UNIT_CREDIT_CODE", param));
uuccBuilder.must(QueryBuilders.termQuery("USE_UNIT_CREDIT_CODE.keyword", param));
boolMust.must(uuccBuilder);
}
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