package cn.hnthyy.thmz.mapper.his;

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

import java.util.List;

public interface ZyDepositFileMapper {
    /**
     * 根据住院号和次数查询缴费记录
     * @param zyDepositFile
     * @return
     */
    @Select("  SELECT inpatient_no," +
            "         admiss_times," +
            "         depo_times," +
            "         depo_date," +
            "         depo_amount," +
            "         depo_type," +
            "         status=case when window_no='2' and status='2' then '4' " +
            "                     when window_no='2' and status='4' then '3' " +
            "                     else status end," +
            "         cheque_no ," +
            "         receipt_no," +
            "         op_id_code," +
            "         ledger_sn ," +
            "         printed   ," +
            "         window_no  " +
            "    FROM zy_deposit_file " +
            "   WHERE " +
            "          inpatient_no = #{inpatientNo}  AND  " +
            "          admiss_times = #{admissTimes}   ")
    List<ZyDepositFile> selectZyDepositFileBYInpatientNoAndTimes(ZyDepositFile zyDepositFile);

}
