package com.tmerclub.cloud.supplier.service;

import com.tmerclub.cloud.common.database.dto.PageDTO;
import com.tmerclub.cloud.common.database.vo.PageVO;
import com.tmerclub.cloud.supplier.dto.PurchaseAmountLogDTO;
import com.tmerclub.cloud.supplier.mongo.MongoPurchaseAmountLogBO;
import com.tmerclub.cloud.supplier.vo.ShopSupplierNameVO;
import com.tmerclub.cloud.supplier.vo.TotalPurchaseAmountVO;
import com.tmerclub.cloud.supplier.vo.mongo.MongoPurchaseAmountLogVO;
import jakarta.servlet.http.HttpServletResponse;

import java.util.List;

/**
 * @author gaozijie
 * @date 2023-08-28
 */
public interface PurchaseAmountLogService {

    /**
     * 获取供应商名称列表
     * @param shopId 商家id
     * @return 供应商名称列表
     */
    List<ShopSupplierNameVO> listSupplier(Long shopId);

    /**
     * 获取商家名称列表
     * @param supplierId 供应商Id
     * @return 商家名称列表
     */
    List<ShopSupplierNameVO> listShop(Long supplierId);

    /**
     * 分页查询采购金额日志
     * @param pageDTO 分页参数
     * @param purchaseAmountLogDTO 查询参数
     * @return 采购金额日志份分页对象
     */
    PageVO<MongoPurchaseAmountLogVO> pagePurchaseAmountLog(PageDTO pageDTO,
                                                           PurchaseAmountLogDTO purchaseAmountLogDTO);

    /**
     * 保存采购金额日志
     * @param mongoPurchaseAmountLogBO 采购金额日志
     */
    void savePurchaseLog(MongoPurchaseAmountLogBO mongoPurchaseAmountLogBO);

    /**
     * 获取总采购金额数据
     * @param purchaseAmountLogDTO 查询参数
     * @return 总采购金额对象
     */
    TotalPurchaseAmountVO getTotalPurchaseAmount(PurchaseAmountLogDTO purchaseAmountLogDTO);

    /**
     * 导出excel
     * @param response 响应
     * @param purchaseAmountLogDTO 查询参数
     */
    void exportExcel(HttpServletResponse response, PurchaseAmountLogDTO purchaseAmountLogDTO);

}
