forked from Yara724/api
Compare commits
11 Commits
2cada1eba0
...
ea3db8f025
| Author | SHA1 | Date | |
|---|---|---|---|
| ea3db8f025 | |||
| 8448d2d771 | |||
| bf7e2ef97a | |||
| 426268fed2 | |||
| a0874f4837 | |||
| 0c0c306740 | |||
| 914e97687f | |||
| 6b34b0cdf7 | |||
| 5e3da9dc02 | |||
| 5eb50f94cc | |||
| d72c811659 |
@@ -3876,7 +3876,7 @@ export class ClaimRequestManagementService {
|
|||||||
return {
|
return {
|
||||||
BeginDate: insurance.startDate ?? null,
|
BeginDate: insurance.startDate ?? null,
|
||||||
BuiltYear:
|
BuiltYear:
|
||||||
Number(inquiryMapped.ModelField ?? inquiryMapped.ModelCii) || Number(inquiryMapped.PrdDate) || null,
|
Number(inquiryMapped.ModelField ?? inquiryMapped.ModelCii) || Number(inquiryMapped.PrdDte) || null,
|
||||||
ChassisNo:
|
ChassisNo:
|
||||||
inquiryMapped.ChassisNumberField ??
|
inquiryMapped.ChassisNumberField ??
|
||||||
inquiryMapped.ShsNum ??
|
inquiryMapped.ShsNum ??
|
||||||
|
|||||||
@@ -107,6 +107,16 @@ export const FANAVARAN_REMOTE_LOOKUPS: FanavaranRemoteLookupDefinition[] = [
|
|||||||
url: `${FANAVARAN_LOOKUP_BASE_URL}/common/base-info/Provinces`,
|
url: `${FANAVARAN_LOOKUP_BASE_URL}/common/base-info/Provinces`,
|
||||||
cacheFile: "provinces.json",
|
cacheFile: "provinces.json",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "used-place",
|
||||||
|
url: `${FANAVARAN_LOOKUP_BASE_URL}/car/code-list/used-place`,
|
||||||
|
cacheFile: "used-place.json",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "dmg-business-line",
|
||||||
|
url: `${FANAVARAN_LOOKUP_BASE_URL}/car/code-list/dmg-business-line`,
|
||||||
|
cacheFile: "dmg-business-line.json",
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export const TEJARAT_STATIC_ACCIDENT_FILES = {
|
export const TEJARAT_STATIC_ACCIDENT_FILES = {
|
||||||
|
|||||||
@@ -16,9 +16,6 @@ import {
|
|||||||
ApiTags,
|
ApiTags,
|
||||||
} from "@nestjs/swagger";
|
} from "@nestjs/swagger";
|
||||||
import { LocalActorAuthGuard } from "src/auth/guards/actor-local.guard";
|
import { LocalActorAuthGuard } from "src/auth/guards/actor-local.guard";
|
||||||
import { RolesGuard } from "src/auth/guards/role.guard";
|
|
||||||
import { Roles } from "src/decorators/roles.decorator";
|
|
||||||
import { RoleEnum } from "src/Types&Enums/role.enum";
|
|
||||||
import { ClaimRequestManagementService } from "src/claim-request-management/claim-request-management.service";
|
import { ClaimRequestManagementService } from "src/claim-request-management/claim-request-management.service";
|
||||||
import {
|
import {
|
||||||
isFanavaranClientKey,
|
isFanavaranClientKey,
|
||||||
@@ -30,8 +27,7 @@ import {
|
|||||||
@ApiTags("fanavaran")
|
@ApiTags("fanavaran")
|
||||||
@Controller("v2/fanavaran")
|
@Controller("v2/fanavaran")
|
||||||
@ApiBearerAuth()
|
@ApiBearerAuth()
|
||||||
@UseGuards(LocalActorAuthGuard, RolesGuard)
|
@UseGuards(LocalActorAuthGuard)
|
||||||
@Roles(RoleEnum.ADMIN, RoleEnum.FIELD_EXPERT)
|
|
||||||
export class FanavaranController {
|
export class FanavaranController {
|
||||||
constructor(
|
constructor(
|
||||||
private readonly claimRequestManagementService: ClaimRequestManagementService,
|
private readonly claimRequestManagementService: ClaimRequestManagementService,
|
||||||
|
|||||||
@@ -291,6 +291,32 @@ export class LookupsController {
|
|||||||
return await this.lookupsService.getDmgHistoryStatus();
|
return await this.lookupsService.getDmgHistoryStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Get("used-place")
|
||||||
|
@ApiOperation({
|
||||||
|
summary: "Fanavaran used place lookup",
|
||||||
|
description: "Returns used place codes from car/code-list/used-place.",
|
||||||
|
})
|
||||||
|
@ApiOkResponse({
|
||||||
|
description: "Returns Fanavaran used place lookup data",
|
||||||
|
schema: { type: "array", items: { type: "object" } },
|
||||||
|
})
|
||||||
|
async getUsedPlace() {
|
||||||
|
return await this.lookupsService.getUsedPlace();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Get("dmg-business-line")
|
||||||
|
@ApiOperation({
|
||||||
|
summary: "Fanavaran damage business line lookup",
|
||||||
|
description: "Returns damage business line codes from car/code-list/dmg-business-line.",
|
||||||
|
})
|
||||||
|
@ApiOkResponse({
|
||||||
|
description: "Returns Fanavaran damage business line lookup data",
|
||||||
|
schema: { type: "array", items: { type: "object" } },
|
||||||
|
})
|
||||||
|
async getDmgBusinessLine() {
|
||||||
|
return await this.lookupsService.getDmgBusinessLine();
|
||||||
|
}
|
||||||
|
|
||||||
@Get("inquiry-by-vin")
|
@Get("inquiry-by-vin")
|
||||||
@ApiOperation({
|
@ApiOperation({
|
||||||
summary: "Fanavaran vehicle inquiry by VIN",
|
summary: "Fanavaran vehicle inquiry by VIN",
|
||||||
|
|||||||
@@ -143,6 +143,14 @@ export class LookupsService {
|
|||||||
return await this.getClientRemoteLookup("dmg-history-status");
|
return await this.getClientRemoteLookup("dmg-history-status");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async getUsedPlace(): Promise<any> {
|
||||||
|
return await this.getClientRemoteLookup("used-place");
|
||||||
|
}
|
||||||
|
|
||||||
|
async getDmgBusinessLine(): Promise<any> {
|
||||||
|
return await this.getClientRemoteLookup("dmg-business-line");
|
||||||
|
}
|
||||||
|
|
||||||
async inquiryByVin(vin: string): Promise<unknown> {
|
async inquiryByVin(vin: string): Promise<unknown> {
|
||||||
const clientKey = this.activeClientKey();
|
const clientKey = this.activeClientKey();
|
||||||
return this.fanavaranLookupService.inquiryByVin(clientKey, vin);
|
return this.fanavaranLookupService.inquiryByVin(clientKey, vin);
|
||||||
|
|||||||
Reference in New Issue
Block a user