添加字段;

导入模板修改
duizhaopin
13507605001 2 years ago
parent 8f7650b44d
commit c4e9e5ffa0

@ -12,7 +12,6 @@ from openpyxl import load_workbook
class ReadExcel:
def __init__(self, excelName):
self.wb = load_workbook(filename=excelName)
self.ws = self.wb.active
@ -39,15 +38,6 @@ class ReadExcel:
"variety_id": str(uuid.uuid1()),
}
# key_list = [
# "unit_code", "remark2", "category",
# "speci", "name", "english_name",
# "purity", "cas_number", "standard_code",
# "net_weight", "net_weight_unit", "export_count",
# "production_date", "shelf_life", "expiration_date",
# "price", "is_supervise", "remain",
# "manufacturer", "storage_condition", "remark9"
# ]
# TODO 添加供应商修改
key_list = [
"unit_code", "remark2", "category",
@ -58,9 +48,6 @@ class ReadExcel:
"price", "is_supervise", "remain",
"manufacturer", "distributor", "storage_condition", "remark9"
]
# v_list = list("EFGHJKLMNOPQRSTU")
# v_list = list("ABCDEFGHIJKLNOPQRSTUV")
# 添加供应商
v_list = list("ABCDEFGHIJKLNOPQRSTUVW")
# 采用列表和字母对应的两个列表,进行循环的方式写入字典,简化代码量

@ -69,6 +69,18 @@ class EntityMedicament(Base):
put_in_user_name = Column(String(50), comment="入库用户名")
is_add = Column(Integer, comment="", default=0)
user_auditing = Column(String(50), comment="用户审计")
# 单位编号
unit_code = Column(String(50), comment="单位编号")
# 农残、兽残、添加剂、易制毒等
category = Column(String(50), comment="分类")
# 试剂管理、标准品管理、危化品、试剂耗材
func_type = Column(String(50), comment="功能分类")
# 标准品批号
standard_code = Column(String(50), comment="标准品批号")
# 存储条件
storage_condition = Column(String(50), comment="存储条件")
# 标准品管理分类
storage_type = Column(String(50), comment="标准品管理分类")
remark1 = Column(String(50), comment='扩展字段1')
remark2 = Column(String(50), comment='扩展字段2')
@ -111,6 +123,9 @@ class EntityMedicamentTemplate(Base):
}
)
template_id = Column(String(50), primary_key=True, comment="模板ID", default=get_uuid)
# 试剂管理、标准品管理、危化品、试剂耗材
func_type = Column(String(50), comment="功能分类")
customer_id = Column(String(50), comment="客户ID")
client_id = Column(String(50), comment="终端ID")
client_name = Column(String(50), comment="终端名称")
@ -215,6 +230,7 @@ class EntityMedicamentExtend(Base):
description = Column(Text, comment="描述")
key_lenth = Column(String(50), comment="字段长度")
sort_index = Column(Integer, comment="顺序")
func_type = Column(String(50), comment="模块类型区分")
is_use = Column(Integer, default=1, comment="是否启用")
is_del = Column(Integer, default=0, comment="是否删除")

Loading…
Cancel
Save