Commit 796d6a5d by 魏强

qwe;

parent 05e9f8fa
...@@ -221,7 +221,7 @@ class RentService(): ...@@ -221,7 +221,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, rent.rent_type, production.rent_hatch_no, production.total, production.is_return, SELECT rent.rent_no, rent.rent_type, rent.machine_id, rent.is_pay, rent.is_over, 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
...@@ -239,6 +239,11 @@ class RentService(): ...@@ -239,6 +239,11 @@ class RentService():
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.rent_type == 2: if info.rent_type == 2:
if info.machine_id == 0:
if info.is_pay == 1 and info.is_over == 0:
cur_info['status'] = 4
else:
cur_info['status'] = 2
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