Commit 36b7eaf4 by 魏强

qwe;

parent 880b1874
...@@ -197,7 +197,7 @@ class RentService(): ...@@ -197,7 +197,7 @@ class RentService():
@staticmethod @staticmethod
def get_search_info_(key_word, page, limit): def get_search_info_(key_word, page, limit):
sql = ''' sql = '''
SELECT rent.rent_no, production.rent_hatch_no, production.total, production.is_return, SELECT rent.rent_no, rent.rent_type, production.rent_hatch_no, production.total, production.is_return,
production.return_hatch_no, customers.phone, rent.pay_time FROM rent production.return_hatch_no, customers.phone, rent.pay_time FROM rent
LEFT JOIN production ON production.rent_id = rent.id LEFT JOIN production ON production.rent_id = rent.id
LEFT JOIN customers ON customers.id = rent.customer_id LEFT JOIN customers ON customers.id = rent.customer_id
...@@ -214,7 +214,16 @@ class RentService(): ...@@ -214,7 +214,16 @@ class RentService():
cur_info['hatch_no'] = info.rent_hatch_no cur_info['hatch_no'] = info.rent_hatch_no
cur_info['total'] = info.total if info.total else 0 cur_info['total'] = info.total if info.total else 0
cur_info['phone'] = info.phone cur_info['phone'] = info.phone
if info.is_return == 1: if info.rent_type == 2:
if cur_info['total'] <= 0:
if info.return_hatch_no == 127:
cur_info['status'] = 3
else:
cur_info['status'] = 2
else:
cur_info['status'] = 1
elif info.is_return == 1:
if cur_info['total'] <= 0: if cur_info['total'] <= 0:
if info.return_hatch_no == 127: if info.return_hatch_no == 127:
cur_info['status'] = 3 cur_info['status'] = 3
......
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