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

import cn.iocoder.yudao.module.rescue.domain.*;

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;


/**
 * 【请填写功能名称】Service接口
 *
 * @author ruoyi
 * @date 2023-07-18
 */
public interface IRescueDriverInfoService extends IService<RescueDriverInfo>
{

    /**
     * 新增【请填写功能名称】
     *
     * @param rescueDriverInfo 【请填写功能名称】
     * @return 结果
     */
    public int insertRescueDriverInfo(RescueDriverInfo rescueDriverInfo);
    DriverInfo driverInfoStatistics(Long driverId);
    //司机上线
    void topLine(Long driverId);
    //司机下线
    void downLine(Long driverId);
    String getStatus(Long driverId);
    //更新司机位置信息
    void updatePosition(Long driverId, JSONObject positionInfo);

    List<RescueInfo> driverRescueList(Long driverId);
    List<RescueInfo> driverRescuePage(RescueInfo rescueInfo);

    void driverAccept(Long rescueDriverId,String choose,String rejectReason) throws Exception;
    JSONObject rescueDetail(Long rescueId);
    void uploadDetailByDriver(RescueInfoDetail rescueInfoDetail) throws Exception;
    void setOrderMoney(Long rescueId,Double setMoney) throws Exception;
    void endRescue(Long rescueId) throws Exception;
    void addRefuelRecord(RescueRefuelRecord rescueRefuelRecord) throws Exception;
    IPage<RescueRefuelRecord> listRefuelRecord(RescueRefuelRecord rescueRefuelRecord, Page<RescueRefuelRecord> page);

    IPage<RescueInfo> driverRescueList2(Long id, Page<RescueInfo> page);

    IPage<RescueInfo> driverRescuePage2(RescueInfo rescueInfo, Page<RescueInfo> page);
}
