fix: 캘린더 모달 중복 카드 문제 및 삭제 권한 개선
- monthly_worker_status 조회 시 GROUP BY로 중복 데이터 합산 - 작업보고서 삭제 권한을 그룹장 이상으로 제한 (admin, system, group_leader) - 중복 데이터 정리를 위한 마이그레이션 SQL 추가 (009_fix_duplicate_monthly_status.sql) - synology_deployment 버전에도 동일 수정 적용
This commit is contained in:
65
synology_deployment/api/routes/workAnalysisRoutes.js
Normal file
65
synology_deployment/api/routes/workAnalysisRoutes.js
Normal file
@@ -0,0 +1,65 @@
|
||||
// routes/workAnalysisRoutes.js
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const workAnalysisController = require('../controllers/workAnalysisController');
|
||||
|
||||
// 🏠 대시보드용 종합 데이터 (가장 많이 사용될 것 같아서 맨 위에)
|
||||
router.get('/dashboard', workAnalysisController.getDashboardData);
|
||||
|
||||
// 📊 기본 통계
|
||||
router.get('/stats', workAnalysisController.getStats);
|
||||
|
||||
// 📈 일별 작업시간 추이
|
||||
router.get('/daily-trend', workAnalysisController.getDailyTrend);
|
||||
|
||||
// 👥 작업자별 통계
|
||||
router.get('/worker-stats', workAnalysisController.getWorkerStats);
|
||||
|
||||
// 📋 프로젝트별 통계
|
||||
router.get('/project-stats', workAnalysisController.getProjectStats);
|
||||
|
||||
// 🔧 작업유형별 통계
|
||||
router.get('/work-type-stats', workAnalysisController.getWorkTypeStats);
|
||||
|
||||
// 🕐 최근 작업 현황
|
||||
router.get('/recent-work', workAnalysisController.getRecentWork);
|
||||
|
||||
// 📅 요일별 패턴 분석
|
||||
router.get('/weekday-pattern', workAnalysisController.getWeekdayPattern);
|
||||
|
||||
// ❌ 에러 분석
|
||||
router.get('/error-analysis', workAnalysisController.getErrorAnalysis);
|
||||
|
||||
// 📊 월별 비교 분석
|
||||
router.get('/monthly-comparison', workAnalysisController.getMonthlyComparison);
|
||||
|
||||
// 🎯 작업자별 전문분야 분석
|
||||
router.get('/worker-specialization', workAnalysisController.getWorkerSpecialization);
|
||||
|
||||
// 🏗️ 프로젝트별-작업별 시간 분석 (총시간, 정규시간, 에러시간)
|
||||
router.get('/project-worktype-analysis', workAnalysisController.getProjectWorkTypeAnalysis);
|
||||
|
||||
// 📋 헬스체크 및 API 정보
|
||||
router.get('/health', (req, res) => {
|
||||
res.json({
|
||||
success: true,
|
||||
message: '작업 분석 API가 정상 작동 중입니다.',
|
||||
endpoints: [
|
||||
'GET /work-analysis/dashboard - 대시보드 종합 데이터',
|
||||
'GET /work-analysis/stats - 기본 통계',
|
||||
'GET /work-analysis/daily-trend - 일별 추이',
|
||||
'GET /work-analysis/worker-stats - 작업자별 통계',
|
||||
'GET /work-analysis/project-stats - 프로젝트별 통계',
|
||||
'GET /work-analysis/work-type-stats - 작업유형별 통계',
|
||||
'GET /work-analysis/recent-work - 최근 작업 현황',
|
||||
'GET /work-analysis/weekday-pattern - 요일별 패턴',
|
||||
'GET /work-analysis/error-analysis - 에러 분석',
|
||||
'GET /work-analysis/monthly-comparison - 월별 비교',
|
||||
'GET /work-analysis/worker-specialization - 작업자 전문분야',
|
||||
'GET /work-analysis/project-worktype-analysis - 프로젝트별-작업별 시간 분석'
|
||||
],
|
||||
timestamp: new Date().toISOString()
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
Reference in New Issue
Block a user