Commit 0753af61 by 魏强

qwe;

parent 796d6a5d
......@@ -99,22 +99,46 @@ class RentService():
print('no_production_Detail')
rent_detail = Rent.query.filter_by(rent_no=rent_no).first()
total_info = []
tmp = {
'deposit': 9900,
'is_return': 1,
'status': 0,
'mac_no': None,
'phone': RentService.get_customer_phone(rent_detail.customer_id),
'real_total': 0,
'rent_no': rent_no,
'rent_over_time': None,
'rent_price': None,
'spot_name': RentService.get_rent_spot_name(rent_detail.spot_id),
'is_refund': 0,
'refund_no': None,
'rent_refund_no': None,
}
total_info.append(tmp)
cur_info = {}
cur_info['deposit'] = 9900
cur_info['is_return'] = 0
cur_info['mac_no'] = None
cur_info['phone'] = RentService.get_customer_phone(rent_detail.customer_id)
cur_info['real_total'] = 0
cur_info['rent_no'] = rent_no
cur_info['rent_over_time'] = None
cur_info['rent_price'] = None
cur_info['spot_name'] = RentService.get_rent_spot_name(rent_detail.spot_id)
cur_info['is_refund'] = 0
cur_info['refund_no'] = None
cur_info['rent_refund_no'] = None
if rent_detail.rent_type == 2:
if rent_detail.machine_id == 0:
if rent_detail.is_pay == 1 and rent_detail.is_over == 0:
cur_info['status'] = 4
else:
cur_info['status'] = 2
if cur_info['total'] <= 0:
if rent_detail.return_hatch_no == 127:
cur_info['status'] = 3
else:
cur_info['status'] = 2
else:
cur_info['status'] = 1
elif rent_detail.is_return == 1:
if cur_info['total'] <= 0:
if rent_detail.return_hatch_no == 127:
cur_info['status'] = 3
else:
cur_info['status'] = 2
else:
cur_info['status'] = 1
else:
cur_info['status'] = 0
total_info.append(cur_info)
return total_info
@staticmethod
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment