From 777db38816776abbe4b864d26a6c0381b75e8f9d Mon Sep 17 00:00:00 2001 From: 杨乐 <yang.le.192@qq.com> Date: 星期四, 10 二月 2022 16:59:23 +0800 Subject: [PATCH] 修改页码及排序 --- WebAPI/Controllers/SBGL/Gy_EquipTypeController.cs | 67 +++++++++++++++++++++++---------- 1 files changed, 46 insertions(+), 21 deletions(-) diff --git a/WebAPI/Controllers/SBGL/Gy_EquipTypeController.cs b/WebAPI/Controllers/SBGL/Gy_EquipTypeController.cs index ec34e58..59b8d23 100644 --- a/WebAPI/Controllers/SBGL/Gy_EquipTypeController.cs +++ b/WebAPI/Controllers/SBGL/Gy_EquipTypeController.cs @@ -24,16 +24,25 @@ [Route("Gy_EquipType/GetList")] [HttpGet] - public object GetList(string sWhere) + public object GetList(string sWhere,string user) { try { - ds = oCN.RunProcReturn("select HItemID,HParentID,HNumber,HName,HLevel, case when HEndFlag<>0 then 'Y'else ' 'end HEndFlag,case when HStopFlag <> 0 then 'Y'else ' 'end HStopFlag, HRemark, HUseFlag from Gy_EquipFileType where 1=1 " + sWhere, "Gy_EquipFileType"); + if (!DBUtility.ClsPub.Security_Log("Gy_EquipTypeList", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + ds = oCN.RunProcReturn("select HItemID,HParentID,HNumber,HName,HLevel, case when HEndFlag<>0 then 'Y'else ' 'end HEndFlag,case when HStopFlag <> 0 then 'Y'else ' 'end HStopFlag, HRemark, HUseFlag from Gy_EquipFileType where 1=1 " + sWhere+ " order by HItemID ", "Gy_EquipFileType"); if (ds == null) { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�"; + objJsonResult.Message = "鏃犺褰曪紝璇蜂笌绠$悊鍛樿仈绯伙紒"; objJsonResult.data = null; return objJsonResult; } @@ -61,8 +70,17 @@ #region [璁惧鍒嗙被鍒犻櫎鍔熻兘] [Route("Gy_EquipType/Delete_EquipType")] [HttpGet] - public object Delete_EquipType(string HItemID) + public object Delete_EquipType(string HItemID,string user) { + if (!DBUtility.ClsPub.Security_Log("Gy_EquipType_Delete", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + string s = ""; Int64 lngBillKey = 0; lngBillKey = DBUtility.ClsPub.isLong(HItemID); @@ -77,23 +95,12 @@ DLL.ClsGy_EquipTypeBill oBill = new DLL.ClsGy_EquipTypeBill(); if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) { - bool IsDete = oBill.DeleteBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo); - if (IsDete) - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; - objJsonResult.data = null; - return objJsonResult; - } + oCN.RunProc("Delete From Gy_EquipFileType where HItemID=" + lngBillKey); + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鍒犻櫎鎴愬姛"; + objJsonResult.data = null; + return objJsonResult; } else { @@ -123,7 +130,16 @@ string msg1 = _value.ToString(); string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string msg2 = sArray[0].ToString(); + string msg4 = sArray[2].ToString(); + if (!DBUtility.ClsPub.Security_Log("Gy_EquipType_Edit", 1, false, msg4)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } //鍙嶅簭鍒楀寲 msg2 = "[" + msg2.ToString() + "]"; @@ -199,7 +215,16 @@ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string msg2 = sArray[0].ToString(); string msg3 = sArray[1].ToString(); + string msg4 = sArray[2].ToString(); + if (!DBUtility.ClsPub.Security_Log("Gy_EquipType_Edit", 1, false, msg4)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } //鍙嶅簭鍒楀寲 msg2 = "[" + msg2.ToString() + "]"; List<Models.ClsGy_EquipFileType> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsGy_EquipFileType>>(msg2); -- Gitblit v1.9.1