Commit cddb32a1 authored by suhuiguang's avatar suhuiguang

refeat(jyjc): 报检规则4.0开发

1.游乐设施可筛选空或者和指定等级的
parent e7a9c4bf
......@@ -1498,7 +1498,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
setFilterByIndefinite(map, type, companyCode, boolMust);
// 设备种类编码
if (!ObjectUtils.isEmpty(map.getString("EQU_LIST_CODE"))) {
boolMust.must(QueryBuilders.termsQuery("EQU_LIST_CODE", QueryParser.escape(map.getString("EQU_LIST_CODE"))));
boolMust.must(QueryBuilders.termQuery("EQU_LIST_CODE", QueryParser.escape(map.getString("EQU_LIST_CODE"))));
}
// 设备类别
if (!ObjectUtils.isEmpty(map.getString("EQU_CATEGORY_CODE"))) {
......@@ -1530,7 +1530,14 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
// 大型游乐设施时按照设备分类过滤
if (!ObjectUtils.isEmpty(map.getString("equipTag1")) && EquipmentClassifityEnum.YLSS.getCode().equals(map.getString("EQU_LIST_CODE"))) {
boolMust.must(QueryBuilders.termQuery("tag1.keyword", QueryParser.escape(map.getString("equipTag1"))));
// 筛选时取本级及空的
String equipTag1 = map.getString("equipTag1");
BoolQueryBuilder orBuilder = QueryBuilders.boolQuery();
orBuilder.should(QueryBuilders.termQuery("tag1.keyword", equipTag1));
orBuilder.should(QueryBuilders.boolQuery().mustNot(QueryBuilders.existsQuery("tag1")));
orBuilder.should(QueryBuilders.boolQuery().must(QueryBuilders.matchPhraseQuery("tag1", "")));
orBuilder.minimumShouldMatch(1);
boolMust.must(orBuilder);
}
// 固定式压力容器按照是否球罐过滤
if (!ObjectUtils.isEmpty(map.getString("equipTag1")) && BizCommonConstant.EQU_CATEGORY_CODE_GDYLRQ.equals(map.getString("EQU_CATEGORY_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