Kaynağa Gözat

凭证添加查询条件

hu 3 yıl önce
ebeveyn
işleme
b3aec6c522

+ 12 - 0
src/custom/restcontroller/sale/cashbill/cashbill.java

@@ -408,6 +408,7 @@ public class cashbill extends Controller {
                         + "  or t2.abbreviation like '%" + whereObject.getString("condition") + "%'"
                         + "  or t1.billno like '%" + whereObject.getString("condition") + "%'"
                         + "  or t1.remarks like '%" + whereObject.getString("condition") + "%'"
+                        + "  or t4.agentnum like '%" + whereObject.getString("condition") + "%'"
                         + ")";
             }
             if (whereObject.containsKey("status") && !"".equals(whereObject.getString("status"))) {
@@ -428,6 +429,11 @@ public class cashbill extends Controller {
             if (whereObject.containsKey("isrebate") && !"".equals(whereObject.getString("isrebate"))) {
                 where = where + " and ifnull(t3.isrebate,0) ='" + whereObject.getLongValue("isrebate") + "'";
             }
+            if (whereObject.containsKey("agentinfo") && !"".equals(whereObject.getString("agentinfo"))) {
+                where = where + " and(t2.enterprisename like'%" + whereObject.getString("agentinfo")+ "%'"
+                        + "  or t4.agentnum like '%" + whereObject.getString("agentinfo") + "%'"
+                        + ")";
+            }
         }
         SQLFactory sqlFactory = new SQLFactory(this, "收支凭证列表查询", pageSize, pageNumber, pageSorting);
         sqlFactory.addParameter_SQL("where", where);
@@ -463,6 +469,7 @@ public class cashbill extends Controller {
                         + "%' or t3.accountname like '%" + whereObject.getString("condition") + "%'"
                         + "  or t2.abbreviation like '%" + whereObject.getString("condition") + "%'"
                         + "  or t1.billno like '%" + whereObject.getString("condition") + "%'"
+                        + "  or t4.agentnum like '%" + whereObject.getString("condition") + "%'"
                         + ")";
             }
             if (whereObject.containsKey("status") && !"".equals(whereObject.getString("status"))) {
@@ -483,6 +490,11 @@ public class cashbill extends Controller {
             if (whereObject.containsKey("isrebate") && !"".equals(whereObject.getString("isrebate"))) {
                 where = where + " and ifnull(t3.isrebate,0) ='" + whereObject.getLongValue("isrebate") + "'";
             }
+            if (whereObject.containsKey("agentinfo") && !"".equals(whereObject.getString("agentinfo"))) {
+                where = where + " and(t2.enterprisename like'%" + whereObject.getString("agentinfo")+ "%'"
+                        + "  or t4.agentnum like '%" + whereObject.getString("agentinfo") + "%'"
+                        + ")";
+            }
         }
         SQLFactory sqlFactory = new SQLFactory(this, "收支凭证列表查询", pageSize, pageNumber, pageSorting);
         sqlFactory.addParameter_SQL("where", where);