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

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 cn.iocoder.yudao.module.inspection.entity.InspectionAppointment;
import cn.iocoder.yudao.module.inspection.entity.InspectionPickCar;

import java.util.List;

/**
 * 【请填写功能名称】Service接口
 *
 * @author ruoyi
 * @date 2023-08-24
 */
public interface IInspectionAppointmentService  extends IService<InspectionAppointment>
{
    /**
     * 查询【请填写功能名称】
     *
     * @param id 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    public InspectionAppointment selectInspectionAppointmentById(Long id);

    /**
     * 查询【请填写功能名称】列表
     *
     * @param inspectionAppointment 【请填写功能名称】
     * @return 【请填写功能名称】集合
     */
    public IPage<InspectionAppointment> selectInspectionAppointmentList(Page<InspectionAppointment> page, InspectionAppointment inspectionAppointment);

    /**
     * 新增【请填写功能名称】
     *
     * @param inspectionAppointment 【请填写功能名称】
     * @return 结果
     */
    public int insertInspectionAppointment(InspectionAppointment inspectionAppointment);

    /**
     * 修改【请填写功能名称】
     *
     * @param inspectionAppointment 【请填写功能名称】
     * @return 结果
     */
    public int updateInspectionAppointment(InspectionAppointment inspectionAppointment);

    /**
     * 批量删除【请填写功能名称】
     *
     * @param ids 需要删除的【请填写功能名称】主键集合
     * @return 结果
     */
    public int deleteInspectionAppointmentByIds(Long[] ids);

    /**
     * 删除【请填写功能名称】信息
     *
     * @param id 【请填写功能名称】主键
     * @return 结果
     */
    public int deleteInspectionAppointmentById(Long id);

    Long appointmentInspection(InspectionAppointment appointment);
    Long editAppointment(InspectionAppointment appointment);
    void delAppointment(Long appointmentId);
    Long pickCarInspection(InspectionPickCar pickCar) throws Exception;

    JSONObject appointmentDateList(Long goodsId,String type);
    JSONObject pickCarInfo();
    JSONObject computeDistanceAndPrice(Long goodsId,Double longitude,Double latitude,String type ) throws Exception;

    public IPage<InspectionAppointment> getAppointmentList(Page<InspectionAppointment> page, Long partnerId, String phoneNum);
    List<InspectionAppointment> getAppointmentOwn();
}
