|
发表于 2019-10-14 09:45:57
|
显示全部楼层
/BIZ/SA/OPM/logic/code/dsrc/RoleProcedure.javaw文件中saveOPRole方法定义修改为下面的
- public static int saveOPRole(List<DataPermission> insertRange, List<DataPermission> deleteRange, List<DataPermission> updateRange, String concept, String dataModel, String fnModel, String readOnly, String notNull, Table table, List<String> parentIDs) {
- if (table.size() == 1 && parentIDs != null) {
-
-
- if (table.iterator(ModifyState.NEW).hasNext()) {
- Row row = table.iterator(ModifyState.NEW).next();
- Role role = RoleHelper.getRoleByRow(row);
- OpmUtils.checkOrgID(role.getId());
- OpmUtils.checkOrgCode(role.getCode());
- OpmUtils.checkOrgName(role.getName());
- RoleHelper.appendRole(role.getId(), role.getCode(), role.getName(), role.getRoleKind(), role.getCatalog(), role.getExtValues(), parentIDs);
- return 1;
- } else if (table.iterator(ModifyState.EDIT).hasNext()) {
- Row row = table.iterator(ModifyState.EDIT).next();
- Role role = RoleHelper.getRoleByRow(row);
- OpmUtils.checkOrgID(role.getId());
- OpmUtils.checkOrgCode(role.getCode());
- OpmUtils.checkOrgName(role.getName());
- RoleHelper.updateRole(role.getId(), role.getVersion(), role.getCode(), role.getName(), role.getRoleKind(), role.getCatalog(), role.getExtValues(), parentIDs);
- return 1;
- }
- }
- throw new RuntimeException("不支持的操作!");
- }
复制代码 |
|