|
|
|
@ -51,7 +51,7 @@ def show_template():
|
|
|
|
|
# 添加容错,模板内容为空直接跳过
|
|
|
|
|
if i["template_content"] == 'null' or not i["template_content"]:
|
|
|
|
|
continue
|
|
|
|
|
for a in eval(i["template_content"]):
|
|
|
|
|
for a in json.loads(i["template_content"]):
|
|
|
|
|
all_export_cout += int(a.get("export_count", 0))
|
|
|
|
|
new_dic = {
|
|
|
|
|
"all_export_count": all_export_cout,
|
|
|
|
@ -187,7 +187,8 @@ def add_tmp_info():
|
|
|
|
|
if not tmp_name:
|
|
|
|
|
tmp_name = f'入库模板_{Utils.getFileName()}'
|
|
|
|
|
if isinstance(tmp_content, str):
|
|
|
|
|
tmp_content = eval(tmp_content)
|
|
|
|
|
# tmp_content = eval(tmp_content)
|
|
|
|
|
tmp_content = json.loads(tmp_content)
|
|
|
|
|
# total_count = 0
|
|
|
|
|
# for i in tmp_content:
|
|
|
|
|
# total_count += int(i['export_count'])
|
|
|
|
@ -318,10 +319,14 @@ def get_file_list():
|
|
|
|
|
@tmp_router.route("/pring_bar_code", methods=["POST"])
|
|
|
|
|
@token_auth.login_required
|
|
|
|
|
def print_code_data():
|
|
|
|
|
start = request.values.get("start_code")
|
|
|
|
|
end = request.values.get("end_code")
|
|
|
|
|
template_id = request.values.get("template_id")
|
|
|
|
|
# start = request.values.get("start_code")
|
|
|
|
|
# end = request.values.get("end_code")
|
|
|
|
|
# temp_obj_list = BllMedicamentTemplate().findList(EntityMedicamentTemplate.template_id._in(template_id_list)).all()
|
|
|
|
|
obj = CreateBarcode()
|
|
|
|
|
for i in range(int(start), int(end)):
|
|
|
|
|
print(template_id)
|
|
|
|
|
temp = BllMedicamentTemplate().findEntity(EntityMedicamentTemplate.template_id == template_id)
|
|
|
|
|
for i in range(int(temp.start_bar_code), int(temp.start_bar_code) + int(temp.bar_code_count)):
|
|
|
|
|
obj.create_Code128_img(str(i))
|
|
|
|
|
return jsonify(Utils.true_return(msg="成功"))
|
|
|
|
|
|
|
|
|
@ -343,3 +348,10 @@ def print_code_data():
|
|
|
|
|
# return jsonify(Utils.true_return(data=Utils.msyql_table_model(data)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 获取分组后的试剂列表
|
|
|
|
|
@tmp_router.route("/get_drug_group_list", methods=["POST"])
|
|
|
|
|
@token_auth.login_required
|
|
|
|
|
def drug_group_list():
|
|
|
|
|
data = BllMedicament().drug_group_info_list()
|
|
|
|
|
data_list = Utils.msyql_table_model(data)
|
|
|
|
|
return jsonify(Utils.true_return(data=data_list))
|
|
|
|
|