@Override public String getOrgIdByuserAccountOrWorkNo(String userAccount) throws Exception { String orgid = executor.queryObject(String.class, "getOrgIdByuserAccountOrWorkNo", userAccount,userAccount); return orgid; } @Override
@Override public NodeControlParam getNodeControlParam(String processId, String taskKey) throws Exception { return executor.queryObject(NodeControlParam.class, "getNodeContralParam_wf", processId, taskKey); }
@Override public NodeControlParam getNodeControlParamByTaskID(String processId, String taskid) throws Exception { return executor.queryObject(NodeControlParam.class, "getNodeControlParamByTaskID", processId, taskid); }
@Override public ActivitiNodeInfo getFirstUserNode(String processKey) throws Exception { ActivitiNodeInfo nodeInfo = executor.queryObject( ActivitiNodeInfo.class, "getFirstUserNode_wf", processKey); if (null == nodeInfo) { nodeInfo = executor.queryObject(ActivitiNodeInfo.class, "getDefaultFirstUserNode_wf", processKey); } return nodeInfo; }
public String getAssignees(String PROC_INST_ID_,String task_id,String task_key) throws SQLException { String v = task_key+"_users"; return executor.queryObject(String.class,"getAssignees", PROC_INST_ID_,v); }
/** * 根据查询条件查询用户列表 * @param offset * @param pagesize * @return */ public User getUserInfo(String userName) throws Exception{ return executor.queryObject(User.class, "selectUsersByUserName_wf", userName); }
@Override public String getOrgIdByUserId(String userId) throws Exception { String orgid = executor.queryObject(String.class, "getOrgIdByUserId", userId); return orgid; } @Override
@Override public boolean hasTopNodes() { try { int count = executor.queryObject(int.class, "hastopNodes"); return count > 0; } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return false; } }
@Override public NodeInfoEntity getNodeWorktime(String processIntsId, String nodeKey) { try { return executor.queryObject(NodeInfoEntity.class, "getNodeWorktime_wf", processIntsId, nodeKey); } catch (Exception e) { throw new ProcessException(e); } }
public RoleType getRoleType(String typeId) throws RoleTypeException { try { RoleType bean = executor.queryObject(RoleType.class, "selectById", typeId); return bean; } catch (Throwable e) { throw new RoleTypeException("get RoleType failed::typeId=" + typeId, e); } } public ListInfo queryListInfoRoleTypes(RoleTypeCondition conditions, long offset, int pagesize)
public Role getRole(String roleId) throws RoleException { try { Role bean = executor.queryObject(Role.class, "selectById", roleId); return bean; } catch (Throwable e) { throw new RoleException("get Role failed::roleId=" + roleId, e); } } public Role getRoleByName(String roleName) throws RoleException {
/** * @param roleId * @return */ public String getSimpleUserAccount(String roleId) throws RoleException{ try { return this.executor.queryObject(String.class, "getSimpleUserAccount", roleId); } catch (SQLException e) { throw new RoleException("getSimpleUserAccount failed:"+roleId,e); } } /**
@Override public boolean existOrg(String orgId) { try { return executor.queryObject(int.class, "existOrg", orgId) > 0; } catch (Exception e){ throw new SmOrganizationException("Exist Org Failed:"+orgId,e); } }
public boolean hasSon(String org) throws SmOrganizationException{ try { int num = this.executor.queryObject(int.class, "hasSon", org); return (num > 0); } catch (Throwable e) { throw new SmOrganizationException("hasSon SmOrganization failed::orgId=" + org, e); } }
public String getOrgTreeLevel(String orgid) throws SmOrganizationException { try { return executor.queryObject(String.class, "getOrgTreeLevel",orgid); } catch (Exception e) { throw new SmOrganizationException("getAllOrgs failed:", e); } } /** (non-Javadoc)
public AuthUser getUser(String account)throws SmUserException{ try { AuthUser bean = executor.queryObject(AuthUser.class, "getSmUserByNAMECNName", account,account, account,account,account); return bean; } catch (Throwable e) { throw new SmUserException("get SmUser failed::IDNAMECNName=" + account, e); } } public SmUser getSmUserByIDNAMECNName(String userId) throws SmUserException {
public SmUser getSmUserByName(String userName) throws SmUserException{ try { SmUser bean = executor.queryObject(SmUser.class, "getSmUserByName", userName); return bean; } catch (Throwable e) { throw new SmUserException("get SmUser failed::userName=" + userName, e); } } public ListInfo queryListInfoSmUsers(SmUserCondition conditions, long offset, int pagesize) throws SmUserException {
public boolean checkuserexist(String userAccount)throws SmUserException{ try { int num = this.executor.queryObject(int.class, "checkuserexist", userAccount); return num > 0; } catch (SQLException e) { throw new SmUserException(e); } }
public Resource getResource(String resId) throws ResourceException { try { Resource bean = executor.queryObject(Resource.class, "selectById", resId); return bean; } catch (Throwable e) { throw new ResourceException("get Resource failed::resId=" + resId, e); } } public ListInfo queryListInfoResources(ResourceCondition conditions, long offset, int pagesize)
@Override public List<TaskInfo> getCurrentNodeInfoByKey(String bussinesskey, String processKey) throws Exception { // 根据bussinessKey获取流程实例 ProcessInst inst = executor.queryObject(ProcessInst.class, "getProcessByKey_wf", bussinesskey, processKey); if (inst != null) { return getCurrentNodeInfoByProcessID(inst.getPROC_INST_ID_()); } else { return null; } }