Commit 1c904553 by Aeolus

update

parent d3ba2a0e
......@@ -47,7 +47,7 @@ def run_machine_list():
where_sql = " "
if keyword:
where_sql += """
and CONCAT(machine.machine_no,machine.qrcode_no) LIKE '%{keyword}%'
and CONCAT(machine.machine_no,ifnull(machine.qrcode_no,'')) LIKE '%{keyword}%'
""".format(keyword=keyword)
order_sql = " ORDER BY machine.id ASC, machine.status ASC"
......@@ -59,7 +59,7 @@ def run_machine_list():
return BaseResponse(data={"list": [], "page": page, "pageSize": page_size, "total_count": 0})
else:
total_count = count_result.total_count
print(select_sql + from_sql + where_sql + order_sql + limit_sql)
result = db.session.execute(select_sql + from_sql + where_sql + order_sql + limit_sql).fetchall()
return_data = []
......
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