Browse Source

통계 패키지 분리

pull/12/head
lkd9125(이경도) 11 months ago
parent
commit
60a6e25bce
  1. 110
      pav-server/src/main/java/com/palnet/biz/api/main/dash/controller/MainDashController.java
  2. 127
      pav-server/src/main/java/com/palnet/biz/api/main/dash/service/MainDashService.java
  3. 148
      pav-server/src/main/java/com/palnet/biz/api/main/statistics/controller/MainStatisticsController.java
  4. 209
      pav-server/src/main/java/com/palnet/biz/api/main/statistics/service/MainStatisticsService.java
  5. 51
      pav-server/src/main/java/com/palnet/biz/jpa/repository/ctr/CtrCntrlQueryRepository.java

110
pav-server/src/main/java/com/palnet/biz/api/main/dash/controller/MainDashController.java

@ -302,117 +302,7 @@ public class MainDashController {
return ResponseEntity.ok().body(new SuccessResponse<List<MainDashStcsModel>>(result)); return ResponseEntity.ok().body(new SuccessResponse<List<MainDashStcsModel>>(result));
} }
@GetMapping("/stcs/flight-static")
@ApiOperation(value = "비행통계 상단 데이터[DB전체 통계데이터]")
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API")
public ResponseEntity<? extends BasicResponse> fltStcsStatic(){
List<FlightStaticStcsModel> result = null;
try {
result = service.getFlightStaticStcs();
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/flight/{type}")
@ApiOperation(value = "비행통계 cate = ['TIME', 'DISTANCE','FLT_COUNT'], 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> fltStcs(@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));
}
@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.warnStatics(cate, date, formatParam);
List<FlightStaticStcsModel> topData = service.warnTopStatics(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));
}

127
pav-server/src/main/java/com/palnet/biz/api/main/dash/service/MainDashService.java

@ -41,10 +41,7 @@ public class MainDashService {
private FltPlanQueryRepository fltPlanQueryRepository; private FltPlanQueryRepository fltPlanQueryRepository;
@Autowired @Autowired
private CtrCntrlQueryRepository query; private CtrCntrlQueryRepository query;
@Autowired
private CtrCntrlBasRepository cntrlBasRepository;
@ -224,126 +221,6 @@ public class MainDashService {
} }
return result; return result;
} }
/**
* 비행관련 고정 통계, 항상 DB 전체값에서 통계진행할것임
* @return
*/
public List<FlightStaticStcsModel> getFlightStaticStcs(){
FlightStaticStcsModel time = query.getFlightTimeStcs();
FlightStaticStcsModel distance = query.getFlightDistanceStcs();
FlightStaticStcsModel fltCount = query.getFlightCountStcs();
List<FlightStaticStcsModel> result = Arrays.asList(time, distance, fltCount);
return result;
}
/**
* 비행통계
* @param idntfNum
* @param date
* @param formatParam
* @return
*/
public List<FlightStaticStcsModel> fltStatics(String cate, String date, String[] formatParam){
List<FlightStaticStcsModel> resultList = null;
switch (cate) {
case "TIME":
resultList = query.fltTimeStcs(date, formatParam);
break;
case "DISTANCE":
resultList = query.fltDistanceStcs(date, formatParam);
break;
case "FLT_COUNT":
resultList = query.fltCountStcs(date, formatParam);
break;
}
return resultList;
}
/**
* 비행통계 카테고리 Top 5 데이터 가져오기
* @param cate
* @param date
* @param formatParam
* @return
*/
public List<FlightStaticStcsModel> fltTopStatics(String cate, String date, String[] formatParam){
List<FlightStaticStcsModel> resultList = null;
switch (cate) {
case "TIME":
resultList = query.fltTopTimeStcs(date, formatParam);
break;
case "DISTANCE":
resultList = query.fltTopDistanceStcs(date, formatParam);
break;
case "FLT_COUNT":
resultList = query.fltTopCountStcs(date, formatParam);
break;
}
return resultList;
}
/**
* 비행관련 고정 통계, 항상 DB 전체값에서 통계진행할것임
* @return
*/
public List<FlightStaticStcsModel> getWarnStaticStcs(){
// TODO:: 비행경로이탈, 고도이탈, 충돌위험 임시코드
String[] cate = {"PLAN" ,"ALTITUDE", "CRASH"};
// String[] cate = {WarnType.PLAN.getValue() ,WarnType.ALTITUDE.getValue(), WarnType.CRASH.getValue()};
List<FlightStaticStcsModel> result = new ArrayList<>();
for(int i = 0; i < cate.length; i ++){
FlightStaticStcsModel node = query.getWarnStaticStcs(cate[i]);
result.add(node);
}
return result;
}
/**
* 비정상상황 그래프 데이터
* @param cate
* @param date
* @param formatParam
* @return
*/
public List<FlightStaticStcsModel> warnStatics(String cate, String date, String[] formatParam){
List<FlightStaticStcsModel> resultList = query.warnStcs(cate, date, formatParam);
return resultList;
}
/**
* 비정상상황 카테고리별 Top5 데이터
* @param cate
* @param date
* @param formatParam
* @return
*/
public List<FlightStaticStcsModel> warnTopStatics(String cate, String date, String[] formatParam){
List<FlightStaticStcsModel> resultList = query.warnTopStcs(cate, date, formatParam);
return resultList;
}
} }

