From 3e4f459b983268fc5b601c181b894ff4fab524a4 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期三, 17 七月 2024 14:12:15 +0800
Subject: [PATCH] 金蝶同步增加字段 首件 巡检 末检 优化

---
 WebAPI/Controllers/条码管理/WEBSController.cs |   39 ++++++++++++++++++++-------------------
 1 files changed, 20 insertions(+), 19 deletions(-)

diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
index 9f88516..32aaaca 100644
--- "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
+++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
@@ -6186,26 +6186,7 @@
                                 HSupIDs = ds.Tables[0].Rows[0]["HItemID"].ToString();
                             }
 
-                            string HSourceInterIDs = "0";
-                            string HSourceEntryIDs = "0";
                             string HSourceBillNos = "0";
-                            string HUnitIDs = "0";
-                            //鏌ヨ閲囪喘璁㈠崟
-                            ds = oCn.RunProcReturn(@"select  a.HInterID,b.HEntryID,a.HBillNo,b.HUnitID from Cg_POOrderBillMain a
-inner join Cg_POOrderBillSub b on a.HInterID = b.HInterID where HBillNo='" + str[3] + "' and b.HMaterID=" + HMaterIDs, "Cg_POOrderBillMain");
-                            if (ds.Tables[0].Rows.Count == 0)
-                            {
-                                //sErrMsg = "鏉$爜瑙f瀽澶辫触,璇风‘璁ゆ潯鐮侀噰璐鍗曟槸鍚︽纭�!";
-                                //return null;
-                            }
-                            else
-                            {
-                                HSourceInterIDs = ds.Tables[0].Rows[0]["HInterID"].ToString();
-                                HSourceEntryIDs = ds.Tables[0].Rows[0]["HEntryID"].ToString();
-                                HSourceBillNos = ds.Tables[0].Rows[0]["HBillNo"].ToString();
-                                HUnitIDs = ds.Tables[0].Rows[0]["HUnitID"].ToString();
-                            }
-
                             string HInnerBillNos = "";
                             //鏌ヨ鍐呴儴閲囪喘璁㈠崟鍙�
                             ds = oCn.RunProcReturn(@" select * from h_v_IF_POInStockList where 閲囪喘璁㈠崟鍙�= '" + str[3] + "' ", "h_v_IF_POInStockList");
@@ -6218,7 +6199,27 @@
                             else
                             {
                                 HInnerBillNos = ds.Tables[0].Rows[0]["鍐呴儴閲囪喘璁㈠崟鍙�"].ToString();
+                                HSourceBillNos = ds.Tables[0].Rows[0]["閲囪喘璁㈠崟鍙�"].ToString();
                             }
+
+                            string HSourceInterIDs = "0";
+                            string HSourceEntryIDs = "0";
+                            string HUnitIDs = "0";
+                            //鏌ヨ閲囪喘璁㈠崟
+                            ds = oCn.RunProcReturn(@"select  a.HInterID,b.HEntryID,a.HBillNo,b.HUnitID from Cg_POOrderBillMain a
+inner join Cg_POOrderBillSub b on a.HInterID = b.HInterID where HBillNo='" + HSourceBillNos + "' and b.HMaterID=" + HMaterIDs, "Cg_POOrderBillMain");
+                            if (ds.Tables[0].Rows.Count == 0)
+                            {
+                                //sErrMsg = "鏉$爜瑙f瀽澶辫触,璇风‘璁ゆ潯鐮侀噰璐鍗曟槸鍚︽纭�!";
+                                //return null;
+                            }
+                            else
+                            {
+                                HSourceInterIDs = ds.Tables[0].Rows[0]["HInterID"].ToString();
+                                HSourceEntryIDs = ds.Tables[0].Rows[0]["HEntryID"].ToString();
+                                HUnitIDs = ds.Tables[0].Rows[0]["HUnitID"].ToString();
+                            }
+
                             double HQty = double.Parse(str[6]);
 
                             //鏃ユ湡鑾峰彇鏂瑰紡

--
Gitblit v1.9.1