ソースを参照

发货单新增bug修复

hu 3 年 前
コミット
0a5ff32551

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

@@ -59,21 +59,21 @@ public class dispatch extends Controller {
         if (sa_dispatchid <= 0) {
         if (sa_dispatchid <= 0) {
             sa_dispatchid = createTableID(tableName);
             sa_dispatchid = createTableID(tableName);
             Rows rowsinfo = dbConnect
             Rows rowsinfo = dbConnect
-                    .runSqlQuery("select remarks,rec_contactsid,sys_enterpriseid,freightstatus from sa_order where sa_orderid="
-                            + sa_orderid);
+                    .runSqlQuery("select rec_contactsid from sys_enterprise_contacts where workaddress=1 and sys_enterpriseid="
+                            + content.getLong("sys_enterpriseid"));
             if (rowsinfo.isEmpty()) {
             if (rowsinfo.isEmpty()) {
                 //return getErrReturnObject().setErrMsg("该订单不存在").toString();
                 //return getErrReturnObject().setErrMsg("该订单不存在").toString();
             }
             }
             sqlFactory.addParameter("sa_orderid", sa_orderid);
             sqlFactory.addParameter("sa_orderid", sa_orderid);
             // 订货企业id
             // 订货企业id
-            sqlFactory.addParameter("sys_enterpriseid", rowsinfo.get(0).getLong("sys_enterpriseid"));
+            sqlFactory.addParameter("sys_enterpriseid",content.getLong("sys_enterpriseid"));
             // 物流公司档案ID
             // 物流公司档案ID
             //sqlFactory.addParameter("sa_logiscompid", rowsinfo.get(0).getLong("sa_logiscompid"));
             //sqlFactory.addParameter("sa_logiscompid", rowsinfo.get(0).getLong("sa_logiscompid"));
             // 合作企业联系人表ID(收货信息)
             // 合作企业联系人表ID(收货信息)
             sqlFactory.addParameter("rec_contactsid", rowsinfo.get(0).getLong("rec_contactsid"));
             sqlFactory.addParameter("rec_contactsid", rowsinfo.get(0).getLong("rec_contactsid"));
             //运费状态
             //运费状态
-            sqlFactory.addParameter("freightstatus", rowsinfo.get(0).getString("freightstatus"));
-            sqlFactory.addParameter("remarks", rowsinfo.get(0).getString("remarks"));
+            sqlFactory.addParameter("freightstatus","");
+            sqlFactory.addParameter("remarks",remarks);
             sqlFactory.addParameter("billdate", now());
             sqlFactory.addParameter("billdate", now());
             sqlList.add(DataContrlLog.createLog(this, "sa_dispatch", sa_dispatchid, "新增", "发货单新增成功").getSQL());
             sqlList.add(DataContrlLog.createLog(this, "sa_dispatch", sa_dispatchid, "新增", "发货单新增成功").getSQL());
         } else {
         } else {