Commit 3fddd8ea by 宋祥

1.fixBug:admin无需校验部门

parent 01a8fb3e
...@@ -67,9 +67,12 @@ public class DaoUtils { ...@@ -67,9 +67,12 @@ public class DaoUtils {
*/ */
public static void batchInsert(String sql, List rows) { public static void batchInsert(String sql, List rows) {
// 创建人部门 // 创建人部门
List<String> orgIds = UserSessionUtils.getOrgId(); String depCode = "";
AssertUtils.isEmpty(orgIds, "当前用户未绑定部门,无法操作数据,请联系管理员!"); if (StringUtils.isBlank(depCode) && !"admin".equals(UserSessionUtils.getLoginName())) {
String depCode = orgIds.get(0); List<String> orgIds = UserSessionUtils.getOrgId();
AssertUtils.isEmpty(orgIds, "当前用户未绑定部门,无法操作数据,请联系管理员!");
depCode = orgIds.get(0);
}
for (Object row : rows) { for (Object row : rows) {
if (row instanceof DaoEPBase) { if (row instanceof DaoEPBase) {
DaoEPBase daoEPBase = (DaoEPBase) row; DaoEPBase daoEPBase = (DaoEPBase) row;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment