feat: 员工规避损失明细添加规避方式列
This commit is contained in:
@@ -1657,9 +1657,26 @@ export async function getAnnualValueReport(orgId: string, year: number) {
|
||||
riskCount: number
|
||||
lossAvoided: number
|
||||
adjustedLoss: number
|
||||
details: Map<string, { title: string; estimatedLoss: number; legalBasis: string }>
|
||||
details: Map<string, { title: string; estimatedLoss: number; legalBasis: string; resolutionMethod: string }>
|
||||
}> = {}
|
||||
|
||||
// 辅助:根据风险标题推断规避方式
|
||||
function getResolutionMethod(title: string): string {
|
||||
if (title.includes('未签合同') && title.includes('无固定期限')) return '补签书面合同'
|
||||
if (title.includes('未签合同')) return '签订书面合同'
|
||||
if (title.includes('到期') && title.includes('未续签')) return '续签合同'
|
||||
if (title.includes('即将到期')) return '续签或终止合同'
|
||||
if (title.includes('试用期') && title.includes('不合法')) return '调整试用期条款'
|
||||
if (title.includes('入职手续未完成')) return '完成入职手续'
|
||||
if (title.includes('孕期') || title.includes('哺乳期')) return '调整岗位/安排哺乳期待遇'
|
||||
if (title.includes('工伤')) return '申报工伤/安排适当工作'
|
||||
if (title.includes('医疗期')) return '保障医疗期待遇'
|
||||
if (title.includes('社保')) return '补缴社保'
|
||||
if (title.includes('公积金')) return '补缴公积金'
|
||||
if (title.includes('工资') || title.includes('个税')) return '发放工资/申报个税'
|
||||
return '人工处理'
|
||||
}
|
||||
|
||||
// 辅助:根据风险标题推断法律依据
|
||||
function getLegalBasis(title: string): string {
|
||||
if (title.includes('未签合同')) return '第82条 双倍工资≤11个月'
|
||||
@@ -1713,6 +1730,7 @@ export async function getAnnualValueReport(orgId: string, year: number) {
|
||||
title: r.title,
|
||||
estimatedLoss: r.estimatedLoss || 0,
|
||||
legalBasis: getLegalBasis(r.title || ''),
|
||||
resolutionMethod: getResolutionMethod(r.title || ''),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user