package com.its.op.controller.its.statistics;

import com.its.op.dto.its.atrd.TbAtrdDto;
import com.its.op.dto.its.atrd.AtrdRltnIdDto;
import com.its.op.dto.its.atrd.AtrdTrafficStatDto;
import com.its.op.dto.its.statistics.TrafficHourParam;
import com.its.op.dto.its.statistics.TrafficSpecParam;
import com.its.op.dto.its.statistics.TrafficTermParam;
import com.its.op.service.its.atrd.AtrdTrafficStatisticsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/statistics/atrd-traffic")
@Api(tags = "03.통계-2.간선도로소통정보통계")
public class AtrdTrafficStatisticsController {

    private final AtrdTrafficStatisticsService service;
    
    //////////////////////////////////////////////////////////////
    // 검색 설정 기본 기능
    //////////////////////////////////////////////////////////////
    @ApiOperation(value = "간선도로 목록 조회(TB_ATRD)", response = TbAtrdDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/atrd", produces = {"application/json; charset=utf8"})
    public List<TbAtrdDto> findAtrdAll() {
        return this.service.findAtrdAll();
    }

    @ApiOperation(value = "간선도로 링크 목록 조회(TB_ATRD, TB_ATRD_RLTN_ROAD, TB_LINK)", response = AtrdRltnIdDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/atrd/link/{id}", produces = {"application/json; charset=utf8"})
    public List<AtrdRltnIdDto> findAtrdRltnLinkAll(
            @ApiParam(name = "id", value = "ATRD_ID", example = "ATR2001", required = true)
            @PathVariable String id) {
        return this.service.findAtrdRltnLinkAll(id);
    }

    @ApiOperation(value = "간선도로 정보제공구간 목록 조회(TB_ATRD, TB_ATRD_RLTN_ROAD, TB_IFSC)", response = AtrdRltnIdDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/atrd/ifsc/{id}", produces = {"application/json; charset=utf8"})
    public List<AtrdRltnIdDto> findAtrdRltnIfscAll(
            @ApiParam(name = "id", value = "ATRD_ID", example = "ATRD010", required = true)
            @PathVariable String id) {
        return this.service.findAtrdRltnIfscAll(id);
    }

    @ApiOperation(value = "간선도로 도로 목록 조회(TB_ATRD, TB_ATRD_RLTN_ROAD, TB_ROAD)", response = AtrdRltnIdDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/atrd/road/{id}", produces = {"application/json; charset=utf8"})
    public List<AtrdRltnIdDto> findAtrdRoadAll(
            @ApiParam(name = "id", value = "ATRD_ID", example = "ATRD010", required = true)
            @PathVariable String id) {
        return this.service.findAtrdRltnRoadAll(id);
    }

    //////////////////////////////////////////////////////////////
    // LINK_ID, IFSC_ID, ROAD_ID 가 검색 기준
    //////////////////////////////////////////////////////////////
    //////////// 링크 기간검색
    @ApiOperation(value = "기간검색-링크 15분", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/link-15m", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllLink15MTerm(
            @RequestParam String LINK_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(LINK_ID, FROM_DT, TO_DT);
        return this.service.findAllLink15MTerm(cond);
    }

    @ApiOperation(value = "기간검색-링크 시간", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/link-hh", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllLinkHHTerm(
            @RequestParam String LINK_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(LINK_ID, FROM_DT, TO_DT);
        return this.service.findAllLinkHHTerm(cond);
    }

    @ApiOperation(value = "기간검색-링크 일", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/link-dd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllLinkDDTerm(
            @RequestParam String LINK_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(LINK_ID, FROM_DT, TO_DT);
        return this.service.findAllLinkDDTerm(cond);
    }

    @ApiOperation(value = "기간검색-링크 월", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/link-mn", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllLinkMNTerm(
            @RequestParam String LINK_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(LINK_ID, FROM_DT, TO_DT);
        return this.service.findAllLinkMNTerm(cond);
    }

    @ApiOperation(value = "기간검색-링크 년", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/link-yy", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllLinkYYTerm(
            @RequestParam String LINK_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(LINK_ID, FROM_DT, TO_DT);
        return this.service.findAllLinkYYTerm(cond);
    }

    //////////// 서비스 링크 기간검색
    @ApiOperation(value = "기간검색-서비스링크 15분", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/ifsc-15m", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllIfsc15MTerm(
            @RequestParam String IFSC_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(IFSC_ID, FROM_DT, TO_DT);
        return this.service.findAllIfsc15MTerm(cond);
    }

    @ApiOperation(value = "기간검색-서비스링크 시간", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/ifsc-hh", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllIfscHHTerm(
            @RequestParam String IFSC_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(IFSC_ID, FROM_DT, TO_DT);
        return this.service.findAllIfscHHTerm(cond);
    }

    @ApiOperation(value = "기간검색-서비스링크 일", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/ifsc-dd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllIfscDDTerm(
            @RequestParam String IFSC_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(IFSC_ID, FROM_DT, TO_DT);
        return this.service.findAllIfscDDTerm(cond);
    }

    @ApiOperation(value = "기간검색-서비스링크 월", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/ifsc-mn", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllIfscMNTerm(
            @RequestParam String IFSC_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(IFSC_ID, FROM_DT, TO_DT);
        return this.service.findAllIfscMNTerm(cond);
    }

    @ApiOperation(value = "기간검색-서비스링크 년", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/ifsc-yy", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllIfscYYTerm(
            @RequestParam String IFSC_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(IFSC_ID, FROM_DT, TO_DT);
        return this.service.findAllIfscYYTerm(cond);
    }

    //////////// 도로 기간검색
    @ApiOperation(value = "기간검색-도로 15분", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/road-15m", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllRoad15MTerm(
            @RequestParam String ROAD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(ROAD_ID, FROM_DT, TO_DT);
        return this.service.findAllRoad15MTerm(cond);
    }

    @ApiOperation(value = "기간검색-도로 시간", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/road-hh", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllRoadHHTerm(
            @RequestParam String ROAD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(ROAD_ID, FROM_DT, TO_DT);
        return this.service.findAllRoadHHTerm(cond);
    }

    @ApiOperation(value = "기간검색-도로 일", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/road-dd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllRoadDDTerm(
            @RequestParam String ROAD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(ROAD_ID, FROM_DT, TO_DT);
        return this.service.findAllRoadDDTerm(cond);
    }

    @ApiOperation(value = "기간검색-도로 월", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/road-mn", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllRoadMNTerm(
            @RequestParam String ROAD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(ROAD_ID, FROM_DT, TO_DT);
        return this.service.findAllRoadMNTerm(cond);
    }

    @ApiOperation(value = "기간검색-도로 년", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/road-yy", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllRoadYYTerm(
            @RequestParam String ROAD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(ROAD_ID, FROM_DT, TO_DT);
        return this.service.findAllRoadYYTerm(cond);
    }

    //////////// 링크 시간대검색
    @ApiOperation(value = "시간대검색-링크 15분", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/hour/link-15m", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllLink15MHour(
            @RequestParam String LINK_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT,
            @RequestParam String FROM_HM,
            @RequestParam String TO_HM
    ) {

        TrafficHourParam cond = new TrafficHourParam(LINK_ID, FROM_DT, TO_DT, FROM_HM, TO_HM);
        return this.service.findAllLink15MHour(cond);
    }

    @ApiOperation(value = "시간대검색-링크 시간", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/hour/link-hh", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllLinkHHHour(
            @RequestParam String LINK_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT,
            @RequestParam String FROM_HM,
            @RequestParam String TO_HM
    ) {

        TrafficHourParam cond = new TrafficHourParam(LINK_ID, FROM_DT, TO_DT, FROM_HM, TO_HM);
        return this.service.findAllLinkHHHour(cond);
    }

    //////////// 서비스 링크 시간대검색
    @ApiOperation(value = "시간대검색-서비스링크 15분", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/hour/ifsc-15m", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllIfsc15MHour(
            @RequestParam String IFSC_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT,
            @RequestParam String FROM_HM,
            @RequestParam String TO_HM
    ) {

        TrafficHourParam cond = new TrafficHourParam(IFSC_ID, FROM_DT, TO_DT, FROM_HM, TO_HM);
        return this.service.findAllIfsc15MHour(cond);
    }

    @ApiOperation(value = "시간대검색-서비스링크 시간", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/hour/ifsc-hh", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllIfscHHHour(
            @RequestParam String IFSC_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT,
            @RequestParam String FROM_HM,
            @RequestParam String TO_HM
    ) {

        TrafficHourParam cond = new TrafficHourParam(IFSC_ID, FROM_DT, TO_DT, FROM_HM, TO_HM);
        return this.service.findAllIfscHHHour(cond);
    }

    //////////// 도로 시간대검색
    @ApiOperation(value = "시간대검색-도로 15분", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/hour/road-15m", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllRoad15MHour(
            @RequestParam String ROAD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT,
            @RequestParam String FROM_HM,
            @RequestParam String TO_HM
    ) {

        TrafficHourParam cond = new TrafficHourParam(ROAD_ID, FROM_DT, TO_DT, FROM_HM, TO_HM);
        return this.service.findAllRoad15MHour(cond);
    }

    @ApiOperation(value = "시간대검색-도로 시간", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/hour/road-hh", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllRoadHHHour(
            @RequestParam String ROAD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT,
            @RequestParam String FROM_HM,
            @RequestParam String TO_HM
    ) {

        TrafficHourParam cond = new TrafficHourParam(ROAD_ID, FROM_DT, TO_DT, FROM_HM, TO_HM);
        return this.service.findAllRoadHHHour(cond);
    }

    //////////// 링크 지정시각검색
    //////////// TODO: 지정일은 반드시 조회조건에 포함시켜야 한다.
    @ApiOperation(value = "지정시각검색-링크 15분", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/spec/link-15m", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllLink15MSpec(
            @RequestParam String LINK_ID,
            @RequestParam String FROM_HM,
            @RequestParam String TO_HM,
            @RequestParam List<String> statDays
    ) {

        TrafficSpecParam cond = new TrafficSpecParam(LINK_ID, FROM_HM, TO_HM, statDays);
        return this.service.findAllLink15MSpec(cond);
    }

    @ApiOperation(value = "지정시각검색-링크 시간", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/spec/link-hh", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllLinkHHSpec(
            @RequestParam String LINK_ID,
            @RequestParam String FROM_HM,
            @RequestParam String TO_HM,
            @RequestParam List<String> statDays
    ) {

        TrafficSpecParam cond = new TrafficSpecParam(LINK_ID, FROM_HM, TO_HM, statDays);
        return this.service.findAllLinkHHSpec(cond);
    }

    //////////// 서비스 링크 지정시각검색
    @ApiOperation(value = "지정시각검색-서비스링크 15분", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/spec/ifsc-15m", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllIfsc15MSpec(
            @RequestParam String IFSC_ID,
            @RequestParam String FROM_HM,
            @RequestParam String TO_HM,
            @RequestParam List<String> statDays
    ) {

        TrafficSpecParam cond = new TrafficSpecParam(IFSC_ID, FROM_HM, TO_HM, statDays);
        return this.service.findAllIfsc15MSpec(cond);
    }

    @ApiOperation(value = "지정시각검색-서비스링크 시간", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/spec/ifsc-hh", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllIfscHHSpec(
            @RequestParam String IFSC_ID,
            @RequestParam String FROM_HM,
            @RequestParam String TO_HM,
            @RequestParam List<String> statDays
    ) {

        TrafficSpecParam cond = new TrafficSpecParam(IFSC_ID, FROM_HM, TO_HM, statDays);
        return this.service.findAllIfscHHSpec(cond);
    }

    //////////// 도로 지정시각검색
    @ApiOperation(value = "지정시각검색-도로 15분", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/spec/road-15m", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllRoad15MSpec(
            @RequestParam String ROAD_ID,
            @RequestParam String FROM_HM,
            @RequestParam String TO_HM,
            @RequestParam List<String> statDays
    ) {

        TrafficSpecParam cond = new TrafficSpecParam(ROAD_ID, FROM_HM, TO_HM, statDays);
        return this.service.findAllRoad15MSpec(cond);
    }

    @ApiOperation(value = "지정시각검색-도로 시간", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/spec/road-hh", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllRoadHHSpec(
            @RequestParam String ROAD_ID,
            @RequestParam String FROM_HM,
            @RequestParam String TO_HM,
            @RequestParam List<String> statDays
    ) {

        TrafficSpecParam cond = new TrafficSpecParam(ROAD_ID, FROM_HM, TO_HM, statDays);
        return this.service.findAllRoadHHSpec(cond);
    }

    //////////////////////////////////////////////////////////////
    // ATRD_ID 가 검색 기준
    //////////////////////////////////////////////////////////////
    //////////// 링크 기간검색
    @ApiOperation(value = "기간검색-간선도로 15분", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/link-15m/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllLink15MByAtrdIdTerm(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(ATRD_ID, FROM_DT, TO_DT);
        return this.service.findAllLink15MByAtrdIdTerm(cond);
    }

    @ApiOperation(value = "기간검색-간선도로-링크 시간", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/link-hh/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllLinkHHByAtrdIdTerm(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(ATRD_ID, FROM_DT, TO_DT);
        return this.service.findAllLinkHHByAtrdIdTerm(cond);
    }

    @ApiOperation(value = "기간검색-간선도로-링크 일", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/link-dd/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllLinkDDByAtrdIdTerm(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(ATRD_ID, FROM_DT, TO_DT);
        return this.service.findAllLinkDDByAtrdIdTerm(cond);
    }

    @ApiOperation(value = "기간검색-간선도로-링크 월", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/link-mn/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllLinkMNByAtrdIdTerm(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(ATRD_ID, FROM_DT, TO_DT);
        return this.service.findAllLinkMNByAtrdIdTerm(cond);
    }

    @ApiOperation(value = "기간검색-간선도로-링크 년", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/link-yy/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllLinkYYByAtrdIdTerm(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(ATRD_ID, FROM_DT, TO_DT);
        return this.service.findAllLinkYYByAtrdIdTerm(cond);
    }

    //////////// 서비스 링크 기간검색
    @ApiOperation(value = "기간검색-간선도로-서비스링크 15분", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/ifsc-15m/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllIfsc15MByAtrdIdTerm(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(ATRD_ID, FROM_DT, TO_DT);
        return this.service.findAllIfsc15MByAtrdIdTerm(cond);
    }

    @ApiOperation(value = "기간검색-간선도로-서비스링크 시간", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/ifsc-hh/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllIfscHHByAtrdIdTerm(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(ATRD_ID, FROM_DT, TO_DT);
        return this.service.findAllIfscHHByAtrdIdTerm(cond);
    }

    @ApiOperation(value = "기간검색-간선도로-서비스링크 일", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/ifsc-dd/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllIfscDDByAtrdIdTerm(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(ATRD_ID, FROM_DT, TO_DT);
        return this.service.findAllIfscDDByAtrdIdTerm(cond);
    }

    @ApiOperation(value = "기간검색-간선도로-서비스링크 월", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/ifsc-mn/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllIfscMNByAtrdIdTerm(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(ATRD_ID, FROM_DT, TO_DT);
        return this.service.findAllIfscMNByAtrdIdTerm(cond);
    }

    @ApiOperation(value = "기간검색-간선도로-서비스링크 년", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/ifsc-yy/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllIfscYYByAtrdIdTerm(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(ATRD_ID, FROM_DT, TO_DT);
        return this.service.findAllIfscYYByAtrdIdTerm(cond);
    }

    //////////// 도로 기간검색
    @ApiOperation(value = "기간검색-간선도로-도로 15분", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/road-15m/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllRoad15MByAtrdIdTerm(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(ATRD_ID, FROM_DT, TO_DT);
        return this.service.findAllRoad15MByAtrdIdTerm(cond);
    }

    @ApiOperation(value = "기간검색-간선도로-도로 시간", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/road-hh/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllRoadHHByAtrdIdTerm(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(ATRD_ID, FROM_DT, TO_DT);
        return this.service.findAllRoadHHByAtrdIdTerm(cond);
    }

    @ApiOperation(value = "기간검색-간선도로-도로 일", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/road-dd/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllRoadDDByAtrdIdTerm(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(ATRD_ID, FROM_DT, TO_DT);
        return this.service.findAllRoadDDByAtrdIdTerm(cond);
    }

    @ApiOperation(value = "기간검색-간선도로-도로 월", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/road-mn/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllRoadMNByAtrdIdTerm(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(ATRD_ID, FROM_DT, TO_DT);
        return this.service.findAllRoadMNByAtrdIdTerm(cond);
    }

    @ApiOperation(value = "기간검색-간선도로-도로 년", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/term/road-yy/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllRoadYYByAtrdIdTerm(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT) {

        TrafficTermParam cond = new TrafficTermParam(ATRD_ID, FROM_DT, TO_DT);
        return this.service.findAllRoadYYByAtrdIdTerm(cond);
    }

    //////////// 링크 시간대검색
    @ApiOperation(value = "시간대검색-간선도로-링크 15분", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/hour/link-15m/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllLink15MByAtrdIdHour(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT,
            @RequestParam String FROM_HM,
            @RequestParam String TO_HM
    ) {

        TrafficHourParam cond = new TrafficHourParam(ATRD_ID, FROM_DT, TO_DT, FROM_HM, TO_HM);
        return this.service.findAllLink15MByAtrdIdHour(cond);
    }

    @ApiOperation(value = "시간대검색-간선도로-링크 시간", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/hour/link-hh/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllLinkHHByAtrdIdHour(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT,
            @RequestParam String FROM_HM,
            @RequestParam String TO_HM
    ) {

        TrafficHourParam cond = new TrafficHourParam(ATRD_ID, FROM_DT, TO_DT, FROM_HM, TO_HM);
        return this.service.findAllLinkHHByAtrdIdHour(cond);
    }

    //////////// 서비스 링크 시간대검색
    @ApiOperation(value = "시간대검색-간선도로-서비스링크 15분", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/hour/ifsc-15m/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllIfsc15MByAtrdIdHour(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT,
            @RequestParam String FROM_HM,
            @RequestParam String TO_HM
    ) {

        TrafficHourParam cond = new TrafficHourParam(ATRD_ID, FROM_DT, TO_DT, FROM_HM, TO_HM);
        return this.service.findAllIfsc15MByAtrdIdHour(cond);
    }

    @ApiOperation(value = "시간대검색-간선도로-서비스링크 시간", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/hour/ifsc-hh/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllIfscHHByAtrdIdHour(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT,
            @RequestParam String FROM_HM,
            @RequestParam String TO_HM
    ) {

        TrafficHourParam cond = new TrafficHourParam(ATRD_ID, FROM_DT, TO_DT, FROM_HM, TO_HM);
        return this.service.findAllIfscHHByAtrdIdHour(cond);
    }

    //////////// 도로 시간대검색
    @ApiOperation(value = "시간대검색-간선도로-도로 15분", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/hour/road-15m/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllRoad15MByAtrdIdHour(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT,
            @RequestParam String FROM_HM,
            @RequestParam String TO_HM
    ) {

        TrafficHourParam cond = new TrafficHourParam(ATRD_ID, FROM_DT, TO_DT, FROM_HM, TO_HM);
        return this.service.findAllRoad15MByAtrdIdHour(cond);
    }

    @ApiOperation(value = "시간대검색-간선도로-도로 시간", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/hour/road-hh/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllRoadHHByAtrdIdHour(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_DT,
            @RequestParam String TO_DT,
            @RequestParam String FROM_HM,
            @RequestParam String TO_HM
    ) {

        TrafficHourParam cond = new TrafficHourParam(ATRD_ID, FROM_DT, TO_DT, FROM_HM, TO_HM);
        return this.service.findAllRoadHHByAtrdIdHour(cond);
    }

    //////////// 링크 지정시각검색
    //////////// TODO: 지정일은 반드시 조회조건에 포함시켜야 한다.
    @ApiOperation(value = "지정시각검색-간선도로-링크 15분", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/spec/link-15m/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllLink15MByAtrdIdSpec(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_HM,
            @RequestParam String TO_HM,
            @RequestParam List<String> statDays
    ) {

        TrafficSpecParam cond = new TrafficSpecParam(ATRD_ID, FROM_HM, TO_HM, statDays);
        return this.service.findAllLink15MByAtrdIdSpec(cond);
    }

    @ApiOperation(value = "지정시각검색-간선도로-링크 시간", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/spec/link-hh/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllLinkHHByAtrdIdSpec(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_HM,
            @RequestParam String TO_HM,
            @RequestParam List<String> statDays
    ) {

        TrafficSpecParam cond = new TrafficSpecParam(ATRD_ID, FROM_HM, TO_HM, statDays);
        return this.service.findAllLinkHHByAtrdIdSpec(cond);
    }

    //////////// 서비스 링크 지정시각검색
    @ApiOperation(value = "지정시각검색-간선도로-서비스링크 15분", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/spec/ifsc-15m/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllIfsc15MByAtrdIdSpec(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_HM,
            @RequestParam String TO_HM,
            @RequestParam List<String> statDays
    ) {

        TrafficSpecParam cond = new TrafficSpecParam(ATRD_ID, FROM_HM, TO_HM, statDays);
        return this.service.findAllIfsc15MByAtrdIdSpec(cond);
    }

    @ApiOperation(value = "지정시각검색-간선도로-서비스링크 시간", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/spec/ifsc-hh/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllIfscHHByAtrdIdSpec(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_HM,
            @RequestParam String TO_HM,
            @RequestParam List<String> statDays
    ) {

        TrafficSpecParam cond = new TrafficSpecParam(ATRD_ID, FROM_HM, TO_HM, statDays);
        return this.service.findAllIfscHHByAtrdIdSpec(cond);
    }

    //////////// 도로 지정시각검색
    @ApiOperation(value = "지정시각검색-간선도로-도로 15분", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/spec/road-15m/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllRoad15MByAtrdIdSpec(
            @RequestParam String ATRD_ID,
            @RequestParam String FROM_HM,
            @RequestParam String TO_HM,
            @RequestParam List<String> statDays
    ) {

        TrafficSpecParam cond = new TrafficSpecParam(ATRD_ID, FROM_HM, TO_HM, statDays);
        return this.service.findAllRoad15MByAtrdIdSpec(cond);
    }

    @ApiOperation(value = "지정시각검색-간선도로-도로 시간", response = AtrdTrafficStatDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/spec/road-hh/atrd", produces = {"application/json; charset=utf8"})
    public List<AtrdTrafficStatDto> findAllRoadHHByAtrdIdSpec(
            @RequestParam String ATRD_ID, 
            @RequestParam String FROM_HM, 
            @RequestParam String TO_HM, 
            @RequestParam List<String> statDays
    ) {

        TrafficSpecParam cond = new TrafficSpecParam(ATRD_ID, FROM_HM, TO_HM, statDays);
        return this.service.findAllRoadHHByAtrdIdSpec(cond);
    }


}
