Commit 9eefcdb4 authored by suhuiguang's avatar suhuiguang

reafact(jyjc): 西安电梯筛选

1.西安电梯不让报检
parent d1e7f194
...@@ -127,4 +127,9 @@ public interface BizCommonConstant { ...@@ -127,4 +127,9 @@ public interface BizCommonConstant {
* 业务类型-检测 * 业务类型-检测
*/ */
String BIZ_TYPE_JC = "jc"; String BIZ_TYPE_JC = "jc";
/**
* 西安
*/
String XA_ORG_CODE = "50*52";
} }
...@@ -1585,6 +1585,8 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -1585,6 +1585,8 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
// 设备种类编码 // 设备种类编码
if (!ObjectUtils.isEmpty(map.getString("EQU_LIST_CODE"))) { if (!ObjectUtils.isEmpty(map.getString("EQU_LIST_CODE"))) {
boolMust.must(QueryBuilders.termQuery("EQU_LIST_CODE", QueryParser.escape(map.getString("EQU_LIST_CODE")))); boolMust.must(QueryBuilders.termQuery("EQU_LIST_CODE", QueryParser.escape(map.getString("EQU_LIST_CODE"))));
// todo 西安电梯时不让报检。数据去掉
this.disableXADT(map.getString("EQU_LIST_CODE"), boolMust);
} }
// 设备类别 // 设备类别
if (!ObjectUtils.isEmpty(map.getString("EQU_CATEGORY_CODE"))) { if (!ObjectUtils.isEmpty(map.getString("EQU_CATEGORY_CODE"))) {
...@@ -1667,6 +1669,17 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -1667,6 +1669,17 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
return result; return result;
} }
/**
* 西安电梯时不让做报检
* @param equListCode 设备种类
* @param boolMust 匹配条件
*/
private void disableXADT(String equListCode, BoolQueryBuilder boolMust) {
if(EquipmentClassifityEnum.DT.getCode().equals(equListCode)){
boolMust.mustNot(QueryBuilders.wildcardQuery("ORG_BRANCH_CODE.keyword", QueryParser.escape(BizCommonConstant.XA_ORG_CODE) + "*"));
}
}
private void setSpecificallyFilter(BoolQueryBuilder boolMust, JSONObject map) { private void setSpecificallyFilter(BoolQueryBuilder boolMust, JSONObject map) {
if (ObjectUtils.isEmpty(map.getString("COUNTY"))) { if (ObjectUtils.isEmpty(map.getString("COUNTY"))) {
return; return;
......
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