Commit 0753af61 by 魏强

qwe;

parent 796d6a5d
...@@ -99,22 +99,46 @@ class RentService(): ...@@ -99,22 +99,46 @@ class RentService():
print('no_production_Detail') print('no_production_Detail')
rent_detail = Rent.query.filter_by(rent_no=rent_no).first() rent_detail = Rent.query.filter_by(rent_no=rent_no).first()
total_info = [] total_info = []
tmp = { cur_info = {}
'deposit': 9900, cur_info['deposit'] = 9900
'is_return': 1, cur_info['is_return'] = 0
'status': 0, cur_info['mac_no'] = None
'mac_no': None, cur_info['phone'] = RentService.get_customer_phone(rent_detail.customer_id)
'phone': RentService.get_customer_phone(rent_detail.customer_id), cur_info['real_total'] = 0
'real_total': 0, cur_info['rent_no'] = rent_no
'rent_no': rent_no, cur_info['rent_over_time'] = None
'rent_over_time': None, cur_info['rent_price'] = None
'rent_price': None, cur_info['spot_name'] = RentService.get_rent_spot_name(rent_detail.spot_id)
'spot_name': RentService.get_rent_spot_name(rent_detail.spot_id), cur_info['is_refund'] = 0
'is_refund': 0, cur_info['refund_no'] = None
'refund_no': None, cur_info['rent_refund_no'] = None
'rent_refund_no': None,
} if rent_detail.rent_type == 2:
total_info.append(tmp) 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 return total_info
@staticmethod @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