148
pav-server/src/main/java/com/palnet/biz/api/main/statistics/controller/MainStatisticsController.java

@ -0,0 +1,148 @@
package com.palnet.biz.api.main.statistics.controller;
import java.util.List;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
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;
import com.palnet.biz.api.comn.response.BasicResponse;
import com.palnet.biz.api.comn.response.ErrorResponse;
import com.palnet.biz.api.comn.response.SuccessResponse;
import com.palnet.biz.api.main.dash.model.FlightStaticStcsModel;
import com.palnet.biz.api.main.dash.model.FlightStcsModel;
import com.palnet.biz.api.main.statistics.service.MainStatisticsService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
@Log4j2
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/main/statistics", produces = {MediaType.APPLICATION_JSON_VALUE})
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API")
public class MainStatisticsController {
private final MainStatisticsService service;
@GetMapping("/stcs/flight-static")
@ApiOperation(value = "비행통계 상단 데이터[DB전체 통계데이터]")
@Tag(name = "메인화면 컨트롤러", description = "메인화면 관련 API")
public ResponseEntity<? extends BasicResponse> fltStcsStatic(){
List<FlightStaticStcsModel> result = null;
try {
result = service.getFlightStaticStcs();
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/flight/{type}")
@ApiOperation(value = "비행통계 cate = ['TIME', 'DISTANCE','FLT_COUNT'], 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> fltStcs(@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));
}
@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.warnStatics(cate, date, formatParam);
List<FlightStaticStcsModel> topData = service.warnTopStatics(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));
}
}

209
pav-server/src/main/java/com/palnet/biz/api/main/statistics/service/MainStatisticsService.java

