From 957b51cfdeb4374d817086a2ca761c75545e206d Mon Sep 17 00:00:00 2001 From: wtt <1985833171@qq.com> Date: 星期四, 28 十一月 2024 16:59:56 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/XSGL/Xs_SellOutChangeBillController.cs | 102 ++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 77 insertions(+), 25 deletions(-) diff --git a/WebAPI/Controllers/XSGL/Xs_SellOutChangeBillController.cs b/WebAPI/Controllers/XSGL/Xs_SellOutChangeBillController.cs index 5e47493..bca5439 100644 --- a/WebAPI/Controllers/XSGL/Xs_SellOutChangeBillController.cs +++ b/WebAPI/Controllers/XSGL/Xs_SellOutChangeBillController.cs @@ -37,14 +37,14 @@ { List<object> columnNameList = new List<object>(); //鏌ョ湅鏉冮檺 - //if (!DBUtility.ClsPub.Security_Log("Xs_SellOutChangeBill_Query", 1, false, user)) - //{ - // objJsonResult.code = "0"; - // objJsonResult.count = 0; - // objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; - // objJsonResult.data = null; - // return objJsonResult; - //} + if (!DBUtility.ClsPub.Security_Log("Xs_SellOutChangeBill_Query", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } if (sWhere == null || sWhere.Equals("")) { @@ -104,14 +104,14 @@ try { //缂栬緫鏉冮檺 - //if (!DBUtility.ClsPub.Security_Log_second("Xs_SellOutChangeBill_Edit", 1, false, msg4)) - //{ - // objJsonResult.code = "0"; - // objJsonResult.count = 0; - // objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒"; - // objJsonResult.data = null; - // return objJsonResult; - //} + if (!DBUtility.ClsPub.Security_Log_second("Xs_SellOutChangeBill_Edit", 1, false, msg4)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } DAL.ClsXs_SellOutChangeBill oBill = new DAL.ClsXs_SellOutChangeBill(); List<Model.ClsXs_SellOutChangeBillMain> lsmain = new List<Model.ClsXs_SellOutChangeBillMain>(); @@ -211,7 +211,15 @@ } - + //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗 + 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; + } //淇濆瓨 //淇濆瓨瀹屾瘯鍚庡鐞� @@ -308,14 +316,14 @@ string s = ""; //鏌ョ湅鏉冮檺 - //if (!DBUtility.ClsPub.Security_Log("Xs_SellOutChangeBill_Drop", 1, false, user)) - //{ - // objJsonResult.code = "0"; - // objJsonResult.count = 0; - // objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒"; - // objJsonResult.data = null; - // return objJsonResult; - //} + if (!DBUtility.ClsPub.Security_Log("Xs_SellOutChangeBill_Drop", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } if (HInterID == null || HInterID.Equals("")) { @@ -365,6 +373,16 @@ return objJsonResult; } //================================================================================== + + //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗 + 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(); @@ -509,6 +527,17 @@ //杩涜闇�瑕佽繘琛岀殑瀹℃牳/鍙嶅鏍告搷浣� 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; + } + //妫�楠屽瓙琛ㄦ暟鎹� string errorMessage = ""; foreach (Model.ClsXs_SellOutChangeBillSub oSub in oBill.DetailColl) @@ -575,6 +604,18 @@ sql = "exec h_p_Xs_SellOutChangeBill_ReWriteBySellOutChangeBill " + oBill.omodel.HInterID; oCN.RunProc(sql); + //淇$敤鎺у埗 + ds = oCN.RunProcReturn("exec h_p_Kf_CheckSellOutBill_CrediControl " + oBill.omodel.HMainSourceInterID, "h_p_Kf_CheckSellOutBill_CrediControl"); + if (ds.Tables[0].Rows[0]["HBack"].ToString() == "1") + { + oCN.RollBack(); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); + objJsonResult.data = null; + return objJsonResult; + } + //瀹℃牳鎻愪氦 if (oBill.CheckBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Xs_SellOutChangeBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true) { @@ -599,6 +640,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_Xs_SellOutChangeBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'"; ds = oCN.RunProcReturn(sql1, "h_p_Xs_SellOutChangeBill_BeforeUnCheckCtrl"); -- Gitblit v1.9.1