This commit is contained in:
pengyuthon
2026-01-12 10:23:35 +08:00
parent b59a65f2c5
commit 518836cd8d
2 changed files with 3 additions and 8 deletions
+1 -7
View File
@@ -145,13 +145,7 @@ class BusController(Controller):
@http.route('/phone/attendance/list', type='http', auth="none", csrf=False, cors='*')
def phone_attendance_list(self, **kw):
data = request.env['attendance.iot'].sudo().search([]).read()
return json.dumps({'data': data, 'code': 200, 'message': ''})
@http.route('/phone/attendance/list', type='http', auth="none", csrf=False, cors='*')
def phone_attendance_list(self, **kw):
employee_id = request.env['hr.employee'].sudo().search([('user_id.id', '=', int(kw.get('employee_id')))])
data = request.env['attendance.iot'].sudo().search([]).read()
data = request.env['attendance.iot'].sudo().search([]).read(['id', 'name', 'attendance_address', 'company_id', 'remake'])
return json.dumps({'data': data, 'code': 200, 'message': ''})
@http.route('/phone/attendance/operation', type='http', auth="none", csrf=False, cors='*')
+2 -1
View File
@@ -175,8 +175,9 @@ class YuthonWillTask(models.Model):
for task in dates_task_ids:
hour1 = (task.reminder_time + timedelta(hours=8)).hour
minute1 = (task.reminder_time + timedelta(hours=8)).minute
_logger.info(f'-任务时间{hour1}:{minute1}任务分钟{now.hour}:{now.minute}')
_logger.info(f'-状态{minute1 == now.minute and hour1 == now.hour}')
if minute1 == now.minute and hour1 == now.hour:
_logger.info(f'-任务时间{hour1}:{minute1}任务分钟{now.hour}:{now.minute}')
task.write({'task_state': 'done'})
will_id = task.yuthon_will_task_id
for employee_id in will_id.employee_ids: