|
|
|
@ -206,7 +206,7 @@ def get_durg_record():
|
|
|
|
|
|
|
|
|
|
# 设置空瓶
|
|
|
|
|
@drug_router.route("/set_drug_empty_bottle", methods=["GET", "POST"])
|
|
|
|
|
# @token_auth.login_required
|
|
|
|
|
@token_auth.login_required
|
|
|
|
|
def drug_set_empty_bottle():
|
|
|
|
|
drug_id = request.values.get("medicament_id")
|
|
|
|
|
obj = BllMedicament()
|
|
|
|
@ -222,6 +222,23 @@ def drug_set_empty_bottle():
|
|
|
|
|
return jsonify(Utils.false_return(msg="试剂id有误"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@drug_router.route("/update_drug_remain", methods=["GET", "POST"])
|
|
|
|
|
@token_auth.login_required
|
|
|
|
|
def update_drug_remain():
|
|
|
|
|
drug_id = request.values.get("medicament_id")
|
|
|
|
|
remain = request.values.get("reain")
|
|
|
|
|
obj = BllMedicament().findEntity(EntityMedicament.medicament_id==drug_id)
|
|
|
|
|
if obj:
|
|
|
|
|
if not obj.remain:
|
|
|
|
|
setattr(obj, "status", "3")
|
|
|
|
|
else:
|
|
|
|
|
setattr(obj, "remain", remain)
|
|
|
|
|
BllMedicament().update(obj)
|
|
|
|
|
return jsonify(Utils.true_return())
|
|
|
|
|
else:
|
|
|
|
|
return jsonify(Utils.false_return())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#################################
|
|
|
|
|
##验证通过后需要添加至试剂领用处。##
|
|
|
|
|
#################################
|
|
|
|
|