This commit is contained in:
@@ -8,6 +8,22 @@ interface AuditResourceRouteOptions {
|
||||
businessIdentifier?: string | null
|
||||
}
|
||||
|
||||
interface AuditReferenceOptions {
|
||||
currentId?: string | null
|
||||
fidelity?: boolean | null
|
||||
}
|
||||
|
||||
/** 仅保留非空、可靠且不会回到当前目标的显式调查引用。 */
|
||||
export function resolveInvestigationReference(
|
||||
value?: string | null,
|
||||
options: AuditReferenceOptions = {}
|
||||
): string | null {
|
||||
if (options.fidelity === false) return null
|
||||
const normalizedValue = value?.trim()
|
||||
if (!normalizedValue || normalizedValue === options.currentId?.trim()) return null
|
||||
return normalizedValue
|
||||
}
|
||||
|
||||
/** 根据当前主体选择平台内部 ID 或主体安全业务标识。 */
|
||||
export function resolveAuditResourceTarget(
|
||||
options: AuditResourceRouteOptions
|
||||
|
||||
Reference in New Issue
Block a user