Commit fefe1dcb authored by suhuiguang's avatar suhuiguang

1.气瓶appid检索

parent dacbb98e
...@@ -337,6 +337,14 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -337,6 +337,14 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
boolMust.must(query); boolMust.must(query);
} }
//应用id
if (!ObjectUtils.isEmpty(esCylinderFillingRecordDto.getAppId())) {
flag = false;
BoolQueryBuilder query = QueryBuilders.boolQuery();
query.must(QueryBuilders.termsQuery("appId", esCylinderFillingRecordDto.getAppId().toLowerCase()));
boolMust.must(query);
}
//匹配气瓶品种 //匹配气瓶品种
if (!ObjectUtils.isEmpty(esCylinderFillingRecordDto.getCylinderVariety())) { if (!ObjectUtils.isEmpty(esCylinderFillingRecordDto.getCylinderVariety())) {
flag = false; flag = false;
......
...@@ -903,14 +903,15 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind ...@@ -903,14 +903,15 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
boolMust.should(appIdBuilder); boolMust.should(appIdBuilder);
} }
//匹配appid //应用id
if (!ObjectUtils.isEmpty(cylinderInfoDto.getAppId())) { if (!ObjectUtils.isEmpty(cylinderInfoDto.getAppId())) {
flag = false; flag = false;
BoolQueryBuilder appIdBuilder = QueryBuilders.boolQuery(); BoolQueryBuilder query = QueryBuilders.boolQuery();
appIdBuilder.must(QueryBuilders.matchQuery("appId", "*" + cylinderInfoDto.getAppId() + "*")); query.must(QueryBuilders.termsQuery("appId", cylinderInfoDto.getAppId().toLowerCase()));
boolMust.should(appIdBuilder); boolMust.must(query);
} }
//匹配产权单位 //匹配产权单位
if (!ObjectUtils.isEmpty(cylinderInfoDto.getUnitName())) { if (!ObjectUtils.isEmpty(cylinderInfoDto.getUnitName())) {
flag = false; flag = false;
......
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