分类未获得直接返回

duizhaopin
tangxuan 2 years ago
parent d3b75808f8
commit 1bd22d5837

@ -965,6 +965,8 @@ class BllMedicament(Repository):
# 从分类表中获取时间年份 # 从分类表中获取时间年份
medicament_variety_obj = BllMedicamentVariety().findEntity( medicament_variety_obj = BllMedicamentVariety().findEntity(
EntityMedicamentVariety.variety_id == drug_entry.variety_id) EntityMedicamentVariety.variety_id == drug_entry.variety_id)
if not medicament_variety_obj:
return
add_year = int(medicament_variety_obj.remark5) if medicament_variety_obj.remark5 else 1 add_year = int(medicament_variety_obj.remark5) if medicament_variety_obj.remark5 else 1
date_now = datetime.datetime.now() date_now = datetime.datetime.now()
add_expiration_date = (date_now + relativedelta(years=add_year)).strftime("%Y-%m-%d %H:%M:%S") add_expiration_date = (date_now + relativedelta(years=add_year)).strftime("%Y-%m-%d %H:%M:%S")

Loading…
Cancel
Save