柜体清除

duizhaopin
apan_youxiang@163.com 2 years ago
parent 493e8c05a9
commit 04e1929e29

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

@ -321,23 +321,21 @@ def get_month(num):
print(get_month(48)) print(get_month(48))
""" """
添加后排序
删除后填充之前的空缺
需要字段 前端展示中文名称字段描述字段长度
添加权重根据权重排序进行展示
展示位置报表-试剂详情
试剂管理
入库
medicament_id: 157b7dd1-0e46-11ed-b1ca-f47b094925e1
name: 硫酸
english_name:
bar_code: 10001
cas_number: 4214234
purity: 国标
shelf_life: 10
production_date: 2022-07-28 15:22:48
expiration_date: 2023-07-28 15:22:48
use_days_warning_value: 432414
shelf_life_warning_value: 42134214
inventory_warning_value: 432141
speci:
net_weight_unit: g
net_weight: 100
is_supervise: 1
is_weigh: 1
""" """
Loading…
Cancel
Save