From d703d7cc2f3a86692b1db16793ff2ffc60a1a355 Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期一, 21 四月 2025 15:57:05 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/XSGL/YS_ReceiveOtherBillController.cs | 88 +++++++++++++++++++++++++------------------ 1 files changed, 51 insertions(+), 37 deletions(-) diff --git a/WebAPI/Controllers/XSGL/YS_ReceiveOtherBillController.cs b/WebAPI/Controllers/XSGL/YS_ReceiveOtherBillController.cs index 358d185..c7e73f0 100644 --- a/WebAPI/Controllers/XSGL/YS_ReceiveOtherBillController.cs +++ b/WebAPI/Controllers/XSGL/YS_ReceiveOtherBillController.cs @@ -23,18 +23,7 @@ private json objJsonResult = new json(); SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); - DataSet ds; - - public class ClsYS_ReceiveOtherBillSubs - { - - public Int64 HProjectMoneyIDSub;// int //璐圭敤椤圭洰 - public string HTypeSub;// varchar(20) --鍙戠エ绫诲瀷 - public double HMoneySub;// dec(18,8) //鍗曟嵁閲戦 - public double HTaxRateSub;// dec(18,8) //绋庣巼 - public double HSumMoneySub;// dec(18,8) //鎬婚噾棰� - } - + DataSet ds; #region 鍏朵粬搴旀敹鍗曞垪琛� 鏌ヨ /// <summary> @@ -220,6 +209,16 @@ } + //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗 + int sYear = 0; + int sPeriod = 0; + DateTime HDate = DateTime.Now; + if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false) + { + objJsonResult.Message = s; + return objJsonResult; + } + //淇濆瓨 //淇濆瓨瀹屾瘯鍚庡鐞� bool bResult; @@ -354,9 +353,17 @@ return objJsonResult; } //鍒ゆ柇鏄惁鏄垱寤虹姸鎬佽繘琛屽垹闄� - if (BillOld.omodel.HBillStatus.ToString() == "1") + if (int.Parse(BillOld.omodel.HBillStatus.ToString()) <= 1) { - + //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗 + int sYear = 0; + int sPeriod = 0; + DateTime HDate = DateTime.Now; + if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false) + { + objJsonResult.Message = s; + return objJsonResult; + } //鍒犻櫎鍓嶆帶鍒�========================================= string sql1 = "exec h_p_YS_ReceiveOtherBill_BeforeDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'"; @@ -535,34 +542,31 @@ //杩涜闇�瑕佽繘琛岀殑瀹℃牳/鍙嶅鏍告搷浣� if (IsAudit == 0) //瀹℃牳鎻愪氦 { + //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗 + string s = ""; + int sYear = 0; + int sPeriod = 0; + DateTime HDate = DateTime.Now; + if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false) + { + objJsonResult.Message = s; + return objJsonResult; + } + oCN.BeginTran(); //璁板綍杩斿洖淇℃伅 string msg = ""; - if(oBill.omodel.HMainSourceInterID != 0) + string sql = "exec h_p_YS_ReceiveOtherBill_CheckCrediControl " + oBill.omodel.HInterID; + ds = oCN.RunProcReturn(sql, "h_p_YS_ReceiveOtherBill_CheckCrediControl"); + if (ds.Tables[0].Rows[0]["HBack"].ToString() == "1") { - //妫�楠屾簮鍗曟槸鍚﹀瓨鍦ㄥ強鍗曟嵁鐘舵�� - string sql = "select * from YS_ReceiveOtherBillMain where HInterID = " + oBill.omodel.HMainSourceInterID; - ds = oCN.RunProcReturn(sql, "YS_ReceiveOtherBillMain"); - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:婧愬崟-鐗规壒鐢宠鍗曚笉瀛樺湪!"; - objJsonResult.data = null; - return objJsonResult; - } - else if (ds.Tables[0].Rows[0]["HBillStatus"].ToString() != "2") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:婧愬崟-鐗规壒鐢宠鍗曟湭澶勪簬宸插鏍哥姸鎬�!"; - objJsonResult.data = null; - return objJsonResult; - } - - + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); + objJsonResult.data = null; + return objJsonResult; } //瀹℃牳鍓嶆帶鍒�========================================= @@ -613,7 +617,17 @@ } if (IsAudit == 1) //鍙嶅鏍告彁浜� { - + //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗 + string s = ""; + int sYear = 0; + int sPeriod = 0; + DateTime HDate = DateTime.Now; + if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false) + { + objJsonResult.Message = s; + return objJsonResult; + } + //鍙嶅鏍稿墠鎺у埗========================================= string sql1 = "exec h_p_YS_ReceiveOtherBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'"; ds = oCN.RunProcReturn(sql1, "h_p_YS_ReceiveOtherBill_BeforeUnCheckCtrl"); -- Gitblit v1.9.1