Prechádzať zdrojové kódy

刷订单保修状态及bug修复

wu 3 dní pred
rodič
commit
baa1714326

+ 20 - 7
src/custom/restcontroller/webmanage/sale/salestarget/enterprisetarget.java

@@ -177,17 +177,30 @@ public class enterprisetarget extends Controller {
             sys_enterpriseids.add(content_where.getLong("sys_enterpriseid"));
         }
         if (content_where.containsKey("tablefilter")) {
-            if(content_where.getJSONObject("tablefilter").containsKey("enterprisename")){
-                if(StringUtils.isNotBlank(content_where.getJSONObject("tablefilter").getStringValue("enterprisename"))){
+            if (content_where.getJSONObject("tablefilter").containsKey("enterprisename")) {
+                String enterprisename = content_where.getJSONObject("tablefilter").getStringValue("enterprisename");
+                if (StringUtils.isNotBlank(enterprisename)) {
+                    enterprisename = enterprisename.replace("=", "");
                     where1.append(" and(");
-                    where1.append(" t1.enterprisename like '%").append(content_where.getJSONObject("tablefilter").getStringValue("enterprisename")).append("%' ");
+                    where1.append(" t1.enterprisename like '%").append(enterprisename).append("%' ");
                     where1.append(")");
                 }
             }
-            if(content_where.getJSONObject("tablefilter").containsKey("abbreviation")){
-                if(StringUtils.isNotBlank(content_where.getJSONObject("tablefilter").getStringValue("abbreviation"))){
+            if (content_where.getJSONObject("tablefilter").containsKey("agentnum")) {
+                String agentnum = content_where.getJSONObject("tablefilter").getStringValue("agentnum");
+                if (StringUtils.isNotBlank(agentnum)) {
+                    agentnum = agentnum.replace("=", "");
                     where1.append(" and(");
-                    where1.append(" t1.abbreviation like '%").append(content_where.getJSONObject("tablefilter").getStringValue("abbreviation")).append("%' ");
+                    where1.append(" t2.agentnum like '%").append(agentnum).append("%' ");
+                    where1.append(")");
+                }
+            }
+            if (content_where.getJSONObject("tablefilter").containsKey("abbreviation")) {
+                String abbreviation = content_where.getJSONObject("tablefilter").getStringValue("abbreviation");
+                if (StringUtils.isNotBlank(abbreviation)) {
+                    abbreviation = abbreviation.replace("=", "");
+                    where1.append(" and(");
+                    where1.append(" t1.abbreviation like '%").append(abbreviation).append("%' ");
                     where1.append(")");
                 }
             }
@@ -213,7 +226,7 @@ public class enterprisetarget extends Controller {
         sqlFactory.addParameter_in("sys_enterpriseids", sys_enterpriseids);
         sqlFactory.addParameter("siteid", siteid);
         String sql = sqlFactory.getSQL();
-        System.err.println( sql);
+        System.err.println(sql);
         Rows rows = dbConnect.runSqlQuery(sql);
         if (totalRows > 0) {
             rows.totalRows = totalRows;