package cn.iocoder.yudao.module.system.service.biz;


import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.system.controller.admin.biz.vo.*;
import cn.iocoder.yudao.module.system.controller.admin.biz.vo.excel.ElderlyExpenseOrderExportExcelVO;
import cn.iocoder.yudao.module.system.controller.admin.biz.vo.excel.ExpenseOrderBatchPayExcelVO;
import cn.iocoder.yudao.module.system.controller.admin.biz.vo.excel.ExpenseOrderExcelVO;
import cn.iocoder.yudao.module.system.controller.admin.biz.vo.excel.OneTimeExpenseImportExcelVO;
import cn.iocoder.yudao.module.system.dal.dataobject.biz.ExpenseOrderDO;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * 长者账单 Service 接口
 *
 * @author 系统管理员
 */
public interface ExpenseOrderService {

    /**
     * 删除未缴费的账单以及关联的明细项和日常费用
     *
     * @param id 账单ID
     */
    void deleteExpenseOrder(Long id);

    /**
     * 撤销账单支付，将已缴费的账单恢复到未缴费状态，并清除相关支付单据
     *
     * @param id 账单ID
     */
    void cancelPayment(Long id);

    PageResult<ExpenseOrderDO> getExpenseBillPage(ExpenseBillPageReqVO pageReqVO);

    void arrearsNote(Long id, String remarks);

    ExpenseBillRespVO getExpenseBill(Long id);

    void payOrder(ExpensePayOrderSaveReqVO saveReqVO);

    List<ExpenseOrderItemRespVO> exportExpenseOrderItemExcel(Long expenseOrderId);

    List<ExpenseItemRespVO> queryExpenseBillItem(String billingMonth, Long elderId);

    void generateExpenseBill(ExpenseOrderSaveVO saveVO);

    void exportExpenseOrderExcel(HttpServletResponse response, ExpenseBillPageReqVO pageReqVO) throws IOException;

    PageResult<ExpenseOrderDO> getExpenseOrderPageByElderId(ExpenseBillPageReqVO pageReqVO);

    List<ElderlyExpenseOrderExportExcelVO> exportElderlyExpenseOrder(ExpenseBillPageReqVO pageReqVO);

    Map<String, Object> getExpenseOrderAmountByElderId(Long elderId);

    void executeMonthlyBillingStatement(Long tenantId);

    void batchGenerateExpenseBill(ExpenseOrderSaveVO saveVO,String taskId);

    List<ExpenseOrderBatchPayExcelVO> importBatchPay(List<ExpenseOrderBatchPayExcelVO> list, Long tenantId);

    Map<String, Object> importOneTimeExpenseToOrder(List<OneTimeExpenseImportExcelVO> list);

    List<ExpenseOrderBatchPayExcelVO> importBatchAddDeposit(List<ExpenseOrderBatchPayExcelVO> list, Long tenantId);

    void editExpenseOrder(ExpenseOrderEditSaveVO saveVO);

    void markCheckinBillsPaid(MarkCheckinBillsPaidReqVO reqVO);

    void markSupportElderlyBillsPaid(MarkSupportElderlyBillsPaidReqVO reqVO);

    void updateConfirmStatus(Long orderId, boolean b);

    void sendSmsBillOrder(List<Long> orderIds);

    String pushOrder(List<Long> orderIds);

    boolean checkContractNearlyExpire(Long elderId,String billingMonth);

    List<ExpenseOrderDO> getBillOrderList(ExpenseBillPageReqVO pageReqVO);
}