package com.vci.ubcs.omd.service;
|
|
import com.vci.ubcs.omd.dto.BtmTypeDTO;
|
import com.vci.ubcs.omd.entity.BtmType;
|
import com.vci.ubcs.omd.entity.ModifyAttributeInfo;
|
import com.vci.ubcs.omd.vo.BtmTreeVO;
|
import com.vci.ubcs.omd.vo.BtmTypeVO;
|
import com.vci.ubcs.omd.vo.BtmTypeAttributeVO;
|
import com.vci.ubcs.omd.vo.LinkTypeVO;
|
import io.swagger.models.auth.In;
|
import org.springblade.core.log.exception.ServiceException;
|
import org.springblade.core.mp.base.BaseService;
|
import org.springblade.core.tool.api.R;
|
|
import java.util.Collection;
|
import java.util.List;
|
import java.util.Map;
|
|
/**
|
* 业务类型服务接口
|
* @author weidy
|
* @date 2019/10/13 2:33 PM
|
*/
|
public interface IBtmTypeService extends BaseService<BtmType> {
|
|
/**
|
* 设置平台本身的业务类型
|
* @param platformBtmType 平台本身的业务类型
|
*/
|
void setPlatformBtmType(Collection<String> platformBtmType);
|
|
/**
|
* 根据主键获取业务类型
|
* @param pkBtmType 业务类型主键
|
* @return 业务类型,如果不存在会返回null
|
* @throws ServiceException 参数为空或者查询出错时会抛出错误
|
*/
|
BtmTypeVO getBtmTypeByOid(String pkBtmType) throws ServiceException;
|
|
/**
|
* 根据主键批量获取业务类型
|
* @param pkBtmTypes 业务类型主键,用逗号分隔
|
* @return 业务类型列表,如果有不存在的不会返回,全部不存在的则返回空列表
|
* @throws ServiceException 参数为空或者查询出错时会抛出错误
|
*/
|
List<BtmTypeVO> listBtmTypeByOids(String pkBtmTypes) throws ServiceException;
|
|
/**
|
* 批量根据主键获取业务类型
|
* @param pkBtmTypeCollection 业务类型主键集合
|
* @return 业务类型列表,如果有不存在的不会返回,全部不存在的则返回空列表
|
* @throws ServiceException 参数为空或者查询出错时会抛出错误
|
*/
|
List<BtmTypeVO> listBtmTypeByOidCollection(Collection<String> pkBtmTypeCollection) throws ServiceException;
|
|
/**
|
* 根据英文名称获取业务类型
|
* @param id 英文名称
|
* @return 业务类型,如果不存在会返回null
|
* @throws ServiceException 参数为空或者查询出错时会抛出错误
|
*/
|
BtmTypeVO getBtmTypeById(String id) throws ServiceException;
|
|
/**
|
* 根据英文名称批量获取业务类型
|
* @param ids 英文名称,使用逗号分隔
|
* @return 业务类型列表,如果有不存在的不会返回,全部不存在的则返回空列表
|
* @throws ServiceException 参数为空或者查询出错时会抛出错误
|
*/
|
List<BtmTypeVO> listBtmTypeByIds(String ids) throws ServiceException;
|
|
/**
|
* 根据英文名称集合批量获取业务类型
|
* @param idCollection 英文名称集合
|
* @return 业务类型列表,如果有不存在的不会返回,全部不存在的则返回空列表
|
* @throws ServiceException 参数为空或者查询出错时会抛出错误
|
*/
|
List<BtmTypeVO> listBtmTypeByIdCollection(Collection<String> idCollection) throws ServiceException;
|
|
/**
|
* 根据英文名称集合批量获取业务类型的数据对象
|
* @param idCollection 英文名称集合
|
* @return 业务类型列表,如果有不存在的不会返回,全部不存在的则返回空列表
|
* @throws ServiceException 参数为空或者查询出错时会抛出错误
|
*/
|
List<BtmType> listBtmTypeDOByIdCollection(Collection<String> idCollection) throws ServiceException;
|
|
/**
|
* 根据主键集合批量获取业务类型的数据对象
|
* @param oidCollection 主键
|
* @return 业务类型列表,如果有不存在的不会返回,全部不存在的则返回空列表
|
* @throws ServiceException 参数为空或者查询出错时会抛出错误
|
*/
|
List<BtmType> listBtmTypeDOByOidCollection(Collection<String> oidCollection) throws ServiceException;
|
|
/**
|
* 根据业务类型主键获取中文名称
|
* @param oid 业务类型主键,多个使用逗号分隔
|
* @return 中文名称,如果不存在会返回null;多个会以逗号分隔
|
* @throws ServiceException 参数为空或者查询出错时会抛出错误
|
*/
|
String getNameByOid(String oid) throws ServiceException;
|
|
/**
|
* 根据业务类型英文名称获取中文名称
|
* @param id 业务类型英文名称
|
* @return 中文名称,如果不存在会返回null;多个会以逗号分隔
|
* @throws ServiceException 参数为空或者查询出错时会抛出错误
|
*/
|
String getNameById(String id) throws ServiceException;
|
|
/**
|
* 根据业务类型主键获取关联的所有属性对象
|
* @param oid 业务类型主键
|
* @return 所有的属性对象,包括系统属性
|
* @throws ServiceException 业务类型不存在,参数为空或查询出错时会抛出错误
|
*/
|
List<BtmTypeAttributeVO> listHasAttributesByOid(String oid) throws ServiceException;
|
|
/**
|
* 根据业务类型英文名称获取关联的所有属性对象
|
* @param id 业务类型英文名称
|
* @return 所有的属性对象,包括系统内置属性
|
* @throws ServiceException 业务类型不存在,参数为空或者查询出错时会抛出异常
|
*/
|
List<BtmTypeAttributeVO> listHasAttributeById(String id) throws ServiceException;
|
|
/**
|
* 根据业务类型主键获取关联的所有属性对象
|
*
|
* @param oidCollection 业务类型主键集合
|
* @return 所有的属性对象,包括系统内置属性,key是业务类型主键,value是包含的属性
|
* @throws ServiceException 业务类型不存在,参数为空或者查询出错时会抛出异常
|
*/
|
Map<String,List<BtmTypeAttributeVO>> batchListHasAttributesByOidCollection(Collection<String> oidCollection) throws ServiceException;
|
|
/**
|
* 根据业务类型英文名称获取关联的所有属性对象
|
*
|
* @param idCollection 业务类型英文名称集合
|
* @return 所有的属性对象,包括系统内置属性,key是业务类型主键,value是包含的属性
|
* @throws ServiceException 业务类型不存在,参数为空或者查询出错时会抛出异常
|
*/
|
Map<String,List<BtmTypeAttributeVO>> batchListHasAttributesByIdCollection(Collection<String> idCollection) throws ServiceException;
|
|
|
/**
|
* 获取使用业务类型的链接类型
|
* @param pkBtmType 业务类型主键
|
* @return 引用的链接类型
|
* @throws ServiceException 参数为空或者查询出错时会抛出异常
|
*/
|
List<LinkTypeVO> listLinkTypeForUsedBtmType(String pkBtmType) throws ServiceException;
|
|
/**
|
* 校验业务类型是否被引用
|
* @param pkBtmType 业务类型的主键
|
* @return true表示被引用, false表示没有被引用
|
* @throws ServiceException 参数为空或者查询出错时会抛出错误
|
*/
|
boolean checkBtmTypeUsed(String pkBtmType) throws ServiceException;
|
|
/**
|
* 校验业务类型是否被引用
|
*
|
* @param oidCollection 业务类型的主键集合
|
* @return true表示被引用, false表示没有被引用
|
* @throws ServiceException 参数为空或者查询出错时会抛出错误
|
*/
|
boolean checkBtmTypeUseds(Collection<String> oidCollection) throws ServiceException;
|
|
/**
|
* 删除业务类型
|
* @param btmTypeVO 业务类型显示对象
|
* @param autoDeleteTable 自动删除表格
|
* @throws ServiceException 如果业务类型被引用,或者删除出错时会抛出异常
|
*/
|
void delete(BtmTypeVO btmTypeVO, boolean autoDeleteTable) throws ServiceException;
|
|
/**
|
* 批量删除业务类型
|
* @param btmTypeVOList 要删除的业务类型显示对象列表
|
* @param autoDeleteTable 自动删除表格
|
* @throws ServiceException 如果业务类型被引用,或者删除出错时会抛出异常
|
*/
|
void batchDelete(List<BtmTypeVO> btmTypeVOList, boolean autoDeleteTable) throws ServiceException;
|
|
/**
|
* 检查业务类型与数据库表是否一致
|
* @param pkBtmType 业务类型主键
|
* @return 不同的属性信息
|
* @throws ServiceException 参数为空或者查询出错时会抛出异常
|
*/
|
List<ModifyAttributeInfo> checkDbTableSame(String pkBtmType) throws ServiceException;
|
|
/**
|
* 获取数据库表,支持业务类型和视图
|
* @param id 业务类型的名称
|
* @param domain 领域名称
|
* @return 数据库表的名称
|
* @throws ServiceException 参数为空的时候会抛出异常
|
*/
|
String getTableName(String id,String domain) throws ServiceException;
|
|
/**
|
* 新增或修改业务类型
|
* @param btmTypeDTO 业务类型页面传输对象
|
* @param autoCreateTable 自动创建表
|
* @return 执行结果
|
*/
|
R submit(BtmTypeDTO btmTypeDTO,boolean autoCreateTable);
|
|
/**
|
* 按domain分组,查询业务类型属性结构
|
* @return 查询结果
|
*/
|
List<BtmTreeVO> treeDomain();
|
|
/**
|
* 从数据库表中获取
|
* @param domain 领域值
|
* @return 读取结果
|
*/
|
List<BtmTypeVO> getFromTable(String domain);
|
|
/**
|
* 选择数据库表保存为业务类型
|
* @param btmTypeDTOList 页面传输对象
|
* @param domain 领域
|
* @return 执行结果
|
*/
|
List<BtmTypeVO> saveFromTable(List<BtmTypeDTO> btmTypeDTOList,String domain);
|
|
/**
|
* 按照业务类型id获取默认属性
|
* @param btmTypeId 业务类型id
|
* @return 业务类型
|
*/
|
BtmTypeVO getDefaultAttrByBtmId(String btmTypeId);
|
|
/**
|
* 按照业务类型id获取所有的属性
|
* @param btmTypeId 业务类型id
|
* @return 业务类型
|
*/
|
BtmTypeVO getAllAttributeByBtmId(String btmTypeId);
|
|
/**
|
* 按照业务类型主键获取所有的属性
|
* @param btmTypeOid 业务类型主键
|
* @return 业务类型
|
*/
|
BtmTypeVO getAllAttributeByBtmOid(String btmTypeOid);
|
|
/**
|
* 获取引用某个生命周期的业务类型
|
* @param lifeId 生命周期的编号
|
* @return 业务类型显示对象
|
*/
|
List<BtmTypeVO> selectByLifeId(String lifeId);
|
|
/**
|
* 获取引用某些生命周期的业务类型
|
* @param lifeIds 生命周期的编号集合
|
* @return 业务类型显示对象
|
*/
|
List<BtmTypeVO> selectByLifeIds(Collection<String> lifeIds);
|
|
/**
|
* 统计引用某个生命周期的业务类型
|
* @param lifeId 生命周期的编号
|
* @return 个数
|
*/
|
Integer countByLifeId(String lifeId);
|
|
/**
|
* 统计引用某些生命周期的业务类型
|
* @param lifeIds 生命周期的编号集合
|
* @return 个数
|
*/
|
Integer countByLifeIds(Collection<String> lifeIds);
|
}
|