fix(backend): 协议作废与样本接收废弃双向联动 #40

Merged
cykj merged 1 commits from codex/issue-31-discard-sync-d7063ae6ff97 into V2.0 2026-11-05 03:44:15 +00:00
Owner

Summary

  • 协议作废(细胞存储/科研捐赠)后,自动将协议下样本接收结论置为废弃(bj)
  • 协议下全部样本接收均为废弃时,自动作废协议,作废类型为「实验室废弃」(sysfq)
  • 补充字典种子 SQL 与 Web 作废类型回退标签;无新界面/弹窗

关联工单:#31

Test plan

  • pytest backend/tests/test_protocol_reception_discard_sync.py(5 passed)
  • pytest backend/tests/test_protocol_status_transition_message.py
  • pnpm --dir web-admin build(通过)
  • 部署后执行 docs/sql/migrations/2026-11-05-void-type-lab-discard.sql(运行时也会 ensure 字典)
  • 本机联调:质检废弃全部样本 → 协议已作废(实验室废弃);市场协议作废 → 样本接收废弃

Notes

  • 修改范围:backend + web-admin(按范围确认超时采用推荐)
  • mobile-h5 无对应业务页,未改代码
## Summary - 协议作废(细胞存储/科研捐赠)后,自动将协议下样本接收结论置为废弃(bj) - 协议下全部样本接收均为废弃时,自动作废协议,作废类型为「实验室废弃」(sysfq) - 补充字典种子 SQL 与 Web 作废类型回退标签;无新界面/弹窗 关联工单:https://gitea.aichengyan.com/cykj/zkxw/issues/31 ## Test plan - [x] `pytest backend/tests/test_protocol_reception_discard_sync.py`(5 passed) - [x] `pytest backend/tests/test_protocol_status_transition_message.py` - [x] `pnpm --dir web-admin build`(通过) - [ ] 部署后执行 `docs/sql/migrations/2026-11-05-void-type-lab-discard.sql`(运行时也会 ensure 字典) - [ ] 本机联调:质检废弃全部样本 → 协议已作废(实验室废弃);市场协议作废 → 样本接收废弃 ## Notes - 修改范围:backend + web-admin(按范围确认超时采用推荐) - mobile-h5 无对应业务页,未改代码
cykj added 1 commit 2026-11-05 03:38:17 +00:00
When a cell-storage or research-donation protocol is voided, mark all
related sample receptions as discarded; when every sample is discarded,
auto-void the protocol as 实验室废弃 (sysfq). Covers issue #31.

Co-authored-by: Cursor <cursoragent@cursor.com>
cykj merged commit 1fb25f4fc2 into V2.0 2026-11-05 03:44:15 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cykj/zkxw#40