|
|
@@ -941,7 +941,7 @@ public class dispatch extends Controller {
|
|
|
sqlFactory.addParameter("freightstatus", orderRows.get(0).getString("freightstatus"));
|
|
|
sqlFactory.addParameter("billdate", now());
|
|
|
sqlList.add(sqlFactory.getSQL());
|
|
|
- RowsMap orderitemsRowsMap = dbConnect.runSqlQuery("select itemid,itemno,qty,sa_orderitemsid,sa_orderid,remarks from sa_orderitems where isfreeze=0 and siteid='" + siteid + "' and sa_orderid=" + sa_orderid).toRowsMap("sa_orderitemsid");
|
|
|
+ RowsMap orderitemsRowsMap = dbConnect.runSqlQuery("select itemid,itemno,qty,sa_orderitemsid,sa_orderid,remarks,customproperties from sa_orderitems where isfreeze=0 and siteid='" + siteid + "' and sa_orderid=" + sa_orderid).toRowsMap("sa_orderitemsid");
|
|
|
RowsMap dispatchitemsRowsMap;
|
|
|
if (dbConnect.runSqlQuery("select 1 from sys_site_parameter where siteid='" + siteid + "' and dispatch_recheck=1").isEmpty()) {
|
|
|
dispatchitemsRowsMap = dbConnect.runSqlQuery("select sa_orderid,sa_orderitemsid,ifnull(sum(qty),0) qty from sa_dispatch t1 inner join sa_dispatch_items t2 on t1.siteid=t2.siteid and t1.sa_dispatchid=t2.sa_dispatchid where t1.siteid='" + siteid + "' and t1.status in ('审核','关闭') group by t1.sa_orderid,t2.sa_orderitemsid").toRowsMap("sa_orderitemsid");
|
|
|
@@ -978,7 +978,7 @@ public class dispatch extends Controller {
|
|
|
sqlFactory.addParameter("qty", qty);
|
|
|
sqlFactory.addParameter("batchcontrol", 0);
|
|
|
sqlFactory.addParameter("batchno", "");
|
|
|
- sqlFactory.addParameter("remarks", orderRows.get(0).getString("remarks"));
|
|
|
+ sqlFactory.addParameter("remarks", orderitemsRows.get(0).getString("customproperties"));
|
|
|
sqlFactory.addParameter("userid", userid);
|
|
|
sqlFactory.addParameter("username", username);
|
|
|
sqlList.add(sqlFactory.getSQL());
|