package com.vci.ubcs.omd.service;
|
|
import com.vci.ubcs.omd.dto.OmdBtmTypeDTO;
|
import com.vci.ubcs.omd.dto.OmdBtmTypeLinkAttributesDTO;
|
import com.vci.ubcs.omd.entity.OmdBtmType;
|
import com.vci.ubcs.omd.entity.OmdBtmTypeAttribute;
|
import com.vci.ubcs.omd.entity.OsModifyAttributeInfoDO;
|
import com.vci.ubcs.omd.vo.OmdBtmTypeVO;
|
import com.vci.ubcs.omd.vo.OmdBtmTypeAttributeVO;
|
import com.vci.ubcs.omd.vo.OsLinkTypeVO;
|
import org.springblade.core.log.exception.ServiceException;
|
import org.springblade.core.mp.base.BaseService;
|
|
import java.util.Collection;
|
import java.util.Date;
|
import java.util.List;
|
import java.util.Map;
|
|
/**
|
* 业务类型服务接口
|
* @author weidy
|
* @date 2019/10/13 2:33 PM
|
*/
|
public interface IOmdBtmTypeService extends BaseService<OmdBtmType> {
|
|
/**
|
* 设置平台本身的业务类型
|
* @param platformBtmType 平台本身的业务类型
|
*/
|
void setPlatformBtmType(Collection<String> platformBtmType);
|
|
/**
|
* 根据主键获取业务类型
|
* @param pkBtmType 业务类型主键
|
* @return 业务类型,如果不存在会返回null
|
* @throws ServiceException 参数为空或者查询出错时会抛出错误
|
*/
|
OmdBtmTypeVO getBtmTypeByOid(String pkBtmType) throws ServiceException;
|
|
/**
|
* 根据主键批量获取业务类型
|
* @param pkBtmTypes 业务类型主键,用逗号分隔
|
* @return 业务类型列表,如果有不存在的不会返回,全部不存在的则返回空列表
|
* @throws ServiceException 参数为空或者查询出错时会抛出错误
|
*/
|
List<OmdBtmTypeVO> listBtmTypeByOids(String pkBtmTypes) throws ServiceException;
|
|
/**
|
* 批量根据主键获取业务类型
|
* @param pkBtmTypeCollection 业务类型主键集合
|
* @return 业务类型列表,如果有不存在的不会返回,全部不存在的则返回空列表
|
* @throws ServiceException 参数为空或者查询出错时会抛出错误
|
*/
|
List<OmdBtmTypeVO> listBtmTypeByOidCollection(Collection<String> pkBtmTypeCollection) throws ServiceException;
|
|
/**
|
* 根据英文名称获取业务类型
|
* @param id 英文名称
|
* @return 业务类型,如果不存在会返回null
|
* @throws ServiceException 参数为空或者查询出错时会抛出错误
|
*/
|
OmdBtmTypeVO getBtmTypeById(String id) throws ServiceException;
|
|
/**
|
* 根据英文名称批量获取业务类型
|
* @param ids 英文名称,使用逗号分隔
|
* @return 业务类型列表,如果有不存在的不会返回,全部不存在的则返回空列表
|
* @throws ServiceException 参数为空或者查询出错时会抛出错误
|
*/
|
List<OmdBtmTypeVO> listBtmTypeByIds(String ids) throws ServiceException;
|
|
/**
|
* 根据英文名称集合批量获取业务类型
|
* @param idCollection 英文名称集合
|
* @return 业务类型列表,如果有不存在的不会返回,全部不存在的则返回空列表
|
* @throws ServiceException 参数为空或者查询出错时会抛出错误
|
*/
|
List<OmdBtmTypeVO> listBtmTypeByIdCollection(Collection<String> idCollection) throws ServiceException;
|
|
/**
|
* 根据英文名称集合批量获取业务类型的数据对象
|
* @param idCollection 英文名称集合
|
* @return 业务类型列表,如果有不存在的不会返回,全部不存在的则返回空列表
|
* @throws ServiceException 参数为空或者查询出错时会抛出错误
|
*/
|
List<OmdBtmType> listBtmTypeDOByIdCollection(Collection<String> idCollection) throws ServiceException;
|
|
/**
|
* 根据主键集合批量获取业务类型的数据对象
|
* @param oidCollection 主键
|
* @return 业务类型列表,如果有不存在的不会返回,全部不存在的则返回空列表
|
* @throws ServiceException 参数为空或者查询出错时会抛出错误
|
*/
|
List<OmdBtmType> 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<OmdBtmTypeAttributeVO> listHasAttributesByOid(String oid) throws ServiceException;
|
|
/**
|
* 根据业务类型英文名称获取关联的所有属性对象
|
* @param id 业务类型英文名称
|
* @return 所有的属性对象,包括系统内置属性
|
* @throws ServiceException 业务类型不存在,参数为空或者查询出错时会抛出异常
|
*/
|
List<OmdBtmTypeAttributeVO> listHasAttributeById(String id) throws ServiceException;
|
|
/**
|
* 根据业务类型主键获取关联的所有属性对象
|
*
|
* @param oidCollection 业务类型主键集合
|
* @return 所有的属性对象,包括系统内置属性,key是业务类型主键,value是包含的属性
|
* @throws ServiceException 业务类型不存在,参数为空或者查询出错时会抛出异常
|
*/
|
Map<String,List<OmdBtmTypeAttributeVO>> batchListHasAttributesByOidCollection(Collection<String> oidCollection) throws ServiceException;
|
|
/**
|
* 根据业务类型英文名称获取关联的所有属性对象
|
*
|
* @param idCollection 业务类型英文名称集合
|
* @return 所有的属性对象,包括系统内置属性,key是业务类型主键,value是包含的属性
|
* @throws ServiceException 业务类型不存在,参数为空或者查询出错时会抛出异常
|
*/
|
Map<String,List<OmdBtmTypeAttributeVO>> batchListHasAttributesByIdCollection(Collection<String> idCollection) throws ServiceException;
|
|
|
/**
|
* 获取使用业务类型的链接类型
|
* @param pkBtmType 业务类型主键
|
* @return 引用的链接类型
|
* @throws ServiceException 参数为空或者查询出错时会抛出异常
|
*/
|
List<OsLinkTypeVO> 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 btmTypeDTO 业务类型数据传输对象
|
* @param autoCreateTable 是否自动创建表格
|
* @return 添加后的业务类型
|
* @throws ServiceException 添加出错的时候会抛出异常
|
*/
|
OmdBtmTypeDTO addSave(OmdBtmTypeDTO btmTypeDTO, boolean autoCreateTable) throws ServiceException;
|
|
/**
|
* 修改业务类型
|
* @param btmTypeDTO 业务类型数据传输对象
|
* @param autoEditTable 是否自动更新表格
|
* @return 修改后的业务类型
|
* @throws ServiceException 修改出错的时候会抛出异常
|
*/
|
OmdBtmTypeDTO editSave(OmdBtmTypeDTO btmTypeDTO, boolean autoEditTable) throws ServiceException;
|
|
/**
|
* 删除业务类型
|
* @param btmTypeVO 业务类型显示对象
|
* @param autoDeleteTable 自动删除表格
|
* @throws ServiceException 如果业务类型被引用,或者删除出错时会抛出异常
|
*/
|
void delete(OmdBtmTypeVO btmTypeVO,boolean autoDeleteTable) throws ServiceException;
|
|
/**
|
* 批量删除业务类型
|
* @param btmTypeVOList 要删除的业务类型显示对象列表
|
* @param autoDeleteTable 自动删除表格
|
* @throws ServiceException 如果业务类型被引用,或者删除出错时会抛出异常
|
*/
|
void batchDelete(List<OmdBtmTypeVO> btmTypeVOList,boolean autoDeleteTable) throws ServiceException;
|
|
/**
|
* 检查业务类型与数据库表是否一致
|
* @param pkBtmType 业务类型主键
|
* @return 不同的属性信息
|
* @throws ServiceException 参数为空或者查询出错时会抛出异常
|
*/
|
List<OsModifyAttributeInfoDO> checkDbTableSame(String pkBtmType) throws ServiceException;
|
|
/**
|
* 获取数据库表,支持业务类型和视图
|
* @param id 业务类型的名称
|
* @return 数据库表的名称
|
* @throws ServiceException 参数为空的时候会抛出异常
|
*/
|
String getTableName(String id) throws ServiceException;
|
|
/**
|
* 将业务类型使用的属性的传输对象转换为数据对象
|
* @param attributesDTO 属性的数据传输对象
|
* @param pkBtmType 业务类型的主键
|
* @param creator 创建人
|
* @param now 当前时间
|
* @return 属性的数据对象
|
*/
|
OmdBtmTypeAttribute btmTypeAttributeDTO2DO(OmdBtmTypeLinkAttributesDTO attributesDTO, String pkBtmType, String creator, Date now);
|
|
/**
|
* 业务类型的属性显示对象转换为数据对象
|
* @param thisBtmTypeHasAttributeVOList 业务类型属性显示对象
|
* @return 数据对象
|
*/
|
List<OmdBtmTypeAttribute> btmTypeAttributeVO2DO(List<OmdBtmTypeAttributeVO> thisBtmTypeHasAttributeVOList);
|
|
/**
|
* 批量将业务类型的数据对象转换为显示对象
|
* @param attributeDOList 属性的数据对象列表
|
* @return 属性的显示对象列表
|
*/
|
List<OmdBtmTypeAttributeVO> batchBtmTypeAttributeDO2VO(List<OmdBtmTypeAttribute> attributeDOList);
|
|
/**
|
* 批量将业务类型的数据对象转换为显示对象
|
* @param attributesDO 属性的数据对象
|
* @return 属性的显示对象列表
|
*/
|
OmdBtmTypeAttributeVO btmTypeAttributeDO2VO(OmdBtmTypeAttribute attributesDO);
|
|
/**
|
* 获取业务类型的指定属性
|
* @param id 链接类型的英文名称
|
* @param attributeIdCollection 属性的集合,如果为空则获取全部
|
* @return 属性的显示对象
|
*/
|
List<OmdBtmTypeAttribute> listAttributeDOByIdsForBtm(String id, Collection<String> attributeIdCollection);
|
|
/**
|
* 根据业务类型的编号获取属性
|
* @param id 业务类型的编号
|
* @return 属性的显示对象
|
*/
|
List<OmdBtmTypeAttributeVO> listAttributeByBtmTypeId(String id);
|
|
/**
|
* 根据业务类型的主键获取属性
|
* @param oid 业务类型的主键
|
* @return 属性的显示对象
|
*/
|
List<OmdBtmTypeAttributeVO> listAttributeByBtmTypeOid(String oid);
|
|
/**
|
* 批量根据业务类型编号或者主键获取包含的属性
|
* @param oidsOrIds 主键或者编号集合
|
* @param queryById 是否使用编号查询
|
* @return key是业务类型的主键或者编号,值是包含的属性的信息
|
* @throws ServiceException 参数为空或者查询出错会抛出异常
|
*/
|
List<OmdBtmTypeAttributeVO> batchListAttributeByBtmType(Collection<String> oidsOrIds, boolean queryById) throws ServiceException;
|
|
/**
|
* 新增或修改业务类型
|
* @param btmTypeDTO 业务类型页面传输对象
|
* @return 执行结果
|
*/
|
boolean submit(OmdBtmTypeDTO btmTypeDTO);
|
}
|