fix: 协议子资源单事务保存,并补齐样本编码/OA/质检等近期能力

锁定缴费校验失败时整单回滚,避免样本半成功落库;前端禁止删除锁定缴费样本,改码走更正编码。同步落地样本更正、采集微信通知、OA提及未读、细胞产品套餐与相关迁移文档。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-10-26 11:02:25 +08:00
1 parent 19bc66ba45
commit 5dad1bb0e3
142 files changed
+95584 -65717

No files matched your search

@@ -0,0 +1,63 @@
import request from '@/utils/http'
export type SampleCodeCorrectionSource = 'cell_storage' | 'research_donation'
export interface SampleCodeCorrectionImpact {
table: string
label: string
count: number
}
export interface SampleCodeCorrectionPreview {
ok: boolean
blockers: string[]
receptionSource: SampleCodeCorrectionSource
oldSampleCode: string
newSampleCode: string
sampleId?: string | null
impacts: SampleCodeCorrectionImpact[]
totalAffectedRows: number
hints?: {
sameProductCodeAsOld?: number
sameProductCodeAsNew?: number
labStorageCodeUnchanged?: boolean
cellProductCodeNotAutoUpdated?: boolean
}
}
export interface SampleCodeCorrectionApplyResult {
ok: boolean
logId: string
receptionSource: SampleCodeCorrectionSource
oldSampleCode: string
newSampleCode: string
impactCounts: Record<string, number>
totalAffectedRows: number
hints?: SampleCodeCorrectionPreview['hints']
}
export function fetchPreviewSampleCodeCorrection(data: {
receptionSource: SampleCodeCorrectionSource
oldSampleCode: string
newSampleCode: string
newSampleCodeId?: string | null
reason?: string
}) {
return request.post<SampleCodeCorrectionPreview>({
url: '/web/admin/sample-code-corrections/preview',
data
})
}
export function fetchApplySampleCodeCorrection(data: {
receptionSource: SampleCodeCorrectionSource
oldSampleCode: string
newSampleCode: string
newSampleCodeId?: string | null
reason?: string
}) {
return request.post<SampleCodeCorrectionApplyResult>({
url: '/web/admin/sample-code-corrections/apply',
data
})
}