|
|
|
@ -102,17 +102,17 @@ def update_status():
|
|
|
|
|
@token_auth.login_required
|
|
|
|
|
def client_del():
|
|
|
|
|
client_id = request.values.get("client_id")
|
|
|
|
|
# drug_obj = BllMedicament().findEntity(EntityMedicament.client_id == client_id)
|
|
|
|
|
# if drug_obj:
|
|
|
|
|
# return jsonify(Utils.false_return(msg="请先删除柜体内试剂数据"))
|
|
|
|
|
# else:
|
|
|
|
|
# BllClient().delete(EntityClient.client_id==client_id)
|
|
|
|
|
# BllMedicamentRecord().delete(EntityMedicamentRecord.client_id == client_id)
|
|
|
|
|
# BllMedicamentTemplate().delete(EntityMedicamentTemplate.client_id == client_id)
|
|
|
|
|
# BllHumitureRecord().delete(EntityHumitureRecord.client_id == client_id)
|
|
|
|
|
drug_obj = BllMedicament().findEntity(EntityMedicament.client_id == client_id)
|
|
|
|
|
if drug_obj:
|
|
|
|
|
return jsonify(Utils.false_return(msg="请先删除柜体内试剂数据"))
|
|
|
|
|
else:
|
|
|
|
|
BllClient().delete(EntityClient.client_id==client_id)
|
|
|
|
|
BllMedicamentRecord().delete(EntityMedicamentRecord.client_id == client_id)
|
|
|
|
|
BllMedicamentTemplate().delete(EntityMedicamentTemplate.client_id == client_id)
|
|
|
|
|
BllHumitureRecord().delete(EntityHumitureRecord.client_id == client_id)
|
|
|
|
|
|
|
|
|
|
# return jsonify(Utils.true_return(msg="删除成功"))
|
|
|
|
|
return jsonify(Utils.true_return())
|
|
|
|
|
return jsonify(Utils.true_return(msg="删除成功"))
|
|
|
|
|
# return jsonify(Utils.true_return())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 清空所有需删除表数据
|
|
|
|
@ -126,13 +126,13 @@ def client_del():
|
|
|
|
|
@token_auth.login_required
|
|
|
|
|
def client_empty():
|
|
|
|
|
client_id = request.values.get("client_id")
|
|
|
|
|
# if client_id:
|
|
|
|
|
# BllMedicament().delete(EntityMedicament.client_id == client_id)
|
|
|
|
|
# BllMedicamentRecord().delete(EntityMedicamentRecord.client_id == client_id)
|
|
|
|
|
# BllMedicamentTemplate().delete(EntityMedicamentTemplate.client_id == client_id)
|
|
|
|
|
# BllHumitureRecord().delete(EntityHumitureRecord.client_id == client_id)
|
|
|
|
|
# else:
|
|
|
|
|
# BllClient().empty_table_info()
|
|
|
|
|
if client_id:
|
|
|
|
|
BllMedicament().delete(EntityMedicament.client_id == client_id)
|
|
|
|
|
BllMedicamentRecord().delete(EntityMedicamentRecord.client_id == client_id)
|
|
|
|
|
BllMedicamentTemplate().delete(EntityMedicamentTemplate.client_id == client_id)
|
|
|
|
|
BllHumitureRecord().delete(EntityHumitureRecord.client_id == client_id)
|
|
|
|
|
else:
|
|
|
|
|
BllClient().empty_table_info()
|
|
|
|
|
return jsonify(Utils.true_return())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|