入库模板错误修复

duizhaopin
13507605001 2 years ago
parent 1e55945896
commit 6402af2477

@ -174,9 +174,7 @@ def add_tmp_info():
# 获取最大的条形码和条形码数量 # 获取最大的条形码和条形码数量
tmp_obj = BllMedicamentTemplate().execute(sql_all).fetchone() tmp_obj = BllMedicamentTemplate().execute(sql_all).fetchone()
if tmp_obj: if tmp_obj:
max_barcode = tmp_obj.start_bar_code max_barcode = int(tmp_obj.start_bar_code) + int(tmp_obj.bar_code_count)
bar_code_count = tmp_obj.bar_code_count
max_barcode = int(max_barcode) + int(bar_code_count)
else: else:
max_barcode = 100001 max_barcode = 100001
start_bar_code = max_barcode start_bar_code = max_barcode
@ -189,9 +187,9 @@ def add_tmp_info():
if isinstance(tmp_content, str): if isinstance(tmp_content, str):
# tmp_content = eval(tmp_content) # tmp_content = eval(tmp_content)
tmp_content = json.loads(tmp_content) tmp_content = json.loads(tmp_content)
# total_count = 0 bar_code_count = 0
# for i in tmp_content: for i in tmp_content:
# total_count += int(i['export_count']) bar_code_count += int(i['export_count'])
obj = EntityMedicamentTemplate( obj = EntityMedicamentTemplate(
customer_id=client.customer_id, customer_id=client.customer_id,

Loading…
Cancel
Save