package com.tofly.gpsboot.handler.plan;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tofly.gpsboot.common.system.PlanStateEnum;
import com.tofly.gpsboot.service.calculate.ICalculateGpsService;
import com.tofly.gpsboot.util.DateTimeUtil;
import com.tofly.pojo.plan.Plan;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

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

/**
 * 计算gps数据统计
 * @author BZ-DJJ
 */
@Component
@Slf4j
public class CalculationGpsHandler {

    @Autowired
    private ICalculateGpsService iCalculateGpsService;

    @XxlJob("calculationGpsHandler")
    public ReturnT<String> calculationGpsHandler(String param) {
        log.info("执行gps巡检相关数据统计....");
        long l = System.currentTimeMillis();
        iCalculateGpsService.CalculateGps();
        long l1 = System.currentTimeMillis();
        log.info("耗时 :"+(l1-l)+" ms");
        return ReturnT.SUCCESS;
    }
}
