| | |
| | | /// </summary> |
| | | [Route("Gy_ModelType/list")] |
| | | [HttpGet] |
| | | public object list(string sWhere) |
| | | public object list(string sWhere, string ModRightNameSelect, string user) |
| | | { |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameSelect, 1, true, 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_MouldType where 1=1 " + sWhere, "Gy_MouldType"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | |
| | | |
| | | try |
| | | { |
| | | //if (!DBUtility.ClsPub.Security_Log(ModRightNameDelete, 1, true, User)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "没有删除权限"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameDelete, 1, true, User)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有删除权限"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oDeptHlp.GetInfoByID(HItemID)) |
| | | { |
| | | if (oDept.HavChildCodes(HItemID)) |
| | |
| | | { |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | //反序列化 |
| | | msg1 = "[" + msg1.ToString() + "]"; |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString();//当前人 |
| | | string msg4 = sArray[2].ToString();//模块权限 |
| | | |
| | | List<Model.ClsGy_MouldType_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_MouldType_Model>>(msg1); |
| | | //反序列化 |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | | |
| | | List<Model.ClsGy_MouldType_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_MouldType_Model>>(msg2); |
| | | |
| | | string HNumber = list[0].HNumber; |
| | | string HName = list[0].HName; |
| | |
| | | bool HStopflag = list[0].HStopflag; |
| | | string HUseFlag = list[0].HUseFlag; |
| | | bool HEndFlag = list[0].HEndFlag; |
| | | |
| | | //判断权限 |
| | | if (!ClsPub.Security_Log(msg4, 1, true, msg3)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有找到该功能模块!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HNumber)) |
| | | { |
| | |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string msg4 = sArray[2].ToString(); |
| | | string msg5 = sArray[3].ToString(); |
| | | string msg4 = sArray[2].ToString();//当前人 |
| | | string msg5 = sArray[3].ToString();//权限模块 |
| | | |
| | | //反序列化 |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | |
| | | string HUseFlag = list[0].HUseFlag; |
| | | |
| | | //判断权限 |
| | | //if (!ClsPub.Security_Log(msg5, 1, true, msg4)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "没有找到该功能模块!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | if (!ClsPub.Security_Log(msg5, 1, true, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有找到该功能模块!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HNumber)) |