1
0
forked from Yara724/api

Fixed mock data

This commit is contained in:
SepehrYahyaee
2026-06-20 15:48:39 +03:30
parent 4fabed77e5
commit 59eddb8e0e
3 changed files with 197 additions and 51 deletions

View File

@@ -1114,11 +1114,20 @@ export class RequestManagementService {
// ---- External inquiry 1: Tejarat block inquiry ----
let inquiryRaw: any;
let inquiryMapped: any;
const inquiryClientId = party.person?.clientId
? String(party.person.clientId)
: undefined;
const inquiryOptions = inquiryClientId
? { clientId: inquiryClientId }
: undefined;
try {
const inquiry = await this.sandHubService.getTejaratBlockInquiry({
plate: body.plate,
nationalCodeOfInsurer: body.nationalCodeOfInsurer,
});
const inquiry = await this.sandHubService.getTejaratBlockInquiry(
{
plate: body.plate,
nationalCodeOfInsurer: body.nationalCodeOfInsurer,
},
inquiryOptions,
);
inquiryRaw = inquiry.raw;
inquiryMapped = inquiry.mapped;
this.logger.log(
@@ -1199,6 +1208,7 @@ export class RequestManagementService {
const personalInquiry = await this.sandHubService.getPersonalInquiry(
personalNationalCode,
personalBirthDate,
inquiryOptions,
);
this.recordPartyCaseInquiryStatus(
req,
@@ -1312,10 +1322,15 @@ export class RequestManagementService {
if (req.type === BlameRequestType.CAR_BODY && role === PartyRole.FIRST) {
let carBodyInfo: any;
try {
carBodyInfo = await this.sandHubService.getTejaratCarBodyInquiry({
nationalCodeOfInsurer: body.nationalCodeOfInsurer,
plate: body.plate,
});
carBodyInfo = await this.sandHubService.getTejaratCarBodyInquiry(
{
nationalCodeOfInsurer: body.nationalCodeOfInsurer,
plate: body.plate,
},
resolvedClientId
? { clientId: String(resolvedClientId) }
: inquiryOptions,
);
this.recordPartyCaseInquiryStatus(req, "carBody", role, true, {
source: "TEJARAT_CAR_BODY_INQUIRY",
raw: carBodyInfo.raw,