Commit f276518a by 魏强

qwe;

parent c746330f
......@@ -73,6 +73,9 @@ def rent_detail():
rent_no = json_data['rent_no'] if 'rent_no' in json_data else ''
hatch_no = json_data['hatch_no'] if 'hatch_no' in json_data else ''
# data = RentService.get_production_detail(rent_no, hatch_no)
if not hatch_no:
data = RentService.get_no_production_detail(rent_no)
else:
data = RentService.get_production_detail_new(rent_no, hatch_no)
return jsonify(BASE_RESPONSE(data=data).to_dict())
......
......@@ -95,8 +95,7 @@ class RentService():
return data
@staticmethod
def get_production_detail_new(rent_no, hatch_no):
if not hatch_no:
def get_no_production_detail(rent_no):
rent_detail = Rent.query.filter_by(rent_no=rent_no).first()
total_info = []
tmp = {
......@@ -117,7 +116,9 @@ class RentService():
total_info.append(tmp)
return total_info
else:
@staticmethod
def get_production_detail_new(rent_no, hatch_no):
sql = '''
SELECT rent.deposit, rent.is_over, production.is_return, production.total, production.return_hatch_no,
production.rent_machine_id, rent.customer_id, rent.real_total, rent.rent_no, production.return_time,
......
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