Explorar el Código

收支凭证添加归属日期区间查询

hu hace 1 año
padre
commit
2877b88dee
Se han modificado 1 ficheros con 12 adiciones y 0 borrados
  1. 12 0
      src/custom/restcontroller/sale/cashbill/cashbill.java

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

@@ -451,6 +451,12 @@ public class cashbill extends Controller {
             if (whereObject.containsKey("enddate") && !"".equals(whereObject.getString("enddate"))) {
                 where = where + " and DATE_FORMAT(t1.createdate, '%Y-%m-%d') <='" + whereObject.getString("enddate") + "'";
             }
+            if (whereObject.containsKey("beginperiod") && !"".equals(whereObject.getString("beginperiod"))) {
+                where = where + " and t1.period >='" + whereObject.getString("beginperiod") + "' ";
+            }
+            if (whereObject.containsKey("endperiod") && !"".equals(whereObject.getString("endperiod"))) {
+                where = where + " and t1.period <='" + whereObject.getString("endperiod") + "' ";
+            }
             if (whereObject.containsKey("billno") && !"".equals(whereObject.getString("billno"))) {
                 where = where + " and t1.billno ='" + whereObject.getString("billno") + "'";
             }
@@ -567,6 +573,12 @@ public class cashbill extends Controller {
             if (whereObject.containsKey("enddate") && !"".equals(whereObject.getString("enddate"))) {
                 where = where + " and DATE_FORMAT(t1.createdate, '%Y-%m-%d') <='" + whereObject.getString("enddate") + "'";
             }
+            if (whereObject.containsKey("beginperiod") && !"".equals(whereObject.getString("beginperiod"))) {
+                where = where + " and t1.period >='" + whereObject.getString("beginperiod") + "' ";
+            }
+            if (whereObject.containsKey("endperiod") && !"".equals(whereObject.getString("endperiod"))) {
+                where = where + " and t1.period <='" + whereObject.getString("endperiod") + "' ";
+            }
             if (whereObject.containsKey("billno") && !"".equals(whereObject.getString("billno"))) {
                 where = where + " and t1.billno ='" + whereObject.getString("billno") + "'";
             }