|
|
@ -305,7 +305,7 @@ public class MainDashController { |
|
|
|
@GetMapping("/stcs/flight-static") |
|
|
|
@GetMapping("/stcs/flight-static") |
|
|
|
@ApiOperation(value = "비행통계 상단 데이터[DB전체 통계데이터]") |
|
|
|
@ApiOperation(value = "비행통계 상단 데이터[DB전체 통계데이터]") |
|
|
|
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API") |
|
|
|
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API") |
|
|
|
public ResponseEntity<? extends BasicResponse> statisticsStatic(){ |
|
|
|
public ResponseEntity<? extends BasicResponse> fltStcsStatic(){ |
|
|
|
|
|
|
|
|
|
|
|
List<FlightStaticStcsModel> result = null; |
|
|
|
List<FlightStaticStcsModel> result = null; |
|
|
|
|
|
|
|
|
|
|
@ -330,7 +330,7 @@ public class MainDashController { |
|
|
|
@ApiImplicitParam(name = "cate",value = "비행시간,거리,횟수[TIME]", dataTypeClass = String.class), |
|
|
|
@ApiImplicitParam(name = "cate",value = "비행시간,거리,횟수[TIME]", dataTypeClass = String.class), |
|
|
|
@ApiImplicitParam(name = "type",value = "날짜형식[month]", dataTypeClass = String.class) |
|
|
|
@ApiImplicitParam(name = "type",value = "날짜형식[month]", dataTypeClass = String.class) |
|
|
|
}) |
|
|
|
}) |
|
|
|
public ResponseEntity<? extends BasicResponse> statistics(@RequestParam String cate, String date, @PathVariable String type){ |
|
|
|
public ResponseEntity<? extends BasicResponse> fltStcs(@RequestParam String cate, String date, @PathVariable String type){ |
|
|
|
log.warn("cate => {}, date => {}, type => {}", cate, date, type); |
|
|
|
log.warn("cate => {}, date => {}, type => {}", cate, date, type); |
|
|
|
|
|
|
|
|
|
|
|
FlightStcsModel result = new FlightStcsModel(); |
|
|
|
FlightStcsModel result = new FlightStcsModel(); |
|
|
@ -356,5 +356,64 @@ public class MainDashController { |
|
|
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok().body(new SuccessResponse<FlightStcsModel>(result)); |
|
|
|
return ResponseEntity.ok().body(new SuccessResponse<FlightStcsModel>(result)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/stcs/warn-static") |
|
|
|
|
|
|
|
@ApiOperation(value = "비정상 상황 상단 데이터[DB전체 통계데이터]") |
|
|
|
|
|
|
|
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API") |
|
|
|
|
|
|
|
public ResponseEntity<? extends BasicResponse> warnStcsStatic(){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<FlightStaticStcsModel> result = null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
result = service.getWarnStaticStcs(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
log.warn("result => {}", result); |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
log.error("IGNORE : {}", e); |
|
|
|
|
|
|
|
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) |
|
|
|
|
|
|
|
.body(new ErrorResponse("Server Error", "-1")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok().body(new SuccessResponse<List<FlightStaticStcsModel>>(result)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/stcs/warn/{type}") |
|
|
|
|
|
|
|
@ApiOperation(value = "비정상상황 cate = ['PLAN' ,'ALTITUDE', 'CRASH'], type=['year','month','day','one-day']") |
|
|
|
|
|
|
|
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API") |
|
|
|
|
|
|
|
@ApiImplicitParams({ |
|
|
|
|
|
|
|
@ApiImplicitParam(name = "date",value = "날짜[2023]", dataTypeClass = String.class), |
|
|
|
|
|
|
|
@ApiImplicitParam(name = "cate",value = "비행시간,거리,횟수[TIME]", dataTypeClass = String.class), |
|
|
|
|
|
|
|
@ApiImplicitParam(name = "type",value = "날짜형식[month]", dataTypeClass = String.class) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
public ResponseEntity<? extends BasicResponse> warnStcs(@RequestParam String cate, String date, @PathVariable String type){ |
|
|
|
|
|
|
|
log.warn("cate => {}, date => {}, type => {}", cate, date, type); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FlightStcsModel result = new FlightStcsModel(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
String[] formatParam = null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(date == null) date = ""; |
|
|
|
|
|
|
|
formatParam = service.paramCheck(date,type); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<FlightStaticStcsModel> graphData = service.fltStatics(cate, date, formatParam); |
|
|
|
|
|
|
|
List<FlightStaticStcsModel> topData = service.fltTopStatics(cate, date, formatParam); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result.setGraphData(graphData); |
|
|
|
|
|
|
|
result.setTopData(topData); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
log.warn("result => {}", result); |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
log.error("IGNORE : {}", e); |
|
|
|
|
|
|
|
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) |
|
|
|
|
|
|
|
.body(new ErrorResponse("Server Error", "-1")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok().body(new SuccessResponse<FlightStcsModel>(result)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|