|
|
|
@ -164,13 +164,15 @@ def drug_add_update():
|
|
|
|
|
]
|
|
|
|
|
medicament_id = request.values.get("medicament_id")
|
|
|
|
|
bar_code = request.values.get("bar_code")
|
|
|
|
|
medicament_obj = BllMedicament().findEntity(medicament_id)
|
|
|
|
|
medicament_obj = BllMedicament().findEntity(
|
|
|
|
|
EntityMedicament.medicament_id == medicament_id)
|
|
|
|
|
if medicament_id:
|
|
|
|
|
obj = BllMedicament().findEntity(EntityMedicament.bar_code == bar_code)
|
|
|
|
|
if obj.medicament_id == medicament_obj.medicament_id:
|
|
|
|
|
for i in finds_list:
|
|
|
|
|
setattr(medicament_obj, i, request.values.get(i))
|
|
|
|
|
BllMedicament().update(medicament_obj)
|
|
|
|
|
return jsonify(Utils.true_return(msg="修改成功"))
|
|
|
|
|
else:
|
|
|
|
|
return jsonify(Utils.true_return(msg="条码不能重复"))
|
|
|
|
|
return jsonify(Utils.true_return(msg="试剂id不能为空"))
|
|
|
|
@ -178,6 +180,7 @@ def drug_add_update():
|
|
|
|
|
# 流转记录
|
|
|
|
|
@drug_router.route("/get_durg_record", methods=["GET", "POST"])
|
|
|
|
|
@token_auth.login_required
|
|
|
|
|
@token_auth.login_required
|
|
|
|
|
def get_durg_record():
|
|
|
|
|
page = int(request.values.get("page", 1))
|
|
|
|
|
page_size = int(request.values.get("page_size", 10))
|
|
|
|
@ -192,7 +195,7 @@ def get_durg_record():
|
|
|
|
|
#################################
|
|
|
|
|
# 分配禁用用户
|
|
|
|
|
@drug_router.route("/user_ban_list", methods=["GET", "POST"])
|
|
|
|
|
# @token_auth.login_required
|
|
|
|
|
@token_auth.login_required
|
|
|
|
|
def drug_ban_user_list():
|
|
|
|
|
seach_user = request.values.get("seach_user")
|
|
|
|
|
page = int(request.values.get("page", 1))
|
|
|
|
@ -203,7 +206,7 @@ def drug_ban_user_list():
|
|
|
|
|
|
|
|
|
|
# 确认禁用
|
|
|
|
|
@drug_router.route("/user_ban_confirm", methods=["GET", "POST"])
|
|
|
|
|
# @token_auth.login_required
|
|
|
|
|
@token_auth.login_required
|
|
|
|
|
def drug_ban_user_confirm():
|
|
|
|
|
user_id = request.values.get("user_id")
|
|
|
|
|
drug_id = request.values.get("drug_id")
|
|
|
|
@ -215,6 +218,7 @@ def drug_ban_user_confirm():
|
|
|
|
|
|
|
|
|
|
# 获取用户禁用试剂列表
|
|
|
|
|
@drug_router.route("/user_ban_drug_list", methods=["GET", "POST"])
|
|
|
|
|
@token_auth.login_required
|
|
|
|
|
def get_user_ban_drug_list():
|
|
|
|
|
user_id = request.values.get("user_id")
|
|
|
|
|
data_list = BllUserMedicament().get_user_drug_name(user_id)
|
|
|
|
@ -222,6 +226,7 @@ def get_user_ban_drug_list():
|
|
|
|
|
|
|
|
|
|
# 取消禁用试剂
|
|
|
|
|
@drug_router.route("/user_ban_relieve", methods=["GET", "POST"])
|
|
|
|
|
@token_auth.login_required
|
|
|
|
|
def user_ban_relieve():
|
|
|
|
|
user_id = request.values.get("user_id")
|
|
|
|
|
drug_list = request.values.get("drug_list")
|
|
|
|
@ -235,6 +240,7 @@ def user_ban_relieve():
|
|
|
|
|
|
|
|
|
|
# msds数据展示
|
|
|
|
|
@drug_router.route("/msds_db_list", methods=["GET", "POST"])
|
|
|
|
|
@token_auth.login_required
|
|
|
|
|
def get_msds_list():
|
|
|
|
|
seach_word = request.values.get("seach_word")
|
|
|
|
|
page = int(request.values.get("page", 1))
|
|
|
|
@ -246,6 +252,7 @@ def get_msds_list():
|
|
|
|
|
|
|
|
|
|
# 危化品数据展示
|
|
|
|
|
@drug_router.route("/dangerous_db_list", methods=["GET", "POST"])
|
|
|
|
|
@token_auth.login_required
|
|
|
|
|
def get_dangerous_list():
|
|
|
|
|
seach_word = request.values.get("seach_word")
|
|
|
|
|
page = int(request.values.get("page", 1))
|
|
|
|
|