@ -0,0 +1,209 @@
package com.palnet.biz.api.main.statistics.service;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.springframework.stereotype.Service;
import com.palnet.biz.api.main.dash.model.FlightStaticStcsModel;
import com.palnet.biz.jpa.repository.ctr.CtrCntrlQueryRepository;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@Service
@RequiredArgsConstructor
public class MainStatisticsService {
private final CtrCntrlQueryRepository query;
/**
* 파라미터 체크
* 1. 연단위 검색 -> Parameter Null일 경우
* 2. 월단위 검색 -> Parameter 2023등 연도만 있는경우
* 3. 일단위 검색 -> Parameter 2023-09 월까지 있는경우
* 4. 일일단위 검색 -> Parameter 2023-09-01 날짜에 대한 검색
* 이하 모든 데이터는 Exception 발생
* @param date
* @throws NumberFormatException
*/
public String[] paramCheck(String date, String type) throws NumberFormatException{
String[] result = new String[2];
date = date.trim();
String[] paramStrings = date.split("-");
switch (type) {
case "month": // 2. 월단위 검색 -> Parameter 2023등 연도만 있는경우
Integer.parseInt(date.trim());
result[0] = "%Y";
result[1] = "%m";
break;
case "day": // 3. 일단위 검색 -> Parameter 2023-09 등 월까지 있는경우
if(paramStrings.length == 2){
for(String param : paramStrings){
Integer.parseInt(param.trim());
}
result[0] = "%Y-%m";
result[1] = "%d";
} else {
throw new NumberFormatException();
}
break;
case "one-day": // 4. 일일단위 검색 -> Parameter 2023-09-01 등 한 날짜에 대한 검색
if(paramStrings.length == 3){
for(String param : paramStrings){
Integer.parseInt(param.trim());
}
result[0] = "%Y-%m-%d";
result[1] = "%d";
} else {
throw new NumberFormatException();
}
break;
case "year" : // 1. 연단위 검색 -> Parameter Null일 경우
if(paramStrings.length > 1) throw new NumberFormatException();
result[0] = "";
result[1] = "%y";
break;
default:
throw new NumberFormatException();
}
return result;
}
/**
* 비행관련 고정 통계, 항상 DB 전체값에서 통계진행할것임
* @return
*/
public List<FlightStaticStcsModel> getFlightStaticStcs(){
FlightStaticStcsModel time = query.getFlightTimeStcs();
FlightStaticStcsModel distance = query.getFlightDistanceStcs();
FlightStaticStcsModel fltCount = query.getFlightCountStcs();
List<FlightStaticStcsModel> result = Arrays.asList(time, distance, fltCount);
return result;
}
/**
* 비행통계
* @param idntfNum
* @param date
* @param formatParam
* @return
*/
public List<FlightStaticStcsModel> fltStatics(String cate, String date, String[] formatParam){
List<FlightStaticStcsModel> resultList = null;
switch (cate) {
case "TIME":
resultList = query.fltTimeStcs(date, formatParam);
break;
case "DISTANCE":
resultList = query.fltDistanceStcs(date, formatParam);
break;
case "FLT_COUNT":
resultList = query.fltCountStcs(date, formatParam);
break;
}
return resultList;
}
/**
* 비행통계 카테고리 Top 5 데이터 가져오기
* @param cate
* @param date
* @param formatParam
* @return
*/
public List<FlightStaticStcsModel> fltTopStatics(String cate, String date, String[] formatParam){
List<FlightStaticStcsModel> resultList = null;
switch (cate) {
case "TIME":
resultList = query.fltTopTimeStcs(date, formatParam);
break;
case "DISTANCE":
resultList = query.fltTopDistanceStcs(date, formatParam);
break;
case "FLT_COUNT":
resultList = query.fltTopCountStcs(date, formatParam);
break;
}
return resultList;
}
/**
* 비행관련 고정 통계, 항상 DB 전체값에서 통계진행할것임
* @return
*/
public List<FlightStaticStcsModel> getWarnStaticStcs(){
// TODO:: 비행경로이탈, 고도이탈, 충돌위험 임시코드
String[] cate = {"PLAN" ,"ALTITUDE", "CRASH"};
// String[] cate = {WarnType.PLAN.getValue() ,WarnType.ALTITUDE.getValue(), WarnType.CRASH.getValue()};
List<FlightStaticStcsModel> result = new ArrayList<>();
for(int i = 0; i < cate.length; i ++){
FlightStaticStcsModel node = query.getWarnStaticStcs(cate[i]);
result.add(node);
}
return result;
}
/**
* 비정상상황 그래프 데이터
* @param cate
* @param date
* @param formatParam
* @return
*/
public List<FlightStaticStcsModel> warnStatics(String cate, String date, String[] formatParam){
List<FlightStaticStcsModel> resultList = query.warnStcs(cate, date, formatParam);
return resultList;
}
/**
* 비정상상황 카테고리별 Top5 데이터
* @param cate
* @param date
* @param formatParam
* @return
*/
public List<FlightStaticStcsModel> warnTopStatics(String cate, String date, String[] formatParam){
List<FlightStaticStcsModel> resultList = query.warnTopStcs(cate, date, formatParam);
return resultList;
}
}

51
pav-server/src/main/java/com/palnet/biz/jpa/repository/ctr/CtrCntrlQueryRepository.java

