接口更改

This commit is contained in:
李鹏宇
2026-01-12 21:23:21 +08:00
parent cff29585f3
commit da6be7edbd
+4 -4
View File
@@ -27,11 +27,11 @@ class YuthonWillTask(http.Controller):
@http.route('/party/list/confirm', methods=['POST'], type='http', auth='public', csrf=False)
def meal_list_confirm(self, **kwargs):
meal_id = request.env['yuthon.salary.party'].sudo().search([('id', '=', kwargs.get('id'))])
meal_id.write({'toll_state': 'done'})
meal_id.write({'toll_state': 'True'})
@http.route('/meal/list', methods=['POST'], type='http', auth='public', csrf=False)
def meal_list(self, **kwargs):
meal_ids = request.env['yuthon.meal.expenses'].sudo().search([('employee_id', '=', kwargs.get('employee_id'))])
meal_ids = request.env['yuthon.meal.expenses'].sudo().search([('employee_id.id', '=', kwargs.get('employee_id'))])
data_list = []
for meal in meal_ids:
result = {
@@ -40,7 +40,7 @@ class YuthonWillTask(http.Controller):
'select_time': meal.select_time,
'number_breakfasts': meal.number_breakfasts,
'number_lunches': meal.number_lunches,
'total_payments': meal.total_payments,
'total_payment': meal.total_payment,
'toll_state': meal.toll_state,
}
data_list.append(result)
@@ -49,4 +49,4 @@ class YuthonWillTask(http.Controller):
@http.route('/meal/list/confirm', methods=['POST'], type='http', auth='public', csrf=False)
def meal_list_confirm(self, **kwargs):
meal_id = request.env['yuthon.meal.expenses'].sudo().search([('id', '=', kwargs.get('id'))])
meal_id.write({'toll_state': 'done'})
meal_id.write({'toll_state': 'True'})