|
|
@@ -236,6 +236,21 @@ public class dispatch extends Controller {
|
|
|
where.append(" and t1.sa_dispatchid in").append(str);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if (whereObject.containsKey("sa_orderitemsid") && !"".equals(whereObject.getString("sa_orderitemsid"))) {
|
|
|
+ Rows rowsDispatchid = dbConnect.runSqlQuery("select t1.sa_dispatchid from sa_dispatch_items t1 left join sa_dispatch t2 on t1.sa_dispatchid=t2.sa_dispatchid and t1.siteid=t2.siteid " +
|
|
|
+ " where t2.status !='新建' and t1.siteid='"+siteid+"' and t1.sa_orderitemsid ="+whereObject.getLong("sa_orderitemsid")+"");
|
|
|
+
|
|
|
+ if(rowsDispatchid.toJsonArray("sa_dispatchid").isEmpty()){
|
|
|
+ where.append(" and t1.sa_dispatchid in (0)");
|
|
|
+ }else {
|
|
|
+ String str = rowsDispatchid.toJsonArray("sa_dispatchid").toJSONString();
|
|
|
+ str = str.replace("[", "(").replace("]", ")");
|
|
|
+ where.append(" and t1.sa_dispatchid in" ).append(str);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
// SQLFactory sqlFactory = new SQLFactory(this, "发货单列表查询", pageSize, pageNumber, pageSorting);
|
|
|
// sqlFactory.addParameter("siteid", siteid);
|