提交
This commit is contained in:
1 parent
7145c6c683
commit
c137b46939
311 files changed
+41432
-30702
No files matched your search
@@ -44,8 +44,9 @@ class PlanIdBody(BaseModel):
|
||||
class ApplicationCreateBody(BaseModel):
|
||||
model_config = ConfigDict(populate_by_name=True)
|
||||
|
||||
channel_service_order_id: str = Field(..., alias="channelServiceOrderId")
|
||||
channel_service_order_id: Optional[str] = Field(None, alias="channelServiceOrderId")
|
||||
remark: Optional[str] = None
|
||||
biz_type: Optional[str] = Field(None, alias="bizType")
|
||||
|
||||
|
||||
class ApplicationUpdateBody(BaseModel):
|
||||
@@ -111,6 +112,7 @@ class ScheduleCreateBody(BaseModel):
|
||||
plan_id: str = Field(..., alias="infusionPlanId")
|
||||
infusion_time: Optional[str] = Field(None, alias="infusionTime")
|
||||
remark: Optional[str] = None
|
||||
amount: Optional[float] = None
|
||||
|
||||
|
||||
# --- 复合保存 Schema(参考采集协议单一次性保存模式)---
|
||||
@@ -202,6 +204,7 @@ async def api_list_applications(
|
||||
channelId: Optional[str] = Query(None, alias="channelId"),
|
||||
applicationStatus: Optional[str] = Query(None, alias="applicationStatus"),
|
||||
channelServiceOrderId: Optional[str] = Query(None, alias="channelServiceOrderId"),
|
||||
bizType: Optional[str] = Query(None, alias="bizType"),
|
||||
user: dict = Depends(require_admin_or_super_admin),
|
||||
db: Session = Depends(get_db),
|
||||
):
|
||||
@@ -215,6 +218,7 @@ async def api_list_applications(
|
||||
application_status=applicationStatus,
|
||||
channel_service_order_id=channelServiceOrderId,
|
||||
keyword=keyword,
|
||||
biz_type=bizType,
|
||||
)
|
||||
return success_response(result)
|
||||
|
||||
@@ -241,8 +245,9 @@ async def api_create_application(
|
||||
try:
|
||||
tenant_no = _get_tenant_no(db, user)
|
||||
data = {
|
||||
"channelServiceOrderId": body.channel_service_order_id,
|
||||
"channelServiceOrderId": body.channel_service_order_id or "",
|
||||
"remark": body.remark,
|
||||
"bizType": body.biz_type or "pilot_service",
|
||||
}
|
||||
result = pilot_application.create_application(
|
||||
db,
|
||||
@@ -638,6 +643,7 @@ async def api_create_schedule(
|
||||
data = {
|
||||
"infusionTime": body.infusion_time,
|
||||
"remark": body.remark,
|
||||
"amount": body.amount,
|
||||
}
|
||||
result = pilot_application.create_schedule(
|
||||
db,
|
||||
|
||||
Reference in new issue
Block a user