package com.its.op.service.its.statistics;

import com.its.op.dto.its.statistics.IncidentSectStatDto;
import com.its.op.dto.its.statistics.IncidentTypeStatDto;
import com.its.op.dao.mapper.its.statistics.IncidentStatisticsMapper;
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 IncidentStatisticsService {

    private final IncidentStatisticsMapper mapper;

    public List<IncidentTypeStatDto> findAllTypeDD(String fromDt, String toDt) {
        Map<String, String> param = new HashMap<>();
        param.put("FROM_DT", fromDt);
        param.put("TO_DT", toDt);
        return this.mapper.findAllTypeDD(param);
    }

    public List<IncidentTypeStatDto> findAllTypeMN(String fromDt, String toDt) {
        Map<String, String> param = new HashMap<>();
        param.put("FROM_DT", fromDt);
        param.put("TO_DT", toDt);
        return this.mapper.findAllTypeMN(param);
    }

    public List<IncidentTypeStatDto> findAllTypeYY(String fromDt, String toDt) {
        Map<String, String> param = new HashMap<>();
        param.put("FROM_DT", fromDt);
        param.put("TO_DT", toDt);
        return this.mapper.findAllTypeYY(param);
    }

    public List<IncidentSectStatDto> findAllSectDD(String fromDt, String toDt) {
        Map<String, String> param = new HashMap<>();
        param.put("FROM_DT", fromDt);
        param.put("TO_DT", toDt);
        return this.mapper.findAllSectDD(param);
    }

    public List<IncidentSectStatDto> findAllSectMN(String fromDt, String toDt) {
        Map<String, String> param = new HashMap<>();
        param.put("FROM_DT", fromDt);
        param.put("TO_DT", toDt);
        return this.mapper.findAllSectMN(param);
    }

    public List<IncidentSectStatDto> findAllSectYY(String fromDt, String toDt) {
        Map<String, String> param = new HashMap<>();
        param.put("FROM_DT", fromDt);
        param.put("TO_DT", toDt);
        return this.mapper.findAllSectYY(param);
    }

}
