package com.iformall.service;

import com.iformall.common.ResultData;
import com.iformall.domain.po.MallUserInfo;
import com.iformall.domain.po.WxBillSettle;
import com.iformall.domain.vo.WxBillAll;
import com.iformall.domain.vo.WxBillExcelTemplate;
import com.iformall.domain.vo.WxBillExcelTemplateOther;
import com.iformall.enums.EnumBillAction;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * @author gongbiao
 */
public interface WxBillAllService {

    List<Map<String, Object>> allDepositList(WxBillAll wxBillAll);

    Map<String, Object> listAsPage(WxBillAll wxBillAll, Integer pageNum, Integer pageSize);

    List<Map<String, Object>> listBillOweAndWaitPay(WxBillAll wxBillAll);

    ResultData listBill(WxBillAll wxBillAll);

    void updateBill(Map<String, Object> bill);

    void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillAll wxBillAll);

    Object getBillInfo(WxBillAll wxBillAll);

    Long hasOweBill(Long contractId, Integer type);

    /**
     * 发送待缴通知邮件
     */
    void sendWaitPayBillEmail();

    /**
     * 发送欠缴通知邮件
     */
    void sendOweBillForEmail();

    /**
     * 欠缴商户分页列表
     *
     * @return
     */
    Map<String, Object> getOweBillAsPage(WxBillAll record, Integer pageNum, Integer pageSize);


    /**
     * 应收和承付商户分页列表
     *
     * @return
     */
    Map<String, Object> getReceiveAndPayBillAsPage(WxBillAll record, Integer pageNum, Integer pageSize);

    void exportReceiveAndPayBillAsPage(WxBillAll record,  HttpServletRequest request, HttpServletResponse response);

    void exportOweMerchant(WxBillAll record, HttpServletRequest request, HttpServletResponse response);

    void exportWaitMerchant(WxBillAll record, HttpServletRequest request, HttpServletResponse response);

    void updateBillStatus(WxBillAll record);

    void exportOweBill(WxBillAll wxBillAll, HttpServletRequest request, HttpServletResponse response);

    void exportSettleBill(WxBillSettle wxBillSettle, HttpServletRequest request, HttpServletResponse response);

    ResultData updateReceivePay(WxBillAll wxBillAll, MallUserInfo user);

    void addBillAction(EnumBillAction billAction, Long billId, Long oldPrice, Long newPrice, MallUserInfo mallUserInfo);

    void exportTemplate(WxBillExcelTemplate wxBillExcelTemplate, HttpServletRequest request, HttpServletResponse response);

    void importBill(String tenantId, String importKey, WxBillExcelTemplate bill, MallUserInfo user);

    void importBillOther(String tenantId, String importKey, WxBillExcelTemplateOther bill, MallUserInfo user);

}