From 12d289e319ac1076b94aad69533c668a2a899c67 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期二, 06 二月 2024 13:17:04 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs | 76 ++++++++++++++++++++++++++++++++++++++
1 files changed, 76 insertions(+), 0 deletions(-)
diff --git a/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs b/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs
index 304fa3f..0d3a575 100644
--- a/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs
+++ b/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs
@@ -145,6 +145,53 @@
return objJsonResult;
}
+ if (HInterID == null || HInterID.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓嶈兘涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ string HBillNo = "";
+ ds = oCN.RunProcReturn("select * from Cg_POInStockBillMain where HInterID=" + HInterID, "Cg_POInStockBillMain");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁鏁版嵁锛屾棤娉曞垹闄わ紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ else
+ {
+ HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();
+ }
+
+ //鍒犻櫎鍓嶆帶鍒�=========================================
+ string sql1 = "exec h_p_Cg_POInStockBill_BeforeDelCtrl " + HInterID + ",'" + HBillNo + "','" + user + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_Cg_POInStockBill_BeforeDelCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:鍒犻櫎鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //==================================================================================
+
+
//鍏堝垹闄� 閲戣澏鏁版嵁
objJsonResult = DeleteKingDee(HInterID);
if (objJsonResult.code == "0")
@@ -175,7 +222,36 @@
oCN.RunProc($"delete Cg_POInStockBillSub where HInterID={ HInterID}and HEntryID={HsupId}");
}
+
oCN.Commit();
+
+
+ //鍒犻櫎鍚庢帶鍒�==================================================================================
+ string sql2 = "exec h_p_Cg_POInStockBill_AfterDelCtrl " + HInterID + ",'" + HBillNo + "','" + user + "'";
+ ds = oCN.RunProcReturn(sql2, "h_p_Cg_POInStockBill_AfterDelCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ sReturn = "鍒犻櫎鍚庡垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:" + sReturn;
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ sReturn = ds.Tables[0].Rows[0]["HRemark"].ToString();
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:" + sReturn;
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+ //==============================================================================================
+
+
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
--
Gitblit v1.9.1