ソースを参照

Merge remote-tracking branch 'origin/develop' into develop

沈静伟 2 年 前
コミット
58345a5947

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

@@ -1,4 +1,5 @@
 SELECT
+       t1.itemid,
        t1.itemno,
        t1.itemname,
        t2.unitname

+ 2 - 1
src/custom/restcontroller/webmanage/sale/dispatch/SQL/发货单明细关联订单列表查询.sql

@@ -5,7 +5,8 @@ SELECT
        t1.rowno  orderRowno,
        t1.price,
        t1.undeliqty,
-       t1.deliedqty
+       t1.deliedqty,
+       t1.sa_orderitemsid
 FROM
 	sa_orderitems t1
 	INNER JOIN sa_order t2 ON t1.sa_orderid = t2.sa_orderid AND t1.siteid = t2.siteid 

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

@@ -345,7 +345,7 @@ public class dispatchItems extends Controller {
         SQLFactory ordersqlFactory = new SQLFactory(this, "发货单明细关联订单列表查询");
         ordersqlFactory.addParameter("siteid", siteid);
         ordersqlFactory.addParameter_in("sa_orderitemsids", rows.toArrayList("sa_orderitemsid",new ArrayList<>()));
-        Rows orderRows = dbConnect.runSqlQuery(itemsqlFactory);
+        Rows orderRows = dbConnect.runSqlQuery(ordersqlFactory);
         RowsMap orderRowsMap =orderRows.toRowsMap("sa_orderitemsid");
 
         for (Row row :rows) {
@@ -434,7 +434,7 @@ public class dispatchItems extends Controller {
     //查询订单列表(管理端)
     public QuerySQL queryListManage(String where) throws YosException {
         QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sa_dispatch_items",
-                "sa_dispatch_itemsid","sa_dispatchid","sa_orderitemsid","isclose","rowno","itemid","outwarehousedate","batchno","remarks","ifnull(t1.qty, 0)"," ifnull(t1.outwarehouseqty, 0)");
+                "sa_dispatch_itemsid","sa_dispatchid","sa_orderitemsid","isclose","rowno","itemid","outwarehousedate","batchno","remarks");
         querySQL.setTableAlias("t1");
         querySQL.addJoinTable(JOINTYPE.left, "sa_dispatch", "t4", "t4.sa_dispatchid = t1.sa_dispatchid AND t4.siteid = t1.siteid",
                 "billno","status","billdate","closedate");
@@ -442,6 +442,8 @@ public class dispatchItems extends Controller {
                 "agentnum");
         querySQL.addJoinTable(JOINTYPE.left, "sys_enterprise", "t10", "t10.sys_enterpriseid = t4.sys_enterpriseid and t10.siteid = t4.siteid",
                 "enterprisename");
+        querySQL.addQueryFields("qty","ifnull(t1.qty, 0)");
+        querySQL.addQueryFields("outwarehouseqty","ifnull(t1.outwarehouseqty, 0)");
         querySQL.setWhere("t1.siteid", siteid);
         querySQL.setWhere(where);
         querySQL.setWhere("t4.status in ('审核','复核','关闭','手工关闭')");

+ 40 - 41
src/custom/restcontroller/webmanage/sale/order/Order.java

@@ -728,6 +728,7 @@ public class Order extends Controller {
             rows.getFieldList().remove("agentnum");
             rows.getFieldList().remove("projectname");
             rows.getFieldList().remove("siteid");
+            rows.getFieldList().remove("billdate");
             rows.getFieldList().remove("createuserid");
             rows.getFieldList().remove("changeuserid");
             rows.getFieldList().remove("createby");
@@ -737,44 +738,40 @@ public class Order extends Controller {
             rows.getFieldList().remove("submitby");
             rows.getFieldList().remove("closeby");
             rows.getFieldList().remove("closedate");
-            rows.getFieldList().remove("rec_contactsid");
-            rows.getFieldList().remove("sa_contractid");
-            rows.getFieldList().remove("sa_projectid");
-            rows.getFieldList().remove("sa_accountclassid");
-            rows.getFieldList().remove("sa_accountclassinfos");
-            rows.getFieldList().remove("sa_brandid");
-
-
-            rows.getFieldList().remove("sys_enterprise_financeid");
-            rows.getFieldList().remove("sa_logiscompid");
-            rows.getFieldList().remove("saler_hrid");
-            rows.getFieldList().remove("createflag");
-            rows.getFieldList().remove("pay_enterpriseid");
-            rows.getFieldList().remove("signbacknum");
-            rows.getFieldList().remove("rebate_used");
-            rows.getFieldList().remove("rebate_userate");
-            rows.getFieldList().remove("billdate");
-            rows.getFieldList().remove("sa_promotionid");
-            rows.getFieldList().remove("tradefieldmx");
-            rows.getFieldList().remove("reviewtype");
-            rows.getFieldList().remove("freightstatus");
-            rows.getFieldList().remove("toolcount");
-            rows.getFieldList().remove("rebateamount");
-            rows.getFieldList().remove("signbackstatus");
-            rows.getFieldList().remove("saletype");
-
-            rows.getFieldList().remove("oldid");
-            rows.getFieldList().remove("projectnote");
-            rows.getFieldList().remove("deleted");
-            rows.getFieldList().remove("abstract");
-            rows.getFieldList().remove("accountclassinfos");
-            rows.getFieldList().remove("updatek3flag");
-            rows.getFieldList().remove("salename");
-
-
-            //添加
-            rows.getFieldList().add("amount");
-            rows.getFieldList().add("qty");
+//            rows.getFieldList().remove("rec_contactsid");
+//            rows.getFieldList().remove("sa_contractid");
+//            rows.getFieldList().remove("sa_projectid");
+//            rows.getFieldList().remove("sa_accountclassid");
+//            rows.getFieldList().remove("sa_accountclassinfos");
+//            rows.getFieldList().remove("sa_brandid");
+//
+//
+//            rows.getFieldList().remove("sys_enterprise_financeid");
+//            rows.getFieldList().remove("sa_logiscompid");
+//            rows.getFieldList().remove("saler_hrid");
+//            rows.getFieldList().remove("createflag");
+//            rows.getFieldList().remove("pay_enterpriseid");
+//            rows.getFieldList().remove("signbacknum");
+//            rows.getFieldList().remove("rebate_used");
+//            rows.getFieldList().remove("rebate_userate");
+//            rows.getFieldList().remove("sa_promotionid");
+//            rows.getFieldList().remove("tradefieldmx");
+//            rows.getFieldList().remove("reviewtype");
+//            rows.getFieldList().remove("freightstatus");
+//            rows.getFieldList().remove("toolcount");
+//            rows.getFieldList().remove("rebateamount");
+//            rows.getFieldList().remove("signbackstatus");
+//            rows.getFieldList().remove("saletype");
+
+//            rows.getFieldList().remove("oldid");
+//            rows.getFieldList().remove("projectnote");
+//            rows.getFieldList().remove("deleted");
+//            rows.getFieldList().remove("abstract");
+//            rows.getFieldList().remove("accountclassinfos");
+//            rows.getFieldList().remove("updatek3flag");
+//            rows.getFieldList().remove("salename");
+            rows.getFieldList().remove("ischange");
+
             Rows uploadRows = uploadExcelToObs("order", "订单列表", rows, getTitleMap());
             return getSucReturnObject().setData(uploadRows).toString();
         }
@@ -786,11 +783,14 @@ public class Order extends Controller {
     public QuerySQL queryListManage(String where) throws YosException {
         QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sa_order",
                 "sa_orderid", "sonum", "type", "status", "submitdate", "checkdate", "remarks", "createby", "checkby", "billdate", "tradefield");
+
         querySQL.setTableAlias("t1");
         querySQL.addJoinTable(JOINTYPE.left, "sys_enterprise", "t2", "t2.sys_enterpriseid = t1.sys_enterpriseid and t2.siteid = t1.siteid",
                 "enterprisename");
         querySQL.addJoinTable(JOINTYPE.left, "sa_agents", "t6", "t6.sys_enterpriseid=t1.sys_enterpriseid and t6.siteid = t1.siteid",
                 "agentnum");
+        querySQL.addQueryFields("amount", "CAST(0 AS CHAR(20))");
+        querySQL.addQueryFields("qty", "CAST(0 AS CHAR(20))");
         querySQL.setWhere("t1.siteid", siteid);
         querySQL.setWhere(where);
         querySQL.setWhere("t1.deleted=0");
@@ -937,9 +937,6 @@ public class Order extends Controller {
             rows.getFieldList().remove("checkdate");
             rows.getFieldList().remove("typemx");
             rows.getFieldList().remove("sys_enterpriseid");
-            //添加
-            rows.getFieldList().add("amount");
-            rows.getFieldList().add("qty");
             Rows uploadRows = uploadExcelToObs("order", "订单列表", rows, getTitleMap());
             return getSucReturnObject().setData(uploadRows).toString();
         }
@@ -971,6 +968,8 @@ public class Order extends Controller {
         querySQL.addQueryFields("salename", "t6.name");
         querySQL.addJoinTable(JOINTYPE.left, "sa_project", "t7", "t7.sa_projectid = t1.sa_projectid and t7.siteid = t1.siteid",
                 "projectname");
+        querySQL.addQueryFields("amount", "CAST(0 AS CHAR(20))");
+        querySQL.addQueryFields("qty", "CAST(0 AS CHAR(20))");
         querySQL.setWhere("t1.siteid", siteid);
         querySQL.setWhere(where);
         querySQL.setWhere("t1.type!='工具借用单'");