|
|
@ -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")
|
|
|
|