@ -1859,6 +1859,12 @@ public List<AnlsHstryDetailModel> listCntrlHstry(String id){
if(queryResult.size() > 0){ if(queryResult.size() > 0){
result = queryResult.get(0); result = queryResult.get(0);
} else {
FlightStaticStcsModel node = new FlightStaticStcsModel();
node.setName("-");
node.setValue("noData");
result = node;
} }
return result; return result;
@ -1886,9 +1892,17 @@ public List<AnlsHstryDetailModel> listCntrlHstry(String id){
.limit(1) .limit(1)
.fetch(); .fetch();
log.warn("size => {}", queryResult.size());
if(queryResult.size() > 0){ if(queryResult.size() > 0){
result = queryResult.get(0); result = queryResult.get(0);
} } else {
FlightStaticStcsModel node = new FlightStaticStcsModel();
node.setName("-");
node.setValue("noData");
result = node;
}
return result; return result;
} }
@ -1917,6 +1931,12 @@ public List<AnlsHstryDetailModel> listCntrlHstry(String id){
if(queryResult.size() > 0){ if(queryResult.size() > 0){
result = queryResult.get(0); result = queryResult.get(0);
} else {
FlightStaticStcsModel node = new FlightStaticStcsModel();
node.setName("-");
node.setValue("noData");
result = node;
} }
return result; return result;
@ -1966,7 +1986,7 @@ public List<AnlsHstryDetailModel> listCntrlHstry(String id){
if(result.size() <= 0){ if(result.size() <= 0){
FlightStaticStcsModel node = new FlightStaticStcsModel(); FlightStaticStcsModel node = new FlightStaticStcsModel();
node.setName(null); node.setName("-");
node.setValue("NoData"); node.setValue("NoData");
result.add(node); result.add(node);
@ -2014,7 +2034,7 @@ public List<AnlsHstryDetailModel> listCntrlHstry(String id){
if(result.size() <= 0){ if(result.size() <= 0){
FlightStaticStcsModel node = new FlightStaticStcsModel(); FlightStaticStcsModel node = new FlightStaticStcsModel();
node.setName(null); node.setName("-");
node.setValue("NoData"); node.setValue("NoData");
result.add(node); result.add(node);
@ -2062,7 +2082,7 @@ public List<AnlsHstryDetailModel> listCntrlHstry(String id){
if(result.size() <= 0){ if(result.size() <= 0){
FlightStaticStcsModel node = new FlightStaticStcsModel(); FlightStaticStcsModel node = new FlightStaticStcsModel();
node.setName(null); node.setName("-");
node.setValue("NoData"); node.setValue("NoData");
result.add(node); result.add(node);
@ -2113,7 +2133,7 @@ public List<AnlsHstryDetailModel> listCntrlHstry(String id){
if(result.size() <= 0){ if(result.size() <= 0){
FlightStaticStcsModel node = new FlightStaticStcsModel(); FlightStaticStcsModel node = new FlightStaticStcsModel();
node.setName(null); node.setName("-");
node.setValue("NoData"); node.setValue("NoData");
result.add(node); result.add(node);
@ -2156,7 +2176,7 @@ public List<AnlsHstryDetailModel> listCntrlHstry(String id){
if(result.size() <= 0){ if(result.size() <= 0){
FlightStaticStcsModel node = new FlightStaticStcsModel(); FlightStaticStcsModel node = new FlightStaticStcsModel();
node.setName(null); node.setName("-");
node.setValue("NoData"); node.setValue("NoData");
result.add(node); result.add(node);
@ -2199,7 +2219,7 @@ public List<AnlsHstryDetailModel> listCntrlHstry(String id){
if(result.size() <= 0){ if(result.size() <= 0){
FlightStaticStcsModel node = new FlightStaticStcsModel(); FlightStaticStcsModel node = new FlightStaticStcsModel();
node.setName(null); node.setName("-");
node.setValue("NoData"); node.setValue("NoData");
result.add(node); result.add(node);
@ -2236,6 +2256,12 @@ public List<AnlsHstryDetailModel> listCntrlHstry(String id){
if(queryResult.size() > 0){ if(queryResult.size() > 0){
result = queryResult.get(0); result = queryResult.get(0);
} else {
FlightStaticStcsModel node = new FlightStaticStcsModel();
node.setName("-");
node.setValue("noData");
result = node;
} }
return result; return result;
@ -2282,7 +2308,7 @@ public List<AnlsHstryDetailModel> listCntrlHstry(String id){
if(result.size() <= 0){ if(result.size() <= 0){
FlightStaticStcsModel node = new FlightStaticStcsModel(); FlightStaticStcsModel node = new FlightStaticStcsModel();
node.setName(null); node.setName("-");
node.setValue("NoData"); node.setValue("NoData");
result.add(node); result.add(node);
@ -2325,7 +2351,14 @@ public List<AnlsHstryDetailModel> listCntrlHstry(String id){
.limit(5) .limit(5)
.fetch(); .fetch();
if(result.size() <= 0){
FlightStaticStcsModel node = new FlightStaticStcsModel();
node.setName("-");
node.setValue("NoData");
result.add(node);
}
return result; return result;

Loading…
Cancel
Save