feat: 城市变更功能完善及跨页面缓存刷新修复
- 城市变更使用CITY_CHANGE类型替代ADJUST,月度办理显示减员/新增(城市变更) - 在保人员查询排除本月已关闭记录(gte→gt)和本月新增记录(lte→lt) - 社保/公积金减员查询包含CITY_CHANGE类型 - 缴纳记录表格添加城市列显示 - 后端profile API从快照提取city字段 - 修复旧快照缺失city字段的数据 - 修复旧记录changeType为CITY_CHANGE,endMonth与新记录startMonth一致 - 城市变更必填原因,写入备注和审计日志 - 员工详情页添加变更历史Tab - 移除薪酬社保Tab下重复的参保城市变更子Tab - 全局修复跨页面mutation缓存刷新:调薪/调部门/离职/重新入职/批量续签/批量解聘/社保公积金调基/月度办理/撤销解聘均刷新roster-profile
This commit is contained in:
@@ -158,6 +158,7 @@ model Organization {
|
||||
trainingRecords TrainingRecord[]
|
||||
performanceRecords PerformanceRecord[]
|
||||
retirementPolicies RetirementPolicy[]
|
||||
socialMonthlyProcesses SocialMonthlyProcess[]
|
||||
}
|
||||
|
||||
model User {
|
||||
@@ -739,6 +740,24 @@ model EmployeeHousingFundRecord {
|
||||
@@index([employeeId, startMonth, endMonth])
|
||||
}
|
||||
|
||||
/// 月度社保/公积金办理记录(标记某月已办理完成,保存快照)
|
||||
model SocialMonthlyProcess {
|
||||
id String @id @default(cuid())
|
||||
orgId String
|
||||
org Organization @relation(fields: [orgId], references: [id], onDelete: Cascade)
|
||||
month String // 办理月份 YYYY-MM
|
||||
type String // SOCIAL=社保, HOUSING=公积金
|
||||
status String @default("COMPLETED") // COMPLETED=已办理
|
||||
snapshot Json // 办理时的数据快照(增减员+在保人员+缴费明细)
|
||||
processedBy String
|
||||
processedAt DateTime @default(now())
|
||||
createdBy String
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
@@unique([orgId, month, type])
|
||||
@@index([orgId, month])
|
||||
}
|
||||
|
||||
model EmployeeDepartmentRecord {
|
||||
id String @id @default(cuid())
|
||||
orgId String
|
||||
|
||||
Reference in New Issue
Block a user