Skip to content

[refactor] 주문관리 - 사방넷 API to DB 필터링 with 주문 수집 일자(reg_date) & 주문상태(order_status) 관련 수정 #355

Description

@Lyckabc

Todo

사방넷 API를 통한 주문 데이터 수집 시 날짜 필터링과 다중 주문 상태 처리 기능을 개선하는 작업입니다.
🔧 개선 내용

  • 1. 날짜 기반 주문 필터링 구현

목적: 특정 기간의 주문만 선별적으로 수집
구현 방식:

프론트엔드에서 date_from, date_to 값을 받음
사방넷 API 호출 시 ORD_ST_DATE, ORD_ED_DATE 파라미터로 전달
API 엔드포인트: create_down_form_orders_from_receive_orders

  • 2. 다중 주문 상태 처리 개선

기존: 단일 주문 상태만 처리 (order_status)
개선: 두 가지 주문 상태 동시 처리 가능

order_status1: 신규주문
order_status2: 주문확인

로직:
"save_down_form_order_from_receive_orders_by_filters_v2" 함수를 반복문 구조로
주문 상태별로 개별 처리.
order_status1만 있는 경우 → 해당 상태만 처리
order_status2만 있는 경우 → 해당 상태만 처리
둘 다 있는 경우 → 두 상태 모두 순차적으로 처리

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

refactorRefactor something

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions