{"openapi":"3.1.0","info":{"title":"千星矩阵·小河基地 采集网关","description":"数据底座写入管道: append-only + 三级哈希链 + 企业微信实名身份。","version":"0.1.0"},"paths":{"/api/v1/batches":{"post":{"tags":["批次"],"summary":"Create Batch","description":"批次建档(第十四章·批次建档表)。","operationId":"create_batch_api_v1_batches_post","parameters":[{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/water/auto":{"post":{"tags":["水质"],"summary":"Ingest Water Auto","description":"水质自动采集(传感器, 第十四章·水质自动采集字段表)。","operationId":"ingest_water_auto_api_v1_water_auto_post","parameters":[{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaterReadingCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/water/manual":{"post":{"tags":["水质"],"summary":"Ingest Water Manual","description":"人工水质检测(第十四章·人工水质检测表)。\n\n人工录入需身份解析(实名); 身份未解析仅作降级提示, 不阻塞录入。","operationId":"ingest_water_manual_api_v1_water_manual_post","parameters":[{"name":"operator_employee_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Employee Id"}},{"name":"operator_wechat_userid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Wechat Userid"}},{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaterReadingCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/environment":{"post":{"tags":["环境"],"summary":"Ingest Environment","description":"棚内光照/气温记录(第十四章·棚内光照/气温记录表)。","operationId":"ingest_environment_api_v1_environment_post","parameters":[{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/equipment":{"post":{"tags":["设备"],"summary":"Ingest Equipment","description":"设备运行与能耗记录(第十四章·设备运行与能耗记录表)。","operationId":"ingest_equipment_api_v1_equipment_post","parameters":[{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EquipmentCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/operations":{"post":{"tags":["操作"],"summary":"Create Operation","description":"现场操作/工艺干预录入(实名追责)。\n\n覆盖第十四章中投菌、牡蛎壳、纳米气泡开关、海盐、富硒籽粒苋等操作类表单,\n通过 operation_type 区分。","operationId":"create_operation_api_v1_operations_post","parameters":[{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/fish-metrics":{"post":{"tags":["鱼体"],"summary":"Create Fish Metric","description":"鱼体 T0/T30 指标对比(第十四章·鱼体T0/T30指标对比表)。\n\n鱼体是 OA² 评级最强驱动源, 属低频高信号写入: 写入提交后触发事件闭环派生刷新\n(特征→决策幂等追版), 让决策演进史随实测自动生长。","operationId":"create_fish_metric_api_v1_fish_metrics_post","parameters":[{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FishMetricCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lab-reports":{"post":{"tags":["检测"],"summary":"Create Lab Report","description":"第三方检测报告归档(第十四章·第三方检测报告归档表)。\n\n检测合格率是 OA² 安全闸的判据(<100 触发降级), 属低频高信号写入: 写入提交后\n触发事件闭环派生刷新, 让合规姿态变化即时反映到决策。","operationId":"create_lab_report_api_v1_lab_reports_post","parameters":[{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabReportCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/abnormal-events":{"post":{"tags":["异常"],"summary":"Create Abnormal Event","description":"异常事件登记(第十四章·异常事件与批次冻结表)。\n\n若 freeze_status=frozen 或 event_level=red, 联动冻结批次并立即做批次封板\n(冻结即封板: 锁定该批次此刻的不可篡改总指纹 batch_hash)。","operationId":"create_abnormal_event_api_v1_abnormal_events_post","parameters":[{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AbnormalEventCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/staff":{"post":{"tags":["身份"],"summary":"Upsert Staff","description":"人员身份映射写入/更新(境内独占, 永不出境)。","operationId":"upsert_staff_api_v1_staff_post","parameters":[{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffUpsert"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/seal/daily":{"post":{"tags":["封板"],"summary":"Seal Daily","description":"对某表某日做日结封板(三级哈希链之日级, 幂等)。\n\n参数:\n    table_id (str): 表标识(如 water_timeseries)。\n    seal_date (date): 封板日期(UTC)。\n    sealed_by (str | None): 封板触发者(STF-* 或 system)。\n\n返回:\n    dict: 封板结果(daily_hash、行数)。","operationId":"seal_daily_api_v1_seal_daily_post","parameters":[{"name":"table_id","in":"query","required":true,"schema":{"type":"string","title":"Table Id"}},{"name":"seal_date","in":"query","required":true,"schema":{"type":"string","format":"date","title":"Seal Date"}},{"name":"sealed_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sealed By"}},{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Seal Daily Api V1 Seal Daily Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/seal/batch":{"post":{"tags":["封板"],"summary":"Seal Batch","description":"对某批次做批次封板(三级哈希链之批级, 并联动批次状态)。\n\n参数:\n    payload (BatchSealRequest): 批次封板请求。\n\n返回:\n    dict: 封板结果(batch_hash、汇总行数)。","operationId":"seal_batch_api_v1_seal_batch_post","parameters":[{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchSealRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Seal Batch Api V1 Seal Batch Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/evidence/{batch_id}":{"get":{"tags":["证据包"],"summary":"Get Evidence","description":"获取单批次客户证据包(脱敏 JSON)。\n\n说明: 这是对外只读橱窗(数据分级 L1), 不含操作人身份等敏感字段;\n生产环境应经溯源令牌(traceability_url)访问, MVP 阶段为开放只读。\n\n参数:\n    batch_id (str): 批次编码。\n\n返回:\n    dict: 脱敏证据包(含跨链完整性校验结论与封板指纹)。","operationId":"get_evidence_api_v1_evidence__batch_id__get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Evidence Api V1 Evidence  Batch Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboard/gov":{"get":{"tags":["监管大屏"],"summary":"Gov Dashboard","description":"政府监管大屏聚合数据(脱敏 JSON)。\n\n说明: 仅聚合统计与合规姿态(数据分级 L0/L1), 不含人员/成本/原始时序。\n\n参数:\n    base_id (str | None): 基地编码; 缺省用本节点基地。\n\n返回:\n    dict: 聚合看板数据。","operationId":"gov_dashboard_api_v1_dashboard_gov_get","parameters":[{"name":"base_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Gov Dashboard Api V1 Dashboard Gov Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/research/batches":{"get":{"tags":["科研控制台"],"summary":"Research Batches","description":"科研批次清单(含 FQI 转化摘要)。\n\n参数:\n    base_id (str | None): 基地编码; 缺省用本节点基地。\n\n返回:\n    dict: 批次列表。","operationId":"research_batches_api_v1_research_batches_get","parameters":[{"name":"base_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Id"}},{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Research Batches Api V1 Research Batches Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/research/batch/{batch_id}":{"get":{"tags":["科研控制台"],"summary":"Research Batch","description":"单批次科研深钻(全时点鱼体 + 水质日趋势 + 异常根因 + 检测全量)。\n\n参数:\n    batch_id (str): 批次编码。\n\n返回:\n    dict: 深钻数据。","operationId":"research_batch_api_v1_research_batch__batch_id__get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Research Batch Api V1 Research Batch  Batch Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/research/compare":{"get":{"tags":["科研控制台"],"summary":"Research Compare","description":"多批次横向对比(逗号分隔的 batch_ids)。\n\n参数:\n    batch_ids (str): 逗号分隔的批次编码列表。\n\n返回:\n    dict: 并列对比结果。","operationId":"research_compare_api_v1_research_compare_get","parameters":[{"name":"batch_ids","in":"query","required":true,"schema":{"type":"string","title":"Batch Ids"}},{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Research Compare Api V1 Research Compare Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/taskboard":{"get":{"tags":["现场任务板"],"summary":"Get Taskboard","description":"现场任务板(从既有数据实时派生待办)。\n\n参数:\n    base_id (str | None): 基地编码; 缺省用本节点基地。\n\n返回:\n    dict: 任务板数据(按优先级排序)。","operationId":"get_taskboard_api_v1_taskboard_get","parameters":[{"name":"base_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Id"}},{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Taskboard Api V1 Taskboard Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/taskboard/ack":{"post":{"tags":["现场任务板"],"summary":"Ack Task","description":"任务签收回执(append-only 实名闭环: 新增一条 operation_log, 不改历史)。\n\n参数:\n    payload (schemas.TaskAckRequest): 签收请求。\n\n返回:\n    schemas.WriteResult: 写入结果(含哈希与实名校验状态)。","operationId":"ack_task_api_v1_taskboard_ack_post","parameters":[{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskAckRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/wecom/health":{"get":{"tags":["企业微信"],"summary":"Wecom Health","description":"企业微信集成自检: 验证凭据可换取 access_token。\n\n返回:\n    dict: 凭据是否就绪与 token 获取结论(不回显 token 明文)。","operationId":"wecom_health_api_v1_wecom_health_get","parameters":[{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Wecom Health Api V1 Wecom Health Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/wecom/verify/{userid}":{"post":{"tags":["企业微信"],"summary":"Wecom Verify","description":"在线校验某企业微信 UserID 是否真实存在且在职。\n\n注意: 需服务器出口 IP 在企业可信 IP 白名单内, 否则返回 60020。\n\n参数:\n    userid (str): 企业微信成员 UserID。\n\n返回:\n    dict: 校验结论(active 表示已激活在职)。","operationId":"wecom_verify_api_v1_wecom_verify__userid__post","parameters":[{"name":"userid","in":"path","required":true,"schema":{"type":"string","title":"Userid"}},{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Wecom Verify Api V1 Wecom Verify  Userid  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/taskboard/push":{"post":{"tags":["现场任务板"],"summary":"Push Tasks","description":"把当前紧急/高优任务推送到指定企业微信成员(待办驱动上手机)。\n\n注意: 消息发送需服务器出口 IP 在企业可信 IP 白名单内, 且接收人在应用可见范围。\n\n参数:\n    payload (schemas.TaskPushRequest): 推送请求(userid + 可选 base_id + 优先级阈值)。\n\n返回:\n    dict: 推送结果。","operationId":"push_tasks_api_v1_taskboard_push_post","parameters":[{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskPushRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Push Tasks Api V1 Taskboard Push Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/features/compute/{batch_id}":{"post":{"tags":["特征闭环"],"summary":"Features Compute","description":"计算并落库一个新版本的批次特征集(append-only, 版本递增)。\n\n参数:\n    batch_id (str): 批次编码。\n    computed_by (str | None): 计算触发者(STF-* 或 system)。\n\n返回:\n    dict: 计算结果摘要。","operationId":"features_compute_api_v1_features_compute__batch_id__post","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"computed_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Computed By"}},{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Features Compute Api V1 Features Compute  Batch Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/features/{batch_id}":{"get":{"tags":["特征闭环"],"summary":"Features Get","description":"取回某批次最新版本特征集。\n\n参数:\n    batch_id (str): 批次编码。\n\n返回:\n    dict: 特征集。","operationId":"features_get_api_v1_features__batch_id__get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Features Get Api V1 Features  Batch Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/features/{batch_id}/verify":{"get":{"tags":["特征闭环"],"summary":"Features Verify","description":"以当前源数据重算并与已存版本比对(可复算验真, 检出源篡改/漂移)。\n\n参数:\n    batch_id (str): 批次编码。\n\n返回:\n    dict: 逐特征校验结论。","operationId":"features_verify_api_v1_features__batch_id__verify_get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Features Verify Api V1 Features  Batch Id  Verify Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/decisions/compute/{batch_id}":{"post":{"tags":["OA²决策"],"summary":"Decision Compute","description":"计算并落库一个新版本的批次决策(append-only, 版本递增)。\n\n前置: 该批次须已有特征版本(决策只消费已验真特征)。\n\n参数:\n    batch_id (str): 批次编码。\n    computed_by (str | None): 计算触发者(STF-* 或 system)。\n\n返回:\n    dict: 决策摘要(评分/等级/建议/决策哈希)。","operationId":"decision_compute_api_v1_decisions_compute__batch_id__post","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"computed_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Computed By"}},{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Decision Compute Api V1 Decisions Compute  Batch Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/decisions/refresh/{batch_id}":{"post":{"tags":["OA²决策"],"summary":"Decision Refresh","description":"手动触发单批次事件闭环刷新(特征→决策幂等追版)。\n\n与自动触发同一编排: 仅在源数据使特征/决策实质变化时才追加新版本(幂等);\n供运维补刷或权重换版后批量重算之用。\n\n参数:\n    batch_id (str): 批次编码。\n    computed_by (str | None): 触发者(STF-* 或 system)。\n\n返回:\n    dict: 刷新摘要(特征/决策是否追版及新版本号)。","operationId":"decision_refresh_api_v1_decisions_refresh__batch_id__post","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"computed_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Computed By"}},{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Decision Refresh Api V1 Decisions Refresh  Batch Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/decisions/backtest":{"get":{"tags":["OA²决策"],"summary":"Decision Backtest","description":"全量批次双口径回测报告(只读聚合, 不落库)。\n\n产出等级迁移矩阵 + 评分分布漂移 + 升降统计, 供\"是否全量回刷\"做数据驱动决策。\n\n参数:\n    base_id (str | None): 基地编码; 缺省用本节点基地。\n    from_version (str): 基准口径(默认线上 oa2_w_v1)。\n    to_version (str): 候选口径(默认 oa2_w_v2)。\n\n返回:\n    dict: 回测聚合报告。","operationId":"decision_backtest_api_v1_decisions_backtest_get","parameters":[{"name":"base_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Id"}},{"name":"from_version","in":"query","required":false,"schema":{"type":"string","default":"oa2_w_v1","title":"From Version"}},{"name":"to_version","in":"query","required":false,"schema":{"type":"string","default":"oa2_w_v2","title":"To Version"}},{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Decision Backtest Api V1 Decisions Backtest Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/decisions/{batch_id}/compare":{"get":{"tags":["OA²决策"],"summary":"Decision Compare","description":"同批次多权重口径并行对比(调权回测最小验证; 纯计算不落库)。\n\n以同一特征版本喂入不同权重口径, 量化\"换口径后评分/等级如何变、因何而变\",\n供决定是否全量回刷之前先看清效果。\n\n参数:\n    batch_id (str): 批次编码。\n    weights (str): 逗号分隔的权重口径版本(默认 oa2_w_v1,oa2_w_v2)。\n\n返回:\n    dict: 各口径决策与逐分项贡献 + 相对基准的评分/等级变化。","operationId":"decision_compare_api_v1_decisions__batch_id__compare_get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"weights","in":"query","required":false,"schema":{"type":"string","default":"oa2_w_v1,oa2_w_v2","title":"Weights"}},{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Decision Compare Api V1 Decisions  Batch Id  Compare Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/decisions/{batch_id}/verify":{"get":{"tags":["OA²决策"],"summary":"Decision Verify","description":"以当前已存特征重算决策并与已存版本比对(可复算验真, 检出篡改/脱钩)。\n\n参数:\n    batch_id (str): 批次编码。\n\n返回:\n    dict: 决策校验结论。","operationId":"decision_verify_api_v1_decisions__batch_id__verify_get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Decision Verify Api V1 Decisions  Batch Id  Verify Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/decisions/{batch_id}":{"get":{"tags":["OA²决策"],"summary":"Decision Get","description":"取回某批次最新版本决策。\n\n注: 本\"通配单段\"路由须登记在 /decisions/backtest 等具体路径之后,\n否则会把 backtest 误当作 batch_id 捕获(Starlette 按注册顺序匹配)。\n\n参数:\n    batch_id (str): 批次编码。\n\n返回:\n    dict: 决策。","operationId":"decision_get_api_v1_decisions__batch_id__get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Decision Get Api V1 Decisions  Batch Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/verify/{table_id}":{"get":{"tags":["审计"],"summary":"Verify Chain","description":"离线复算校验某条逻辑链的不可篡改性。\n\n参数:\n    table_id (str): 表标识(如 water_timeseries / operation_log)。\n    chain_value (str): 逻辑链键值(如 pond_id 或 batch_id)。\n\n返回:\n    dict: 校验结论。","operationId":"verify_chain_api_v1_verify__table_id__get","parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","title":"Table Id"}},{"name":"chain_value","in":"query","required":true,"schema":{"type":"string","title":"Chain Value"}},{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Verify Chain Api V1 Verify  Table Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/traceability/publish":{"post":{"tags":["跨境出境"],"summary":"Publish Traceability","description":"发布溯源快照(出境前置审批, 对齐 docs/05 §5)。\n\n出境闸门以\"已发布溯源快照\"为放行前提; 未发布则默认拒绝。\n\n参数:\n    payload (schemas.TraceabilityPublishRequest): 发布请求。\n\n返回:\n    dict: 发布结果(trace_id/version/hash)。","operationId":"publish_traceability_api_v1_traceability_publish_post","parameters":[{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceabilityPublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Publish Traceability Api V1 Traceability Publish Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/export/batch/{batch_id}":{"get":{"tags":["跨境出境"],"summary":"Export Batch","description":"生成单批次跨境出境包(默认拒绝 + §5白名单 + §6黑名单扫描 + 出境审计)。\n\n被拦截(未发布/黑名单命中等)返回 403, 且拦截事实已落审计。\n\n参数:\n    batch_id (str): 批次编码。\n    approver_employee_id (str | None): 审批人 STF-*(入审计)。\n    target_server (str): 目标服务器(新加坡展示节点)。\n\n返回:\n    dict: 通过闸门的脱敏出境包。","operationId":"export_batch_api_v1_export_batch__batch_id__get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"approver_employee_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approver Employee Id"}},{"name":"target_server","in":"query","required":false,"schema":{"type":"string","default":"sg-display-node","title":"Target Server"}},{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Export Batch Api V1 Export Batch  Batch Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/export/audit":{"get":{"tags":["跨境出境"],"summary":"Export Audit","description":"查询出境审计日志(§7.1 同步日志, 放行与拦截均可见)。\n\n参数:\n    limit (int): 返回条数上限。\n\n返回:\n    dict: 审计记录列表。","operationId":"export_audit_api_v1_export_audit_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Export Audit Api V1 Export Audit Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/export/selftest":{"get":{"tags":["跨境出境"],"summary":"Export Selftest","description":"闸门自检: 证明黑名单字段会被拦截(纵深防御演示)。\n\n返回:\n    dict: 自检结论。","operationId":"export_selftest_api_v1_export_selftest_get","parameters":[{"name":"x-api-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Export Selftest Api V1 Export Selftest Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/wecom/callback":{"get":{"tags":["企业微信回调"],"summary":"Callback Verify","description":"接收消息服务器URL 的 GET 校验握手。\n\n企微在控制台保存 URL 时以此 GET 验证归属; 须解密 echostr 并原样回明文。\n\n参数:\n    msg_signature (str): 企微签名。\n    timestamp (str): 时间戳。\n    nonce (str): 随机串。\n    echostr (str): 待解密随机串。\n\n返回:\n    PlainTextResponse: 解密后的明文 echostr。","operationId":"callback_verify_wecom_callback_get","parameters":[{"name":"msg_signature","in":"query","required":true,"schema":{"type":"string","title":"Msg Signature"}},{"name":"timestamp","in":"query","required":true,"schema":{"type":"string","title":"Timestamp"}},{"name":"nonce","in":"query","required":true,"schema":{"type":"string","title":"Nonce"}},{"name":"echostr","in":"query","required":true,"schema":{"type":"string","title":"Echostr"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["企业微信回调"],"summary":"Callback Receive","description":"接收企微推送的业务事件(密文 XML), 验签解密后 ack。\n\n当前仅做验签解密与确认接收(空串 ack); 事件路由(成员变更/审批回写)\n可在此基础上扩展。绝不在响应体回显明文, 防泄露。\n\n参数:\n    request (Request): 原始请求(含 XML body)。\n    msg_signature (str): 企微签名。\n    timestamp (str): 时间戳。\n    nonce (str): 随机串。\n\n返回:\n    Response: 空串 200(企微视为成功接收)。","operationId":"callback_receive_wecom_callback_post","parameters":[{"name":"msg_signature","in":"query","required":true,"schema":{"type":"string","title":"Msg Signature"}},{"name":"timestamp","in":"query","required":true,"schema":{"type":"string","title":"Timestamp"}},{"name":"nonce","in":"query","required":true,"schema":{"type":"string","title":"Nonce"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/wecom/oauth/login":{"get":{"tags":["企业微信回调"],"summary":"Oauth Login","description":"发起企业微信网页授权(免密登录)。\n\n参数:\n    state (str): 防 CSRF 状态串, 回调原样带回。\n\n返回:\n    RedirectResponse: 302 跳转到企业微信授权页。","operationId":"oauth_login_wecom_oauth_login_get","parameters":[{"name":"state","in":"query","required":false,"schema":{"type":"string","default":"tsm","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/wecom/oauth/callback":{"get":{"tags":["企业微信回调"],"summary":"Oauth Callback","description":"企业微信授权回跳: 用 code 换 UserID 并映射内部员工(STF-*)。\n\n参数:\n    code (str): 企微回跳的临时授权码。\n    state (str): 发起时携带的状态串。\n\n返回:\n    HTMLResponse: 登录结果页(仅展示 UserID 与 STF 映射结论, 不回显敏感信息)。","operationId":"oauth_callback_wecom_oauth_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"type":"string","default":"","title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","default":"","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"tags":["运维"],"summary":"Health","description":"健康检查: 探测数据库连通性。\n\n返回:\n    dict: 服务与数据库状态。","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Health Health Get"}}}}}}}},"components":{"schemas":{"AbnormalEventCreate":{"properties":{"event_id":{"type":"string","title":"Event Id"},"batch_id":{"type":"string","title":"Batch Id"},"pond_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pond Id"},"event_type":{"type":"string","title":"Event Type"},"event_level":{"type":"string","title":"Event Level"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Time"},"detected_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detected By"},"action_taken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action Taken"},"freeze_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Freeze Status"},"close_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Close Time"},"root_cause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Root Cause"},"corrective_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Corrective Action"}},"type":"object","required":["event_id","batch_id","event_type","event_level"],"title":"AbnormalEventCreate","description":"异常事件登记(可触发批次冻结)。"},"BatchCreate":{"properties":{"batch_id":{"type":"string","title":"Batch Id"},"base_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Id"},"pond_id":{"type":"string","title":"Pond Id"},"species":{"type":"string","title":"Species"},"supplier_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supplier Id"},"origin_region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Region"},"arrival_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Arrival Time"},"stocking_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Stocking Time"},"expected_out_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Out Time"},"initial_weight_total":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Initial Weight Total"},"product_grade":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Grade"},"hsr_flag":{"type":"boolean","title":"Hsr Flag","default":false}},"type":"object","required":["batch_id","pond_id","species"],"title":"BatchCreate","description":"批次建档。"},"BatchSealRequest":{"properties":{"batch_id":{"type":"string","title":"Batch Id"},"freeze_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Freeze Reason"},"sealed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sealed By"},"set_status":{"type":"string","title":"Set Status","default":"frozen"}},"type":"object","required":["batch_id"],"title":"BatchSealRequest","description":"批次封板请求。"},"EnvironmentCreate":{"properties":{"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"greenhouse_id":{"type":"string","title":"Greenhouse Id"},"air_temp":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Air Temp"},"humidity":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Humidity"},"lux":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Lux"},"device_id":{"type":"string","title":"Device Id"}},"type":"object","required":["greenhouse_id","device_id"],"title":"EnvironmentCreate","description":"棚内环境读数。"},"EquipmentCreate":{"properties":{"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"device_id":{"type":"string","title":"Device Id"},"device_type":{"type":"string","title":"Device Type"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"runtime_minutes":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Runtime Minutes"},"power_kw":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Power Kw"},"energy_kwh":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Energy Kwh"},"alarm_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alarm Code"},"maintenance_flag":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Maintenance Flag"}},"type":"object","required":["device_id","device_type"],"title":"EquipmentCreate","description":"设备状态与能耗读数。"},"FishMetricCreate":{"properties":{"sample_id":{"type":"string","title":"Sample Id"},"batch_id":{"type":"string","title":"Batch Id"},"timepoint":{"type":"string","title":"Timepoint"},"weight":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Weight"},"length":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Length"},"height":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Height"},"width":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Width"},"condition_factor":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Condition Factor"},"l_value":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"L Value"},"a_value":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"A Value"},"b_value":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"B Value"},"yellow_index":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Yellow Index"},"shear_force":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Shear Force"},"elasticity":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Elasticity"},"chewiness":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Chewiness"},"crude_fat":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Crude Fat"},"protein":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Protein"},"tvb_n":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Tvb N"},"gsm":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Gsm"},"mib_2":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Mib 2"},"selenium":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Selenium"},"fqi_score":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Fqi Score"}},"type":"object","required":["sample_id","batch_id","timepoint"],"title":"FishMetricCreate","description":"鱼体前后对比指标。"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LabReportCreate":{"properties":{"report_id":{"type":"string","title":"Report Id"},"batch_id":{"type":"string","title":"Batch Id"},"sample_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sample Id"},"lab_name":{"type":"string","title":"Lab Name"},"cma_cnas_flag":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Cma Cnas Flag"},"test_type":{"type":"string","title":"Test Type"},"test_item":{"type":"string","title":"Test Item"},"test_result":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Test Result"},"limit_value":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Limit Value"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"pass_fail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pass Fail"},"report_file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report File Url"},"report_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Report Date"},"reviewer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer"}},"type":"object","required":["report_id","batch_id","lab_name","test_type","test_item"],"title":"LabReportCreate","description":"第三方检测报告。"},"OperationCreate":{"properties":{"operation_id":{"type":"string","title":"Operation Id"},"batch_id":{"type":"string","title":"Batch Id"},"pond_id":{"type":"string","title":"Pond Id"},"operator_employee_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Employee Id"},"operator_wechat_userid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Wechat Userid"},"operation_type":{"type":"string","title":"Operation Type"},"operation_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Operation Time"},"qr_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qr Location"},"input_amount":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Input Amount"},"input_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Unit"},"photo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photo Url"},"video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Url"},"remarks":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remarks"},"review_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Status"},"reviewer_employee_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Employee Id"}},"type":"object","required":["operation_id","batch_id","pond_id","operation_type"],"title":"OperationCreate","description":"现场操作/工艺干预记录(实名追责)。"},"StaffUpsert":{"properties":{"internal_employee_id":{"type":"string","title":"Internal Employee Id","description":"内部员工ID(STF-*)"},"base_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Id"},"wechat_userid":{"type":"string","title":"Wechat Userid"},"name":{"type":"string","title":"Name"},"department":{"type":"string","title":"Department"},"role":{"type":"string","title":"Role"},"permission_level":{"type":"string","title":"Permission Level"},"phone_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Hash"},"employment_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employment Status"},"data_export_allowed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Data Export Allowed"},"is_sensitive_operator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Sensitive Operator"},"identity_verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Identity Verified"},"last_sync_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sync Time"}},"type":"object","required":["internal_employee_id","wechat_userid","name","department","role","permission_level"],"title":"StaffUpsert","description":"人员身份映射写入/更新(境内独占, 永不出境)。"},"TaskAckRequest":{"properties":{"batch_id":{"type":"string","title":"Batch Id"},"pond_id":{"type":"string","title":"Pond Id"},"task_ref":{"type":"string","title":"Task Ref"},"operator_employee_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Employee Id"},"operator_wechat_userid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Wechat Userid"},"remarks":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remarks"}},"type":"object","required":["batch_id","pond_id","task_ref"],"title":"TaskAckRequest","description":"现场任务签收回执请求(append-only 实名闭环)。"},"TaskPushRequest":{"properties":{"userid":{"type":"string","title":"Userid"},"base_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Id"}},"type":"object","required":["userid"],"title":"TaskPushRequest","description":"现场任务推送请求(推送紧急/高优待办到企业微信成员)。"},"TraceabilityPublishRequest":{"properties":{"batch_id":{"type":"string","title":"Batch Id"},"approver_employee_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approver Employee Id"},"public_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Url"}},"type":"object","required":["batch_id"],"title":"TraceabilityPublishRequest","description":"溯源快照发布请求(出境前置审批)。"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WaterReadingCreate":{"properties":{"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"base_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Id"},"pond_id":{"type":"string","title":"Pond Id"},"batch_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Batch Id"},"device_id":{"type":"string","title":"Device Id"},"do_mg_l":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Do Mg L"},"ph":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Ph"},"water_temp":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Water Temp"},"salinity":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Salinity"},"conductivity":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Conductivity"},"orp":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Orp"},"turbidity":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Turbidity"},"tan_n":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Tan N"},"no2_n":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"No2 N"},"no3_n":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"No3 N"},"alkalinity":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Alkalinity"}},"type":"object","required":["pond_id","device_id"],"title":"WaterReadingCreate","description":"水质读数(自动或人工; data_source 区分)。"},"WriteResult":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"row_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Row Hash"},"prev_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev Hash"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"identity_verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Identity Verified"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"auto_decision":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Auto Decision"}},"type":"object","title":"WriteResult","description":"写入结果统一响应。"}}}}