package com.hzjt.service;

import com.hzjt.domain.Vehicle;
import com.hzjt.domain.Vehicles;
import com.hzjt.domain.Vehiclesdetail;
import com.hzjt.mapper.TraffFlowMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Service
public class TraffFlowService {

    @Autowired
    private TraffFlowMapper traffFlowMapper;


    public void saveTraffFlow(Vehicles vehicles) {
        traffFlowMapper.add(vehicles);
    }

    public int saveTraffFlowDetail(Vehicle vehiclesdetail) {
        return traffFlowMapper.insertlist(vehiclesdetail);
    }

    public List<Map> selectFiveAndDayFlow(String videoid) {
        return traffFlowMapper.selectFiveAndDayFlow(videoid);
    }

    public List<Map> selectFiveAndTypeDayFlow(String videoid) {
        return traffFlowMapper.selectFiveAndTypeDayFlow(videoid);
    }

    public Integer statisVehiclesByDay() {
        return traffFlowMapper.statisVehiclesByDay();
    }


    public void deleteBeforeTwoMonthVehicles() {
        traffFlowMapper.deleteBeforeTwoMonthVehiclesDetails();
    }


    public void deleteVehiclesByDay() {
        traffFlowMapper.deleteVehiclesByDay();
    }

    public Integer insertOrUpdatevehicleTodaystatistic() {
        return traffFlowMapper.insertOrUpdatevehicleTodaystatistic();
    }

    public String selectSbtddspsrRtspByVideoid(String videoid) {

        return traffFlowMapper.selectSbtddspsrRtspByVideoid(videoid);


    }


}