Browse Source

登录提示BUG修改

章政 6 years ago
parent
commit
57f7765735
1 changed files with 6 additions and 15 deletions
  1. 6 15
      UAS_MES_NEW/PublicMethod/LogicHandler.cs

+ 6 - 15
UAS_MES_NEW/PublicMethod/LogicHandler.cs

@@ -120,19 +120,12 @@ namespace UAS_MES_NEW.PublicMethod
                     oErrorMessage = "岗位资源不允许为空";
                     return false;
                 }
-                if (em_type == "admin")
+                if (!dh.CheckExist("Source", "upper(sc_code)='" + iSourceCode + "' and sc_statuscode='AUDITED'"))
                 {
-                    if (dh.CheckExist("Source", "upper(sc_code)='" + iSourceCode + "' and sc_statuscode='AUDITED'"))
-                    {
-                        return true;
-                    }
-                    else
-                    {
-                        oErrorMessage = "岗位资源编号错误或者未审核!";
-                        return false;
-                    }
+                    oErrorMessage = "岗位资源编号错误或者未审核!";
+                    return false;
                 }
-                else
+                if (em_type != "admin")
                 {
                     dt = dh.getFieldsDatasByCondition("cs$empgroup left join cs$userresource on ur_groupcode=eg_groupcode left join source on ur_resourcecode=sc_code", new string[] { "upper(ur_resourcecode) ur_resourcecode" }, "upper(eg_emcode)= '" + iUserCode + "' and sc_statuscode='AUDITED'");
                     //如果存在该编号
@@ -146,12 +139,10 @@ namespace UAS_MES_NEW.PublicMethod
                         }
                         oErrorMessage = "用户不处于当前资源所属分组!";
                     }
-                    else
-                        oErrorMessage = "岗位资源编号错误或者未审核!";
+                    else oErrorMessage = "用户不处于当前资源所属分组!";
                 }
             }
-            else
-                oErrorMessage = "用户不存在!";
+            else oErrorMessage = "用户不存在!";
             return false;
         }