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)