package cn.hnthyy.thmz.service.his.zy;

import cn.hnthyy.thmz.entity.MzException;
import cn.hnthyy.thmz.entity.his.zy.ZyReceipt;
import cn.hnthyy.thmz.entity.thmz.User;

import java.util.List;

/**
 * 住院发票数据库接口
 */
public interface ZyReceiptService {

    /**
     * 查询当前病人本次住院所有有效发票信息
     * @param inpatientNo
     * @param admissTimes
     * @return
     */
    List<ZyReceipt> queryAllValidReceipt(String inpatientNo, Integer admissTimes);

    /**
     * 查询当前病人本次住院所有有效且未打印发票信息
     * @param inpatientNo
     * @param admissTimes
     * @return
     */
    List<ZyReceipt> queryAllValidAndNotPrintReceipt(String inpatientNo, Integer admissTimes);


    /**
     * 根据住院号与住院次数以及账页号获取住院发票信息
     *
     * @param inpatientNo
     * @param admissTimes
     * @return
     */
    ZyReceipt queryZyReceiptByLedgerSn(String inpatientNo, Integer admissTimes, Long ledgerSn);


    /**
     * 打印发票
     * @param inpatientNo
     * @param admissTimes
     * @param ledgerSn
     * @param user
     * @return
     * @throws MzException
     */
    ZyReceipt printReceipt(String inpatientNo, Integer admissTimes, Long ledgerSn,User user) throws MzException;
}
