fix(tkfb): TBM 완료 시 연차 작업자 작업보고서 생성 500 에러 수정

daily_work_reports INSERT에 NOT NULL 필수 컬럼 work_type_id 누락으로
연차 작업자 포함 TBM 완료 시 500 에러 발생. work_type_id=11(휴무) 추가.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-03-16 15:54:41 +09:00
parent 1e1d2f631a
commit 9a2b682b18

View File

@@ -185,8 +185,8 @@ const TbmModel = {
if (existingReport.length === 0) {
await conn.query(
`INSERT INTO daily_work_reports
(report_date, user_id, project_id, work_hours, work_status_id, created_by, tbm_assignment_id, created_at)
VALUES (?, ?, 13, 8, 1, ?, ?, NOW())`,
(report_date, user_id, project_id, work_type_id, work_hours, work_status_id, created_by, tbm_assignment_id, created_at)
VALUES (?, ?, 13, 11, 8, 1, ?, ?, NOW())`,
[reportDate, aw.user_id, createdBy, assignRows[0].assignment_id]
);
}