yxj
2024-01-19 eede0db43c1e3572e7987fd9aac53b889b62ab00
PDA 用户模块权限判断方法修改
1个文件已修改
40 ■■■■■ 已修改文件
WebAPI/Controllers/条码管理/WEBSController.cs 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -121,8 +121,44 @@
        {
            try
            {
                if (oWebs.CheckModRight(ModRightName, HUserName, ref DBUtility.ClsPub.sErrInfo))
                //获取系统参数
                string sErrMsg = "";
                if (oSystemParameter.ShowBill(ref sErrMsg) == true)
                {
                    //判断权限
                    if (!DBUtility.ClsPub.Security_Log(ModRightName, 1, false, HUserName))
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "您没有对应模块权限,请与管理员联系!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (oSystemParameter.omodel.WMS_WMSStockCtl_ERPMode.ToUpper() == "WISE")
                    {
                        ds = oCn.RunProcReturn("exec h_p_K3_User '" + HUserName + "'", "h_p_K3_User");
                        if (ds == null || ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "您的用户没有绑定金蝶账号,请与管理员联系!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    else if (oSystemParameter.omodel.WMS_WMSStockCtl_ERPMode.ToUpper() == "CLOUD")
                    {
                        //判断用户账号密码(WISE、CLOUD)是否正确
                        if (!oWebs.CheckUser(HUserName, ref DBUtility.ClsPub.sErrInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功!";
@@ -133,7 +169,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                    objJsonResult.Message = "获取系统参数失败! " + sErrMsg;
                    objJsonResult.data = null;
                    return objJsonResult;
                }