From 20f0478d39110034363d852d6d0594cea325617f Mon Sep 17 00:00:00 2001 From: zzr99 <1940172413@qq.com> Date: 星期一, 27 六月 2022 16:43:55 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs | 74 ++++++++++++++++++++++++++---------- 1 files changed, 53 insertions(+), 21 deletions(-) diff --git a/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs b/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs index 8ac3bfc..e751558 100644 --- a/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs +++ b/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs @@ -31,27 +31,48 @@ /// </summary> [Route("Sc_ICMOReportBill/list")] [HttpGet] - public object list(string sWhere) + public object list(string sWhere,string user) { try { + //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄� + if (!DBUtility.ClsPub.Security_Log("Sc_ICMOReportBillQuery", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳潈闄愭煡璇�!"; + objJsonResult.data = null; + return objJsonResult; + } + if (sWhere == null || sWhere.Equals("")) { - ds = oCN.RunProcReturn("select * from h_v_IF_ICMOReportBillList_Edit " + sWhere, "h_v_IF_ICMOReportBillList_Edit"); + ds = oCN.RunProcReturn("select * from h_v_IF_ICMOReportBillList_Edit order by hmainid desc ", "h_v_IF_ICMOReportBillList_Edit"); } else { string sql1 = "select * from h_v_IF_ICMOReportBillList_Edit where 1 = 1 "; - string sql = sql1 + sWhere; + string sql = sql1 + sWhere+ " order by hmainid desc "; ds = oCN.RunProcReturn(sql, "h_v_IF_ICMOReportBillList_Edit"); } - - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //} + //else + //{ + //objJsonResult.code = "0"; + //objJsonResult.count = 0; + //objJsonResult.Message = "鏃犳暟鎹�"; + //objJsonResult.data = null; + //return objJsonResult; + //} + } catch (Exception e) { @@ -146,12 +167,23 @@ string msg2 = sArray[0].ToString(); string msg3 = sArray[1].ToString(); string refSav = sArray[2].ToString(); + string user = sArray[3].ToString(); string UserName = ""; string s = ""; ListModels oListModels = new ListModels(); try { + //鍒ゆ柇鏄惁鏈夌紪杈戞潈闄� + if (!DBUtility.ClsPub.Security_Log("Sc_ICMOReportBill_Edit", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳潈闄愮紪杈�!"; + objJsonResult.data = null; + return objJsonResult; + } + DLL.ClsSc_ICMOReportBill oBill = new DLL.ClsSc_ICMOReportBill(); List<Models.ClsSc_ICMOReportBillMain> lsmain = new List<Models.ClsSc_ICMOReportBillMain>(); msg2 = msg2.Replace("\\", ""); @@ -323,17 +355,17 @@ /// <returns></returns> [Route("Sc_ICMOReportBill/DeltetICMOReportBill")] [HttpGet] - public object DeltetMouldLifeChangeBill(string HInterID) + public object DeltetMouldLifeChangeBill(string HInterID,string user) { //缂栬緫鏉冮檺 - //if (!DBUtility.ClsPub.Security_Log("Sc_ICMOReportBill_Delete", 1, true, DBUtility.ClsPub.CurUserName)) - //{ - // objJsonResult.code = "0"; - // objJsonResult.count = 0; - // objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒"; - // objJsonResult.data = null; - // return objJsonResult; - //} + if (!DBUtility.ClsPub.Security_Log_second("Sc_ICMOReportBill_Drop", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } string s = ""; Int64 lngBillKey = 0; @@ -357,7 +389,7 @@ objJsonResult.data = null; return objJsonResult; } - if (BillOld.omodel.HChecker != "") + if (oBill.omodel.HChecker != "") { objJsonResult.code = "0"; objJsonResult.count = 0; @@ -420,7 +452,7 @@ try { //瀹℃牳鏉冮檺 - if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName)) + if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName)) { objJsonResult.code = "0"; objJsonResult.count = 0; -- Gitblit v1.9.1