package com.its.api.its.service.statistics;

import com.its.api.its.model.dto.statistics.TrafficStatDto;
import com.its.api.its.repository.statistics.TrafficTermStatisticsMapper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

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

@Slf4j
@RequiredArgsConstructor
@Service
public class TrafficTermStatisticsService {

    private final TrafficTermStatisticsMapper mapper;

    public List<TrafficStatDto> findAllLink15M(String fromDt, String toDt, String LINK_ID) {
        Map<String, String> param = new HashMap<>();
        param.put("FROM_DT", fromDt);
        param.put("TO_DT", toDt);
        param.put("LINK_ID", LINK_ID);
        return this.mapper.findAllLink15M(param);
    }
    public List<TrafficStatDto> findAllLinkHH(String fromDt, String toDt, String LINK_ID) {
        Map<String, String> param = new HashMap<>();
        param.put("FROM_DT", fromDt);
        param.put("TO_DT", toDt);
        param.put("LINK_ID", LINK_ID);
        return this.mapper.findAllLinkHH(param);
    }
    public List<TrafficStatDto> findAllLinkDD(String fromDt, String toDt, String LINK_ID) {
        Map<String, String> param = new HashMap<>();
        param.put("FROM_DT", fromDt);
        param.put("TO_DT", toDt);
        param.put("LINK_ID", LINK_ID);
        return this.mapper.findAllLinkDD(param);
    }
    public List<TrafficStatDto> findAllLinkMN(String fromDt, String toDt, String LINK_ID) {
        Map<String, String> param = new HashMap<>();
        param.put("FROM_DT", fromDt);
        param.put("TO_DT", toDt);
        param.put("LINK_ID", LINK_ID);
        return this.mapper.findAllLinkMN(param);
    }
    public List<TrafficStatDto> findAllLinkYY(String fromDt, String toDt, String LINK_ID) {
        Map<String, String> param = new HashMap<>();
        param.put("FROM_DT", fromDt);
        param.put("TO_DT", toDt);
        param.put("LINK_ID", LINK_ID);
        return this.mapper.findAllLinkYY(param);
    }

    public List<TrafficStatDto> findAllIfsc15M(String fromDt, String toDt, String IFSC_ID) {
        Map<String, String> param = new HashMap<>();
        param.put("FROM_DT", fromDt);
        param.put("TO_DT", toDt);
        param.put("IFSC_ID", IFSC_ID);
        return this.mapper.findAllIfsc15M(param);
    }
    public List<TrafficStatDto> findAllIfscHH(String fromDt, String toDt, String IFSC_ID) {
        Map<String, String> param = new HashMap<>();
        param.put("FROM_DT", fromDt);
        param.put("TO_DT", toDt);
        param.put("IFSC_ID", IFSC_ID);
        return this.mapper.findAllIfscHH(param);
    }
    public List<TrafficStatDto> findAllIfscDD(String fromDt, String toDt, String IFSC_ID) {
        Map<String, String> param = new HashMap<>();
        param.put("FROM_DT", fromDt);
        param.put("TO_DT", toDt);
        param.put("IFSC_ID", IFSC_ID);
        return this.mapper.findAllIfscDD(param);
    }
    public List<TrafficStatDto> findAllIfscMN(String fromDt, String toDt, String IFSC_ID) {
        Map<String, String> param = new HashMap<>();
        param.put("FROM_DT", fromDt);
        param.put("TO_DT", toDt);
        param.put("IFSC_ID", IFSC_ID);
        return this.mapper.findAllIfscMN(param);
    }
    public List<TrafficStatDto> findAllIfscYY(String fromDt, String toDt, String IFSC_ID) {
        Map<String, String> param = new HashMap<>();
        param.put("FROM_DT", fromDt);
        param.put("TO_DT", toDt);
        param.put("IFSC_ID", IFSC_ID);
        return this.mapper.findAllIfscYY(param);
    }

    public List<TrafficStatDto> findAllRoad15M(String fromDt, String toDt, String ROAD_ID) {
        Map<String, String> param = new HashMap<>();
        param.put("FROM_DT", fromDt);
        param.put("TO_DT", toDt);
        param.put("ROAD_ID", ROAD_ID);
        return this.mapper.findAllRoad15M(param);
    }
    public List<TrafficStatDto> findAllRoadHH(String fromDt, String toDt, String ROAD_ID) {
        Map<String, String> param = new HashMap<>();
        param.put("FROM_DT", fromDt);
        param.put("TO_DT", toDt);
        param.put("ROAD_ID", ROAD_ID);
        return this.mapper.findAllRoadHH(param);
    }
    public List<TrafficStatDto> findAllRoadDD(String fromDt, String toDt, String ROAD_ID) {
        Map<String, String> param = new HashMap<>();
        param.put("FROM_DT", fromDt);
        param.put("TO_DT", toDt);
        param.put("ROAD_ID", ROAD_ID);
        return this.mapper.findAllRoadDD(param);
    }
    public List<TrafficStatDto> findAllRoadMN(String fromDt, String toDt, String ROAD_ID) {
        Map<String, String> param = new HashMap<>();
        param.put("FROM_DT", fromDt);
        param.put("TO_DT", toDt);
        param.put("ROAD_ID", ROAD_ID);
        return this.mapper.findAllRoadMN(param);
    }
    public List<TrafficStatDto> findAllRoadYY(String fromDt, String toDt, String ROAD_ID) {
        Map<String, String> param = new HashMap<>();
        param.put("FROM_DT", fromDt);
        param.put("TO_DT", toDt);
        param.put("ROAD_ID", ROAD_ID);
        return this.mapper.findAllRoadYY(param);
    }

}
