Sfoglia il codice sorgente

销售出库单列表查询参数变更

hu 1 mese fa
parent
commit
1672cafcd0

+ 9 - 15
src/custom/restcontroller/webmanage/sale/stockbill/stockbill.java

@@ -199,22 +199,16 @@ public class stockbill extends Controller {
             }
 
 
-            if (whereObject.containsKey("past15days") && !"".equals(whereObject.getString("past15days"))) {
-                if(whereObject.getBooleanValue("past15days")){
-                    where.append("and DATE_FORMAT(t1.billdate, '%Y-%m-%d') >=DATE_SUB(CURDATE(), INTERVAL 15 DAY)");
-                }
-
-            }
-            if (whereObject.containsKey("past30days") && !"".equals(whereObject.getString("past30days"))) {
-                if(whereObject.getBooleanValue("past30days")){
+            if (whereObject.containsKey("dateinterval") && !"".equals(whereObject.getString("dateinterval"))) {
+                if(whereObject.getString("dateinterval").equals("past30days")){
                     where.append("and DATE_FORMAT(t1.billdate, '%Y-%m-%d') >=DATE_SUB(CURDATE(), INTERVAL 30 DAY)");
-                }
-            }
-            if (whereObject.containsKey("today") && !"".equals(whereObject.getString("today"))) {
-                if(whereObject.getBooleanValue("today")){
+                } else if (whereObject.getString("dateinterval").equals("past15days")) {
+                    where.append("and DATE_FORMAT(t1.billdate, '%Y-%m-%d') >=DATE_SUB(CURDATE(), INTERVAL 15 DAY)");
+                }else if (whereObject.getString("dateinterval").equals("today")) {
                     where.append("and DATE_FORMAT(t1.billdate, '%Y-%m-%d') >=CURDATE()");
                 }
             }
+
             if (whereObject.containsKey("checknoprint") && !"".equals(whereObject.getString("checknoprint"))) {
                 if(whereObject.getBooleanValue("checknoprint")){
                     where.append("and t1.status ='审核' and isreport=0");
@@ -225,9 +219,9 @@ public class stockbill extends Controller {
                     where.append("and t1.isreceiver=0 and ifnull(txlogisticid,'')='' ");
                 }
             }
-//            if (whereObject.containsKey("paynocheck") && !"".equals(whereObject.getString("paynocheck"))) {
-//                where.append("and t1.remarks like'%").append(whereObject.getString("remarks")).append("%' ");
-//            }
+            if (whereObject.containsKey("paynocheck") && !"".equals(whereObject.getString("paynocheck"))) {
+                where.append("and t1.status ='新建' and delivery='到付'");
+            }
 
 
             if (whereObject.containsKey("param") && !"".equals(whereObject.getString("param"))) {