Преглед на файлове

订单明细快捷查询优化及总部创建特殊订单账户余额显示错误及订单定制信息需要同步到发货单备注中

hu преди 2 години
родител
ревизия
5a58821ed2

+ 3 - 0
src/custom/restcontroller/webmanage/sale/accountclass/accountclass.java

@@ -165,6 +165,9 @@ public class accountclass extends Controller {
             }
 
         }
+        if(content.containsKey("sys_enterpriseid")){
+            sys_enterpriseid=content.getLongValue("sys_enterpriseid");
+        }
         /*
          * SQL通告板块查询参数设置并查询
          */

+ 1 - 0
src/custom/restcontroller/webmanage/sale/dispatch/SQL/发货商品列表查询.sql

@@ -10,6 +10,7 @@ SELECT t1.sa_orderitemsid,
        t1.undeliqty,
        t1.remarks,
        t1.rowno,
+       t1.customproperties,
        t3.sonum,
        t3.billdate,
        t3.createdate,

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

@@ -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());

+ 1 - 1
src/custom/restcontroller/webmanage/sale/order/OrderItems.java

@@ -745,7 +745,7 @@ public class OrderItems extends Controller {
                 } else if (convenient.equals("待审核")) {
                     where.append(" and t5.status ='提交' ");
                 } else if (convenient.equals("待发货")) {
-                    where.append(" and t5.status not in ('预提交','新建') and not exists(select 1 from st_stockbill_items s1 inner join st_stockbill s2 on s1.st_stockbillid=s2.st_stockbillid and s1.siteid=s2.siteid where s2.status='审核' and s2.rb=1 and s1.sa_orderitemsid=t1.sa_orderitemsid)");
+                    where.append(" and t5.status in ('审核') and not exists(select 1 from st_stockbill_items s1 inner join st_stockbill s2 on s1.st_stockbillid=s2.st_stockbillid and s1.siteid=s2.siteid where s2.status='审核' and s2.rb=1 and s1.sa_orderitemsid=t1.sa_orderitemsid)");
                 } else if (convenient.equals("已发货")) {
                     where.append(" and exists(select 1 from st_stockbill_items s1 inner join st_stockbill s2 on s1.st_stockbillid=s2.st_stockbillid and s1.siteid=s2.siteid where s2.status='审核' and s2.rb=1 and s1.sa_orderitemsid=t1.sa_orderitemsid)");
                 } else if (convenient.equals("已取消")) {