forked from Yara724/api
the serial letter normalization added to the code to normalize the Heh , Ya , Kaf and etc to the correct character
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
import { Types } from "mongoose";
|
||||
import { ClaimCaseDbService } from "src/claim-request-management/entites/db-service/claim-case.db.service";
|
||||
import { SandHubService } from "src/sand-hub/sand-hub.service";
|
||||
import { PlateNormalizerService } from "src/utils/plate-normalizer/plate-normalizer.service";
|
||||
import { BlameRequestType } from "src/Types&Enums/blame-request-management/blameRequestType.enum";
|
||||
import { BlameRequestDbService } from "./entities/db-service/blame-request.db.service";
|
||||
import { PartyRole } from "./entities/schema/partyRole.enum";
|
||||
@@ -33,6 +34,7 @@ export class InquiryRefreshService {
|
||||
private readonly blameRequestDbService: BlameRequestDbService,
|
||||
private readonly claimCaseDbService: ClaimCaseDbService,
|
||||
private readonly sandHubService: SandHubService,
|
||||
private readonly plateNormalizer: PlateNormalizerService,
|
||||
) {}
|
||||
|
||||
async reinquiryInquiries(
|
||||
@@ -592,7 +594,7 @@ export class InquiryRefreshService {
|
||||
centerDigits !== undefined &&
|
||||
ir !== undefined
|
||||
) {
|
||||
const plateLetter = String(centerAlphabet).trim();
|
||||
const plateLetter = this.plateNormalizer.normalizePlateText(String(centerAlphabet));
|
||||
const parsed: PlateParts = {
|
||||
leftDigits: Number(leftDigits),
|
||||
centerAlphabet: plateLetter,
|
||||
@@ -622,8 +624,7 @@ export class InquiryRefreshService {
|
||||
const ir = Number(irRaw);
|
||||
const leftDigits = Number(leftRaw);
|
||||
const centerDigits = Number(centerRaw);
|
||||
const centerAlphabet = String(alphaRaw || "").trim();
|
||||
|
||||
const centerAlphabet = this.plateNormalizer.normalizePlateText(String(alphaRaw || ""));
|
||||
if (
|
||||
!Number.isFinite(ir) ||
|
||||
!Number.isFinite(leftDigits) ||
|
||||
|
||||
Reference in New Issue
Block a user