From 32481e52571bc04b97c0be02c6531ec33f34a67b Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期四, 04 一月 2024 17:30:41 +0800 Subject: [PATCH] 增加 岗位,岗位列表,岗位技能,岗位技能列表,出库类型,入库类型,调拨类型模块,审查,反审查,禁用,反禁用,刷新,按钮设置,列设置; --- WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs | 65 +++++++++++++++++++++++++++----- 1 files changed, 55 insertions(+), 10 deletions(-) diff --git a/WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs b/WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs index 1ae525d..ecd8749 100644 --- a/WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs +++ b/WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs @@ -38,14 +38,14 @@ { List<object> columnNameList = new List<object>(); //鏌ョ湅鏉冮檺 - //if (!DBUtility.ClsPub.Security_Log("Gy_ProjectStage_Query", 1, false, user)) - //{ - // objJsonResult.code = "0"; - // objJsonResult.count = 0; - // objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; - // objJsonResult.data = null; - // return objJsonResult; - //} + if (!DBUtility.ClsPub.Security_Log("YS_ReceiveBillQuery", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } if (sWhere == null || sWhere.Equals("")) { @@ -469,17 +469,60 @@ //杩涜闇�瑕佽繘琛岀殑瀹℃牳/鍙嶅鏍告搷浣� if (IsAudit == 0) //瀹℃牳鎻愪氦 { + oCN.BeginTran(); + + //璁板綍杩斿洖淇℃伅 + string msg = ""; + + if(oBill.omodel.HMainSourceInterID != 0) + { + //妫�楠屾簮鍗曟槸鍚﹀瓨鍦ㄥ強鍗曟嵁鐘舵�� + string sql = "select * from Xs_ExceptiveCheckRequestBillMain where HInterID = " + oBill.omodel.HMainSourceInterID; + ds = oCN.RunProcReturn(sql, "Xs_ExceptiveCheckRequestBill"); + 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; + } + + if( oBill.omodel.HRelSumMoney*oBill.omodel.HExRate < double.Parse( ds.Tables[0].Rows[0]["HLeftMoney"].ToString() )) + { + msg = "鏀舵鍗曟姌鎵e悗閲戦灏忎簬婧愬崟-鐗规壒鐢宠鍗曠殑娆犵己閲戦锛屾棤娉曞叧闂簮鍗�-鐗规壒鐢宠鍗�!"; + } + else + { + //鍙嶅啓婧愬崟-鐗规壒鐢宠鍗曞崟鎹姸鎬� + sql = "update Xs_ExceptiveCheckRequestBillMain set HBillStatus = 3 where HInterID = " + oBill.omodel.HMainSourceInterID; + oCN.RunProc(sql); + } + } + //瀹℃牳鎻愪氦 if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) { + oCN.Commit(); + objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = "瀹℃牳鎴愬姛"; + objJsonResult.Message = "瀹℃牳鎴愬姛锛�" + msg; objJsonResult.data = null; return objJsonResult; } else { + oCN.RollBack(); + objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; @@ -495,7 +538,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); + objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); objJsonResult.data = null; return objJsonResult; } @@ -522,6 +565,8 @@ } catch (Exception e) { + oCN.RollBack(); + objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString(); -- Gitblit v1.9.1