From 877a3643ea89282775a2a5ca25a2d79fbdfad0b7 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期四, 05 九月 2024 08:14:56 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/Kf_ICStockBillMainController.cs | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 52 insertions(+), 0 deletions(-)
diff --git a/WebAPI/Controllers/Kf_ICStockBillMainController.cs b/WebAPI/Controllers/Kf_ICStockBillMainController.cs
index 837ed09..c09cec1 100644
--- a/WebAPI/Controllers/Kf_ICStockBillMainController.cs
+++ b/WebAPI/Controllers/Kf_ICStockBillMainController.cs
@@ -156,9 +156,35 @@
else
{
string HCheckDate = DateTime.Now.Date.ToString();
+ oCN.BeginTran();
oCN.RunProc(" Update Kf_ICStockBillMain set HChecker='" + CurUserName + "',HCheckDate='" + HCheckDate + "',HBillStatus=2 Where HBillType='1247' and HInterID=" + HInterID);
//瀹℃牳鏇存柊 鍙婃椂搴撳瓨琛� 澧炲姞搴撳瓨
ds = oCN.RunProcReturn("exec h_KF_UPDateICinventory '" + oBill.omodel.HInterID + "','" + oBill.omodel.HBillType + "','1'", "h_KF_UPDateICinventory");
+
+ //=========================瀹℃牳鍙嶅鏍稿悗璐熷簱瀛樻帶鍒�
+ DataSet ds2 = oCN.RunProcReturn("Exec h_p_KF_ICinventoryStockCtrl '" + oBill.omodel.HInterID + "', '" + oBill.omodel.HBillType + "'", "h_p_KF_ICinventoryStockCtrl");
+ if (ds2 == null)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + "搴撳瓨鏇存柊鍚庢帶鍒跺垽鏂け璐�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ oCN.RollBack();
+ string sReturn = "搴撳瓨鏇存柊澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + sReturn;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //============================
+
+ oCN.Commit();
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "瀹℃牳鎴愬姛锛�";
@@ -179,9 +205,35 @@
else
{
string HCheckDate = DateTime.Now.Date.ToString();
+ oCN.BeginTran();
oCN.RunProc(" Update Kf_ICStockBillMain set HChecker=' ',HCheckDate=null,HBillStatus=1 Where HBillType='1247' and HInterID=" + HInterID);
//瀹℃牳鏇存柊 鍙婃椂搴撳瓨琛� 鍑忓皯搴撳瓨
ds = oCN.RunProcReturn("exec h_KF_UPDateICinventory '" + oBill.omodel.HInterID + "','" + oBill.omodel.HBillType + "','2'", "h_KF_UPDateICinventory");
+
+ //=========================瀹℃牳鍙嶅鏍稿悗璐熷簱瀛樻帶鍒�
+ DataSet ds2 = oCN.RunProcReturn("Exec h_p_KF_ICinventoryStockCtrl '" + oBill.omodel.HInterID + "', '" + oBill.omodel.HBillType + "'", "h_p_KF_ICinventoryStockCtrl");
+ if (ds2 == null)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + "搴撳瓨鏇存柊鍚庢帶鍒跺垽鏂け璐�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ oCN.RollBack();
+ string sReturn = "搴撳瓨鏇存柊澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + sReturn;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //============================
+
+ oCN.Commit();
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "鍙嶅鏍告垚鍔燂紒";
--
Gitblit v1.9.1