Просмотр исходного кода

feat(production): add biz_type field to BizProductionWorkOrder model

zlwu 5 месяцев назад
Родитель
Сommit
d93b16ab0c
1 измененных файлов с 6 добавлено и 2 удалено
  1. 6 2
      backend/app/models/models.py

+ 6 - 2
backend/app/models/models.py

@@ -2434,7 +2434,7 @@ class BizProductionWorkOrder(Base):
 
     id = Column(String(64), primary_key=True, comment="主键ID")
     work_order_no = Column(String(32), nullable=False, comment="工单号")
-    work_order_type = Column(String(20), nullable=False, default="inbound", comment="工单类型: inbound=入库, temporary=临时")
+    work_order_type = Column(String(20), nullable=False, default="inbound", comment="工单类型: inbound=入库, temporary=临时, outbound=出库")
     reception_id = Column(String(64), nullable=True, comment="接收记录ID")
     protocol_sample_id = Column(String(64), nullable=True, comment="协议样本ID")
     collection_protocol_id = Column(String(64), nullable=True, comment="采集协议单ID")
@@ -2442,7 +2442,8 @@ class BizProductionWorkOrder(Base):
     sample_code = Column(String(32), nullable=True, comment="样本编码快照")
     reception_source = Column(String(20), nullable=True, default="cell_storage", comment="来源类型 cell_storage细胞存储 research_donation科研捐赠")
     infusion_schedule_id = Column(String(64), nullable=True, comment="中试输注计划ID(出库生产关联)")
-    work_order_status = Column(String(16), nullable=False, default="dpz", comment="工单状态 dpz待配置 jxz进行中 ywc已完成")
+    biz_type = Column(String(20), nullable=True, comment="业务类型: pilot_service=中试服务, clinical_application=临床应用")
+    work_order_status = Column(String(16), nullable=False, default="dpz", comment="工单状态 dpz待配置 jxz进行中 ywc已完成 yzf已作废")
     configured_time = Column(DateTime, nullable=True, comment="配置时间")
     configured_by = Column(String(64), nullable=True, comment="配置人")
     tenant_no = Column(String(64), nullable=False, default="zkxw", comment="租户编号")
@@ -2902,6 +2903,9 @@ class BizPilotInfusionSchedule(Base):
     infusion_location = Column(String(200), nullable=True, comment="输注地点")
     infusion_method = Column(String(32), nullable=True, comment="输注方式(字典szfs)")
     schedule_status = Column(String(16), nullable=False, default="dsc", comment="dsc待生产 ysc已生产 yjf已交付 yqx已取消")
+    infusion_status = Column(String(16), nullable=False, default="dtz", comment="dtz待输注 yrqr已用户确认 yqx已取消 ywc已完成")
+    cancel_reason = Column(String(512), nullable=True, default=None, comment="取消原因")
+    qc_status = Column(String(16), nullable=False, default="dzc", comment="dzc待质检 yzj已质检 yqx已取消")
     attachments = Column(String(4000), nullable=True, comment="附件逗号分隔")
     tenant_no = Column(String(64), nullable=False, default="zkxw", comment="租户编号")
     order_num = Column(Integer, nullable=True, comment="排序号")