|
@@ -82,17 +82,9 @@ class EmployeeHandler(BaseHandler[dict]):
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
async def _handle_add(self, data: EmployeeChangeContent, auth: AuthSchema) -> bool:
|
|
async def _handle_add(self, data: EmployeeChangeContent, auth: AuthSchema) -> bool:
|
|
|
- """处理员工新增"""
|
|
|
|
|
|
|
+ """处理员工新增(未激活,不触发额度联动)"""
|
|
|
log.info(f"员工新增: employee_id={data.employee_id}, enterprise_id={data.enterprise_id}")
|
|
log.info(f"员工新增: employee_id={data.employee_id}, enterprise_id={data.enterprise_id}")
|
|
|
await self.update_employee(data, auth)
|
|
await self.update_employee(data, auth)
|
|
|
- # 联动:员工新增到部门时,创建额度记录
|
|
|
|
|
- dept_ids = await self._get_department_ids(data)
|
|
|
|
|
- if dept_ids:
|
|
|
|
|
- from app.plugin.module_payment.expense.institution.scope_sync import sync_employee_add_to_department_institutions
|
|
|
|
|
- await sync_employee_add_to_department_institutions(
|
|
|
|
|
- auth=auth, enterprise_id=data.enterprise_id,
|
|
|
|
|
- employee_id=data.employee_id, department_ids=dept_ids,
|
|
|
|
|
- )
|
|
|
|
|
return True
|
|
return True
|
|
|
|
|
|
|
|
async def _handle_activate(self, data: EmployeeChangeContent, auth: AuthSchema) -> bool:
|
|
async def _handle_activate(self, data: EmployeeChangeContent, auth: AuthSchema) -> bool:
|