|
|
@ -128,10 +128,9 @@ def drug_use_retur_list():
|
|
|
|
@token_auth.login_required
|
|
|
|
@token_auth.login_required
|
|
|
|
def get_drug_info():
|
|
|
|
def get_drug_info():
|
|
|
|
bar_code = request.values.get("bar_code")
|
|
|
|
bar_code = request.values.get("bar_code")
|
|
|
|
data_list = BllMedicament().get_bar_code_drug_info(bar_code=bar_code)
|
|
|
|
data = BllMedicament().findEntity(EntityMedicament.bar_code == bar_code)
|
|
|
|
if data_list:
|
|
|
|
if data:
|
|
|
|
data_info = data_list[0]
|
|
|
|
return jsonify(Utils.true_return(data=Utils.model_to_dict(data)))
|
|
|
|
return jsonify(Utils.true_return(data=Utils.msyql_table_model(data_info)))
|
|
|
|
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
return jsonify(Utils.false_return(msg="条码有误"))
|
|
|
|
return jsonify(Utils.false_return(msg="条码有误"))
|
|
|
|
|
|
|
|
|
|
|
|