forked from Yara724/api
claim things fixed
This commit is contained in:
@@ -3889,7 +3889,7 @@ export class ClaimRequestManagementService {
|
||||
return {
|
||||
BeginDate: insurance.startDate ?? null,
|
||||
BuiltYear:
|
||||
Number(inquiryMapped.ModelField ?? inquiryMapped.ModelCii) || null,
|
||||
Number(inquiryMapped.ModelField ?? inquiryMapped.ModelCii) || Number(inquiryMapped.PrdDate) || null,
|
||||
ChassisNo:
|
||||
inquiryMapped.ChassisNumberField ??
|
||||
inquiryMapped.ShsNum ??
|
||||
@@ -5066,6 +5066,25 @@ export class ClaimRequestManagementService {
|
||||
warning,
|
||||
fileName: candidate.fileName,
|
||||
});
|
||||
|
||||
// Schedule a retry for this individual file via autoSubmitFanavaranAttachment,
|
||||
// which handles idempotency (won't re-upload if already recorded as submitted)
|
||||
// and has its own inner retry/back-off via scheduleFanavaranRetry.
|
||||
await this.scheduleFanavaranRetry(
|
||||
claimCaseId,
|
||||
"attachments",
|
||||
() =>
|
||||
this.autoSubmitFanavaranAttachment(
|
||||
claimCaseId,
|
||||
{
|
||||
path: candidate.path,
|
||||
fileName: candidate.fileName,
|
||||
source: candidate.source,
|
||||
},
|
||||
{ clientKey, auditSource: FanavaranAuditSource.AUTO_SUBMIT },
|
||||
),
|
||||
`${logPrefix} [${i + 1}/${pending.length}] retry`,
|
||||
);
|
||||
}
|
||||
|
||||
if (i < pending.length - 1) {
|
||||
@@ -9667,6 +9686,7 @@ export class ClaimRequestManagementService {
|
||||
accepted: boolean;
|
||||
phase?: "PRICED_PARTS_FOR_FACTORS" | "FINAL_APPROVAL";
|
||||
fanavaran?: FanavaranAutoSubmitResult;
|
||||
fanavaranExpertise?: FanavaranExpertiseSubmitResult;
|
||||
}> {
|
||||
if (!Types.ObjectId.isValid(claimRequestId)) {
|
||||
throw new BadRequestException("Invalid claim request id");
|
||||
@@ -9940,6 +9960,7 @@ export class ClaimRequestManagementService {
|
||||
accepted: true,
|
||||
phase: "FINAL_APPROVAL",
|
||||
fanavaran,
|
||||
fanavaranExpertise,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user