ERP-node에서 개발한 POP/MES 관련 백엔드 API를 vexplor_dev로 이전.
컨트롤러 16개, 라우트 16개, 서비스 2개 복사 + app.ts 라우트 등록 + cheerio 의존성 추가.
이전 대상:
- POP 생산관리 (popProduction, inspectionResult)
- 작업지시, 공정정보, 생산계획
- 입고, 출고, 출하지시, 출하계획
- 분석리포트, 영업리포트, 설계모듈
- 자재현황, 포장/적재, 크롤링, 시스템공지
tsc 검증: 기존 에러 1건 외 신규 에러 없음
- Integrated express-async-errors to automatically handle errors in async route handlers, enhancing the overall error management in the application.
- Updated app.ts to include the express-async-errors import for global error handling.
- Removed redundant logging statements in admin and user menu retrieval functions to streamline the code and improve readability.
- Adjusted logging levels from info to debug for less critical logs, ensuring that important information is logged appropriately without cluttering the logs.
Phase 1.5 완료: 인증 서비스 Raw Query 전환 및 테스트 완료
✅ AuthService 전환 완료 (5개 Prisma 호출 제거):
- loginPwdCheck(): Raw Query로 사용자 비밀번호 조회
- insertLoginAccessLog(): Raw Query로 로그인 로그 기록
- getUserInfo(): Raw Query로 사용자/권한/회사 정보 조회
- authority_sub_user ↔ authority_master JOIN (master_objid ↔ objid)
- 3개 쿼리로 분리 (사용자, 권한, 회사)
- processLogin(): 전체 로그인 플로우 통합
- processLogout(): 로그아웃 로그 기록
🧪 테스트 완료:
- 단위 테스트: 30개 테스트 모두 통과 ✅
- 로그인 검증 (6개)
- 사용자 정보 조회 (5개)
- 로그인 로그 기록 (4개)
- 전체 로그인 프로세스 (5개)
- 로그아웃 (2개)
- 토큰 검증 (3개)
- Raw Query 전환 검증 (3개)
- 성능 테스트 (2개)
- 통합 테스트: 작성 완료 (auth.integration.test.ts)
- 로그인 → 토큰 발급 → 인증 → 로그아웃 플로우
🔧 주요 변경사항:
- Prisma import 제거 → Raw Query (query from db.ts)
- authority 테이블 JOIN 수정 (auth_code → master_objid/objid)
- 파라미터 바인딩으로 SQL Injection 방지
- 타입 안전성 유지 (TypeScript Generic 사용)
📊 성능:
- 로그인 프로세스: < 1초
- 사용자 정보 조회: < 500ms
- 모든 테스트 실행 시간: 2.016초
🎯 다음 단계:
- Phase 2: 핵심 서비스 전환 (ScreenManagement, TableManagement 등)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
✨ 주요 기능:
- 배치 설정 관리 (생성/수정/삭제/실행)
- 배치 실행 로그 관리 및 모니터링
- 배치 스케줄러 자동 실행 (cron 기반)
- 외부 DB 연결을 통한 데이터 동기화
- Oracle, MSSQL, MariaDB 커넥터 지원
🔧 백엔드 구현:
- BatchManagementController: 배치 설정 CRUD
- BatchExecutionLogController: 실행 로그 관리
- BatchSchedulerService: 자동 스케줄링
- BatchExternalDbService: 외부 DB 연동
- 배치 관련 테이블 스키마 추가
🎨 프론트엔드 구현:
- 배치 관리 대시보드 UI
- 배치 생성/수정 폼
- 실행 로그 모니터링 화면
- 수동 실행 및 상태 관리
🛡️ 안전성:
- 기존 시스템과 독립적 구현
- 트랜잭션 기반 안전한 데이터 처리
- 에러 핸들링 및 로깅 강화