sysmanagehelper.java
来自「公司自己开发的工作流引擎」· Java 代码 · 共 803 行 · 第 1/2 页
JAVA
803 行
SysManageEJB ejb=handle.getSysManageEJB();
ejb.updateUserOperation(userId,roleId,selectUserOperations);
logger.info("Execution deleteUserFromOrg time:"+(System.currentTimeMillis()-
startTime)+" ms.");
}
/**
* 将用户从当前角色中移出
* @param user WfUser
*/
public void moveUserFromRole(String userId,String roleId)
throws Exception{
long startTime=System.currentTimeMillis();
WorkflowEJBHandle handle=new WorkflowEJBHandle();
SysManageEJB ejb=handle.getSysManageEJB();
ejb.moveUserFromRole(userId,roleId);
logger.info("Execution deleteUserFromOrg time:"+(System.currentTimeMillis()-
startTime)+" ms.");
}
/**
* 查询用户信息
* @param user WfUser
* @return List
* @throws SQLException
*/
public List queryUser(WfUser user)
throws Exception{
long startTime=System.currentTimeMillis();
WorkflowEJBHandle handle=new WorkflowEJBHandle();
SysManageEJB ejb=handle.getSysManageEJB();
List result=ejb.queryUser(user);
logger.info("Execution queryUser time:"+(System.currentTimeMillis()-
startTime)+" ms.");
return result;
}
/**
* 根据USER_ID查询用户信息
*
* @param userId String 用户ID
* @return WfUser
* @throws Exception
*/
public WfUser queryUserById(String userId)throws Exception{
long startTime = System.currentTimeMillis();
WorkflowEJBHandle handle = new WorkflowEJBHandle();
SysManageEJB sysEjb = handle.getSysManageEJB();
WfUser userInfo = sysEjb.queryUserById(userId);
return userInfo;
}
/**
* 保存组织信息
* @param org WfOrganization
* @throws Exception
*/
public void saveOrg(WfOrganization org)
throws Exception{
long startTime=System.currentTimeMillis();
WorkflowEJBHandle handle=new WorkflowEJBHandle();
SysManageEJB ejb=handle.getSysManageEJB();
ejb.saveOrg(org);
logger.info("Execution saveOrg time:"+(System.currentTimeMillis()-startTime)+
" ms.");
}
/**
* 保存用户信息
* @param user WfUser
* @param orgId 所属部门id
* @throws Exception
*/
public void saveUser(WfUser user,String orgId)
throws Exception{
long startTime=System.currentTimeMillis();
WorkflowEJBHandle handle=new WorkflowEJBHandle();
SysManageEJB ejb=handle.getSysManageEJB();
ejb.saveUser(user,orgId);
logger.info("Execution saveUser time:"+(System.currentTimeMillis()-
startTime)+" ms.");
}
/**
* 将人员加入组织
* @param userList List 人员列表
* @param orgId String 组织id
* @throws Exception
*/
public void addUserToOrg(List userList,String orgId)
throws Exception{
long startTime=System.currentTimeMillis();
WorkflowEJBHandle handle=new WorkflowEJBHandle();
SysManageEJB ejb=handle.getSysManageEJB();
ejb.addUserToOrg(userList,orgId);
logger.info("Execution addUserToOrg time:"+(System.currentTimeMillis()-
startTime)+" ms.");
}
/**
* 将组织人员加入管理角色
* @param userList List 人员列表
* @param orgId String 组织id
* @throws Exception
*/
public void addOrgUserToRole(List orgList ,List userList,String roleId,List orgOperationList,List userOperationList)
throws Exception{
long startTime=System.currentTimeMillis();
WorkflowEJBHandle handle=new WorkflowEJBHandle();
SysManageEJB ejb=handle.getSysManageEJB();
ejb.addOrgUserToRole(orgList,userList,roleId,orgOperationList,userOperationList);
logger.info("Execution addUserToOrg time:"+(System.currentTimeMillis()-
startTime)+" ms.");
}
/**
* 删除用户,并未真正删除用户,只是置无效标志,将用户与部门、角色的关联删除
* @param userId 用户id
*/
public void deleteUser(String userId)
throws Exception{
long startTime=System.currentTimeMillis();
WorkflowEJBHandle handle=new WorkflowEJBHandle();
SysManageEJB ejb=handle.getSysManageEJB();
ejb.deleteUser(userId);
logger.info("Execution deleteUser time:"+(System.currentTimeMillis()-
startTime)+" ms.");
}
/**
* 将用户从当前部门中移出,只是将用户与部门的关联删除
* @param user WfUser
*/
public void deleteUserFromOrg(String userId,String orgId)
throws Exception{
long startTime=System.currentTimeMillis();
WorkflowEJBHandle handle=new WorkflowEJBHandle();
SysManageEJB ejb=handle.getSysManageEJB();
ejb.deleteUserFromOrg(userId,orgId);
logger.info("Execution deleteUserFromOrg time:"+(System.currentTimeMillis()-
startTime)+" ms.");
}
/**
* 查询未归入部门的人员
* @param orgId String
* @return List
* @throws SQLException
*/
public List queryFreeUser()
throws Exception{
long startTime=System.currentTimeMillis();
WorkflowEJBHandle handle=new WorkflowEJBHandle();
SysManageEJB ejb=handle.getSysManageEJB();
List result=ejb.queryFreeUser();
logger.info("Execution queryFreeUser time:"+(System.currentTimeMillis()-
startTime)+" ms.");
return result;
}
/**
* 查询指定组织的可选择上级组织列表
* @param orgId String 当前部门id
* @param areaId String 所属行政区id
* @return List
* @throws Exception
*/
public List querySelectParentOrgList(String upOrgId,String orgId,
String areaId)
throws Exception{
long startTime=System.currentTimeMillis();
WorkflowEJBHandle handle=new WorkflowEJBHandle();
SysManageEJB ejb=handle.getSysManageEJB();
List result=ejb.querySelectParentOrgList(upOrgId,orgId,areaId);
logger.info("Execution querySelectParentOrgList time:"+
(System.currentTimeMillis()-startTime)+" ms.");
return result;
}
/**
* 查询登陆用户管理权限范围内的指定组织的可选择上级组织列表
* @param orgId String 当前部门id
* @param areaId String 所属行政区id
* @return List
* @throws Exception
*/
public List querySelectParentOrgList(String upOrgId,String orgId,
String areaId,String userId)
throws Exception{
long startTime=System.currentTimeMillis();
WorkflowEJBHandle handle=new WorkflowEJBHandle();
SysManageEJB ejb=handle.getSysManageEJB();
List result=ejb.querySelectParentOrgList(upOrgId,orgId,areaId,userId);
logger.info("Execution querySelectParentOrgList time:"+
(System.currentTimeMillis()-startTime)+" ms.");
return result;
}
/**
*查询当前用户能管理的管理角色
*
* @param areaId String 区域ID
* @param roleId String 选中角色的ID
* @param roleType String 选中角色的类型
* @param userId String 用户ID
* @param isAdmin boolean 是否是管理员,管理员能见所有角色
* @return List
* @throws Exception
*/
public List getManagingRoleRoleTree(String areaId,String roleId,
String managingRoleId,String roleType,String userId,boolean isAdmin)
throws Exception{
long startTime=System.currentTimeMillis();
WorkflowEJBHandle handle=new WorkflowEJBHandle();
SysManageEJB ejb=handle.getSysManageEJB();
List result=ejb.getManagingRoleRoleTree(areaId,roleId,managingRoleId,roleType,userId,isAdmin);
logger.info("Execution getManagingRoleRoleTree Method cost time:"+
(System.currentTimeMillis()-startTime)+" ms.");
return result;
}
/**
* 查询角色的详细信息
*
* @param roleId String 角色ID
* @return RoleNodeFormbean
* @throws Exception
*/
public RoleNodeFormbean getRoleInfo(String roleId)throws Exception{
long startTime=System.currentTimeMillis();
WorkflowEJBHandle handle=new WorkflowEJBHandle();
SysManageEJB ejb=handle.getSysManageEJB();
RoleNodeFormbean roleForm = ejb.getRoleInfo(roleId);
logger.info("Execution getRoleInfo Method cost time:"+
(System.currentTimeMillis() - startTime) + " ms.");
return roleForm;
}
/**
* 查询附属在某管理角色下的角色的操作权限
*
* @param roleId String 角色ID
* @param managingRoleId String 管理角色ID
* @return Map
* @throws Exception
*/
public Map getRoleGrantedOprMap(String roleId,String managingRoleId)
throws Exception{
long startTime=System.currentTimeMillis();
WorkflowEJBHandle handle=new WorkflowEJBHandle();
SysManageEJB ejb=handle.getSysManageEJB();
Map grantedAuthMap = ejb.getRoleGrantedOprMap(roleId,managingRoleId);
logger.info("Execution getRoleGrantedOprMap Method cost time:"+
(System.currentTimeMillis() - startTime) + " ms.");
return grantedAuthMap;
}
/**
* 更新附属在某管理角色下的角色的操作权限
*
* @param roleId String 角色ID
* @param managingRoleId String 管理角色ID
* @param oprList List 操作权限列表(String..)
* @throws Exception
*/
public void updateRoleOperations(String roleId,String managingRoleId,List oprList)throws Exception{
long startTime=System.currentTimeMillis();
WorkflowEJBHandle handle=new WorkflowEJBHandle();
SysManageEJB ejb=handle.getSysManageEJB();
ejb.updateRoleOperation(roleId,managingRoleId,oprList);
logger.info("Execution udpateRoleOperations Method cost time:"+
(System.currentTimeMillis() - startTime) + " ms.");
}
/**
* 根据用户ID和角色ID,查询所有下级角色
*
* @param areaId String
* @param roleId String 角色ID
* @param userId String 用户ID
* @param isAdmin boolean 是否是管理员,管理员能见所有角色
* @return List
* @throws Exception
*/
public List getRoleTree(String areaId,String roleId,String userId, boolean isAdmin)
throws Exception{
List roleList = null;
long startTime=System.currentTimeMillis();
WorkflowEJBHandle handle=new WorkflowEJBHandle();
SysManageEJB ejb=handle.getSysManageEJB();
roleList = ejb.getRoleTree(areaId,roleId,userId,isAdmin);
logger.info("Execution getRoleTree Method cost time:"+
(System.currentTimeMillis() - startTime) + " ms.");
return roleList;
}
/**
* 为某个管理角色增加角色及在这些角色上的操作权限
*
* @param managingRoleId String 管理角色ID
* @param roleIdList List 角色列表(String...)
* @param operationList List 操作权限列表(String...)
* @throws Exception
*/
public void addRole2ManagingRole(String managingRoleId,List roleIdList,List operationList)
throws Exception{
long startTime=System.currentTimeMillis();
WorkflowEJBHandle handle=new WorkflowEJBHandle();
SysManageEJB ejb=handle.getSysManageEJB();
ejb.addRole2ManagingRole(managingRoleId,roleIdList,operationList);
logger.info("Execution addRole2ManagingRole Method cost time:"+
(System.currentTimeMillis() - startTime) + " ms.");
}
public List getExtFieldList(String caller)throws Exception{
long startTime=System.currentTimeMillis();
List extFieldList = null;
WorkflowEJBHandle handle=new WorkflowEJBHandle();
SysManageEJB ejb=handle.getSysManageEJB();
extFieldList = ejb.getExtFieldList(caller);
logger.info("Execution getExtFieldList Method cost time:"+
(System.currentTimeMillis() - startTime) + " ms.");
return extFieldList;
}
public List queryOrgTreeList(String orgId,String areaId,String userId)throws Exception{
long startTime=System.currentTimeMillis();
List ortTreeList = null;
WorkflowEJBHandle handle=new WorkflowEJBHandle();
SysManageEJB ejb=handle.getSysManageEJB();
ortTreeList = ejb.queryOrgTreeList(orgId,areaId,userId);
logger.info("Execution queryOrgTreeList Method cost time:"+
(System.currentTimeMillis() - startTime) + " ms.");
return ortTreeList;
}
public void transferUser(String originalOrgId,String destinationOrgId,String userId)throws Exception{
long startTime=System.currentTimeMillis();
WorkflowEJBHandle handle=new WorkflowEJBHandle();
SysManageEJB ejb=handle.getSysManageEJB();
ejb.transferUser(originalOrgId,destinationOrgId,userId);
logger.info("Execution transferUser Method cost time:"+
(System.currentTimeMillis() - startTime) + " ms.");
}
public List queryOrgTreeList(String orgId,String areaId)throws Exception{
long startTime=System.currentTimeMillis();
List ortTreeList = null;
WorkflowEJBHandle handle=new WorkflowEJBHandle();
SysManageEJB ejb=handle.getSysManageEJB();
ortTreeList = ejb.queryOrgTreeList(orgId,areaId);
logger.info("Execution queryOrgTreeList Method cost time:"+
(System.currentTimeMillis() - startTime) + " ms.");
return ortTreeList;
}
public void removeManagedRel(String managingRoleId,String roleId)throws Exception{
long startTime=System.currentTimeMillis();
List ortTreeList = null;
WorkflowEJBHandle handle=new WorkflowEJBHandle();
SysManageEJB ejb=handle.getSysManageEJB();
ejb.removeManagedRel(managingRoleId,roleId);
logger.info("Execution removeManagedRel Method cost time:"+
(System.currentTimeMillis() - startTime) + " ms.");
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?