refactor: worker_id → user_id 전체 마이그레이션 (Phase 1-4)

sso_users.user_id를 단일 식별자로 통합. JWT에서 worker_id 제거,
department_id/is_production 추가. 백엔드 15개 모델, 11개 컨트롤러,
4개 서비스, 7개 라우트, 프론트엔드 32+ JS/11+ HTML 변환.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-03-05 13:13:10 +09:00
parent 2197cdb3d5
commit abd7564e6b
90 changed files with 1790 additions and 925 deletions

View File

@@ -662,7 +662,7 @@
const records = response.data.data;
// 작업자별로 데이터 정리
records.forEach(record => {
const workerId = record.worker_id;
const workerId = record.user_id;
// 날짜 형식 정규화 (다양한 형식 처리)
let dateKey = record.record_date;
if (dateKey) {
@@ -686,7 +686,7 @@
console.error('근태 데이터 조회 오류:', err);
// 작업자별 빈 데이터 초기화
workers.forEach(worker => {
attendanceData[worker.worker_id] = {};
attendanceData[worker.user_id] = {};
});
}
@@ -765,7 +765,7 @@
html += `<tbody>`;
workers.forEach((worker, index) => {
const workerRecords = attendanceData[worker.worker_id] || {};
const workerRecords = attendanceData[worker.user_id] || {};
let totalOvertimeHours = 0;
// 입사일 파싱
@@ -954,7 +954,7 @@
let totalNormalDays = 0;
workers.forEach(worker => {
const records = attendanceData[worker.worker_id] || {};
const records = attendanceData[worker.user_id] || {};
Object.values(records).forEach(record => {
const hours = parseFloat(record.total_work_hours) || 0;
totalWorkHours += hours;