package com.openhis.web.inhospitalcharge.appservice;

import java.util.List;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.core.common.core.domain.R;
import com.openhis.web.inhospitalcharge.dto.AdvancePaymentFlowRecordDto;
import com.openhis.web.inhospitalcharge.dto.AdvancePaymentInAndOutDto;
import com.openhis.web.inhospitalcharge.dto.AdvancePaymentInfoDto;

import javax.servlet.http.HttpServletRequest;

/**
 * 预交金管理 应用Service
 */
public interface IAdvancePaymentManageAppService {

    /**
     * 查询患者预交金基本信息
     * 
     * @param advancePaymentInfoDto 患者预交金基本信息dto
     * @param searchKey 模糊查询关键字
     * @param pageNo 当前页
     * @param pageSize 每页多少条
     * @param request 请求
     * @return 患者预交金基本信息
     */
    IPage<AdvancePaymentInfoDto> getAdvancePaymentInfo(AdvancePaymentInfoDto advancePaymentInfoDto, String searchKey,
        Integer pageNo, Integer pageSize, HttpServletRequest request);

    /**
     * 查询预交金支付流水记录
     *
     * @param encounterId 住院就诊Id
     * @return 预交金支付流水记录
     */
    List<AdvancePaymentFlowRecordDto> getAdvancePaymentFlowRecord(Long encounterId);

    /**
     * 预交金交款
     *
     * @param advancePaymentInAndOutDto 交款dto
     * @return 结果
     */
    R<?> inAdvancePayment(AdvancePaymentInAndOutDto advancePaymentInAndOutDto);

    /**
     * 预交金退款
     *
     * @param advancePaymentInAndOutDto 退款dto
     * @return 结果
     */
    R<?> outAdvancePayment(AdvancePaymentInAndOutDto advancePaymentInAndOutDto);

}
