1
wtt
4 天以前 409529b1a6e7478d691e95f84713bdd5ad5ffed2
WebAPI/Controllers/WebAPIController.cs
@@ -343,6 +343,8 @@
        {
            try
            {
                string sErrMsg = "";
                oSystemParameter.ShowBill(ref sErrMsg);
                DataSet ds = null;
                ClsCN oCnLoc = new ClsCN();
                DAL.ClsUser oUser = new DAL.ClsUser();
@@ -368,14 +370,18 @@
                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;
@@ -19968,7 +19974,7 @@
                {
                    objjson.code = "0";
                    objjson.count = 0;
                    objjson.Message = "获取失败" + DBUtility.ClsPub.sErrInfo;
                    objjson.Message = "获取失败,未设置默认检验方案";
                    objjson.data = null;
                    return objjson;
                }
@@ -20528,7 +20534,7 @@
                {
                    objjson.code = "0";
                    objjson.count = 0;
                    objjson.Message = "获取失败,查无数据" + DBUtility.ClsPub.sErrInfo;
                    objjson.Message = "获取失败,明细查无数据";
                    objjson.data = null;
                    return objjson;
                }
@@ -21126,8 +21132,14 @@
                    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");
                        }
                    }                 
                }