package com.fs.store.mapper;

import com.fs.store.domain.FsDepartment;
import com.fs.his.vo.OptionsVO;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 科室Mapper接口
 *
 * @author fs
 * @date 2023-06-01
 */
public interface FsDepartmentMapper
{
    /**
     * 查询科室
     *
     * @param deptId 科室主键
     * @return 科室
     */
    public FsDepartment selectFsDepartmentByDeptId(Long deptId);

    /**
     * 查询科室列表
     *
     * @param fsDepartment 科室
     * @return 科室集合
     */
    public List<FsDepartment> selectFsDepartmentList(FsDepartment fsDepartment);

    /**
     * 新增科室
     *
     * @param fsDepartment 科室
     * @return 结果
     */
    public int insertFsDepartment(FsDepartment fsDepartment);

    /**
     * 修改科室
     *
     * @param fsDepartment 科室
     * @return 结果
     */
    public int updateFsDepartment(FsDepartment fsDepartment);

    /**
     * 删除科室
     *
     * @param deptId 科室主键
     * @return 结果
     */
    public int deleteFsDepartmentByDeptId(Long deptId);

    /**
     * 批量删除科室
     *
     * @param deptIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteFsDepartmentByDeptIds(Long[] deptIds);
    @Select("select * from fs_department where dept_code=#{deptCode}")
    FsDepartment selectFsDepartmentByDeptCode(String deptCode);

    @Select("select dept_id dictValue,dept_name dictLabel from fs_department ORDER BY sort ")
    List<OptionsVO> selectFsDiseaseOptionsVO();
}
