瀏覽代碼

“已审未发”更改为“仅查未出”

eganwu 1 年之前
父節點
當前提交
47b1737e4d
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      src/custom/restcontroller/webmanage/sale/dispatch/dispatchItems.java

+ 1 - 2
src/custom/restcontroller/webmanage/sale/dispatch/dispatchItems.java

@@ -359,7 +359,7 @@ public class dispatchItems extends Controller {
             if (whereObject.containsKey("isnotsent") && !"".equals(whereObject.getString("isnotsent"))) {
                 if (whereObject.getBooleanValue("isnotsent")) {
                     //System.out.println(" and t4.status ='复核' and  ifnull(t1.outwarehouseqty, 0)< ifnull(t1.qty, 0)");
-                    where.append(" and  ifnull(t1.qty, 0)> ifnull(t1.outwarehouseqty, 0) and  t1.sa_dispatchid in(select t1.sa_dispatchid from sa_dispatch_items t1  LEFT JOIN sa_dispatch t4 ON t4.sa_dispatchid = t1.sa_dispatchid AND t4.siteid = t1.siteid where  t4.status ='复核' and  ifnull(t1.outwarehouseqty, 0)< ifnull(t1.qty, 0) and ifnull(t1.outwarehouseqty, 0)>0)");
+                    where.append(" and t1.sa_dispatchid in(SELECT sa_dispatchid FROM (SELECT sum(outwarehouseqty) outwarehouseqty,sa_dispatchid FROM sa_dispatch_items WHERE siteid='"+siteid+"' GROUP BY sa_dispatchid) a WHERE a.outwarehouseqty=0)");
                 }
             }
         }
@@ -505,7 +505,6 @@ public class dispatchItems extends Controller {
         querySQL.addQueryFields("outwarehouseqty", "ifnull(t1.outwarehouseqty, 0)");
         querySQL.setWhere("t1.siteid", siteid);
         querySQL.setWhere(where);
-        querySQL.setWhere("t4.status in ('审核','复核','关闭','手工关闭')");
         return querySQL;
     }