From 0910a653b936af52e97633c70f6d6dee3f3f5a2b Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期二, 21 十月 2025 16:55:55 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs | 64 ++++++++++++++++----------------
1 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs b/WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs
index ba1fba1..038a859 100644
--- a/WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs
+++ b/WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs
@@ -2115,39 +2115,39 @@
List<ClsKf_ICStockBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsKf_ICStockBillSub>>(entry);
// 鍒ゆ柇 鏁版嵁搴撲腑鏄惁瀛樺湪id鍜屽崟鎹彿鐩哥瓑鐨勫崟鎹紝瀛樺湪锛屽垯閲嶅缓锛屽彧鏈塱d鍙风浉绛夛紝鍒欑敵璇锋柊鐨刬d鍙�
- // var ds1 = oCN.RunProcReturn($@"
- // select hmainid HInterID, 鍗曟嵁鍙� HBillNO from h_v_Kf_POStockInBillList where hmainid = {mainList[0].HInterID}
- // ", "h_v_Kf_POStockInBillList");
- // 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("1201", 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_POStockInBillList where hmainid = {mainList[0].HInterID}
+ ", "h_v_Kf_POStockInBillList");
+ 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("1201", 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