Просмотр исходного кода

发票申请搜索条件调整

沈静伟 4 лет назад
Родитель
Сommit
948c5316db

+ 3 - 3
src/rest/openapi/restcontroller/wechatapp/tinvoiceapply/Tinvoiceapply.java

@@ -31,15 +31,15 @@ public class Tinvoiceapply extends Controller {
         if (content.containsKey("where")) {
             JSONObject whereObject = content.getJSONObject("where");
             if (whereObject.containsKey("condition") && !"".equals(whereObject.getString("condition"))) {
-                where = where + " and (t1.finvoicename like'%" + whereObject.getString("condition") + "%' " +
+                where = where + " and (t3.fagentname like'%" + whereObject.getString("condition") + "%' or t3.fagentshortname like'%" + whereObject.getString("condition") + "%' or t1.finvoicename like'%" + whereObject.getString("condition") + "%' " +
                         "or exists(select tinvoicebillid from tinvoicebill where siteid=t1.siteid and tinvoiceapplyid=t1.tinvoiceapplyid and (invoicecode like'%" + whereObject.getString("condition") + "%' or invoiceno like'%" + whereObject.getString("condition") +
                         "%')))";
             }
             if (whereObject.containsKey("fbegdate") && !"".equals(whereObject.getString("fbegdate"))) {
-                where = where + " and t1.createdate >='" + whereObject.getString("fbegdate") + "'";
+                where = where + " and t1.checkdate >='" + whereObject.getString("fbegdate") + "'";
             }
             if (whereObject.containsKey("fenddate") && !"".equals(whereObject.getString("fenddate"))) {
-                where = where + " and t1.createdate <='" + whereObject.getString("fenddate") + "'";
+                where = where + " and t1.checkdate <='" + whereObject.getString("fenddate") + "'";
             }
         }
         SQLFactory factory = new SQLFactory(this, "¾­ÏúÉÌ·¢Æ±Áбí²éѯ", pageSize, pageNumber, sort);

+ 3 - 3
src/rest/openapi/restcontroller/wechatapp/tinvoiceapply/Tinvoiceapply_saler.java

@@ -31,15 +31,15 @@ public class Tinvoiceapply_saler extends Controller {
         if (content.containsKey("where")) {
             JSONObject whereObject = content.getJSONObject("where");
             if (whereObject.containsKey("condition") && !"".equals(whereObject.getString("condition"))) {
-                where = where + " and (t1.finvoicename like'%" + whereObject.getString("condition") + "%' " +
+                where = where + " and (t3.fagentname like'%" + whereObject.getString("condition") + "%' or t3.fagentshortname like'%" + whereObject.getString("condition") + "%' or t1.finvoicename like'%" + whereObject.getString("condition") + "%' " +
                         "or exists(select tinvoicebillid from tinvoicebill where siteid=t1.siteid and tinvoiceapplyid=t1.tinvoiceapplyid and (invoicecode like'%" + whereObject.getString("condition") + "%' or invoiceno like'%" + whereObject.getString("condition") +
                         "%')))";
             }
             if (whereObject.containsKey("fbegdate") && !"".equals(whereObject.getString("fbegdate"))) {
-                where = where + " and t1.createdate >='" + whereObject.getString("fbegdate") + "'";
+                where = where + " and t1.checkdate >='" + whereObject.getString("fbegdate") + "'";
             }
             if (whereObject.containsKey("fenddate") && !"".equals(whereObject.getString("fenddate"))) {
-                where = where + " and t1.createdate <='" + whereObject.getString("fenddate") + "'";
+                where = where + " and t1.checkdate <='" + whereObject.getString("fenddate") + "'";
             }
             if (whereObject.containsKey("fstatus") && !"".equals(whereObject.getString("fstatus"))) {
                 where = where + " and t1.fstatus ='" + whereObject.getString("fstatus") + "'";