From 7b852c102e3325c91e0fba94c5315161747af9ed Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 25 三月 2024 11:55:35 +0800
Subject: [PATCH] 销售出库明细报表
---
WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs | 41 +++++++++++++++++++++++++++++++++++++++--
1 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs b/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs
index 97355c4..5ce8c12 100644
--- a/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs
@@ -498,6 +498,8 @@
objJsonResult.data = null;
return objJsonResult;
}
+ string HBillNo = "";
+ oCN.BeginTran();//寮�濮嬩簨鍔�
ds = oCN.RunProcReturn("select * from Sc_ICMOReportBillMain where HInterID=" + lngBillKey, "Sc_ICMOReportBillMain");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
@@ -505,17 +507,51 @@
objJsonResult.count = 0;
objJsonResult.Message = "娌℃湁鏁版嵁锛屾棤娉曞垹闄わ紒";
objJsonResult.data = null;
+ oCN.RollBack();
return objJsonResult; ;
}
+ else
+ {
+ HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();
+ }
+
+ //鍒犻櫎鍓嶆帶鍒�=========================================
+ DataSet Ds;
+
+ string sql1 = "exec h_p_Sc_ICMOReportBill_BeforeDelCtrl " + HInterID + ",'" + HBillNo + "','" + user + "'";
+ Ds = oCN.RunProcReturn(sql1, "h_p_Sc_ICMOReportBill_BeforeDelCtrl");
+ if (Ds == null || Ds.Tables.Count == 0 || Ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:鍒犻櫎鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+
+ if (Ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:" + Ds.Tables[0].Rows[0]["HRemark"].ToString();
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+ //==================================================================================
+
oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + "" + "','" + "鍒犻櫎鐢熶骇姹囨姤鍗曞崟鎹細" + ds.Tables[0].Rows[0]["HBillNo"].ToString() + "','LMES-鐢熶骇姹囨姤鍗曟ā鍧�','" + DBUtility.ClsPub.IPAddress + "','鍒犻櫎鍗曟嵁'", ref DBUtility.ClsPub.sExeReturnInfo);
- bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+ bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, HBillNo, "h_p_Sc_ICMOReportBill_AfterDelCtrl", user, ref DBUtility.ClsPub.sExeReturnInfo);
if (IsDete)
{
+ oCN.Commit();//鎻愪氦浜嬪姟
+
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
@@ -524,11 +560,11 @@
}
else
{
-
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
objJsonResult.data = null;
+ oCN.RollBack();
return objJsonResult;
}
}
@@ -538,6 +574,7 @@
objJsonResult.count = 0;
objJsonResult.Message = "鍗曟嵁鏈壘鍒�";
objJsonResult.data = null;
+ oCN.RollBack();
return objJsonResult;
}
}
--
Gitblit v1.9.1