Commit d8c89673 by Aeolus

update

parent e4fdc820
......@@ -34,10 +34,10 @@ def get_production_list():
tmp_dict = {}
for i in hatch_list:
if tmp_dict.get(i.production_id, None):
if tmp_dict.get(i.production_id, None) is None:
tmp_dict[i.production_id] = {
"machine_no": i.machine_no,
"hatch_no": i.hatch_no,
"hatch_no": [i.hatch_no],
"production_id": i.production_id,
"name": i.name,
"title": i.title,
......@@ -56,7 +56,8 @@ def get_production_list():
}
else:
tmp_dict[i.production_id]["count"] += 1
hatch_data = tmp_dict.values()
tmp_dict[i.production_id]["hatch_no"].append(i.hatch_no)
hatch_data = list(tmp_dict.values())
return BaseResponse(data=hatch_data)
......
......@@ -7,8 +7,16 @@ author:Aeolus
"""
import logging
from flask import Blueprint
from flask import Blueprint, request
logger = logging.getLogger(__name__)
tally_route = Blueprint('tally', __name__)
\ No newline at end of file
tally_route = Blueprint('tally', __name__)
@tally_route.route("/login", methods = ["POST"])
def run_tally_login():
json_data = request.get_json()
user_name = json_data["user_name"]
password = json_data["password"]
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