From 916f6b186e8eb682143e548db0d326bf1d96ffcc Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期四, 04 一月 2024 17:31:56 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/BaseSet/Gy_CustomerController.cs |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs b/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs
index 2a9d283..7b1ef6a 100644
--- a/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs
@@ -313,6 +313,22 @@
                     ", " + HCusTypeID + ","+ HCreateOrgID + ","+ HUseOrgID + ")");
                 //淇敼涓婄骇涓洪潪鏈骇浠g爜
                 oCN.RunProc("Update Gy_Customer set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+
+                //淇濆瓨鍚庢帶鍒�
+                string sql = "select * from Gy_Customer where HNumber = '" + HNumber + "' and HName = '" + HName + "' and HUSEORGID = " + HUseOrgID;
+                ds = oCN.RunProcReturn(sql, "Gy_Customer");
+                HItemID = Int64.Parse(ds.Tables[0].Rows[0]["HItemID"].ToString());
+                ds = oCN.RunProcReturn("exec h_p_Gy_Customer_AfterSaveCtrl " + HItemID, "h_p_Gy_Customer_AfterSaveCtrl");
+                if (ds.Tables[0].Rows[0]["HBack"].ToString() == "1")
+                {
+                    oCN.RollBack();
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "Exception锛�" + ds.Tables[0].Rows[0]["HBackRemark"].ToString();
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
                 oCN.Commit();
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
@@ -573,6 +589,21 @@
                 //灏嗕笂绾� 涓洪潪鏈骇
                 oCN.RunProc("Update Gy_Customer set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
                 //
+
+                //淇濆瓨鍚庢帶鍒�
+                ds = oCN.RunProcReturn("exec h_p_Gy_Customer_AfterSaveCtrl " + HItemID, "h_p_Gy_Customer_AfterSaveCtrl");
+                if (ds.Tables[0].Rows[0]["HBack"].ToString() == "1")
+                {
+                    oCN.RollBack();
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "Exception锛�" + ds.Tables[0].Rows[0]["HBackRemark"].ToString();
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+
                 oCN.Commit();
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;

--
Gitblit v1.9.1