package cn.hnthyy.thmz.mapper.his;

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

import java.util.List;

public interface MzyZdChargeTypeMapper {
    /**
     * 查询所有的号别
     * @return
     */
    @Select("SELECT rtrim(code) code,rtrim(name) name,rtrim(py_code) py_code,rtrim(d_code) self_code,req_fee,clinic_fee,oth_fee,del_flag,rtrim(req_type) req_type,sort_no,print_flag FROM mzy_zd_charge_type where (del_flag  <> 1  or del_flag is null )")
    List<MzyZdChargeType> selectAllMzyZdChargeType();

    /**
     * 根据号别的编号查询号别
     * @param code
     * @return
     */
    @Select("SELECT rtrim(code) code,rtrim(name) name,rtrim(py_code) py_code,rtrim(d_code) self_code,req_fee,clinic_fee,oth_fee,del_flag,rtrim(req_type) req_type,sort_no,print_flag FROM mzy_zd_charge_type where code =#{code} ")
    MzyZdChargeType selectByCode(@Param("code") String code);
}
