package com.tofly.gpsboot.handler.plan;


import com.tofly.gpsboot.service.calculate.ICalculateGpsService;
import lombok.extern.slf4j.Slf4j;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

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

    @Autowired
    private ICalculateGpsService iCalculateGpsService;
    @Transactional(rollbackFor = Exception.class)
    public void calculationGpsHandler(String param) {
        log.info("执行gps巡检相关数据统计....");
        long l = System.currentTimeMillis();
        iCalculateGpsService.CalculateGps();
        long l1 = System.currentTimeMillis();
        log.info("耗时 :"+(l1-l)+" ms");
    }
}
