From be84cd7103a846ad4b7b1601cb5ec9f1447e482d Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期四, 11 一月 2024 09:52:25 +0800
Subject: [PATCH] 工序流转卡派工单保存方法,增加 调用 保存前控制 h_p_Sc_ProcExchSendWorkBill_BeforeSaveCtrl 和保存后控制 h_p_Sc_ProcExchSendWorkBill_AfterSaveCtrl的 存储过程。 工序委外派工单保存方法,增加 调用 保存前控制 h_p_WW_EntrustWorkOrderBill_BeforeSaveCtrl 和保存后控制 h_p_WW_EntrustWorkOrderBill_AfterSaveCtrl的 存储过程。 工序进站接收单保存方法,增加 调用 保存前控制 h_p_Sc_StationInBill_BeforeSaveCtrl 和保存后控制 h_p_Sc_StationInBill_AfterSaveCtrl的 存储过程。 工序出站汇报单保存方法,增加 调用 保存前控制 h_p_Sc_StationOutBill_BeforeSaveCtrl 和保存后控制 h_p_Sc_StationOutBill_AfterSaveCtrl的 存储过程。
---
WebAPI/Controllers/BaseSet/Gy_CustomerController.cs | 72 +++++++++++++++++++++++++++++++++++
1 files changed, 71 insertions(+), 1 deletions(-)
diff --git a/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs b/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs
index e9d3302..c5d51b0 100644
--- a/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs
@@ -131,6 +131,45 @@
}
}
+
+ #region 鑾峰彇褰撳墠鏈�澶х殑瀹㈡埛浠g爜
+ [Route("Gy_Customer/getMaxCusNumber")]
+ [HttpGet]
+ public object getMaxCusNumber()
+ {
+ try
+ {
+ string sql = "select top(1) * from Gy_Customer order by HNumber desc";
+ ds = oCN.RunProcReturn(sql, "Gy_Customer");
+
+ if (ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "灏氭湭瀛樺湪瀹㈡埛锛岃鑷富缁存姢瀹㈡埛浠g爜!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
/// <summary>
/// 鑾峰彇鏈�澶у熀纭�璧勬枡ID
///鍙傛暟锛歴tring sql銆�
@@ -302,7 +341,7 @@
",HSubsidyAccrualRating,HCreditRating,HMaxCreditRating" +
",HCusTypeID,HCREATEORGID,HUSEORGID) " +
" Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + HParentID +
- ", " + HLevel + ",0,'" + HStopflag + "','" + HRemark + "'" +
+ ", " + HLevel + ",1,'" + HStopflag + "','" + HRemark + "'" +
",'" + HShortName + "','" + HAddress + "','" + HLinkMan + "','" + HLinkPhone + "','" + HMobilePhone + "'" +
",'" + HFax + "','" + HPostalCode + "','" + HEmail + "','" + HBank + "','" + HBankAccount + "'" +
",'" + HTaxNum + "'," + HTaxRate + ",'" + HCountry + "','" + HCorMan + "','" + HEnglishName + "'" +
@@ -313,6 +352,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 +628,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