fix(vacation): bulkUpsert 저장 테이블 통일 (sp_vacation_balances)
vacation_balance_details에 쓰고 sp_vacation_balances에서 읽는 테이블 불일치 수정. 경조사 등 특별휴가 저장 후 반영 안 되던 문제 해결. - bulkUpsert: vacation_balance_details → sp_vacation_balances - balance_type 전달: CARRY_OVER, AUTO, LONG_SERVICE, COMPANY_GRANT - 기존 경조사 데이터 21건 sp_vacation_balances로 마이그레이션 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -829,7 +829,8 @@
|
||||
user_id: w.user_id,
|
||||
vacation_type_id: typeIdMap['CARRYOVER'],
|
||||
year: currentYear,
|
||||
total_days: d.carryover
|
||||
total_days: d.carryover,
|
||||
balance_type: 'CARRY_OVER'
|
||||
});
|
||||
}
|
||||
if (typeIdMap['ANNUAL']) {
|
||||
@@ -837,7 +838,8 @@
|
||||
user_id: w.user_id,
|
||||
vacation_type_id: typeIdMap['ANNUAL'],
|
||||
year: currentYear,
|
||||
total_days: d.annual
|
||||
total_days: d.annual,
|
||||
balance_type: 'AUTO'
|
||||
});
|
||||
}
|
||||
if (typeIdMap['LONG_SERVICE']) {
|
||||
@@ -845,7 +847,8 @@
|
||||
user_id: w.user_id,
|
||||
vacation_type_id: typeIdMap['LONG_SERVICE'],
|
||||
year: currentYear,
|
||||
total_days: d.longService
|
||||
total_days: d.longService,
|
||||
balance_type: 'LONG_SERVICE'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -883,7 +886,8 @@
|
||||
vacation_type_id: specialTypeId,
|
||||
year: currentYear,
|
||||
total_days: special.days,
|
||||
notes: special.typeName || special.type
|
||||
notes: special.typeName || special.type,
|
||||
balance_type: 'COMPANY_GRANT'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user