From 9d4fdc8ef43bfcafdb4a0f3e0e3d59cef1812b15 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期五, 27 三月 2026 09:29:26 +0800
Subject: [PATCH] 合并分支

---
 WebAPI/Controllers/仓存管理/验收入库/Kf_ProductInBillController.cs |   64 ++++++++++++++++----------------
 1 files changed, 32 insertions(+), 32 deletions(-)

diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_ProductInBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_ProductInBillController.cs"
index 764034f..121eaa5 100644
--- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_ProductInBillController.cs"
+++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_ProductInBillController.cs"
@@ -1672,39 +1672,39 @@
 
 
                 // 鍒ゆ柇 鏁版嵁搴撲腑鏄惁瀛樺湪id鍜屽崟鎹彿鐩哥瓑鐨勬墦鍗曟嵁锛屽瓨鍦紝鍒欓噸寤猴紝鍙湁id鍙风浉绛夛紝鍒欑敵璇锋柊鐨刬d鍙�
-                // var ds1 = oCn.RunProcReturn($@"
-                // select hmainid HInterID, 鍗曟嵁鍙� HBillNO from h_v_Kf_ProductInBillList where hmainid = {mainList[0].HInterID}
-                // ", "h_v_Kf_ProductInBillList");
-                // var HInterID_Old = mainList[0].HInterID;
-                // if (ds1.Tables[0].Rows.Count > 0 && ds1.Tables[0].Rows[0]["HInterID"] != null)
-                // {
-                //     if (string.Equals(ds1.Tables[0].Rows[0]["HBillNo"].ToString(), mainList[0].HBillNo, StringComparison.OrdinalIgnoreCase))
-                //     {
-                //         string sql = string.Empty;
-                //         sql = $"delete Kf_ICStockBillMain where HinterID = {mainList[0].HInterID}";
-                //         oCn.RunProc(sql);
-                //         sql = $"delete Kf_ICStockBillSub where HinterID = {mainList[0].HInterID}";
-                //         oCn.RunProc(sql);
-                //     }
-                //     else
-                //     {
-                //         // 閲嶆柊鐢宠HInterID
-                //         var HInterID_Exch = DBUtility.ClsPub.CreateBillID("1202", ref DBUtility.ClsPub.sExeReturnInfo);
-                //         mainList[0].HInterID = HInterID_Exch;
-                // 
-                //         foreach (var oSub in subList)
-                //         {
-                //             oSub.HInterID = HInterID_Exch;
-                //         }
-                // 
-                //     }
-                // }
+                var ds1 = oCn.RunProcReturn($@"
+                select hmainid HInterID, 鍗曟嵁鍙� HBillNO from h_v_Kf_ProductInBillList where hmainid = {mainList[0].HInterID}
+                ", "h_v_Kf_ProductInBillList");
+                var HInterID_Old = mainList[0].HInterID;
+                if (ds1.Tables[0].Rows.Count > 0 && ds1.Tables[0].Rows[0]["HInterID"] != null)
+                {
+                    if (string.Equals(ds1.Tables[0].Rows[0]["HBillNo"].ToString(), mainList[0].HBillNo, StringComparison.OrdinalIgnoreCase))
+                    {
+                        string sql = string.Empty;
+                        sql = $"delete Kf_ICStockBillMain where HinterID = {mainList[0].HInterID}";
+                        oCn.RunProc(sql);
+                        sql = $"delete Kf_ICStockBillSub where HinterID = {mainList[0].HInterID}";
+                        oCn.RunProc(sql);
+                    }
+                    else
+                    {
+                        // 閲嶆柊鐢宠HInterID
+                        var HInterID_Exch = DBUtility.ClsPub.CreateBillID("1202", ref DBUtility.ClsPub.sExeReturnInfo);
+                        mainList[0].HInterID = HInterID_Exch;
+                
+                        foreach (var oSub in subList)
+                        {
+                            oSub.HInterID = HInterID_Exch;
+                        }
+                
+                    }
+                }
 
-                string sql = string.Empty;
-                sql = $"delete Kf_ICStockBillMain where HinterID = {mainList[0].HInterID}";
-                oCn.RunProc(sql);
-                sql = $"delete Kf_ICStockBillSub where HinterID = {mainList[0].HInterID}";
-                oCn.RunProc(sql);
+                // string sql = string.Empty;
+                // sql = $"delete Kf_ICStockBillMain where HinterID = {mainList[0].HInterID}";
+                // oCn.RunProc(sql);
+                // sql = $"delete Kf_ICStockBillSub where HinterID = {mainList[0].HInterID}";
+                // oCn.RunProc(sql);
                 // 涓昏〃
                 oCn.RunProc($@"Insert Into Kf_ICStockBillMain 
                 (

--
Gitblit v1.9.1