package cn.iocoder.yudao.module.rescue.service;


import cn.iocoder.yudao.module.rescue.domain.RescueInfo;
import cn.iocoder.yudao.module.rescue.domain.RescueRefuelRecord;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * 加油记录Service接口
 *
 * @author zcy
 * @date 2023-09-26
 */
public interface IRescueRefuelRecordService  extends IService<RescueRefuelRecord>
{
    /**
     * 查询加油记录
     *
     * @param id 加油记录主键
     * @return 加油记录
     */
    public RescueRefuelRecord selectRescueRefuelRecordById(Long id);

    /**
     * 查询加油记录列表
     *
     * @param rescueRefuelRecord 加油记录
     * @return 加油记录集合
     */
    IPage<RescueRefuelRecord> selectRescueRefuelRecordList(RescueRefuelRecord rescueRefuelRecord, Page<RescueRefuelRecord> page);

    /**
     * 新增加油记录
     *
     * @param rescueRefuelRecord 加油记录
     * @return 结果
     */
    public int insertRescueRefuelRecord(RescueRefuelRecord rescueRefuelRecord);

    /**
     * 修改加油记录
     *
     * @param rescueRefuelRecord 加油记录
     * @return 结果
     */
    public int updateRescueRefuelRecord(RescueRefuelRecord rescueRefuelRecord);

    /**
     * 批量删除加油记录
     *
     * @param ids 需要删除的加油记录主键集合
     * @return 结果
     */
    public int deleteRescueRefuelRecordByIds(Long[] ids);

    /**
     * 删除加油记录信息
     *
     * @param id 加油记录主键
     * @return 结果
     */
    public int deleteRescueRefuelRecordById(Long id);
    public JSONObject getMonthRescueRefuelRecord(Long driverId, String time, Long carId);
    JSONObject listData(RescueInfo rescueInfo);

    /**
     * 救援大屏日常费用统计
     * @param timeType day 日  week 周  month 月
     * @return
     */
    Map<String, Object> getRescueExpenseCount(String timeType);
}
