package cn.hnthyy.thmz.mapper.his.mz;

import cn.hnthyy.thmz.entity.his.mz.MzZdWorkTime;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface MzZdWorkTimeMapper {
    /**
     * 查询所有在使用中的时间区间
     * @return
     */
    @Select("select code,rtrim(name) name,rtrim(start_time) start_time,rtrim(end_time) end_time,del_flag from mz_zd_work_time where del_flag =0")
    List<MzZdWorkTime> selectAllMzZdWorkTime();

    /**
     * 查询所有在使用中的时间区间
     * @param code
     * @return
     */
    @Select("select code,rtrim(name) name,rtrim(start_time) start_time,rtrim(end_time) end_time,del_flag from mz_zd_work_time where code =#{code} and del_flag =0 ")
    MzZdWorkTime selectMzZdWorkTimeByCode(@Param("code")String code);

}
