diff --git a/0_Framework/Application/Sms/ISmsService.cs b/0_Framework/Application/Sms/ISmsService.cs index d3915923..cb1fec3f 100644 --- a/0_Framework/Application/Sms/ISmsService.cs +++ b/0_Framework/Application/Sms/ISmsService.cs @@ -27,7 +27,8 @@ public interface ISmsService Task GetCreditAmount(); - public Task SendInstitutionVerificationLink(string number, string fullName, Guid institutionId, long contractingPartyId, long institutionContractId); + public Task SendInstitutionCreationVerificationLink(string number, string fullName, Guid institutionId, long contractingPartyId, long institutionContractId); + public Task SendInstitutionAmendmentVerificationLink(string number, string fullName, Guid institutionId, long contractingPartyId, long institutionContractId); public Task SendInstitutionVerificationCode(string number, string code, string contractingPartyFullName, long contractingPartyId, long institutionContractId); diff --git a/Company.Domain/InstitutionContractAgg/IInstitutionContractRepository.cs b/Company.Domain/InstitutionContractAgg/IInstitutionContractRepository.cs index 3a91fcdf..d4b70e4b 100644 --- a/Company.Domain/InstitutionContractAgg/IInstitutionContractRepository.cs +++ b/Company.Domain/InstitutionContractAgg/IInstitutionContractRepository.cs @@ -6,7 +6,6 @@ using _0_Framework.Application; using _0_Framework.Domain; using CompanyManagment.App.Contracts.InstitutionContract; using CompanyManagment.App.Contracts.Workshop; -using Microsoft.AspNetCore.Mvc; namespace Company.Domain.InstitutionContractAgg; @@ -77,4 +76,5 @@ public interface IInstitutionContractRepository : IRepository> GetInstitutionContractSelectList(string search, string selected); Task> PrintAllAsync(List ids); + Task AmendmentComplete(InstitutionContractAmendmentCompleteRequest request); } \ No newline at end of file diff --git a/Company.Domain/InstitutionContractAgg/InstitutionContract.cs b/Company.Domain/InstitutionContractAgg/InstitutionContract.cs index 2df07cf1..78caa1ce 100644 --- a/Company.Domain/InstitutionContractAgg/InstitutionContract.cs +++ b/Company.Domain/InstitutionContractAgg/InstitutionContract.cs @@ -252,6 +252,11 @@ public class InstitutionContract : EntityBase { WorkshopGroup = null; } + + public void AddAmendment(InstitutionContractAmendment amendment) + { + Amendments.Add(amendment); + } } public class InstitutionContractAmendment : EntityBase @@ -259,14 +264,15 @@ public class InstitutionContractAmendment : EntityBase private InstitutionContractAmendment(){} public InstitutionContractAmendment(long institutionContractId, List installments, double amount, bool hasInstallment, - InstitutionContractAmendmentChange amendmentChange, long lawId) + List amendmentChanges, long lawId) { InstitutionContractId = institutionContractId; Installments = installments is { Count: > 0} ? installments : []; Amount = amount; HasInstallment = hasInstallment; - AmendmentChanges = [amendmentChange]; + AmendmentChanges = amendmentChanges; LawId = lawId; + VerificationStatus = InstitutionContractVerificationStatus.PendingForVerify; } public long InstitutionContractId { get; set; } @@ -280,6 +286,15 @@ public class InstitutionContractAmendment : EntityBase public long LawId { get; set; } + + public string VerifierPhoneNumber { get; private set; } + + public string VerifierFullName { get; private set; } + + public InstitutionContractVerificationStatus VerificationStatus { get; set; } + + public DateTime VerifyCodeCreation { get; set; } + public void SetVerifyCode(string code,string verifierFullName, string verifierPhoneNumber) { VerifyCode = code; @@ -287,25 +302,22 @@ public class InstitutionContractAmendment : EntityBase VerifierFullName = verifierFullName; VerifierPhoneNumber = verifierPhoneNumber; } - - public string VerifierPhoneNumber { get; private set; } - - public string VerifierFullName { get; private set; } - - public DateTime VerifyCodeCreation { get; set; } + public void Verified() + { + VerificationStatus = InstitutionContractVerificationStatus.Verified; + } } public class InstitutionContractAmendmentChange : EntityBase { private InstitutionContractAmendmentChange() { } - private InstitutionContractAmendmentChange(long institutionContractAmendmentId, - InstitutionContractAmendment institutionContractAmendment, InstitutionContractAmendmentChangeType changeType, - DateTime changeDateGr, bool? hasRollCallPlan, bool? hasCustomizeCheckoutPlan, bool? hasContractPlan, + + private InstitutionContractAmendmentChange(InstitutionContractAmendmentChangeType changeType, + DateTime changeDateGr, bool? hasCustomizeCheckoutPlan, bool? hasContractPlan, bool? hasContractPlanInPerson, bool? hasInsurancePlan, bool? hasInsurancePlanInPerson, int? personnelCount, - long? workshopDetailsId) + bool? hasRollCallPlan, bool? hasRollCallInPerson, + long? currentWorkshopId, int personnelCountDifference) { - InstitutionContractAmendmentId = institutionContractAmendmentId; - InstitutionContractAmendment = institutionContractAmendment; ChangeType = changeType; ChangeDateGr = changeDateGr; HasRollCallPlan = hasRollCallPlan; @@ -315,9 +327,80 @@ public class InstitutionContractAmendmentChange : EntityBase HasInsurancePlan = hasInsurancePlan; HasInsurancePlanInPerson = hasInsurancePlanInPerson; PersonnelCount = personnelCount; - WorkshopDetailsId = workshopDetailsId; + PersonnelCountDifference = personnelCountDifference; + CurrentWorkshopId = currentWorkshopId; + HasRollCallInPerson = hasRollCallInPerson; } + /// + /// تغییر تعداد پرسنل + /// + public static InstitutionContractAmendmentChange CreatePersonCountChange( + DateTime changeDateGr, int personnelCount, int personnelCountDifference, + long currentWorkshopId) + { + return new InstitutionContractAmendmentChange( + changeType: InstitutionContractAmendmentChangeType.PersonCount, + changeDateGr: changeDateGr, + hasCustomizeCheckoutPlan: null, + hasContractPlan: null, + hasContractPlanInPerson: null, + hasInsurancePlan: null, + hasInsurancePlanInPerson: null, + personnelCount: personnelCount, + hasRollCallPlan: null, + hasRollCallInPerson: null, + currentWorkshopId: currentWorkshopId, + personnelCountDifference: personnelCountDifference); + } + + /// + /// تغییر خدمات + /// + public static InstitutionContractAmendmentChange CreateServicesChange( + DateTime changeDateGr, long currentWorkshopId, bool hasRollCallPlan, bool hasRollCallInPerson, + bool hasCustomizeCheckoutPlan, bool hasContractPlan, bool hasContractPlanInPerson, + bool hasInsurancePlan, bool hasInsurancePlanInPerson) + { + return new InstitutionContractAmendmentChange( + changeType: InstitutionContractAmendmentChangeType.Services, + changeDateGr: changeDateGr, + hasCustomizeCheckoutPlan: hasCustomizeCheckoutPlan, + hasContractPlan: hasContractPlan, + hasContractPlanInPerson: hasContractPlanInPerson, + hasInsurancePlan: hasInsurancePlan, + hasInsurancePlanInPerson: hasInsurancePlanInPerson, + personnelCount: null, + hasRollCallPlan: hasRollCallPlan, + hasRollCallInPerson: hasRollCallInPerson, + currentWorkshopId: currentWorkshopId, + personnelCountDifference: 0); + } + + /// + /// ایجاد کارگاه جدید + /// + public static InstitutionContractAmendmentChange CreateWorkshopCreatedChange( + DateTime changeDateGr, bool hasRollCallPlan, bool hasRollCallInPerson, + bool hasCustomizeCheckoutPlan, bool hasContractPlan, bool hasContractPlanInPerson, + bool hasInsurancePlan, bool hasInsurancePlanInPerson,int personnelCount) + { + return new InstitutionContractAmendmentChange( + changeType: InstitutionContractAmendmentChangeType.WorkshopCreated, + changeDateGr: changeDateGr, + hasCustomizeCheckoutPlan: hasCustomizeCheckoutPlan, + hasContractPlan: hasContractPlan, + hasContractPlanInPerson: hasContractPlanInPerson, + hasInsurancePlan: hasInsurancePlan, + hasInsurancePlanInPerson: hasInsurancePlanInPerson, + personnelCount: personnelCount, + hasRollCallPlan: hasRollCallPlan, + hasRollCallInPerson: hasRollCallInPerson, + currentWorkshopId: null, + personnelCountDifference: 0); + } + + public long InstitutionContractAmendmentId { get; private set; } public InstitutionContractAmendment InstitutionContractAmendment { get; private set; } public InstitutionContractAmendmentChangeType ChangeType { get; private set; } @@ -328,6 +411,8 @@ public class InstitutionContractAmendmentChange : EntityBase /// public bool? HasRollCallPlan { get; private set; } + public bool? HasRollCallInPerson { get; set; } + /// /// پلن فیش غیر رسمی /// @@ -357,11 +442,17 @@ public class InstitutionContractAmendmentChange : EntityBase /// تعداد پرسنل /// public int? PersonnelCount { get; private set; } + + /// + /// مقدار تغییرات تعداد پرسنل + /// + public int PersonnelCountDifference { get; set; } + /// /// تعداد کارگاه /// - public long? WorkshopDetailsId { get; private set; } + public long? CurrentWorkshopId { get; private set; } } public enum InstitutionContractAmendmentChangeType diff --git a/Company.Domain/InstitutionContractAmendmentTempAgg/InstitutionContractAmendmentTemp.cs b/Company.Domain/InstitutionContractAmendmentTempAgg/InstitutionContractAmendmentTemp.cs index bac4cd56..e3d8a4c9 100644 --- a/Company.Domain/InstitutionContractAmendmentTempAgg/InstitutionContractAmendmentTemp.cs +++ b/Company.Domain/InstitutionContractAmendmentTempAgg/InstitutionContractAmendmentTemp.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using CompanyManagment.App.Contracts.InstitutionContract; using MongoDB.Bson; using MongoDB.Bson.Serialization.Attributes; @@ -25,7 +26,21 @@ public class InstitutionContractAmendmentTemp public Guid Id { get; private set; } public List PrevWorkshops { get; private set; } public List NewWorkshops { get; private set; } + + public InstitutionContractPaymentMonthlyViewModel MonthlyPayment { get; set; } + + public InstitutionContractPaymentOneTimeViewModel OneTimePayment { get; set; } + public long InstitutionContractId { get; private set; } + + public int MonthDifference { get; set; } + public void AddPaymentDetails(InstitutionContractPaymentMonthlyViewModel resMonthly, InstitutionContractPaymentOneTimeViewModel resOneTime, int monthDiff) + { + MonthlyPayment = resMonthly; + OneTimePayment = resOneTime; + MonthDifference = monthDiff; + } + } public class InstitutionContractAmendmentTempNewWorkshop : InstitutionContractAmendmentTempPrevWorkshop diff --git a/CompanyManagment.App.Contracts/InstitutionContract/IInstitutionContractApplication.cs b/CompanyManagment.App.Contracts/InstitutionContract/IInstitutionContractApplication.cs index 816745a6..3aa9a8f5 100644 --- a/CompanyManagment.App.Contracts/InstitutionContract/IInstitutionContractApplication.cs +++ b/CompanyManagment.App.Contracts/InstitutionContract/IInstitutionContractApplication.cs @@ -244,7 +244,7 @@ public interface IInstitutionContractApplication #endregion Task ResendVerifyLink(long institutionContractId); - + Task AmendmentComplete(InstitutionContractAmendmentCompleteRequest request); /// /// دیتای پرینت قرارداد مالی /// @@ -253,6 +253,15 @@ public interface IInstitutionContractApplication Task PrintOneAsync(long id); } +public class InstitutionContractAmendmentCompleteRequest +{ + public Guid TempId { get; set; } + public bool IsInstallment { get; set; } + public long LawId { get; set; } + + +} + public class InstitutionContractPrintViewModel { public InstitutionContratVerificationParty FirstParty { get; set; } diff --git a/CompanyManagment.Application/InstitutionContractApplication.cs b/CompanyManagment.Application/InstitutionContractApplication.cs index bafa7edf..c01e95c2 100644 --- a/CompanyManagment.Application/InstitutionContractApplication.cs +++ b/CompanyManagment.Application/InstitutionContractApplication.cs @@ -1140,7 +1140,7 @@ public class InstitutionContractApplication : IInstitutionContractApplication CreateContractingPartyAccount(contractingParty.id, res.SendId); - await _smsService.SendInstitutionVerificationLink(contractingParty.Phone, contractingPartyFullName, + await _smsService.SendInstitutionCreationVerificationLink(contractingParty.Phone, contractingPartyFullName, entity.PublicId, contractingParty.id,entity.id ); await _institutionContractRepository.SaveChangesAsync(); @@ -1377,7 +1377,7 @@ public class InstitutionContractApplication : IInstitutionContractApplication if (contractingParty == null) throw new NotFoundException("طرف قرارداد یافت نشد"); var contractingPartyFullName = contractingParty.FName + " " + contractingParty.LName; - await _smsService.SendInstitutionVerificationLink(contractingParty.Phone, contractingPartyFullName, + await _smsService.SendInstitutionCreationVerificationLink(contractingParty.Phone, contractingPartyFullName, institutionContract.PublicId, contractingParty.id, institutionContract.id); return new OperationResult().Succcedded(); } @@ -1387,6 +1387,11 @@ public class InstitutionContractApplication : IInstitutionContractApplication return (await _institutionContractRepository.PrintAllAsync([id])).FirstOrDefault(); } + public async Task AmendmentComplete(InstitutionContractAmendmentCompleteRequest request) + { + await _institutionContractRepository.AmendmentComplete(request); + } + private async Task> CreateLegalContractingPartyEntity( CreateInstitutionContractLegalPartyRequest request, long representativeId, string address, string city, diff --git a/CompanyManagment.EFCore/Repository/InstitutionContractRepository.cs b/CompanyManagment.EFCore/Repository/InstitutionContractRepository.cs index 1d0ecd24..753e7674 100644 --- a/CompanyManagment.EFCore/Repository/InstitutionContractRepository.cs +++ b/CompanyManagment.EFCore/Repository/InstitutionContractRepository.cs @@ -29,7 +29,6 @@ using CompanyManagment.App.Contracts.Law; using CompanyManagment.App.Contracts.TemporaryClientRegistration; using CompanyManagment.App.Contracts.Workshop; using CompanyManagment.App.Contracts.WorkshopPlan; -using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; @@ -2342,7 +2341,7 @@ public class InstitutionContractRepository : RepositoryBase x.InstitutionContractId == institutionContractId);; var temp = new InstitutionContractAmendmentTemp(workshops, institutionContractId); @@ -2456,7 +2457,8 @@ public class InstitutionContractRepository : RepositoryBase startDay) monthDiff++; - var sumOneMonth = institutionContractAmendmentTemp.NewWorkshops.Sum(x => x.PriceDifference); + var sumOneMonth = institutionContractAmendmentTemp + .NewWorkshops.Sum(x => x.PriceDifference); var baseAmount = monthDiff * sumOneMonth; var tax = baseAmount*0.10; @@ -2515,6 +2517,13 @@ public class InstitutionContractRepository : RepositoryBase x.Id == institutionContractAmendmentTemp.Id, institutionContractAmendmentTemp); + + + return res; } @@ -2765,6 +2774,120 @@ public class InstitutionContractRepository : RepositoryBasex.Id == request.TempId).FirstOrDefaultAsync(); + + if (amendmentTemp == null) + throw new BadRequestException("دیتای وارد شده نامعتبر است"); + + var institutionContract = await _context.InstitutionContractSet + .Include(x=>x.Amendments) + .Include(x=>x.WorkshopGroup) + .ThenInclude(x=>x.CurrentWorkshops) + .FirstOrDefaultAsync(x => x.id == amendmentTemp.InstitutionContractId); + + + List installments = []; + double amount = 0; + if (request.IsInstallment) + { + installments = amendmentTemp.MonthlyPayment.Installments.Select(x=> + new InstitutionContractInstallment(x.InstalmentDate.ToGeorgianDateTime(), + x.InstallmentAmountStr.MoneyToDouble(), "")).ToList(); + amount = amendmentTemp.MonthlyPayment.PaymentAmount.MoneyToDouble(); + } + else + { + amount = amendmentTemp.OneTimePayment.PaymentAmount.MoneyToDouble(); + } + var newWorkshops = amendmentTemp + .NewWorkshops.Where(x=>x.CurrentWorkshopId ==0).ToList(); + + var newWorkshopTempIds = newWorkshops.Select(x=>x.Id).ToList(); + + var changes = newWorkshops.Select(x=> + InstitutionContractAmendmentChange.CreateWorkshopCreatedChange(DateTime.Now,x.RollCall,x.RollCallInPerson,x.CustomizeCheckout, + x.ContractAndCheckout,x.ContractAndCheckoutInPerson,x.Insurance,x.InsuranceInPerson,x.CountPerson)).ToList(); + + var changedWorkshops = amendmentTemp.NewWorkshops + .Where(x => !newWorkshopTempIds.Contains(x.Id)).ToList(); + + foreach (var changedWorkshop in changedWorkshops) + { + var prev = amendmentTemp.PrevWorkshops.FirstOrDefault(x => x.Id == changedWorkshop.Id); + if (prev == null) + throw new BadRequestException("دیتای وارد شده ناقص ذخیره شده است"); + + // مقایسه مقادیر بولین بین prev و changedWorkshop برای تشخیص تغییرات + var changedBooleans = new Dictionary(); + + if (prev.CustomizeCheckout != changedWorkshop.CustomizeCheckout) + changedBooleans.Add("CustomizeCheckout", (prev.CustomizeCheckout, changedWorkshop.CustomizeCheckout)); + + if (prev.ContractAndCheckout != changedWorkshop.ContractAndCheckout) + changedBooleans.Add("ContractAndCheckout", (prev.ContractAndCheckout, changedWorkshop.ContractAndCheckout)); + + if (prev.ContractAndCheckoutInPerson != changedWorkshop.ContractAndCheckoutInPerson) + changedBooleans.Add("ContractAndCheckoutInPerson", (prev.ContractAndCheckoutInPerson, changedWorkshop.ContractAndCheckoutInPerson)); + + if (prev.Insurance != changedWorkshop.Insurance) + changedBooleans.Add("Insurance", (prev.Insurance, changedWorkshop.Insurance)); + + if (prev.InsuranceInPerson != changedWorkshop.InsuranceInPerson) + changedBooleans.Add("InsuranceInPerson", (prev.InsuranceInPerson, changedWorkshop.InsuranceInPerson)); + + if (prev.RollCall != changedWorkshop.RollCall) + changedBooleans.Add("RollCall", (prev.RollCall, changedWorkshop.RollCall)); + + if (prev.RollCallInPerson != changedWorkshop.RollCallInPerson) + changedBooleans.Add("RollCallInPerson", (prev.RollCallInPerson, changedWorkshop.RollCallInPerson)); + + // اگر تغییری وجود داشته باشد، آن را به لیست تغییرات اضافه کن + if (changedBooleans.Any()) + { + var change = InstitutionContractAmendmentChange.CreateServicesChange( + DateTime.Now, + changedWorkshop.WorkshopId, + changedWorkshop.RollCall, + changedWorkshop.RollCallInPerson, + changedWorkshop.CustomizeCheckout, + changedWorkshop.ContractAndCheckout, + changedWorkshop.ContractAndCheckoutInPerson, + changedWorkshop.Insurance, + changedWorkshop.InsuranceInPerson); + + changes.Add(change); + } + + if (changedWorkshop.CountPerson != prev.CountPerson) + { + var difference = changedWorkshop.CountPerson - prev.CountPerson; + var change = InstitutionContractAmendmentChange.CreatePersonCountChange( + DateTime.Now, + changedWorkshop.CountPerson, + difference,changedWorkshop.WorkshopId); + + changes.Add(change); + } + } + + var amendment = new InstitutionContractAmendment(institutionContract.id,installments,amount, + request.IsInstallment,changes,request.LawId); + institutionContract.AddAmendment(amendment); + + await _smsService.SendInstitutionAmendmentVerificationLink( + institutionContract.VerifierPhoneNumber, + institutionContract.ContractingPartyName, + institutionContract.PublicId, + institutionContract.ContractingPartyId, + institutionContract.id + ); + await _context.SaveChangesAsync(); + + } + private InstitutionContractExtensionPaymentResponse CalculateInPersonPayment( InstitutionContractExtensionPlanDetail selectedPlan, double baseAmount, double tenPercent, diff --git a/CompanyManagment.EFCore/Services/SmsService.cs b/CompanyManagment.EFCore/Services/SmsService.cs index 9815e23a..be8c96cd 100644 --- a/CompanyManagment.EFCore/Services/SmsService.cs +++ b/CompanyManagment.EFCore/Services/SmsService.cs @@ -332,7 +332,7 @@ public class SmsService : ISmsService } } - public async Task SendInstitutionVerificationLink(string number, string fullName, Guid institutionId, long contractingPartyId, long institutionContractId) + public async Task SendInstitutionCreationVerificationLink(string number, string fullName, Guid institutionId, long contractingPartyId, long institutionContractId) { var guidStr=institutionId.ToString(); var firstPart = guidStr.Substring(0, 15); @@ -343,7 +343,26 @@ public class SmsService : ISmsService new("CODE1",firstPart), new("CODE2",secondPart) }); - var smsResult = new SmsResult(verificationSendResult.Data.MessageId, verificationSendResult.Message, "لینک تاییدیه قرارداد مالی", + var smsResult = new SmsResult(verificationSendResult.Data.MessageId, verificationSendResult.Message, "لینک تاییدیه ایجاد قرارداد مالی", + fullName, number, contractingPartyId, institutionContractId); + await _smsResultRepository.CreateAsync(smsResult); + await _smsResultRepository.SaveChangesAsync(); + return verificationSendResult.Status == 0; + } + + public async Task SendInstitutionAmendmentVerificationLink(string number, string fullName, Guid institutionId, + long contractingPartyId, long institutionContractId) + { + var guidStr=institutionId.ToString(); + var firstPart = guidStr.Substring(0, 15); + var secondPart = guidStr.Substring(15); + var verificationSendResult =await SmsIr.VerifySendAsync(number, 527519, new VerifySendParameter[] + { + new("FULLNAME", fullName), + new("CODE1",firstPart), + new("CODE2",secondPart) + }); + var smsResult = new SmsResult(verificationSendResult.Data.MessageId, verificationSendResult.Message, "لینک تاییدیه ارتقا قرارداد مالی", fullName, number, contractingPartyId, institutionContractId); await _smsResultRepository.CreateAsync(smsResult); await _smsResultRepository.SaveChangesAsync(); diff --git a/ServiceHost/Areas/Admin/Controllers/institutionContractController.cs b/ServiceHost/Areas/Admin/Controllers/institutionContractController.cs index a1087f28..c383efec 100644 --- a/ServiceHost/Areas/Admin/Controllers/institutionContractController.cs +++ b/ServiceHost/Areas/Admin/Controllers/institutionContractController.cs @@ -541,18 +541,51 @@ public class institutionContractController : AdminBaseController var res =await _institutionContractApplication.InsertAmendmentTempWorkshops(request); return res; } + [HttpDelete("amendment/remove-temp-workshops/{workshopTempId:guid}")] public async Task RemoveAmendmentWorkshops(Guid workshopTempId) { await _institutionContractApplication.RemoveAmendmentWorkshops(workshopTempId); return Ok(); } + [HttpPost("amendment/payment-details")] public async Task> GetAmendmentPaymentDetails([FromBody]InsitutionContractAmendmentPaymentRequest request) { var res =await _institutionContractApplication.GetAmendmentPaymentDetails(request); return res; } + + [HttpPost("amendment/complete/")] + public async Task AmendmentComplete( + InstitutionContractAmendmentCompleteRequest request) + { + + await _institutionContractApplication.AmendmentComplete(request); + return Ok(); + + } + + /// + /// + /// + /// + /// + [HttpGet("/api/institutionContract/amendment-Verification/{id:guid}")] + [AllowAnonymous] + public async Task> GetAmendmentVerificationDetails(Guid id) + { + return await _institutionContractApplication.GetAmendmentVerificationDetails(id); + } + + [HttpPost("/api/institutionContract/Verify-amendment")] + [AllowAnonymous] + public async Task> VerifyAmendment([FromBody] InstitutionVerificationRequest command) + { + var res = await _institutionContractApplication.AmendmentVerifyOtp(command.Id, command.Code); + return res; + } + [HttpGet("edit-old/{id}")]