feat: 다수 기능 개선 - 순찰, 출근, 작업분석, 모바일 UI 등

- 순찰/점검 기능 개선 (zone-detail 페이지 추가)
- 출근/근태 시스템 개선 (연차 조회, 근무현황)
- 작업분석 대분류 그룹화 및 마이그레이션 스크립트
- 모바일 네비게이션 UI 추가
- NAS 배포 도구 및 문서 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-02-09 14:41:01 +09:00
parent 1548253f56
commit 2b1c7bfb88
633 changed files with 361224 additions and 1090 deletions

View File

@@ -3,8 +3,35 @@
const express = require('express');
const router = express.Router();
const multer = require('multer');
const path = require('path');
const patrolController = require('../controllers/patrolController');
// Multer 설정 - 구역 현황 사진 업로드
const storage = multer.diskStorage({
destination: (req, file, cb) => {
cb(null, path.join(__dirname, '../uploads'));
},
filename: (req, file, cb) => {
const uniqueSuffix = Date.now() + '-' + Math.round(Math.random() * 1E9);
const ext = path.extname(file.originalname).toLowerCase();
cb(null, `zone-item-${uniqueSuffix}${ext}`);
}
});
const upload = multer({
storage,
limits: { fileSize: 10 * 1024 * 1024 }, // 10MB
fileFilter: (req, file, cb) => {
const allowedTypes = ['image/jpeg', 'image/png', 'image/gif', 'image/webp'];
if (allowedTypes.includes(file.mimetype)) {
cb(null, true);
} else {
cb(new Error('이미지 파일만 업로드 가능합니다.'), false);
}
}
});
// ==================== 순회점검 세션 ====================
// 세션 목록 조회
@@ -70,4 +97,30 @@ router.get('/item-types', patrolController.getItemTypes);
// 오늘 순회점검 현황
router.get('/today-status', patrolController.getTodayStatus);
// ==================== 작업장 상세 정보 ====================
// 작업장 상세 정보 조회 (시설물, 안전신고, 부적합, 출입, TBM 통합)
// GET /patrol/workplaces/:workplaceId/detail?date=2026-02-05
router.get('/workplaces/:workplaceId/detail', patrolController.getWorkplaceDetail);
// ==================== 구역 내 등록 물품/시설물 ====================
// 구역 내 등록된 물품/시설물 목록 조회
router.get('/workplaces/:workplaceId/zone-items', patrolController.getZoneItems);
// 구역 내 물품/시설물 등록
router.post('/workplaces/:workplaceId/zone-items', patrolController.createZoneItem);
// 구역 내 물품/시설물 수정
router.put('/zone-items/:itemId', patrolController.updateZoneItem);
// 구역 내 물품/시설물 삭제
router.delete('/zone-items/:itemId', patrolController.deleteZoneItem);
// 구역 현황 사진 업로드
router.post('/zone-items/photos', upload.single('photo'), patrolController.uploadZoneItemPhoto);
// 구역 현황 이력 조회
router.get('/zone-items/:itemId/history', patrolController.getZoneItemHistory);
module.exports = router;