From 0c2b9ec5e8a3ea99744e6cea92fb621801ad40b6 Mon Sep 17 00:00:00 2001 From: freedakgmail Date: Mon, 17 Aug 2026 20:21:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8A=B3=E5=8A=A1=E5=8D=8F=E8=AE=AE?= =?UTF-8?q?=E7=AD=89=E9=9D=9E=E5=8A=B3=E5=8A=A8=E5=90=88=E5=90=8C=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E4=B8=8D=E8=AE=A1=E7=AE=97=E7=A4=BE=E4=BF=9D=E5=85=AC?= =?UTF-8?q?=E7=A7=AF=E9=87=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 合同类型为 LABOR/INTERNSHIP/PARTTIME/OUTSOURCING/UNSIGNED 时 socialInsCalc 和 housingFundCalc 返回 null --- backend/src/routes/roster.routes.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/src/routes/roster.routes.ts b/backend/src/routes/roster.routes.ts index 3ac14fd..aef715d 100644 --- a/backend/src/routes/roster.routes.ts +++ b/backend/src/routes/roster.routes.ts @@ -225,12 +225,17 @@ router.get('/', authMiddleware, async (req: AuthRequest, res, next) => { socialInsBase: e.socialInsBase, housingFundBase: e.housingFundBase, socialInsCalc: (() => { + const contractType = latestContract?.contractType + // 劳务协议、实习协议、兼职协议、业务外包等非劳动合同不缴纳社保 + if (!contractType || ['LABOR', 'INTERNSHIP', 'PARTTIME', 'OUTSOURCING', 'UNSIGNED'].includes(contractType)) return null const cfgs = configCache.get(e.city || '_default') if (!cfgs?.social || !e.socialInsBase) return null const r = calcSocialInsurance(e.socialInsBase, cfgs.social) return { socialEmp: r.socialEmp, socialOrg: r.socialOrg } })(), housingFundCalc: (() => { + const contractType = latestContract?.contractType + if (!contractType || ['LABOR', 'INTERNSHIP', 'PARTTIME', 'OUTSOURCING', 'UNSIGNED'].includes(contractType)) return null const cfgs = configCache.get(e.city || '_default') if (!cfgs?.housing || !e.housingFundBase) return null const r = calcHousingFund(e.housingFundBase, cfgs.housing)