fix(lab-sample): 恢复 Excel 真菌等补充字段并同步质检
纠正入库编码被误软删问题,恢复可关联样本的补充字段;列表接入质检填空,并补充间充质科研捐献接收行。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
c0aba421da
commit
e7b3876db6
4 files changed
+370
-17
No files matched your search
@@ -0,0 +1,23 @@
|
||||
# 恢复 Excel 补充字段(真菌等)
|
||||
|
||||
## 原因
|
||||
|
||||
`20261112_lab_sample_processing_retire_excel_demo.sql` 按「补充表 sample_code = 协议样本号」软删演示行。
|
||||
会议 Excel 实际多用实验室入库编码(`B000*` / `BC*` / `UBMC*`),与协议号不一致,导致真实样本的真菌/内毒素/CD34 等补充字段被误删。
|
||||
|
||||
## 处理
|
||||
|
||||
运行:
|
||||
|
||||
```bash
|
||||
ENV_FILE=backend/.env python backend/scripts/restore_lab_sample_processing_excel_extras.py
|
||||
```
|
||||
|
||||
脚本会:
|
||||
|
||||
1. 找出 `update_by=retire-excel-demo` 且 `del_flag=1` 的补充行
|
||||
2. 仅恢复仍能关联到当前有效协议/接收编码的行
|
||||
3. 只写回 `SOURCE_EXTRA` 字段到有效补充表
|
||||
4. 同步旧台账 `biz_lab_sample_process_supplement`
|
||||
|
||||
列表侧同时会从质检完成任务填空(内毒素/真菌/支原体/细菌及母血相关)。
|
||||
Reference in new issue
Block a user