From 3e073e3d25f894fa43b800b6ee3c44a847203ddf Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期五, 16 一月 2026 15:33:07 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 119 +++++++++++++++++++++++++++--------------------------------
1 files changed, 55 insertions(+), 64 deletions(-)
diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index b3f8848..6a0abc9 100644
--- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -3243,76 +3243,67 @@
return objJsonResult;
}
- if (oBill.DeleteBill(hmainid, ref DBUtility.ClsPub.sExeReturnInfo))
+ oCN.BeginTran();
+ //鍒犻櫎鍓嶆帶鍒�=========================================
+ ds = oCN.RunProcReturn("Exec h_p_Gy_MouldFile_BeforeDelCtrl " + hmainid + ",'" + User + "'", "h_p_Gy_MouldFile_BeforeDelCtrl");
+
+ if (ds == null)
{
- oCN.BeginTran();
- //鍒犻櫎鍓嶆帶鍒�=========================================
- ds = oCN.RunProcReturn("Exec h_p_Gy_MouldFile_BeforeDelCtrl " + hmainid + ",'" + User + "'", "h_p_Gy_MouldFile_BeforeDelCtrl");
-
- if (ds == null)
- {
- oCN.RollBack();
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鍒犻櫎鍓嶅垽鏂け璐ワ紒";
- objJsonResult.data = null;
- return objJsonResult;
- }
- if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
- {
- oCN.RollBack();
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鍒犻櫎澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
- objJsonResult.data = null;
- return objJsonResult;
- }
- //=========================================================
-
- oCN.RunProc("Delete From Gy_MouldFileSub_MaintainRule where HInterID=" + hmainid);
- oCN.RunProc("Delete From Gy_MouldFileSub_DotCheckRule where HInterID=" + hmainid);
-
- //鍒犻櫎鍚庢帶鍒�=========================================
- DataSet ds2 = oCN.RunProcReturn("Exec h_p_Gy_MouldFile_AfterDelCtrl " + hmainid + ",'" + User + "'", "h_p_Gy_MouldFile_AfterDelCtrl");
- if (ds2 == null)
- {
- oCN.RollBack();
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鍒犻櫎鍚庡垽鏂け璐ワ紒";
- objJsonResult.data = null;
- return objJsonResult;
- }
- if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
- {
- oCN.RollBack();
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鍒犻櫎澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
- objJsonResult.data = null;
- return objJsonResult;
- }
- //=========================================================
-
- oCN.Commit();
- //鍐欏叆鏃ュ織
- ClsPub.Add_Log("", "鍒犻櫎椤圭洰锛屼唬鐮侊細" + oBill.omodel.HMouldNo + ",鍚嶇О锛�" + oBill.omodel.HName, ClsPub.CurUserName);
- //鏇存柊涓婄骇涓� 鏈骇
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "鍒犻櫎鎴愬姛";
- objJsonResult.data = null;
- return objJsonResult;
- }
- else
- {
+ oCN.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍒犻櫎澶辫触";
+ objJsonResult.Message = "鍒犻櫎鍓嶅垽鏂け璐ワ紒";
objJsonResult.data = null;
return objJsonResult;
}
- //ds = oCN.RunProcReturn("delete from Gy_Department where HItemID = " + HItemID, "Gy_Department");
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //=========================================================
+ oCN.RunProc("Delete From Gy_MouldFileMain where HInterID=" + hmainid);
+ oCN.RunProc("Delete From Gy_MouldFileSub where HInterID=" + hmainid);
+ oCN.RunProc("Delete From Gy_MouldFileSub2 where HInterID=" + hmainid);
+ oCN.RunProc("Delete From Gy_MouldFileSub_SubMater where HInterID=" + hmainid);
+ oCN.RunProc("Delete From Gy_MouldFileSub_MaintainRule where HInterID=" + hmainid);
+ oCN.RunProc("Delete From Gy_MouldFileSub_DotCheckRule where HInterID=" + hmainid);
+
+ //鍒犻櫎鍚庢帶鍒�=========================================
+ DataSet ds2 = oCN.RunProcReturn("Exec h_p_Gy_MouldFile_AfterDelCtrl " + hmainid + ",'" + User + "'", "h_p_Gy_MouldFile_AfterDelCtrl");
+ if (ds2 == null)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎鍚庡垽鏂け璐ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //=========================================================
+
+ oCN.Commit();
+ //鍐欏叆鏃ュ織
+ ClsPub.Add_Log("", "鍒犻櫎妯″叿妗f锛屼唬鐮侊細" + oBill.omodel.HMouldNo + ",鍚嶇О锛�" + oBill.omodel.HName, ClsPub.CurUserName);
+ //鏇存柊涓婄骇涓� 鏈骇
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
}
catch (Exception e)
--
Gitblit v1.9.1