feat(pilot): 临床科研申请单新增业务类型字段

在申请单信息中增加 researchCategory(生物新技术临床科研/临床课题联合申报/生物制药研发),贯通 SQL、后端校验与 Web 表单/列表/详情;用户确认免除 Figma。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-11-20 15:51:19 +08:00
1 parent ef3e015ff9
commit 6b1bf8a1d2
11 files changed
+157 -1

No files matched your search

+8
View File
@@ -53,6 +53,7 @@ class ApplicationCreateBody(BaseModel):
customer_name: Optional[str] = Field(None, alias="customerName")
customer_contact: Optional[str] = Field(None, alias="customerContact")
customer_phone: Optional[str] = Field(None, alias="customerPhone")
research_category: Optional[str] = Field(None, alias="researchCategory")
class ApplicationUpdateBody(BaseModel):
@@ -65,6 +66,7 @@ class ApplicationUpdateBody(BaseModel):
customer_name: Optional[str] = Field(None, alias="customerName")
customer_contact: Optional[str] = Field(None, alias="customerContact")
customer_phone: Optional[str] = Field(None, alias="customerPhone")
research_category: Optional[str] = Field(None, alias="researchCategory")
class PatientSaveBody(BaseModel):
@@ -206,6 +208,7 @@ class ApplicationSaveBody(BaseModel):
customer_name: Optional[str] = Field(None, alias="customerName")
customer_contact: Optional[str] = Field(None, alias="customerContact")
customer_phone: Optional[str] = Field(None, alias="customerPhone")
research_category: Optional[str] = Field(None, alias="researchCategory")
remark: Optional[str] = None
consent_form_urls: Optional[str] = Field(None, alias="consentFormUrls")
consent_attachments: Optional[list] = Field(None, alias="consentAttachments")
@@ -287,6 +290,7 @@ async def api_create_application(
"customerName": body.customer_name,
"customerContact": body.customer_contact,
"customerPhone": body.customer_phone,
"researchCategory": body.research_category,
}
result = pilot_application.create_application(
db,
@@ -322,6 +326,8 @@ async def api_update_application(
data["customerContact"] = body.customer_contact
if body.customer_phone is not None:
data["customerPhone"] = body.customer_phone
if body.research_category is not None:
data["researchCategory"] = body.research_category
result = pilot_application.update_application(
db, app_id=body.id, data=data, tenant_no=tenant_no
)
@@ -364,6 +370,8 @@ async def api_save_application(
app_data["customerContact"] = body.customer_contact
if body.customer_phone is not None:
app_data["customerPhone"] = body.customer_phone
if body.research_category is not None:
app_data["researchCategory"] = body.research_category
if body.consent_attachments is not None:
app_data["consentAttachments"] = body.consent_attachments
elif body.consent_form_urls is not None: