feat(check): 文件要在、扫描件兜底(C10);响应方式存进清单并可改(C12)
- check/presence.py:「提供《授权委托书》」「须提交投标函」这类要求按标题里有没有这个文件名判断,不调模型。
- 扫描件兜底:要附证明材料的要求没找到、投标文件里有扫描件页时,改为提示级「可能在扫描件里,请人工核对」。
- 响应方式解析时识别、带依据句子存进 checklist.response_modes(迁移 0008);清单页显示、可改(写审计,
重新解析不覆盖人工改过的);查标用存下来的。新接口 PUT /projects/{id}/checklist/response-modes/{category}。
- check_item_result.layer 加 presence(迁移 0007);契约同步默认接受的两种结论。
开发集 17 份:规矩投标文件的致命问题 120 → 51,致命级召回不变(22 / 32)(docs/architecture/check-eval.md §5)。
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
27
server/migrations/versions/0007_check_layer_presence.py
Normal file
27
server/migrations/versions/0007_check_layer_presence.py
Normal file
@@ -0,0 +1,27 @@
|
||||
"""查标结论的来源加 presence:「文件要在」类要求按文件在不在判断,不调模型。
|
||||
|
||||
Revision ID: 0007
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from alembic import op
|
||||
|
||||
revision = "0007"
|
||||
down_revision = "0006"
|
||||
|
||||
LAYERS = "'deviation_table', 'rule_compare', 'model', 'retrieval'"
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.get_bind().exec_driver_sql(f"""
|
||||
ALTER TABLE check_item_result DROP CONSTRAINT check_item_result_layer_check;
|
||||
ALTER TABLE check_item_result ADD CONSTRAINT check_item_result_layer_check CHECK (layer IN ({LAYERS}, 'presence'));
|
||||
""")
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.get_bind().exec_driver_sql(f"""
|
||||
ALTER TABLE check_item_result DROP CONSTRAINT check_item_result_layer_check;
|
||||
ALTER TABLE check_item_result ADD CONSTRAINT check_item_result_layer_check CHECK (layer IN ({LAYERS}));
|
||||
""")
|
||||
22
server/migrations/versions/0008_checklist_response_modes.py
Normal file
22
server/migrations/versions/0008_checklist_response_modes.py
Normal file
@@ -0,0 +1,22 @@
|
||||
"""招标文件的响应方式存进清单(决策 C12):[{category, mode, status, origin, citation_ids, set_by, set_at}]。
|
||||
|
||||
识别结果(origin = rule)在清单页显示,用户可以改(origin = human,人工确认点);重新解析不覆盖人工改过的。
|
||||
查标按这里的响应方式判「没找到响应算不算问题」。
|
||||
|
||||
Revision ID: 0008
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from alembic import op
|
||||
|
||||
revision = "0008"
|
||||
down_revision = "0007"
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.get_bind().exec_driver_sql("ALTER TABLE checklist ADD COLUMN response_modes jsonb NOT NULL DEFAULT '[]'")
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.get_bind().exec_driver_sql("ALTER TABLE checklist DROP COLUMN response_modes")
|
||||
Reference in New Issue
Block a user