|
@@ -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;
|
|
|
}
|
|
|
|