13 lines
		
	
	
		
			331 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			331 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
| from __future__ import absolute_import, unicode_literals
 | |
| 
 | |
| from celery import shared_task
 | |
| from apps.hrm.models import Employee
 | |
| 
 | |
| 
 | |
| @shared_task
 | |
| def update_all_employee_not_atwork():
 | |
|     """
 | |
|     将所有员工设为非在岗状态
 | |
|     """
 | |
|     Employee.objects.all().update(is_atwork=False, last_check_time=None, not_work_remark=None)
 |