fanavaran configs seeding

This commit is contained in:
2026-08-03 09:55:30 +03:30
parent ca5c1900ff
commit f7b7cd13e8
5 changed files with 285 additions and 18 deletions

View File

@@ -299,10 +299,10 @@ export class ClaimRequestManagementService {
private readonly USERNAME = "fanhabUser";
private readonly PASSWORD = "Fan#@2U$3er";
// API headers
// API headers (legacy Tejaratno — prefer getFanavaranClientProfile)
private readonly CORP_ID = "3539";
private readonly CONTRACT_ID = "263";
private readonly LOCATION = "119";
private readonly LOCATION = "100";
private readonly PARSIAN_FANAVARAN_CONFIG = {
appName: "ParsianService",
@@ -314,12 +314,12 @@ export class ClaimRequestManagementService {
location: "210050",
} as const;
/** Tejaratno hardcoded Fanavaran lookup defaults (legacy). */
/** Tejaratno hardcoded Fanavaran lookup defaults (legacy fallback only). */
private readonly TEJARATNO_FANAVARAN_DEFAULTS = {
AccidentCityId: 701,
AccidentReportTypeId: 155,
AccidentVehicleUsedId: 1,
ClaimExpertId: 2709,// before 4543092
ClaimExpertId: 4543092,
CompensationReferenceId: 167,
CulpritLicenceTypeId: 2,
CulpritTypeId: 337,
@@ -4139,7 +4139,7 @@ export class ClaimRequestManagementService {
AccidentCityId: 701,
AccidentReportTypeId: 155,
AccidentVehicleUsedId: 1,
ClaimExpertId: 2709,
ClaimExpertId: 4543092,
CompensationReferenceId: 167,
CulpritLicenceTypeId: 2,
CulpritTypeId: 337,
@@ -5612,6 +5612,9 @@ export class ClaimRequestManagementService {
const profile = getFanavaranClientProfile(input.clientKey);
const active = getActiveV2ExpertReply(input.claimCase as any);
// GEN.08 ClaimExpertId = tenant ExpertiseClaimExpertId (assessor role).
// Tejaratno: 2709. Parsian: 29. Must NOT reuse GEN.03 ClaimExpertId
// (مسئول پرونده مالی — Tejaratno 4543092 / Parsian 154).
const claimExpertId = profile.defaults.ExpertiseClaimExpertId;
const warnings: string[] = [];