Commit 361213f1 authored by suhuiguang's avatar suhuiguang

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

1.首检时不按照地市区县过滤,只作为规则匹配条件
parent 8e1683e6
...@@ -1519,13 +1519,16 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -1519,13 +1519,16 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
if (!ObjectUtils.isEmpty(map.getString("EQU_DEFINE_CODE"))) { if (!ObjectUtils.isEmpty(map.getString("EQU_DEFINE_CODE"))) {
boolMust.must(QueryBuilders.termQuery("EQU_DEFINE_CODE.keyword", QueryParser.escape(map.getString("EQU_DEFINE_CODE")))); boolMust.must(QueryBuilders.termQuery("EQU_DEFINE_CODE.keyword", QueryParser.escape(map.getString("EQU_DEFINE_CODE"))));
} }
String inspectionType = map.getString("inspectionType");
// 非首次检验时,需要按照选择的地市区县过滤;首检的地市只作为报检规则的匹配条件
if(!JYJCBusinessTypeEnum.SCJY.getCode().equals(inspectionType)){
// 地市 // 地市
if (!ObjectUtils.isEmpty(map.getString("CITY"))) { if (!ObjectUtils.isEmpty(map.getString("CITY"))) {
boolMust.must(QueryBuilders.wildcardQuery("USE_PLACE_CODE", "*" + map.getString("CITY") + "*")); boolMust.must(QueryBuilders.wildcardQuery("USE_PLACE_CODE", "*" + map.getString("CITY") + "*"));
} }
// 区县筛选设置。雁塔时去掉高新数据;高新、经开、西咸时按照属地监管部门过滤 // 区县筛选设置,雁塔时去掉高新数据;高新、经开、西咸时按照属地监管部门过滤
this.setSpecificallyFilter(boolMust, map); this.setSpecificallyFilter(boolMust, map);
}
// 设备代码模糊查询 // 设备代码模糊查询
if (!ObjectUtils.isEmpty(map.getString(EQU_CODE))) { if (!ObjectUtils.isEmpty(map.getString(EQU_CODE))) {
String test = QueryParser.escape(map.getString(EQU_CODE)); String test = QueryParser.escape(map.getString(EQU_CODE));
...@@ -1665,8 +1668,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -1665,8 +1668,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
boolMust.mustNot(QueryBuilders.termsQuery("SEQUENCE_NBR.keyword", records)); boolMust.mustNot(QueryBuilders.termsQuery("SEQUENCE_NBR.keyword", records));
} }
// 流动时起重机械及厂车可直接做首检 // 流动时起重机械及厂车可直接做首检
if (JYJCBusinessTypeEnum.WTJY.getCode().equals(inspectionType) || if (("5000".equals(equListCode) || "4400".equals(equCategoryCode)) && JYJCBusinessTypeEnum.SCJY.getCode().equals(inspectionType)) {
(("5000".equals(equListCode) || "4400".equals(equCategoryCode)) && JYJCBusinessTypeEnum.SCJY.getCode().equals(inspectionType))) {
// 5000/4400 且是首检,或是委托检验,都不需要进入管理 // 5000/4400 且是首检,或是委托检验,都不需要进入管理
boolMust.must(QueryBuilders.termQuery("IS_INTO_MANAGEMENT", false)); boolMust.must(QueryBuilders.termQuery("IS_INTO_MANAGEMENT", false));
} else { } else {
......
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