package com.vci.ubcs.omd.service;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.vci.ubcs.omd.entity.Status;
|
import com.vci.ubcs.omd.vo.StatusVO;
|
import com.vci.ubcs.starter.exception.VciBaseException;
|
import org.springblade.core.mp.support.Query;
|
|
import java.util.Collection;
|
import java.util.List;
|
import java.util.Map;
|
|
/**
|
* Description: 状态池的服务
|
*
|
* @author LiHang
|
* @date 2023/5/23
|
*/
|
public interface IStatusService extends IService<Status> {
|
|
/**
|
* 获取状态列表
|
* @param conditionMap 查询条件
|
* @param pageHelper 分页信息和排序信息,默认使用id排序
|
* @return 状态对象列表
|
* @throws VciBaseException 查询出错时会抛出异常
|
*/
|
IPage<StatusVO> listStatus(Map<String, Object> conditionMap, Query pageHelper) throws VciBaseException;
|
|
/**
|
* 获取状态列表
|
* @param conditionMap 查询条件
|
* @return 状态对象列表
|
* @throws VciBaseException 查询出错时会抛出异常
|
*/
|
List<StatusVO> listStatusNoPage(Map<String,String> conditionMap) throws VciBaseException;
|
|
/**
|
* 根据主键获取状态
|
* @param pkStatus 状态主键
|
* @return 状态,如果不存在会返回null
|
* @throws VciBaseException 参数为空或者查询出错时会抛出错误
|
*/
|
StatusVO getStatusByOid(String pkStatus) throws VciBaseException;
|
|
/**
|
* 根据主键批量获取状态
|
* @param primaryKeys 状态主键,用逗号分隔
|
* @return 状态列表,如果有不存在的不会返回,全部不存在的则返回空列表
|
* @throws VciBaseException 参数为空或者查询出错时会抛出错误
|
*/
|
List<StatusVO> listStatusByOids(String primaryKeys) throws VciBaseException;
|
|
/**
|
* 批量根据主键获取状态
|
* @param pkStatusCollection 状态主键集合
|
* @return 状态列表,如果有不存在的不会返回,全部不存在的则返回空列表
|
* @throws VciBaseException 参数为空或者查询出错时会抛出错误
|
*/
|
List<StatusVO> listStatusByOidCollection(Collection<String> pkStatusCollection) throws VciBaseException;
|
|
/**
|
* 根据英文名称获取状态
|
* @param id 英文名称
|
* @return 状态,如果不存在会返回null
|
* @throws VciBaseException 查询出错抛出异常
|
*/
|
StatusVO getStatusById(String id) throws VciBaseException;
|
|
/**
|
* 根据英文名称批量获取状态
|
* @param ids 英文名称,使用逗号分隔
|
* @return 状态列表,如果有不存在的不会返回,全部不存在的则返回空列表
|
* @throws VciBaseException 参数为空或者查询出错时会抛出错误
|
*/
|
List<StatusVO> listStatusByIds(String ids) throws VciBaseException;
|
|
/**
|
* 根据英文名称集合批量获取状态
|
* @param idCollection 英文名称集合
|
* @return 状态列表,如果有不存在的不会返回,全部不存在的则返回空列表
|
* @throws VciBaseException 参数为空或者查询出错时会抛出错误
|
*/
|
List<StatusVO> listStatusByIdCollection(Collection<String> idCollection) throws VciBaseException;
|
|
/**
|
* 根据状态主键获取中文名称
|
* @param oid 状态主键,多个使用逗号分隔
|
* @return 中文名称,如果不存在会返回null
|
* @throws VciBaseException 参数为空或者查询出错时会抛出错误
|
*/
|
String getNameByOid(String oid) throws VciBaseException;
|
|
/**
|
* 根据状态英文名称获取中文名称
|
* @param id 状态英文名称
|
* @return 中文名称,如果不存在会返回null
|
* @throws VciBaseException 参数为空或者查询出错时会抛出错误
|
*/
|
String getNameById(String id) throws VciBaseException;
|
/**
|
* 添加状态
|
* @param statusVO 状态显示对象(和DTO共用)
|
* @return 添加后的状态
|
* @throws VciBaseException 添加出错的时候会抛出异常
|
*/
|
StatusVO addSave(StatusVO statusVO) throws VciBaseException;
|
|
/**
|
* 批量添加状态
|
* @param statusVOList 状态显示对象列表(和DTO共用)
|
* @return 批量添加后的状态
|
* @throws VciBaseException 添加出错的时候会抛出异常
|
*/
|
List<StatusVO> batchAddSave(List<StatusVO> statusVOList) throws VciBaseException;
|
|
|
/**
|
* 修改状态
|
* @param statusVO 状态显示对象(和DTO共用)
|
* @return 修改后的状态
|
* @throws VciBaseException 修改出错的时候会抛出异常
|
*/
|
StatusVO editSave(StatusVO statusVO) throws VciBaseException;
|
|
/**
|
* 批量修改状态
|
* @param statusVOList 状态显示对象列表(和DTO共用)
|
* @return 批量修改后的状态
|
* @throws VciBaseException 修改出错的时候会抛出异常
|
*/
|
List<StatusVO> batchEditSave(List<StatusVO> statusVOList) throws VciBaseException;
|
|
/**
|
* 删除状态
|
* @param statusVO 状态显示对象
|
* @throws VciBaseException 如果状态被引用,或者删除出错时会抛出异常
|
*/
|
void delete(StatusVO statusVO) throws VciBaseException;
|
|
/**
|
* 批量删除状态
|
* @param statusVOList 要删除的状态显示对象列表
|
* @throws VciBaseException 如果状态被引用,或者删除出错时会抛出异常
|
*/
|
void batchDelete(List<StatusVO> statusVOList) throws VciBaseException;
|
|
/**
|
* 批量校验状态是否被使用
|
* @param oidCollection 主键集合
|
* @return true表示被引用
|
*/
|
boolean checkStatusUseds(Collection<String> oidCollection);
|
|
/**
|
* 校验状态是否被引用
|
* @param pkStatus 状态的主键
|
* @return true表示被引用, false表示没有被引用
|
* @throws VciBaseException 参数为空或者查询出错时会抛出错误
|
*/
|
boolean checkStatusUsed(String pkStatus) throws VciBaseException;
|
|
}
|