Merge branch 'main' of http://39.117.244.52:3000/kjs/ERP-node into feature/screen-management

This commit is contained in:
kjs
2025-09-29 13:37:35 +09:00
40 changed files with 10345 additions and 1914 deletions

View File

@@ -0,0 +1,47 @@
// 배치 실행 로그 라우트
// 작성일: 2024-12-24
import { Router } from "express";
import { BatchExecutionLogController } from "../controllers/batchExecutionLogController";
import { authenticateToken } from "../middleware/authMiddleware";
const router = Router();
/**
* GET /api/batch-execution-logs
* 배치 실행 로그 목록 조회
*/
router.get("/", authenticateToken, BatchExecutionLogController.getExecutionLogs);
/**
* POST /api/batch-execution-logs
* 배치 실행 로그 생성
*/
router.post("/", authenticateToken, BatchExecutionLogController.createExecutionLog);
/**
* PUT /api/batch-execution-logs/:id
* 배치 실행 로그 업데이트
*/
router.put("/:id", authenticateToken, BatchExecutionLogController.updateExecutionLog);
/**
* DELETE /api/batch-execution-logs/:id
* 배치 실행 로그 삭제
*/
router.delete("/:id", authenticateToken, BatchExecutionLogController.deleteExecutionLog);
/**
* GET /api/batch-execution-logs/latest/:batchConfigId
* 특정 배치의 최신 실행 로그 조회
*/
router.get("/latest/:batchConfigId", authenticateToken, BatchExecutionLogController.getLatestExecutionLog);
/**
* GET /api/batch-execution-logs/stats
* 배치 실행 통계 조회
*/
router.get("/stats", authenticateToken, BatchExecutionLogController.getExecutionStats);
export default router;

View File

@@ -0,0 +1,82 @@
// 배치관리 전용 라우트 (기존 소스와 완전 분리)
// 작성일: 2024-12-24
import { Router } from "express";
import { BatchManagementController } from "../controllers/batchManagementController";
import { authenticateToken } from "../middleware/authMiddleware";
const router = Router();
/**
* GET /api/batch-management/connections
* 사용 가능한 커넥션 목록 조회
*/
router.get("/connections", authenticateToken, BatchManagementController.getAvailableConnections);
/**
* GET /api/batch-management/connections/:type/tables
* 내부 DB 테이블 목록 조회
*/
router.get("/connections/:type/tables", authenticateToken, BatchManagementController.getTablesFromConnection);
/**
* GET /api/batch-management/connections/:type/:id/tables
* 외부 DB 테이블 목록 조회
*/
router.get("/connections/:type/:id/tables", authenticateToken, BatchManagementController.getTablesFromConnection);
/**
* GET /api/batch-management/connections/:type/tables/:tableName/columns
* 내부 DB 테이블 컬럼 정보 조회
*/
router.get("/connections/:type/tables/:tableName/columns", authenticateToken, BatchManagementController.getTableColumns);
/**
* GET /api/batch-management/connections/:type/:id/tables/:tableName/columns
* 외부 DB 테이블 컬럼 정보 조회
*/
router.get("/connections/:type/:id/tables/:tableName/columns", authenticateToken, BatchManagementController.getTableColumns);
/**
* POST /api/batch-management/batch-configs
* 배치 설정 생성
*/
router.post("/batch-configs", authenticateToken, BatchManagementController.createBatchConfig);
/**
* GET /api/batch-management/batch-configs
* 배치 설정 목록 조회
*/
router.get("/batch-configs", authenticateToken, BatchManagementController.getBatchConfigs);
/**
* GET /api/batch-management/batch-configs/:id
* 특정 배치 설정 조회
*/
router.get("/batch-configs/:id", authenticateToken, BatchManagementController.getBatchConfigById);
/**
* PUT /api/batch-management/batch-configs/:id
* 배치 설정 업데이트
*/
router.put("/batch-configs/:id", authenticateToken, BatchManagementController.updateBatchConfig);
/**
* POST /api/batch-management/batch-configs/:id/execute
* 배치 수동 실행
*/
router.post("/batch-configs/:id/execute", authenticateToken, BatchManagementController.executeBatchConfig);
/**
* POST /api/batch-management/rest-api/preview
* REST API 데이터 미리보기
*/
router.post("/rest-api/preview", authenticateToken, BatchManagementController.previewRestApiData);
/**
* POST /api/batch-management/rest-api/save
* REST API 배치 저장
*/
router.post("/rest-api/save", authenticateToken, BatchManagementController.saveRestApiBatch);
export default router;

