Этап 4 / Пакет по РБП восстановление живого контура сбора данных и доказательной базы
This commit is contained in:
@@ -329,7 +329,15 @@ function requiredChecksByClaim(claimType: ClaimType): string[] {
|
||||
if (claimType === "prove_month_close_state") {
|
||||
return ["close_operation_found", "distribution_step_found", "residual_tail_found"];
|
||||
}
|
||||
return ["rbp_writeoff_lifecycle_confirmed", "residual_tail_found", "close_contradiction_or_normal_residual"];
|
||||
return [
|
||||
"rbp_writeoff_document_found",
|
||||
"rbp_object_identified",
|
||||
"rbp_movement_found",
|
||||
"rbp_period_end_residual_found",
|
||||
"rbp_writeoff_lifecycle_confirmed",
|
||||
"residual_tail_found",
|
||||
"close_contradiction_or_normal_residual"
|
||||
];
|
||||
}
|
||||
|
||||
function detectChecksForCorpus(corpus: string, claimType: ClaimType, anchors: Record<string, string[]>): string[] {
|
||||
@@ -351,6 +359,10 @@ function detectChecksForCorpus(corpus: string, claimType: ClaimType, anchors: Re
|
||||
const hasRbp = /(?:\brbp\b|рбп|account\s*97|счет\s*97|deferred)/i.test(corpus);
|
||||
const hasResidual = /(?:tail|остат|незакры|overdue|period_boundary|terminal_state_gap)/i.test(corpus);
|
||||
const hasContradiction = /(?:contradiction|invalid_transition|normal residual|нормальн)/i.test(corpus);
|
||||
const hasRbpWriteoffDoc = /(?:списани[ея]\s+рбп|rbp_writeoff|deferred_expense_document|writeoff document)/i.test(corpus);
|
||||
const hasRbpObject = /(?:rbp[_\s-]?object|объект\s+рбп|analytics|subkonto|расходыбудущихпериодов)/i.test(corpus);
|
||||
const hasMovement = /(?:movement|движен|хозрасчетный|document_to_posting|posting|проводк)/i.test(corpus);
|
||||
const hasPeriodEndResidual = /(?:period_boundary|end_period|2020-07-31|остат)/i.test(corpus);
|
||||
|
||||
if (claimType === "prove_settlement_closure_state") {
|
||||
if (hasPayment) checks.add("payment_document_found");
|
||||
@@ -377,6 +389,10 @@ function detectChecksForCorpus(corpus: string, claimType: ClaimType, anchors: Re
|
||||
if (hasDistribution) checks.add("distribution_step_found");
|
||||
if (hasResidual) checks.add("residual_tail_found");
|
||||
} else {
|
||||
if (hasRbpWriteoffDoc || (hasRbp && hasDistribution)) checks.add("rbp_writeoff_document_found");
|
||||
if (hasRbpObject || hasRbp) checks.add("rbp_object_identified");
|
||||
if (hasMovement) checks.add("rbp_movement_found");
|
||||
if (hasPeriodEndResidual || hasResidual) checks.add("rbp_period_end_residual_found");
|
||||
if (hasRbp && hasDistribution) checks.add("rbp_writeoff_lifecycle_confirmed");
|
||||
if (hasResidual) checks.add("residual_tail_found");
|
||||
if (hasContradiction || hasClose) checks.add("close_contradiction_or_normal_residual");
|
||||
|
||||
Reference in New Issue
Block a user