|
|
@ -198,10 +198,14 @@ def get_durg_record():
|
|
|
|
@token_auth.login_required
|
|
|
|
@token_auth.login_required
|
|
|
|
def drug_ban_user_list():
|
|
|
|
def drug_ban_user_list():
|
|
|
|
seach_user = request.values.get("seach_user")
|
|
|
|
seach_user = request.values.get("seach_user")
|
|
|
|
|
|
|
|
drug_id = request.values.get("drug_id")
|
|
|
|
page = int(request.values.get("page", 1))
|
|
|
|
page = int(request.values.get("page", 1))
|
|
|
|
page_size = int(request.values.get("page_size", 10))
|
|
|
|
page_size = int(request.values.get("page_size", 10))
|
|
|
|
page_param = PageParam(page, page_size)
|
|
|
|
page_param = PageParam(page, page_size)
|
|
|
|
data_list = BllUserMedicament().get_user_jin_medicament(seach_user=seach_user, page_param=page_param)
|
|
|
|
data_list = BllUserMedicament().get_user_jin_medicament(
|
|
|
|
|
|
|
|
seach_user=seach_user, page_param=page_param,
|
|
|
|
|
|
|
|
drug_id=drug_id
|
|
|
|
|
|
|
|
)
|
|
|
|
return jsonify(Utils.true_return(data={"data": Utils.msyql_table_model(data_list), "total_count": page_param.totalRecords}))
|
|
|
|
return jsonify(Utils.true_return(data={"data": Utils.msyql_table_model(data_list), "total_count": page_param.totalRecords}))
|
|
|
|
|
|
|
|
|
|
|
|
# 确认禁用
|
|
|
|
# 确认禁用
|
|
|
@ -216,21 +220,21 @@ def drug_ban_user_confirm():
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
return jsonify(Utils.false_return())
|
|
|
|
return jsonify(Utils.false_return())
|
|
|
|
|
|
|
|
|
|
|
|
# 获取用户禁用试剂列表
|
|
|
|
# # 获取用户禁用试剂列表
|
|
|
|
@drug_router.route("/user_ban_drug_list", methods=["GET", "POST"])
|
|
|
|
# @drug_router.route("/user_ban_drug_list", methods=["GET", "POST"])
|
|
|
|
@token_auth.login_required
|
|
|
|
# @token_auth.login_required
|
|
|
|
def get_user_ban_drug_list():
|
|
|
|
# def get_user_ban_drug_list():
|
|
|
|
user_id = request.values.get("user_id")
|
|
|
|
# user_id = request.values.get("user_id")
|
|
|
|
data_list = BllUserMedicament().get_user_drug_name(user_id)
|
|
|
|
# data_list = BllUserMedicament().get_user_drug_name(user_id)
|
|
|
|
return jsonify(Utils.true_return(data=Utils.msyql_table_model(data_list)))
|
|
|
|
# return jsonify(Utils.true_return(data=Utils.msyql_table_model(data_list)))
|
|
|
|
|
|
|
|
|
|
|
|
# 取消禁用试剂
|
|
|
|
# 取消禁用试剂
|
|
|
|
@drug_router.route("/user_ban_relieve", methods=["GET", "POST"])
|
|
|
|
@drug_router.route("/user_ban_relieve", methods=["GET", "POST"])
|
|
|
|
@token_auth.login_required
|
|
|
|
@token_auth.login_required
|
|
|
|
def user_ban_relieve():
|
|
|
|
def user_ban_relieve():
|
|
|
|
user_id = request.values.get("user_id")
|
|
|
|
user_id = request.values.get("user_id")
|
|
|
|
drug_list = request.values.get("drug_list")
|
|
|
|
drug_id = request.values.get("drug_id")
|
|
|
|
data = BllUserMedicament().del_user_ban_drug(user_id=user_id, drug_list=drug_list)
|
|
|
|
data = BllUserMedicament().del_user_ban_drug(user_id=user_id, drug_id=drug_id)
|
|
|
|
if data:
|
|
|
|
if data:
|
|
|
|
return jsonify(Utils.true_return(msg="删除成功"))
|
|
|
|
return jsonify(Utils.true_return(msg="删除成功"))
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|