更新库存余量

duizhaopin
apan_youxiang@163.com 2 years ago
parent e7889930f8
commit 89152fcd84

@ -206,7 +206,7 @@ def get_durg_record():
# 设置空瓶 # 设置空瓶
@drug_router.route("/set_drug_empty_bottle", methods=["GET", "POST"]) @drug_router.route("/set_drug_empty_bottle", methods=["GET", "POST"])
# @token_auth.login_required @token_auth.login_required
def drug_set_empty_bottle(): def drug_set_empty_bottle():
drug_id = request.values.get("medicament_id") drug_id = request.values.get("medicament_id")
obj = BllMedicament() obj = BllMedicament()
@ -222,6 +222,23 @@ def drug_set_empty_bottle():
return jsonify(Utils.false_return(msg="试剂id有误")) 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())
################################# #################################
##验证通过后需要添加至试剂领用处。## ##验证通过后需要添加至试剂领用处。##
################################# #################################

@ -4,5 +4,5 @@ customer_id = 1
serverip = 0.0.0.0 serverip = 0.0.0.0
port = 9001 port = 9001
# dbconntion = mysql+pymysql://root:123456@127.0.0.1/local_rms_db?charset=utf8 # dbconntion = mysql+pymysql://root:123456@127.0.0.1/local_rms_db?charset=utf8
# dbconntion = mysql+pymysql://yanyi:tangyan86910282@111.231.67.55/yy_rms_multiple?charset=utf8 dbconntion = mysql+pymysql://yanyi:tangyan86910282@111.231.67.55/yy_rms_multiple?charset=utf8
dbconntion = mysql+pymysql://root:123456@127.0.0.1/yy_rms_multiple?charset=utf8 # dbconntion = mysql+pymysql://root:123456@127.0.0.1/yy_rms_multiple?charset=utf8
Loading…
Cancel
Save