Rollback uploadDocument step resume

This commit is contained in:
SepehrYahyaee
2026-09-16 15:37:27 +03:30
parent ecf69cc332
commit c9e273fc4e
5 changed files with 59 additions and 161 deletions

View File

@@ -3263,6 +3263,7 @@ export class ExpertClaimService {
) {
if (actor.role !== RoleEnum.FIELD_EXPERT) requireActorClientKey(actor);
const claim = await this.claimCaseDbService.findById(claimRequestId);
const blame = await this.blameRequestDbService.findById(claim.blameRequestId);
if (!claim) {
throw new NotFoundException(
@@ -3303,6 +3304,14 @@ export class ExpertClaimService {
);
}
if (reply.carPrice && blame.type !== BlameRequestType.CAR_BODY) {
throw new ForbiddenException("قیمت روز خودرو فقط در پرونده های بدنه باید بررسی شود")
}
if (blame.type === BlameRequestType.THIRD_PARTY && reply.carPrice) {
throw new ForbiddenException("قیمت روز خودرو فقط در پرونده های بدنه باید بررسی شود")
}
const pricingValidationError = getExpertReplyPricingValidationError(
reply.parts,
{ locale: "fa", enforceAmountBounds: true },
@@ -3531,6 +3540,7 @@ export class ExpertClaimService {
"evaluation.ownerInsurerApproval": "",
"evaluation.ownerPricedPartsApproval": "",
},
"vehicle.price": reply.carPrice,
"workflow.currentStep": currentStep,
"workflow.nextStep": nextWorkflowStep,
[`evaluation.${replyField}`]: replyPayload,