| | |
| | | { |
| | | try |
| | | { |
| | | string sErrMsg = ""; |
| | | oSystemParameter.ShowBill(ref sErrMsg); |
| | | DataSet ds = null; |
| | | ClsCN oCnLoc = new ClsCN(); |
| | | DAL.ClsUser oUser = new DAL.ClsUser(); |
| | |
| | | string sql = string.Format(@" select a.* from Gy_UserByOrgRelation a |
| | | where a.HUserID = '{0}' and a.HOrgID = '{1}'", UserName, HOrgName); |
| | | DataSet _ds = oCnLoc.RunProcReturn(sql, "h_p_Xt_UserRelationOrg_Check"); |
| | | //if (_ds == null || _ds.Tables[0].Rows.Count == 0) |
| | | //{ |
| | | // objjson.code = "0"; |
| | | // objjson.count = 0; |
| | | // objjson.Message = "用户" + UserName + "没有该组织权限"; |
| | | // objjson.data = null; |
| | | // return objjson; |
| | | //} |
| | | |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "杭州斯莫尔") |
| | | { |
| | | if (_ds == null || _ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "用户" + UserName + "没有该组织权限"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | objjson.code = "0"; |
| | | objjson.count = 1; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 根据模具仓库编号获取模具数据 |
| | | /// </summary> |
| | | /// <param name="sWhere">筛选条件</param> |
| | | /// <param name="user">操作用户</param> |
| | | /// <param name="Organization">组织</param> |
| | | /// <returns>模具数据清单</returns> |
| | | [Route("Web/Get_Sc_MouldStatusAnalysisList")] |
| | | [HttpGet] |
| | | public object Get_Sc_MouldStatusAnalysisList(string sWhere, string user, string Organization) |
| | | { |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("Select * from h_v_Sc_MouldStatusAnalysisList where 1=1 Order by HInterID DESC", "h_v_Sc_MouldStatusAnalysisList"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "Select * from h_v_Sc_MouldStatusAnalysisList where 1=1 "; |
| | | string sql = sql1 + sWhere + " Order by HInterID DESC"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldStatusAnalysisList"); |
| | | } |
| | | |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败" + DBUtility.ClsPub.sErrInfo; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 1; |
| | | objjson.Message = "获取成功!"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败" + ex.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取器具列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败" + DBUtility.ClsPub.sErrInfo; |
| | | objjson.Message = "获取失败,未设置默认检验方案"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败,查无数据" + DBUtility.ClsPub.sErrInfo; |
| | | objjson.Message = "获取失败,明细查无数据"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | |
| | | ds = oCn.RunProcReturn(sql1, "Gy_MenuDefineSet"); //查询用户绑定的角色 是否设置菜单信息 取角色名称最短的一个 |
| | | if ((ds.Tables[0] == null || ds.Tables[0].Rows.Count == 0)) |
| | | { |
| | | sql = "Select HitemID,HNumber,HName,HPartentID,HLevel,Hurl,HShowMode,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain,HPicNum from Gy_Menu_1 where HType = '" + HType + "' Order by HPosition,len(HitemID),HitemID "; |
| | | ds = oCn.RunProcReturn(sql, "Gy_Menu_1"); |
| | | sql1 = "select HItemID,HPartentID,HNumber,HName,HLevel,Hurl,HType,HPicNum,HShowMode,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain from Gy_MenuDefineSet where HMakeName = 'admin' and HType = '" + HType + "' order by HPosition"; |
| | | ds = oCn.RunProcReturn(sql1, "Gy_MenuDefineSet"); //查询admin 是否设置菜单信息 |
| | | if ((ds.Tables[0] == null || ds.Tables[0].Rows.Count == 0)) |
| | | { |
| | | sql = "Select HitemID,HNumber,HName,HPartentID,HLevel,Hurl,HShowMode,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain,HPicNum from Gy_Menu_1 where HType = '" + HType + "' Order by HPosition,len(HitemID),HitemID "; |
| | | ds = oCn.RunProcReturn(sql, "Gy_Menu_1"); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |