From 756c87c9467e9ba5ec472ca3e39fd9ad58eb85c5 Mon Sep 17 00:00:00 2001 From: YL <YL@LAPTOP-SE03PLUR> Date: 星期一, 18 十月 2021 08:45:02 +0800 Subject: [PATCH] 动态菜单 --- WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs | 61 ++++++++++++++++++++---------- 1 files changed, 40 insertions(+), 21 deletions(-) diff --git a/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs b/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs index 54fe768..aafe991 100644 --- a/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs +++ b/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs @@ -83,12 +83,21 @@ [Route("Sc_MouldMoveStockStepInBill/GetMouldMoveStockStepInBill")] [HttpGet] - public object GetMouldMoveStockStepInBill(string sWhere) + public object GetMouldMoveStockStepInBill(string sWhere,string user,string Organization) { try { + //缂栬緫鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Sc_MouldMoveStockStepInBillList", 1, true, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } - ds = Sc_MouldMoveStockStepInBill(sWhere); + ds = Sc_MouldMoveStockStepInBill(sWhere, Organization); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; @@ -105,16 +114,16 @@ } } - public static DataSet Sc_MouldMoveStockStepInBill(string sWhere) + public static DataSet Sc_MouldMoveStockStepInBill(string sWhere,string Organization) { + string sql1 = string.Format(@"select * from h_v_Sc_MouldMoveStockStepInBillListDetail where (璋冨叆缁勭粐='" + Organization + "' or 璋冨嚭缁勭粐='" + Organization + "' )"); if (sWhere == null || sWhere.Equals("")) { - return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldMoveStockStepInBillListDetail ", "h_v_Sc_MouldMoveStockStepInBillListDetail"); + return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 鏃ユ湡 desc", "h_v_Sc_MouldMoveStockStepInBillListDetail"); } else { - string sql1 = "select * from h_v_Sc_MouldMoveStockStepInBillListDetail where 1 = 1 "; - string sql = sql1 + sWhere; + string sql = sql1 + sWhere + "order by 鏃ユ湡 desc"; return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldMoveStockStepInBillListDetail"); } @@ -152,8 +161,9 @@ { ds = oCN.RunProcReturn(string.Format(@"SELECT HMaterID,妯″叿浠g爜 HMaterCode,妯″叿鍚嶇О HMaterName,瑙勬牸鍨嬪彿 HMaterSpec,鎵规 HBatchNo, 璁捐瀵垮懡 HDesignLife, 鍓╀綑瀵垮懡 HLeaveLife, 绱Н浣跨敤瀵垮懡 HUseLife, 搴斿彂鏁伴噺 HQtyMust, 瀹炲彂鏁伴噺 HQty, - 鍗曚环 HPrice, 閲戦 HMoney,HWHSonID HWHID, 鍙戞枡浠撳簱浠g爜 HWHCode, 鍙戞枡浠撳簱 HWHName,HSPID, - 浠撲綅浠g爜 HSPCode, 浠撲綅 HSPName,琛ㄤ綋澶囨敞 HRemark FROM h_v_Sc_MouldMoveStockStepInBillListDetail"), "h_v_Sc_MouldMoveStockStepInBillListDetail"); + 鍗曚环 HPrice, 閲戦 HMoney,HStockOrgID, HOtherOrgID,璋冨嚭缁勭粐浠g爜 HOtherOrgCode,璋冨嚭缁勭粐 HOtherOrgName, HWHID, 璋冨叆浠撳簱浠g爜 HWHCode, 璋冨叆浠撳簱 HWHName,HSPID, + 璋冨叆浠撲綅浠g爜 HSPCode, 璋冨叆浠撲綅 HSPName,HSCWHID, 璋冨嚭浠撳簱浠g爜 HSCWHCode, 璋冨嚭浠撳簱 HSCWHName,HSCSPID, + 璋冨嚭浠撲綅浠g爜 HSCSPCode, 璋冨嚭浠撲綅 HSCSPName,琛ㄤ綋澶囨敞 HRemark FROM h_v_Sc_MouldMoveStockStepInBillListDetail"), "h_v_Sc_MouldMoveStockStepInBillListDetail"); objJsonResult.code = "0"; objJsonResult.count = 1; @@ -162,12 +172,12 @@ } else { - //string sql1 = "select HRepairCheckID,HRepairCheckContent,HManagerID,HRemark from Sc_MouldRepairCheckBillSub where 1 = 1 "; string sql1 = string.Format(@"SELECT HMaterID,妯″叿浠g爜 HMaterCode,妯″叿鍚嶇О HMaterName,瑙勬牸鍨嬪彿 HMaterSpec,鎵规 HBatchNo, 璁捐瀵垮懡 HDesignLife, 鍓╀綑瀵垮懡 HLeaveLife, 绱Н浣跨敤瀵垮懡 HUseLife, 搴斿彂鏁伴噺 HQtyMust, 瀹炲彂鏁伴噺 HQty, - 鍗曚环 HPrice, 閲戦 HMoney,HWHSonID HWHID, 鍙戞枡浠撳簱浠g爜 HWHCode, 鍙戞枡浠撳簱 HWHName,HSPID, - 浠撲綅浠g爜 HSPCode, 浠撲綅 HSPName,琛ㄤ綋澶囨敞 HRemark FROM h_v_Sc_MouldMoveStockStepInBillListDetail where 1 = 1 "); + 鍗曚环 HPrice, 閲戦 HMoney,HStockOrgID, HOtherOrgID,璋冨嚭缁勭粐浠g爜 HOtherOrgCode,璋冨嚭缁勭粐 HOtherOrgName, HWHID, 璋冨叆浠撳簱浠g爜 HWHCode, 璋冨叆浠撳簱 HWHName,HSPID, + 璋冨叆浠撲綅浠g爜 HSPCode, 璋冨叆浠撲綅 HSPName,HSCWHID, 璋冨嚭浠撳簱浠g爜 HSCWHCode, 璋冨嚭浠撳簱 HSCWHName,HSCSPID, + 璋冨嚭浠撲綅浠g爜 HSCSPCode, 璋冨嚭浠撲綅 HSCSPName,琛ㄤ綋澶囨敞 HRemark FROM h_v_Sc_MouldMoveStockStepInBillListDetail where 1 = 1 "); string sql = sql1 + sqlWhere; ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMoveStockStepInBillListDetail"); @@ -203,12 +213,21 @@ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string msg2 = sArray[0].ToString(); string msg3 = sArray[1].ToString(); - + string msg4 = sArray[2].ToString(); string UserName = ""; ListModels oListModels = new ListModels(); try { + if (!DBUtility.ClsPub.Security_Log("Sc_MouldMoveStockStepInBill_Edit", 1, true, msg4)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁鏌ョ湅鏉冮檺"; + objJsonResult.data = null; + return objJsonResult; + } + DLL.ClsSc_MouldMoveStockStepInBill oBill = new DLL.ClsSc_MouldMoveStockStepInBill(); List<Model.ClsSc_MouldMoveStockStepInBillMain > lsmain = new List<Model.ClsSc_MouldMoveStockStepInBillMain>(); msg2 = msg2.Replace("\\", ""); @@ -330,17 +349,17 @@ /// <returns></returns> [Route("Sc_MouldMoveStockStepInBill/DeltetMouldMoveStockStepInBill")] [HttpGet] - public object DeltetMouldMoveStockStepInBill(string HInterID) + public object DeltetMouldMoveStockStepInBill(string HInterID,string user) { //缂栬緫鏉冮檺 - //if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdBackBill_Delete", 1, true, DBUtility.ClsPub.CurUserName)) - //{ - // objJsonResult.code = "0"; - // objJsonResult.count = 0; - // objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒"; - // objJsonResult.data = null; - // return objJsonResult; - //} + if (!DBUtility.ClsPub.Security_Log("Sc_MouldMoveStockStepInBill_Delete", 1, true, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } Int64 lngBillKey = 0; -- Gitblit v1.9.1