|
|
|
@ -102,12 +102,12 @@ public class FltPlanQueryRepository {
|
|
|
|
|
} |
|
|
|
|
//동일 기체 등록시 비행시간 중복여부 조회
|
|
|
|
|
public List<BasFlightPlanModel> arcrftCheck(BasFlightPlanModel rq, String idntfNum){ |
|
|
|
|
QFltPlanArcrft arcrft = QFltPlanArcrft.fltPlanArcrft; |
|
|
|
|
QFltPlanBas bas = QFltPlanBas.fltPlanBas; |
|
|
|
|
QFltPlanArcrft arcrft = QFltPlanArcrft.fltPlanArcrft; |
|
|
|
|
QFltPlanBas bas = QFltPlanBas.fltPlanBas; |
|
|
|
|
|
|
|
|
|
List<BasFlightPlanModel> list = query |
|
|
|
|
List<BasFlightPlanModel> list = query |
|
|
|
|
.select(Projections.bean( |
|
|
|
|
BasFlightPlanModel.class, |
|
|
|
|
BasFlightPlanModel.class, |
|
|
|
|
bas.schFltStDt, |
|
|
|
|
bas.schFltEndDt, |
|
|
|
|
bas.delYn |
|
|
|
@ -116,28 +116,27 @@ public class FltPlanQueryRepository {
|
|
|
|
|
.leftJoin(arcrft) |
|
|
|
|
.on(bas.planSno.eq(arcrft.planSno)) |
|
|
|
|
.where(arcrft.idntfNum.eq(idntfNum) |
|
|
|
|
.and(((bas.schFltStDt.loe(rq.getSchFltStDt())) |
|
|
|
|
.and(bas.schFltEndDt.goe(rq.getSchFltEndDt()))) |
|
|
|
|
.or((bas.schFltStDt.goe(rq.getSchFltStDt())) |
|
|
|
|
.and((bas.schFltStDt.loe(rq.getSchFltEndDt())) |
|
|
|
|
.and(bas.schFltEndDt.goe(rq.getSchFltEndDt())))) |
|
|
|
|
.or(((bas.schFltStDt.loe(rq.getSchFltStDt())) |
|
|
|
|
.and(bas.schFltEndDt.goe(rq.getSchFltStDt()))) |
|
|
|
|
.and(bas.schFltEndDt.loe(rq.getSchFltEndDt()))) |
|
|
|
|
.or((bas.schFltStDt.goe(rq.getSchFltStDt())) |
|
|
|
|
.and(bas.schFltEndDt.loe(rq.getSchFltEndDt())))) |
|
|
|
|
.and(bas.delYn.eq("N"))) |
|
|
|
|
.and(((bas.schFltStDt.loe(rq.getSchFltStDt())) |
|
|
|
|
.and(bas.schFltEndDt.goe(rq.getSchFltEndDt()))) |
|
|
|
|
.or((bas.schFltStDt.goe(rq.getSchFltStDt())) |
|
|
|
|
.and((bas.schFltStDt.loe(rq.getSchFltEndDt())) |
|
|
|
|
.and(bas.schFltEndDt.goe(rq.getSchFltEndDt())))) |
|
|
|
|
.or(((bas.schFltStDt.loe(rq.getSchFltStDt())) |
|
|
|
|
.and(bas.schFltEndDt.goe(rq.getSchFltStDt()))) |
|
|
|
|
.and(bas.schFltEndDt.loe(rq.getSchFltEndDt()))) |
|
|
|
|
.or((bas.schFltStDt.goe(rq.getSchFltStDt())) |
|
|
|
|
.and(bas.schFltEndDt.loe(rq.getSchFltEndDt())))) |
|
|
|
|
.and(bas.delYn.eq("N"))) |
|
|
|
|
.fetch(); |
|
|
|
|
return list; |
|
|
|
|
return list; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
// 비행계획구역 설정시 같은 시간대에 구역이 중복되는지 조회
|
|
|
|
|
public List<BasFlightPlanModel> CoordCheck(BasFlightPlanModel rq){ |
|
|
|
|
QFltPlanArea area = QFltPlanArea.fltPlanArea; |
|
|
|
|
QFltPlanAreaCoord coord = QFltPlanAreaCoord.fltPlanAreaCoord; |
|
|
|
|
QFltPlanBas bas = QFltPlanBas.fltPlanBas; |
|
|
|
|
|
|
|
|
|
List<BasFlightPlanModel> list = query |
|
|
|
|
QFltPlanArea area = QFltPlanArea.fltPlanArea; |
|
|
|
|
QFltPlanAreaCoord coord = QFltPlanAreaCoord.fltPlanAreaCoord; |
|
|
|
|
QFltPlanBas bas = QFltPlanBas.fltPlanBas; |
|
|
|
|
List<BasFlightPlanModel> list = query |
|
|
|
|
.select(Projections.bean( |
|
|
|
|
BasFlightPlanModel.class, |
|
|
|
|
bas.planSno, |
|
|
|
@ -159,58 +158,61 @@ public class FltPlanQueryRepository {
|
|
|
|
|
bas.createDt, |
|
|
|
|
bas.updateUserId, |
|
|
|
|
bas.updateDt |
|
|
|
|
|
|
|
|
|
)) |
|
|
|
|
.from(bas) |
|
|
|
|
.where((((bas.schFltStDt.loe(rq.getSchFltStDt())) |
|
|
|
|
.and(bas.schFltEndDt.goe(rq.getSchFltEndDt()))) |
|
|
|
|
.or((bas.schFltStDt.goe(rq.getSchFltStDt())) |
|
|
|
|
.and((bas.schFltStDt.loe(rq.getSchFltEndDt())) |
|
|
|
|
.and(bas.schFltEndDt.goe(rq.getSchFltEndDt())))) |
|
|
|
|
.or(((bas.schFltStDt.loe(rq.getSchFltStDt())) |
|
|
|
|
.and(bas.schFltEndDt.goe(rq.getSchFltStDt()))) |
|
|
|
|
.and(bas.schFltEndDt.loe(rq.getSchFltEndDt()))) |
|
|
|
|
.or((bas.schFltStDt.goe(rq.getSchFltStDt())) |
|
|
|
|
.and(bas.schFltEndDt.loe(rq.getSchFltEndDt())))) |
|
|
|
|
.and(bas.delYn.eq("N"))) |
|
|
|
|
.and(bas.schFltEndDt.goe(rq.getSchFltEndDt()))) |
|
|
|
|
.or((bas.schFltStDt.goe(rq.getSchFltStDt())) |
|
|
|
|
.and((bas.schFltStDt.loe(rq.getSchFltEndDt())) |
|
|
|
|
.and(bas.schFltEndDt.goe(rq.getSchFltEndDt())))) |
|
|
|
|
.or(((bas.schFltStDt.loe(rq.getSchFltStDt())) |
|
|
|
|
.and(bas.schFltEndDt.goe(rq.getSchFltStDt()))) |
|
|
|
|
.and(bas.schFltEndDt.loe(rq.getSchFltEndDt()))) |
|
|
|
|
.or((bas.schFltStDt.goe(rq.getSchFltStDt())) |
|
|
|
|
.and(bas.schFltEndDt.loe(rq.getSchFltEndDt())))) |
|
|
|
|
.and(bas.delYn.eq("N"))) |
|
|
|
|
.fetch(); |
|
|
|
|
return list; |
|
|
|
|
return list; |
|
|
|
|
} |
|
|
|
|
//CoordCheck에 들어갈 count
|
|
|
|
|
public List<BasFlightPlanAreaCoordRq> CoordCount(BasFlightPlanModel rq){ |
|
|
|
|
QFltPlanArea area = QFltPlanArea.fltPlanArea; |
|
|
|
|
QFltPlanAreaCoord coord = QFltPlanAreaCoord.fltPlanAreaCoord; |
|
|
|
|
QFltPlanBas bas = QFltPlanBas.fltPlanBas; |
|
|
|
|
|
|
|
|
|
List<BasFlightPlanAreaCoordRq> list = query |
|
|
|
|
QFltPlanArea area = QFltPlanArea.fltPlanArea; |
|
|
|
|
QFltPlanAreaCoord coord = QFltPlanAreaCoord.fltPlanAreaCoord; |
|
|
|
|
QFltPlanBas bas = QFltPlanBas.fltPlanBas; |
|
|
|
|
QFltPlanArcrft arcrft = QFltPlanArcrft.fltPlanArcrft; |
|
|
|
|
List<BasFlightPlanAreaCoordRq> list = query |
|
|
|
|
.select(Projections.bean( |
|
|
|
|
BasFlightPlanAreaCoordRq.class, |
|
|
|
|
coord.lon, |
|
|
|
|
coord.lat, |
|
|
|
|
BasFlightPlanAreaCoordRq.class, |
|
|
|
|
area.bufferZone, |
|
|
|
|
area.areaType, |
|
|
|
|
area.planAreaSno.count().intValue().as("cnt") |
|
|
|
|
area.planAreaSno.count().intValue().as("cnt"), |
|
|
|
|
arcrft.idntfNum |
|
|
|
|
)) |
|
|
|
|
.from(bas) |
|
|
|
|
.leftJoin(area) |
|
|
|
|
.on(bas.planSno.eq(area.planSno)) |
|
|
|
|
.leftJoin(arcrft) |
|
|
|
|
.on(area.planSno.eq(arcrft.planSno)) |
|
|
|
|
.leftJoin(coord) |
|
|
|
|
.on(area.planAreaSno.eq(coord.planAreaSno)) |
|
|
|
|
|
|
|
|
|
.where((((bas.schFltStDt.loe(rq.getSchFltStDt())) |
|
|
|
|
.and(bas.schFltEndDt.goe(rq.getSchFltEndDt()))) |
|
|
|
|
.or((bas.schFltStDt.goe(rq.getSchFltStDt())) |
|
|
|
|
.and((bas.schFltStDt.loe(rq.getSchFltEndDt())) |
|
|
|
|
.and(bas.schFltEndDt.goe(rq.getSchFltEndDt())))) |
|
|
|
|
.or(((bas.schFltStDt.loe(rq.getSchFltStDt())) |
|
|
|
|
.and(bas.schFltEndDt.goe(rq.getSchFltStDt()))) |
|
|
|
|
.and(bas.schFltEndDt.loe(rq.getSchFltEndDt()))) |
|
|
|
|
.or((bas.schFltStDt.goe(rq.getSchFltStDt())) |
|
|
|
|
.and(bas.schFltEndDt.loe(rq.getSchFltEndDt())))) |
|
|
|
|
.and(bas.delYn.eq("N")) |
|
|
|
|
.and(((coord.lon.goe(0.1)) |
|
|
|
|
.and(coord.lat.goe(0.1))))) |
|
|
|
|
.and(bas.schFltEndDt.goe(rq.getSchFltEndDt()))) |
|
|
|
|
.or((bas.schFltStDt.goe(rq.getSchFltStDt())) |
|
|
|
|
.and((bas.schFltStDt.loe(rq.getSchFltEndDt())) |
|
|
|
|
.and(bas.schFltEndDt.goe(rq.getSchFltEndDt())))) |
|
|
|
|
.or(((bas.schFltStDt.loe(rq.getSchFltStDt())) |
|
|
|
|
.and(bas.schFltEndDt.goe(rq.getSchFltStDt()))) |
|
|
|
|
.and(bas.schFltEndDt.loe(rq.getSchFltEndDt()))) |
|
|
|
|
.or((bas.schFltStDt.goe(rq.getSchFltStDt())) |
|
|
|
|
.and(bas.schFltEndDt.loe(rq.getSchFltEndDt())))) |
|
|
|
|
.and(bas.delYn.eq("N")) |
|
|
|
|
.and(((coord.lon.goe(0.1)) |
|
|
|
|
.and(coord.lat.goe(0.1))))) |
|
|
|
|
.groupBy(area.planAreaSno) |
|
|
|
|
.fetch(); |
|
|
|
|
return list; |
|
|
|
|
return list; |
|
|
|
|
} |
|
|
|
|
// 조종사 조회
|
|
|
|
|
public List<BasFlightPlanPilotModel> listPilot(String groupId) { |
|
|
|
|