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

import cn.hnthyy.thmz.entity.MzException;
import cn.hnthyy.thmz.entity.his.zy.ZyDepositFile;

import java.math.BigDecimal;
import java.util.List;

public interface ZyDepositFileService {
    /**
     * 根据住院号和次数查询缴费记录
     * @param zyDepositFile
     * @return
     */
    List<ZyDepositFile> queryZyDepositFileBYInpatientNoAndTimes(ZyDepositFile zyDepositFile);

    /**
     * 保存住院收费
     * @param zyDepositFile
     * @return
     */
    int saveZyDepositFile(ZyDepositFile zyDepositFile) throws MzException;


    /**
     * 按照收据号查询该收据号的总费用  ==0 说明已经退了费  >0 说明未退费
     * @param receiptNo
     * @return
     */
    BigDecimal querySumDepoAmountByReceiptNo(String receiptNo);

    /**
     * 根据收据号将状态标记为以退费
     * @param receiptNo
     * @return
     */
    int modifyReportFlag(String receiptNo);


    /**
     * 按照收据号查询未退费的收据内容
     * @param receiptNo
     * @return
     */
    ZyDepositFile queryZyDepositFileByReceiptNo(String receiptNo);


    /**
     * 根据收据号将发票标记为已打印发票
     * @param receiptNo
     * @return
     */
    int modifyPrinted(String receiptNo);


    /**
     * 判断手机自助缴费平台对应的流水号有无成功住院预交金
     * @param psordnum
     * @param agtordnum
     * @return
     */
    ZyDepositFile queryZyDepositFileByAgtordnum(String psordnum,String agtordnum,String tableName);


    /**
     * 取消出纳 =费用申述 费用冲刷
     * @param inpatientNo
     * @param admissTimes
     * @return
     */
    int cancelCashi(String opId,String inpatientNo, Integer admissTimes) throws MzException;


    /**
     * 出纳操作
     * @param opId
     * @param zyDepositFiles
     * @return
     */
    int teller(String opId,List<ZyDepositFile> zyDepositFiles) throws MzException;

}
