feat: dedup expected data by handover_no before export submit
- store.get_existing_handover_nos: query PG expected_record.handover_no - inject dedup skip before submitting export in zto/yunda/anneng/shunxin - shunxin reads RTS handover_no from waybill-list view (method 1) - force-redownload switch threaded via task_spec -> dispatch -> impl - schema: add idx_expected_handover index Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -187,6 +187,9 @@ app = FastAPI(title="InboundVerify 服务端", lifespan=lifespan)
|
||||
class TaskRequest(BaseModel):
|
||||
site: str
|
||||
kind: str
|
||||
force: bool = (
|
||||
False # 强制重下:忽略已落库去重,重新提交所有班次/交接单的导出任务(默认关)
|
||||
)
|
||||
|
||||
|
||||
@app.post("/tasks")
|
||||
@@ -200,7 +203,7 @@ def create_task(req: TaskRequest):
|
||||
if (req.site, req.kind) not in TASK_HANDLERS:
|
||||
raise HTTPException(status_code=400, detail=f"无效任务: {req.site}/{req.kind}")
|
||||
task_id = state_store.create_task(req.site, req.kind)
|
||||
task_queue.put((task_id, {"site": req.site, "kind": req.kind}))
|
||||
task_queue.put((task_id, {"site": req.site, "kind": req.kind, "force": req.force}))
|
||||
return {"task_id": task_id}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user