feat: 3-System 분리 프로젝트 초기 코드 작성
TK-FB(공장관리+신고)와 M-Project(부적합관리)를 3개 독립 시스템으로 분리하기 위한 전체 코드 구조 작성. - SSO 인증 서비스 (bcrypt + pbkdf2 이중 해시 지원) - System 1: 공장관리 (TK-FB 기반, 신고 코드 제거) - System 2: 신고 (TK-FB에서 workIssue 코드 추출) - System 3: 부적합관리 (M-Project 기반) - Gateway 포털 (path-based 라우팅) - 통합 docker-compose.yml 및 배포 스크립트 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
39
system1-factory/api/routes/workReportRoutes.js
Normal file
39
system1-factory/api/routes/workReportRoutes.js
Normal file
@@ -0,0 +1,39 @@
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const workReportController = require('../controllers/workReportController');
|
||||
|
||||
// CREATE
|
||||
router.post('/', workReportController.createWorkReport);
|
||||
|
||||
// READ BY DATE
|
||||
router.get('/date/:date', workReportController.getWorkReportsByDate);
|
||||
|
||||
// ✅ summary 라우트는 반드시 아래보다 위에 둬야 작동합니다
|
||||
router.get('/summary', workReportController.getSummary);
|
||||
|
||||
// READ IN RANGE
|
||||
router.get('/', workReportController.getWorkReportsInRange);
|
||||
|
||||
// READ ONE (항상 가장 마지막)
|
||||
router.get('/:id', workReportController.getWorkReportById);
|
||||
|
||||
// UPDATE
|
||||
router.put('/:id', workReportController.updateWorkReport);
|
||||
|
||||
// DELETE
|
||||
router.delete('/:id', workReportController.removeWorkReport);
|
||||
|
||||
// ========== 부적합 원인 관리 ==========
|
||||
// 작업 보고서의 부적합 원인 목록 조회
|
||||
router.get('/:reportId/defects', workReportController.getReportDefects);
|
||||
|
||||
// 부적합 원인 저장 (전체 교체)
|
||||
router.put('/:reportId/defects', workReportController.saveReportDefects);
|
||||
|
||||
// 부적합 원인 추가 (단일)
|
||||
router.post('/:reportId/defects', workReportController.addReportDefect);
|
||||
|
||||
// 부적합 원인 삭제
|
||||
router.delete('/defects/:defectId', workReportController.removeReportDefect);
|
||||
|
||||
module.exports = router;
|
||||
Reference in New Issue
Block a user