View File

@@ -1,73 +1,70 @@
// 배치 관리 라우트
// 작성일: 2024-12-23
// 배치관리 라우트
// 작성일: 2024-12-24
import { Router } from 'express';
import { BatchController } from '../controllers/batchController';
import { authenticateToken } from '../middleware/authMiddleware';
import { Router } from "express";
import { BatchController } from "../controllers/batchController";
import { authenticateToken } from "../middleware/authMiddleware";
const router = Router();
// 모든 라우트에 인증 미들웨어 적용
router.use(authenticateToken);
/**
* GET /api/batch-configs
* 배치 설정 목록 조회
*/
router.get("/", authenticateToken, BatchController.getBatchConfigs);
/**
* GET /api/batch
* 배치 작업 목록 조회
* GET /api/batch-configs/connections
* 사용 가능한 커넥션 목록 조회
*/
router.get('/', BatchController.getBatchJobs);
router.get("/connections", BatchController.getAvailableConnections);
/**
* GET /api/batch/:id
* 배치 작업 상세 조회
* GET /api/batch-configs/connections/:type/tables
* 내부 DB 테이블 목록 조회
*/
router.get('/:id', BatchController.getBatchJobById);
router.get("/connections/:type/tables", authenticateToken, BatchController.getTablesFromConnection);
/**
* POST /api/batch
* 배치 작업 생성
* GET /api/batch-configs/connections/:type/:id/tables
* 외부 DB 테이블 목록 조회
*/
router.post('/', BatchController.createBatchJob);
router.get("/connections/:type/:id/tables", authenticateToken, BatchController.getTablesFromConnection);
/**
* PUT /api/batch/:id
* 배치 작업 수정
* GET /api/batch-configs/connections/:type/tables/:tableName/columns
* 내부 DB 테이블 컬럼 정보 조회
*/
router.put('/:id', BatchController.updateBatchJob);
router.get("/connections/:type/tables/:tableName/columns", authenticateToken, BatchController.getTableColumns);
/**
* DELETE /api/batch/:id
* 배치 작업 삭제
* GET /api/batch-configs/connections/:type/:id/tables/:tableName/columns
* 외부 DB 테이블 컬럼 정보 조회
*/
router.delete('/:id', BatchController.deleteBatchJob);
router.get("/connections/:type/:id/tables/:tableName/columns", authenticateToken, BatchController.getTableColumns);
/**
* POST /api/batch/:id/execute
* 배치 작업 수동 실행
* GET /api/batch-configs/:id
* 특정 배치 설정 조회
*/
router.post('/:id/execute', BatchController.executeBatchJob);
router.get("/:id", authenticateToken, BatchController.getBatchConfigById);
/**
* GET /api/batch/executions
* 배치 실행 목록 조회
* POST /api/batch-configs
* 배치 설정 생성
*/
router.get('/executions/list', BatchController.getBatchExecutions);
router.post("/", authenticateToken, BatchController.createBatchConfig);
/**
* GET /api/batch/monitoring
* 배치 모니터링 정보 조회
* PUT /api/batch-configs/:id
* 배치 설정 수정
*/
router.get('/monitoring/status', BatchController.getBatchMonitoring);
router.put("/:id", authenticateToken, BatchController.updateBatchConfig);
/**
* GET /api/batch/types/supported
* 지원되는 작업 타입 조회
* DELETE /api/batch-configs/:id
* 배치 설정 삭제 (논리 삭제)
*/
router.get('/types/supported', BatchController.getSupportedJobTypes);
router.delete("/:id", authenticateToken, BatchController.deleteBatchConfig);
/**
* GET /api/batch/schedules/presets
* 스케줄 프리셋 조회
*/
router.get('/schedules/presets', BatchController.getSchedulePresets);
export default router;
export default router;