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

@@ -792,7 +792,7 @@ const MobileReport = (function() {
const reportData = {
tbm_assignment_id: tbm.assignment_id,
tbm_session_id: tbm.session_id,
worker_id: tbm.worker_id,
user_id: tbm.user_id,
project_id: tbm.project_id,
work_type_id: tbm.task_id,
report_date: reportDate,
@@ -895,7 +895,7 @@ const MobileReport = (function() {
data: {
tbm_assignment_id: tbm.assignment_id,
tbm_session_id: tbm.session_id,
worker_id: tbm.worker_id,
user_id: tbm.user_id,
project_id: tbm.project_id,
work_type_id: tbm.task_id,
report_date: reportDate,
@@ -974,7 +974,7 @@ const MobileReport = (function() {
const state = window.DailyWorkReportState;
manualCards[id] = {
worker_id: null,
user_id: null,
report_date: getKoreaToday(),
project_id: null,
work_type_id: null,
@@ -1006,9 +1006,9 @@ const MobileReport = (function() {
<button class="m-manual-delete" onclick="MobileReport.removeManualCard('${id}')">&times;</button>
<div class="m-form-group">
<label class="m-form-label">작업자</label>
<select class="m-form-select" id="m_manual_worker_${id}" onchange="MobileReport.updateManualField('${id}','worker_id',this.value)">
<select class="m-form-select" id="m_manual_worker_${id}" onchange="MobileReport.updateManualField('${id}','user_id',this.value)">
<option value="">작업자 선택</option>
${workers.map(w => `<option value="${w.worker_id}">${esc(w.worker_name)} (${esc(w.job_type || '-')})</option>`).join('')}
${workers.map(w => `<option value="${w.user_id}">${esc(w.worker_name)} (${esc(w.job_type || '-')})</option>`).join('')}
</select>
</div>
<div class="m-form-row">
@@ -1127,7 +1127,7 @@ const MobileReport = (function() {
const mc = manualCards[id];
if (!mc) return;
const workerId = mc.worker_id || document.getElementById('m_manual_worker_' + id)?.value;
const workerId = mc.user_id || document.getElementById('m_manual_worker_' + id)?.value;
const reportDate = mc.report_date || document.getElementById('m_manual_date_' + id)?.value;
const projectId = mc.project_id || document.getElementById('m_manual_project_' + id)?.value;
const taskId = mc.task_id || document.getElementById('m_manual_task_' + id)?.value;
@@ -1148,7 +1148,7 @@ const MobileReport = (function() {
const reportData = {
report_date: reportDate,
worker_id: parseInt(workerId),
user_id: parseInt(workerId),
work_entries: [{
project_id: parseInt(projectId),
task_id: parseInt(taskId),