@@ -53,7 +53,7 @@ class BusController(Controller):
|
||||
_logger.info("----------------/api/v1/record/face---------接口收到响应-------------------------------")
|
||||
data = request.httprequest.json
|
||||
user_id = data.get('logs')[0].get('user_id')
|
||||
employee_id = request.env(user=SUPERUSER_ID)["hr.employee"].search([('user_id', '=', user_id)])
|
||||
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({
|
||||
@@ -63,11 +63,7 @@ class BusController(Controller):
|
||||
'attendance_iot_id': attendance_iot_id.id, # 打卡设备
|
||||
})
|
||||
|
||||
# now_time = fields.Datetime.to_datetime(fields.Date.today()) + timedelta(hours=8, days=1)
|
||||
# start_time = now_time - timedelta(days=2)
|
||||
# request.env["hr.attendance.detail"].normal_clock_in_time(employee_id, now_time, start_time)
|
||||
|
||||
_logger.info(f"{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)
|
||||
|
||||
@@ -399,11 +399,12 @@ class SoongWorkflowCommentWizard(models.TransientModel):
|
||||
action_id = self.env['ir.actions.act_window'].search([('res_model', '=', self.res_model)])[0]
|
||||
url = f'https://oa.thtzjt.com/web?login={employee.user_id.login}&oauth_uid={employee.wecom_userid}#id={record_id.id}&cids=2&action={action_id.id}&model={record_id._name}&view_type=form&menu_id=10104'
|
||||
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa',
|
||||
user_id='18562027762',
|
||||
user_id=employee.wecom_userid,
|
||||
title=record_id._description,
|
||||
description="标题: {}\n".format(
|
||||
record_id.name) + self.env.user.name + ' ' + str(
|
||||
fields.Datetime.now() + timedelta(hours=8)),
|
||||
fields.Datetime.now() + timedelta(
|
||||
hours=8)),
|
||||
url=url, btntxt="查看详情")
|
||||
else: # 串审模式 (沿用原有逻辑)
|
||||
# 查找下一个节点
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
'category': 'zhou',
|
||||
'version': '0.1',
|
||||
'license': 'LGPL-3',
|
||||
'depends': ['base', 'web', 'yuthon_property'],
|
||||
'depends': ['base', 'web', 'yuthon_property','yuthon_property_approval'],
|
||||
'data': [
|
||||
'views/menu.xml',
|
||||
'views/ledger_report_views.xml',
|
||||
|
||||
@@ -17,6 +17,18 @@ class YuthonProperty(models.Model):
|
||||
if params.get("date_end"):
|
||||
domain.append(("actual_end_time", "<=", params.get("date_end")))
|
||||
|
||||
condition = params.get('condition',False)
|
||||
partner_id = params.get('partner_id',False)
|
||||
company_id = params.get('company_id',False)
|
||||
|
||||
if condition:
|
||||
domain.append(('tenure_type','=', condition))
|
||||
|
||||
if partner_id:
|
||||
domain.append(('admin_id', '=', partner_id))
|
||||
if company_id:
|
||||
domain.append(('company_id', '=', company_id))
|
||||
|
||||
# 查询数据,限制100条
|
||||
properties = self.search(domain, limit=100)
|
||||
state_selection = dict(self._fields['property_state']._description_selection(self.env))
|
||||
|
||||
@@ -18,7 +18,7 @@ class YuthonProperty(models.Model):
|
||||
]
|
||||
|
||||
if params.get("date_start"):
|
||||
domain.append(("due_date_end", ">=", params.get("date_start")))
|
||||
domain.append(("due_date", ">=", params.get("date_start")))
|
||||
if params.get("date_end"):
|
||||
domain.append(("due_date", "<=", params.get("date_end")))
|
||||
|
||||
@@ -27,6 +27,14 @@ class YuthonProperty(models.Model):
|
||||
partner_id = params.get('partner_id',False)
|
||||
company_id = params.get('company_id',False)
|
||||
|
||||
if condition:
|
||||
domain.append(('tenure_type','=', condition))
|
||||
|
||||
if partner_id:
|
||||
domain.append(('admin_id', '=', partner_id))
|
||||
if company_id:
|
||||
domain.append(('company_id', '=', company_id))
|
||||
|
||||
# # 6. 排除无效账单(作废/红冲)
|
||||
# domain += [
|
||||
# ("is_invalid", "=", False),
|
||||
|
||||
Reference in New Issue
Block a user