Forráskód Böngészése

一期,客户信息列表页导出,渠道筛选从should移到must中

luGuangChen 2 éve
szülő
commit
7e31737d82

+ 6 - 5
dgtis-modules/dgtis-modules-data/src/main/java/com/dgtis/data/api/CustomerApiController.java

@@ -964,6 +964,11 @@ public class CustomerApiController {
                 builder.append("{\"prefix\":{\"label57\":\"最近一次理赔类型\"}},");
             }
 
+            // 渠道不为空的话按渠道筛选
+            if(StringUtils.isNotEmpty(deptCode)){
+                builder.append("{\"wildcard\":{\"salecom\":\"*"+deptCode+"*\"}},");
+            }
+
             if(StringUtils.isNotEmpty(gender) || StringUtils.isNotEmpty(NOVPolicy) || StringUtils.isNotEmpty(custtype)
                     || StringUtils.isNotEmpty(custclass) || StringUtils.isNotEmpty(sobirth) || StringUtils.isNotEmpty(SCustID)
                     || StringUtils.isNotEmpty(beginBirthDay) || StringUtils.isNotEmpty(endBirthDay) || StringUtils.isNotEmpty(education)
@@ -972,7 +977,7 @@ public class CustomerApiController {
                     || (StringUtils.isNotEmpty(lp) && "0".equals(lp)) || /*StringUtils.isNotEmpty(deptCode) ||*/
                     StringUtils.isNotEmpty(participantsDateS) || StringUtils.isNotEmpty(participantsDateE) ||
                     StringUtils.isNotEmpty(policybelong) || StringUtils.isNotEmpty(name) || StringUtils.isNotEmpty(mobile)
-                    || StringUtils.isNotEmpty(fadate)){
+                    || StringUtils.isNotEmpty(fadate) || StringUtils.isNotEmpty(deptCode)){
                 builder.delete(builder.length()-1,builder.length());
             }
 
@@ -1000,10 +1005,6 @@ public class CustomerApiController {
 
             builder.append("],");
             builder.append("\"should\":[");
-            if(StringUtils.isNotEmpty(deptCode)){
-                //
-                builder.append("{\"wildcard\":{\"salecom\":\"*"+deptCode+"*\"}}");
-            }
             //客户证件号码
             if(StringUtils.isNotEmpty(idcard)){
                 builder.append("{\"wildcard\":{\"idcard\":\"*"+idcard+"*\"}},");