From bf0c89740cc3a81c63ff382b2a7f9db3f5aa9d99 Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期五, 10 十一月 2023 11:43:43 +0800 Subject: [PATCH] 信用额度申请单:反写客户信息额度改为使用存储过程反写 --- WebAPI/Controllers/XSGL/Xs_CusRatingChangeBillController.cs | 32 +++++++------------------------- 1 files changed, 7 insertions(+), 25 deletions(-) diff --git a/WebAPI/Controllers/XSGL/Xs_CusRatingChangeBillController.cs b/WebAPI/Controllers/XSGL/Xs_CusRatingChangeBillController.cs index d8ed3a9..cc84359 100644 --- a/WebAPI/Controllers/XSGL/Xs_CusRatingChangeBillController.cs +++ b/WebAPI/Controllers/XSGL/Xs_CusRatingChangeBillController.cs @@ -468,34 +468,16 @@ //杩涜闇�瑕佽繘琛岀殑瀹℃牳/鍙嶅鏍告搷浣� if (IsAudit == 0) //瀹℃牳鎻愪氦 { - //鍙嶅啓瀹㈡埛淇$敤棰濆害 - oCN.BeginTran(); - string sql = "select * from Gy_Customer_Credit where HCusID = " + oBill.omodel.HCusID; - ds = oCN.RunProcReturn(sql, "Gy_Customer_Credit"); - if (ds.Tables[0].Rows.Count == 0) - { - sql = "insert into Gy_Customer_Credit" + - "(HCusID,HCreditRating_Now,HUpdateTime,HUpdateMan)" + - " values(" + - "" + oBill.omodel.HCusID + - "," + oBill.omodel.HNewRating + - ",'" + DateTime.Now.ToString("yyyy-MM-dd") + "'" + - ",'" + CurUserName + "'" + - ")"; - oCN.RunProc(sql); - } - else - { - sql = "update Gy_Customer_Credit set " + - "HCreditRating_Now = " + oBill.omodel.HNewRating + - ",HUpdateTime = '" + DateTime.Now.ToString("yyyy-MM-dd") + "'" + - ",HUpdateMan = '" + CurUserName + "'" + - " where HCusID = " + oBill.omodel.HCusID; - oCN.RunProc(sql); - } + + //瀹℃牳鎻愪氦 if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) { + + //鍙嶅啓瀹㈡埛淇$敤棰濆害 + oCN.BeginTran(); + string sql = "exec h_p_Xs_CusRatingChangeBill_ReWriteCustomerCredit " + oBill.omodel.HCusID + "," + oBill.omodel.HNewRating + ",'" + CurUserName + "'"; + oCN.RunProc(sql); oCN.Commit(); objJsonResult.code = "1"; -- Gitblit v1.9.1