|
|
@@ -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;
|
|
|
}
|
|
|
|