feat: 补充公积金支持(员工级别可选)
上海等城市存在补充公积金账户,同一企业内高管可能有但普通员工 没有。新增员工级别补充公积金账户关联: - Employee 表加 supplementaryHousingAccountId 字段 - BatchEntry 表加 supplementaryHousingEmp/Org 字段 - 薪资计算 calcBatchEntry 支持补充公积金(额外算一笔,纳入 个税扣除、最低工资保护递延逻辑) - 新增员工弹窗加补充公积金账户选择器(可选,仅显示 accountType=SUPPLEMENTARY 的公积金账户) - 员工档案编辑支持补充公积金账户 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
@@ -407,6 +407,7 @@ export async function createEmployee(orgId: string, userId: string, data: any) {
|
||||
education: data.education || null,
|
||||
position: data.position || null,
|
||||
status: data.status || 'ACTIVE',
|
||||
supplementaryHousingAccountId: data.supplementaryHousingAccountId || null,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -759,6 +760,7 @@ export async function updateEmployee(orgId: string, id: string, data: any) {
|
||||
if (data.education !== undefined) updateData.education = data.education
|
||||
if (data.position !== undefined) updateData.position = data.position
|
||||
if (data.status !== undefined) updateData.status = data.status
|
||||
if (data.supplementaryHousingAccountId !== undefined) updateData.supplementaryHousingAccountId = data.supplementaryHousingAccountId || null
|
||||
|
||||
// 参保城市变更:关闭旧城市在保记录,创建新城市记录
|
||||
if (data.city !== undefined && data.city !== employee.city) {
|
||||
|
||||
Reference in New Issue
Block a user