package com.ltkj.hosp.mapper;
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.ltkj.hosp.domain.DictSfxm;
|
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Select;
|
|
import java.util.List;
|
|
/**
|
* 收费项目Mapper接口
|
*
|
* @author ltkj
|
* @date 2023-03-22
|
*/
|
@Mapper
|
public interface DictSfxmMapper extends BaseMapper<DictSfxm> {
|
/**
|
* 查询收费项目
|
*
|
* @param id 收费项目主键
|
* @return 收费项目
|
*/
|
public DictSfxm selectDictSfxmById(Long id);
|
|
/**
|
* 查询收费项目列表
|
*
|
* @param dictSfxm 收费项目
|
* @return 收费项目集合
|
*/
|
public List<DictSfxm> selectDictSfxmList(DictSfxm dictSfxm);
|
|
List<DictSfxm> selectDictSfxmListLimit(@Param("dictSfxm") DictSfxm dictSfxm, @Param("page") Integer page, @Param("size") Integer size);
|
|
Integer selectDictSfxmListCount(@Param("dictSfxm") DictSfxm dictSfxm);
|
|
/**
|
* 新增收费项目
|
*
|
* @param dictSfxm 收费项目
|
* @return 结果
|
*/
|
public int insertDictSfxm(DictSfxm dictSfxm);
|
|
/**
|
* 修改收费项目
|
*
|
* @param dictSfxm 收费项目
|
* @return 结果
|
*/
|
public int updateDictSfxm(DictSfxm dictSfxm);
|
|
/**
|
* 删除收费项目
|
*
|
* @param id 收费项目主键
|
* @return 结果
|
*/
|
public int deleteDictSfxmById(Long id);
|
|
/**
|
* 批量删除收费项目
|
*
|
* @param ids 需要删除的数据主键集合
|
* @return 结果
|
*/
|
public int deleteDictSfxmByIds(Long[] ids);
|
|
|
@Select("SELECT * FROM dict_sfxm a WHERE CHAR_LENGTH(a.xmbm)=2")
|
List<DictSfxm> getYjDictSfxmList();
|
|
|
@Select("SELECT * FROM dict_sfxm a WHERE CHAR_LENGTH(a.xmbm)=4 AND SUBSTR(a.xmbm,1,2)=(SELECT a.xmbm FROM dict_sfxm a WHERE a.id=#{id})")
|
List<DictSfxm> getEjDictSfxmList(Long id);
|
|
|
@Select("SELECT * FROM dict_sfxm a WHERE CHAR_LENGTH(a.xmbm)>4 AND SUBSTR(a.xmbm,1,4)=(SELECT a.xmbm FROM dict_sfxm a WHERE a.id=#{id})")
|
List<DictSfxm> getSjDictSfxmList(Long id);
|
}
|