260515_01_ENH: 다른 설문들도 공통 포맷으로 data 조회 되도록 수정 및 필요 상수 추가
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.kri.kfpa.dash.controller;
|
||||
|
||||
import com.kri.kfpa.dash.dto.CsiDataDto;
|
||||
import com.kri.kfpa.dash.dto.CsiSummaryDto;
|
||||
import com.kri.kfpa.dash.dto.DivDetailDataDto;
|
||||
import com.kri.kfpa.dash.service.StatisticsService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@@ -11,6 +12,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@@ -21,18 +23,31 @@ public class StatisticsController {
|
||||
|
||||
private final StatisticsService statisticsService;
|
||||
|
||||
@Operation(summary = "전체 summary 조회")
|
||||
@GetMapping("/csi-summary")
|
||||
public Map<String, List<CsiSummaryDto>> getCsiSummary(
|
||||
@RequestParam(name = "dt") String searchDateTime
|
||||
) {
|
||||
return statisticsService.getCsiSummary(searchDateTime);
|
||||
}
|
||||
|
||||
@Operation(summary = "csi 데이터 조회")
|
||||
@GetMapping("/csi")
|
||||
public Map<String, List<CsiDataDto>> getCsiData() {
|
||||
return statisticsService.getCsiData();
|
||||
public Map<String, List<CsiDataDto>> getCsiData(
|
||||
@RequestParam(name = "pkey") String pkey,
|
||||
@RequestParam(name = "dt") String searchDateTime
|
||||
) {
|
||||
return statisticsService.getCsiData(pkey, searchDateTime);
|
||||
}
|
||||
|
||||
@Operation(summary = "지역 본부 상세 조회")
|
||||
@GetMapping("/div-detail/{div}")
|
||||
public Map<String, DivDetailDataDto> getDivDetailData(
|
||||
@PathVariable String div
|
||||
@PathVariable String div,
|
||||
@RequestParam(name = "pkey") String pkey,
|
||||
@RequestParam(name = "dt") String searchDateTime
|
||||
) {
|
||||
return statisticsService.getDivDetailData(div);
|
||||
return statisticsService.getDivDetailData(div, pkey, searchDateTime);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user