feat: AIHR 智能人力资源管理系统初始提交

- 员工花名册管理(加密存储、导入导出)
- 薪酬管理(发薪批次、薪酬模版、加班费计算、工资条)
- 社保公积金(多城市配置、版本管理、基数调整)
- 解聘管理(6步流程、证据链、工作交接)
- AI 助手(合同审查、风险预测、RAG 知识库)
- Dashboard 仪表盘
- 设置与通知
This commit is contained in:
selfrelease
2026-07-24 13:53:11 +08:00
commit 0df8aa77d9
109 changed files with 38190 additions and 0 deletions
+174
View File
@@ -0,0 +1,174 @@
export interface ApiResponse<T> {
success: boolean
data: T
error: { code: string; message: string } | null
}
export interface PaginatedData<T> {
items: T[]
total: number
page: number
pageSize: number
}
export interface Organization {
id: string
name: string
plan: 'FREE' | 'PRO' | 'ENTERPRISE'
maxEmployees: number
city: string | null
}
export interface User {
id: string
orgId: string
name: string
phone: string
email: string | null
role: 'ADMIN' | 'HR' | 'VIEWER'
}
export interface Employee {
id: string
orgId: string
name: string
department: string
hireDate: string
monthlySalary: string
status: 'ACTIVE' | 'RESIGNED'
gender: string | null
phone: string | null
isPregnant: boolean
isInMedicalPeriod: boolean
isWorkInjured: boolean
contracts: LaborContract[]
}
export interface LaborContract {
id: string
employeeId: string
signDate: string | null
startDate: string
endDate: string | null
contractType: 'FIXED' | 'UNFIXED' | 'UNSIGNED'
signMethod: 'PAPER' | 'ELECTRONIC'
contractYears: number
probationMonths: number
probationSalary: number
renewalCount: number
attachmentName: string | null
attachmentUrl: string | null
electronicContractNo: string | null
electronicContractUrl: string | null
}
export interface RiskItem {
id: string
orgId: string
employeeId: string | null
type: 'CONTRACT' | 'SALARY' | 'TERMINATION'
level: 'HIGH' | 'MEDIUM' | 'LOW'
status: 'PENDING' | 'RESOLVED' | 'IGNORED'
title: string
description: string
actionUrl: string | null
createdAt: string
}
export interface DashboardData {
greeting: string
stats: {
employeeCount: number
highRiskCount: number
todoCount: number
monthlyOvertimePay: number
}
todos: {
id: string
type: 'CONTRACT' | 'SALARY' | 'TERMINATION' | 'MONTHLY' | 'ONBOARDING'
level: 'high' | 'medium' | 'low'
title: string
description: string
actionUrl: string
}[]
resolvedTodos: {
id: string
type: 'CONTRACT' | 'SALARY' | 'TERMINATION' | 'MONTHLY' | 'ONBOARDING'
level: 'high' | 'medium' | 'low'
title: string
description: string
actionUrl: string
resolvedAt: string | null
}[]
riskDistribution: {
contract: number
salary: number
termination: number
}
topRisks: {
id: string
type: string
level: string
title: string
description: string
employeeName: string | null
actionUrl: string
}[]
aiPrediction: {
risks: unknown[]
suggestion: string
} | null
payrollSummary: {
month: string
employeeCount: number
payslipCount: number
confirmedPayslips: number
unconfirmedPayslips: number
baseSalary: number
overtimePay: number
allowance: number
deduction: number
totalPay: number
socialOrg: number
socialEmp: number
housingOrg: number
housingEmp: number
estimatedTax: number
severancePay: number
orgTotalCost: number
empNetPay: number
}
monthlyActivities: {
month: string
newContracts: number
terminations: number
disciplinaryActions: number
attendanceRecords: number
overtimeHours: number
overtimePay: number
}
}
export interface TerminationRecord {
id: string
employeeId: string
employeeName: string
reason: 'NEGOTIATED' | 'FAULT' | 'NONFAULT' | 'LAYOFF' | 'EXPIRED'
terminationDate: string
compensation: number
riskLevel: 'SAFE' | 'WARNING' | 'DANGER'
checklist: { item: string; passed: boolean; remark?: string }[]
createdAt: string
}
export interface Payslip {
id: string
month: string
baseSalary: number
overtimePay: number
weekdayOvertimePay: number
weekendOvertimePay: number
holidayOvertimePay: number
totalPay: number
confirmedAt: string | null
}