From 921cb64a22f98b53a758992d143af69efc8511e7 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 3 Sep 2026 19:38:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20update=5Fdoc=5Frequirement=E6=94=AF?= =?UTF-8?q?=E6=8C=81chapter=5Ftitle=E5=9B=9E=E5=86=99(D3=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E5=9B=9E=E5=A1=AB)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pipeline_bidding/bid_analysis_capability.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pipeline_bidding/bid_analysis_capability.py b/pipeline_bidding/bid_analysis_capability.py index 7942abc..0b01275 100644 --- a/pipeline_bidding/bid_analysis_capability.py +++ b/pipeline_bidding/bid_analysis_capability.py @@ -438,12 +438,13 @@ async def add_doc_requirement(project_id, requirement, req_type="structure", async def update_doc_requirement(project_id, record_id="", chapter_no="", req_type="", requirement="", source_ref="", page_limit="", - delete=False, who=None, agent_id=None): + chapter_title="", delete=False, who=None, agent_id=None): """更新/删除既有投标文件要求条目(2026-09-03,根治 add 只增不改)。 定位:record_id 优先;否则 chapter_no+req_type 唯一定位。 - delete=True → 删除该条(编造/无出处项的处置); - - requirement/source_ref/page_limit 非空 → 回写原条目(纠正必须回写,不得只追加新条目)。 + - requirement/source_ref/page_limit/chapter_title 非空 → 回写原条目 + (纠正必须回写,不得只追加新条目形成矛盾对)。 """ try: project_id = await resolve_project_id(project_id) @@ -479,6 +480,8 @@ async def update_doc_requirement(project_id, record_id="", chapter_no="", req_ty sets, p = [], {"r": rid} if requirement: sets.append("requirement=${rq}$"); p["rq"] = requirement + if chapter_title: + sets.append("chapter_title=${ct}$"); p["ct"] = str(chapter_title)[:250] if source_ref: sets.append("source_ref=${sr}$"); p["sr"] = str(source_ref)[:480] if page_limit: