|
|
|
@ -58,6 +58,60 @@ function* flightStcsSearchSaga(
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function* abnormalStcsSaga( |
|
|
|
|
action: ActionType<typeof Actions.ABNORMAL_STCS.request> |
|
|
|
|
) { |
|
|
|
|
try { |
|
|
|
|
const payload = action.payload; |
|
|
|
|
const res = yield call(Apis.statisticsAPI.abnormal); |
|
|
|
|
const { data, errorCode } = res; |
|
|
|
|
|
|
|
|
|
if (errorCode) { |
|
|
|
|
// 오류메시지 호출
|
|
|
|
|
yield put( |
|
|
|
|
MessageActions.IS_ERROR({ |
|
|
|
|
errorCode: errorCode, |
|
|
|
|
errorMessage: '처리중 오류가 발생하였습니다', |
|
|
|
|
isHistoryBack: false, |
|
|
|
|
isRefresh: false |
|
|
|
|
}) |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
yield put(Actions.ABNORMAL_STCS.success(data)); |
|
|
|
|
} catch (error) { |
|
|
|
|
yield put(Actions.ABNORMAL_STCS.failure(error)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function* abnormalStcsSearchSaga( |
|
|
|
|
action: ActionType<typeof Actions.ABNORMAL_STCS_SEARCH.request> |
|
|
|
|
) { |
|
|
|
|
try { |
|
|
|
|
const payload = action.payload; |
|
|
|
|
const res = yield call(Apis.statisticsAPI.abnormalSearch, payload); |
|
|
|
|
const { data, errorCode } = res; |
|
|
|
|
|
|
|
|
|
if (errorCode) { |
|
|
|
|
// 오류메시지 호출
|
|
|
|
|
yield put( |
|
|
|
|
MessageActions.IS_ERROR({ |
|
|
|
|
errorCode: errorCode, |
|
|
|
|
errorMessage: '처리중 오류가 발생하였습니다', |
|
|
|
|
isHistoryBack: false, |
|
|
|
|
isRefresh: false |
|
|
|
|
}) |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
yield put(Actions.ABNORMAL_STCS_SEARCH.success(data)); |
|
|
|
|
} catch (error) { |
|
|
|
|
yield put(Actions.ABNORMAL_STCS_SEARCH.failure(error)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function* resultStcsSaga( |
|
|
|
|
action: ActionType<typeof Actions.RESULT_STCS.request> |
|
|
|
|
) { |
|
|
|
@ -115,6 +169,8 @@ function* resultStcsSearchSaga(
|
|
|
|
|
export function* statisticsSaga() { |
|
|
|
|
yield takeEvery(Actions.FLIGHT_STCS.request, flightStcsSaga); |
|
|
|
|
yield takeEvery(Actions.FLIGHT_STCS_SEARCH.request, flightStcsSearchSaga); |
|
|
|
|
yield takeEvery(Actions.ABNORMAL_STCS.request, abnormalStcsSaga); |
|
|
|
|
yield takeEvery(Actions.ABNORMAL_STCS_SEARCH.request, abnormalStcsSearchSaga); |
|
|
|
|
yield takeEvery(Actions.RESULT_STCS.request, resultStcsSaga); |
|
|
|
|
yield takeEvery(Actions.RESULT_STCS_SEARCH.request, resultStcsSearchSaga); |
|
|
|
|
} |
|
|
|
|