@@ -53,17 +53,20 @@ class BusController(Controller):
|
||||
_logger.info("----------------/api/v1/record/face---------接口收到响应-------------------------------")
|
||||
data = request.httprequest.json
|
||||
user_id = data.get('logs')[0].get('user_id')
|
||||
recog_time = data.get('logs')[0].get('recog_time')
|
||||
_logger.info(f"打卡时间{recog_time}-----当前时间{fields.Datetime.now()}打卡时间")
|
||||
employee_id = request.env(user=SUPERUSER_ID)["hr.employee"].search([('mobile_phone', '=', user_id)])
|
||||
attendance_iot_id = request.env(user=SUPERUSER_ID)["attendance.iot"].search([('name', '=', data.get('sn'))])
|
||||
if employee_id:
|
||||
request.env(user=SUPERUSER_ID)["hr.attendance.detail"].create({
|
||||
'employee_id': employee_id.id, # 员工
|
||||
'checkin_time': fields.Datetime.now(), # 打卡时间
|
||||
'source': 'iot', # 打卡来源
|
||||
'attendance_iot_id': attendance_iot_id.id, # 打卡设备
|
||||
})
|
||||
# if employee_id:
|
||||
# request.env(user=SUPERUSER_ID)["hr.attendance.detail"].create({
|
||||
# 'employee_id': employee_id.id, # 员工
|
||||
# 'checkin_time': fields.Datetime.now(), # 打卡时间
|
||||
# 'checkin_time': recog_time, # 打卡时间
|
||||
# 'source': 'iot', # 打卡来源
|
||||
# 'attendance_iot_id': attendance_iot_id.id, # 打卡设备
|
||||
# })
|
||||
|
||||
_logger.info(f"考勤机自定义编码{user_id}: {employee_id.name}打卡--{fields.Datetime.now()}")
|
||||
# _logger.info(f"考勤机自定义编码{user_id}: {employee_id.name}打卡--{fields.Datetime.now()}")
|
||||
return {"Result": 0, "Msg": "添加成功"}
|
||||
|
||||
@route('/api/v1/user/inf_photo', methods=['POST'], type='json', auth='none', csrf=False)
|
||||
|
||||
@@ -768,7 +768,6 @@ class SoongWorkflowCommentWizard(models.TransientModel):
|
||||
return {
|
||||
'name': '流程待办',
|
||||
'view_mode': 'tree',
|
||||
# "tag": "flush_badge",
|
||||
'res_model': 'soong.workflow.record',
|
||||
'type': 'ir.actions.act_window',
|
||||
'views': [[tree_id, 'tree']],
|
||||
@@ -779,12 +778,6 @@ class SoongWorkflowCommentWizard(models.TransientModel):
|
||||
'check_employee': 1
|
||||
}
|
||||
}
|
||||
# return {
|
||||
# "type": "ir.actions.client",
|
||||
# # "tag": "flush_badge",
|
||||
# "tag": "reload",
|
||||
# "params": {"menu_id": menu_id}
|
||||
# }
|
||||
|
||||
|
||||
def update_self_users_ids(self):
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
],
|
||||
"assets": {
|
||||
"web.assets_backend": [
|
||||
# "sun_badge_menu/static/src/webclient/actions/client_actions.js",
|
||||
"sun_badge_menu/static/src/webclient/actions/client_actions.js",
|
||||
"sun_badge_menu/static/src/webclient/navbar/navbar.js",
|
||||
"sun_badge_menu/static/src/webclient/navbar/navbar.xml"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user