文档中心 > API文档

4.34.1. 单位管理

接口列表:

  • public ServiceResponse getAccountId(String accountName);

  • public AccountInfoParam_All getAccountByCode(String token, String accountCode) throws ServiceException;

  • public boolean deleteAccountByCode(String token, String accountCode) throws ServiceException;

  • public boolean updateAccountByCode(String token, String accountCode, AccountInfoParam_All account) throws ServiceException;

接口说明:

  • getAccountId:按照单位名称获取单位ID;参数accountName为单位名称;成功返回单位ID,否则返回-1

  • getAccountByCode:按照单位编码获取单位的信息。 按照单位编码找到唯一的单位,如果找到多个单位,则返回空,获取失败; 参数token为登录验证后获取的身份令牌,accountCode为单位编码;返回满足条件的唯一单位

  • deleteAccountByCode:按照单位编码删除单位 删除单位时,如果单位存在组织模型,不允许删除 如果按照代码找出多条单位记录,则不能删除,单位编码要唯一 ;参数token为登录验证后获取的身份令牌,accountCode为单位编码;成功返回true,失败返回false

  • updateAccountByCode:按照单位编码修改单位信息 如果按编码找出多条单位记录,不能修改,单位编码要唯一 当修改为停用时,如果单位还有未删除的组织模型,不允许停用,修改失败 ;参数token为登录验证后获取的身份令牌,accountCode为单位编码,account为单位信息;成功返回true,失败返回false

    单位实体(AccountInfoParam_All)