/*
 * Copyright [2022] [https://www.xiaonuo.vip]
 *
 * Snowy采用APACHE LICENSE 2.0开源协议，您在使用过程中，需要注意以下几点：
 *
 * 1.请不要删除和修改根目录下的LICENSE文件。
 * 2.请不要删除和修改Snowy源码头部的版权声明。
 * 3.本项目代码可免费商业使用，商业使用请保留源码和相关描述文件的项目出处，作者声明等。
 * 4.分发源码时候，请注明软件出处 https://www.xiaonuo.vip
 * 5.不可二次分发开源参与同类竞品，如有想法可联系团队xiaonuobase@qq.com商议合作。
 * 6.若您的项目无法满足以上几点，需要更多功能代码，获取Snowy商业授权许可，请在官网购买授权，地址为 https://www.xiaonuo.vip
 */
package vip.xiaonuo.biz.modular.record.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.servlet.http.HttpServletResponse;
import vip.xiaonuo.biz.modular.record.entity.BizRecord;
import vip.xiaonuo.biz.modular.record.param.*;
import vip.xiaonuo.biz.modular.record.result.CarResult;
import vip.xiaonuo.biz.modular.record.result.CompanyResult;
import vip.xiaonuo.biz.modular.record.result.GoodsResult;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * 过磅记录Service接口
 *
 * @author 徐超
 * @date 2025/01/02 16:34
 **/
public interface BizRecordService extends IService<BizRecord> {

    /**
     * 获取过磅记录分页
     *
     * @author 徐超
     * @date 2025/01/02 16:34
     */
    Page<BizRecord> page(BizRecordPageParam bizRecordPageParam);

    /**
     * 添加过磅记录
     *
     * @author 徐超
     * @date 2025/01/02 16:34
     */
    void add(BizRecordAddParam bizRecordAddParam);

    /**
     * 地磅端推送过磅记录
     * @param bizRecordEditParam
     */
    void push(BizRecordEditParam bizRecordEditParam);

    /**
     * 编辑过磅记录
     *
     * @author 徐超
     * @date 2025/01/02 16:34
     */
    void edit(BizRecordEditParam bizRecordEditParam);

    /**
     * 删除过磅记录
     *
     * @author 徐超
     * @date 2025/01/02 16:34
     */
    void delete(List<BizRecordIdParam> bizRecordIdParamList);

    /**
     * 获取过磅记录详情
     *
     * @author 徐超
     * @date 2025/01/02 16:34
     */
    BizRecord detail(BizRecordIdParam bizRecordIdParam);

    /**
     * 获取过磅记录详情
     *
     * @author 徐超
     * @date 2025/01/02 16:34
     **/
    BizRecord queryEntity(String id);


    /**
     * 导出
     * @param exportParam
     * @param response
     * @throws IOException
     */
    void export(BizRecordPageParam exportParam, HttpServletResponse response) throws IOException;

    /**
     * 近七天统计
     * @param sevenDaysCountParam
     * @return
     */
    List<Map<String, Object>> sevenDaysList(SevenDaysCountParam sevenDaysCountParam);

    /**
     * 重量统计
     * @param sevenDaysCountParam
     * @return
     */
    Map<String, Object> sevenDaysCountWeight(SevenDaysCountParam sevenDaysCountParam);

    /**
     * 收货单位统计
     * @param sevenDaysCountParam
     * @return
     */
    List<CompanyResult> receiptCompanyCountList(SevenDaysCountParam sevenDaysCountParam);

    /**
     * 收货单位统计导出
     * @param sevenDaysCountParam
     * @param response
     * @throws IOException
     */
    void receiptCompanyExport(SevenDaysCountParam sevenDaysCountParam, HttpServletResponse response) throws IOException;


    /**
     *  发货单位统计
     * @param sevenDaysCountParam
     * @return
     */
    List<CompanyResult> shippingCompanyCountList(SevenDaysCountParam sevenDaysCountParam);

    /**
     * 发货单位统计导出
     * @param sevenDaysCountParam
     * @param response
     * @throws IOException
     */
    void shippingCompanyExport(SevenDaysCountParam sevenDaysCountParam, HttpServletResponse response) throws IOException;

    /**
     *  运输单位统计
     * @param sevenDaysCountParam
     * @return
     */
    List<CompanyResult> transportCompanyCountList(SevenDaysCountParam sevenDaysCountParam);

    /**
     * 运输单位统计导出
     * @param sevenDaysCountParam
     * @param response
     * @throws IOException
     */
    void transportCompanyExport(SevenDaysCountParam sevenDaysCountParam, HttpServletResponse response) throws IOException;

    /**
     * 货品统计
     * @param sevenDaysCountParam
     * @return
     */
    List<GoodsResult> goodsCountList(SevenDaysCountParam sevenDaysCountParam);

    /**
     * 运输单位统计导出
     * @param sevenDaysCountParam
     * @param response
     * @throws IOException
     */
    void goodsCountExport(SevenDaysCountParam sevenDaysCountParam, HttpServletResponse response) throws IOException;


    /**
     * 货品统计
     * @param sevenDaysCountParam
     * @return
     */
    List<CarResult> carCountList(SevenDaysCountParam sevenDaysCountParam);

    /**
     * 车辆统计导出
     * @param sevenDaysCountParam
     * @param response
     * @throws IOException
     */
    void carCountExport(SevenDaysCountParam sevenDaysCountParam, HttpServletResponse response) throws IOException;

    /**发货确认*/
    void confirmRecord(BizRecordIdParam bizRecordIdParam);

    void updateDriverSign(BizRecordEditParam bizRecordEditParam);

}
