package com.clx.performance.service.trace;

import com.clx.performance.esplus.model.TruckLatestPosESPlus;
import com.clx.performance.param.temp.DriverTraceAddParam;
import com.clx.performance.param.temp.TruckTraceAddParam;
import com.clx.performance.vo.pc.trace.DriverTraceVO;
import com.clx.performance.vo.pc.trace.DriverTruckTraceVO;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

public interface TruckTraceService {

    List<DriverTruckTraceVO> listTruckTraceByTime(String truckNo, String beginTime, String endTime);
    List<DriverTraceVO> listDriverTraceByTime(Long userNo, String beginTime, String endTime);

    void truckTraceSave(TruckTraceAddParam param);

    void driverTraceSave(DriverTraceAddParam param);

    BigDecimal[] getCurrentPosition(String truckNo, Long userNo);
    BigDecimal[] getCurrentPosition(String truckNo, Long userNo, String beginTime);


    int getParkTime(String truckNo, Long userNo, LocalDateTime beginDateTime);
    int getParkTime(String truckNo, Long userNo, LocalDateTime beginTime, LocalDateTime endTime);


    BigDecimal[] getCurrentTruckPosition(String truckNo);


    List<List<DriverTraceVO>> splitDriverTrace(List<DriverTraceVO> driverTraceList);


    //计算车辆的停留结束时间
    List<DriverTruckTraceVO> calcTruckStayTime(List<DriverTruckTraceVO> traceList);

    List<DriverTraceVO> calcDriverStayTime(List<DriverTraceVO> traceList);

    List<List<DriverTruckTraceVO>> splitTruckTrace(List<DriverTruckTraceVO> traceList);


    void saveTruckTrace(String truckNo,Integer size,String gpsTime);


    TruckLatestPosESPlus getTruckLatestPos(String truckNo);

}
