Merge branch 'Feature/institution-contract/refactor-creation' into Main
This commit is contained in:
@@ -310,6 +310,11 @@ public interface IInstitutionContractApplication
|
||||
Task<OperationResult> CreationComplete(InstitutionContractExtensionCompleteRequest request);
|
||||
}
|
||||
|
||||
public class CreationSetContractingPartyResponse
|
||||
{
|
||||
public long RepresentativeId { get; set; }
|
||||
}
|
||||
|
||||
public class InstitutionContractCreationWorkshopsResponse
|
||||
{
|
||||
public List<WorkshopTempViewModel> WorkshopTemps { get; set; }
|
||||
|
||||
@@ -33,5 +33,5 @@ public class InstitutionContractPaymentOneTimeViewModel
|
||||
}
|
||||
public class InstitutionContractPaymentMonthlyViewModel:InstitutionContractPaymentOneTimeViewModel
|
||||
{
|
||||
public List<MonthlyInstallment> Installments { get; set; }
|
||||
public List<MonthlyInstallment> Installments { get; set; } = [];
|
||||
}
|
||||
@@ -1714,6 +1714,8 @@ public class InstitutionContractApplication : IInstitutionContractApplication
|
||||
return _institutionContractRepository.CreationComplete(request);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private async Task<OperationResult<PersonalContractingParty>> CreateLegalContractingPartyEntity(
|
||||
CreateInstitutionContractLegalPartyRequest request, long representativeId, string address, string city,
|
||||
string state)
|
||||
|
||||
@@ -3673,7 +3673,8 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
|
||||
TotalAmount = baseAmount.ToMoney(),
|
||||
Tax = tax.ToMoney(),
|
||||
PaymentAmount = total.ToMoney()
|
||||
}
|
||||
},
|
||||
Monthly = new(),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -5388,6 +5389,7 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
|
||||
BirthDateFa = apiRespons.IdentificationInformation.BirthDate,
|
||||
};
|
||||
result.LegalParty = null;
|
||||
result.LegalType = LegalType.Real;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5404,6 +5406,7 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
|
||||
PhoneNumber = request.Mobile,
|
||||
};
|
||||
result.RealParty = null;
|
||||
result.LegalType = LegalType.Legal;
|
||||
}
|
||||
|
||||
idNumberSeri = apiRespons.IdentificationInformation.ShenasnameSeri;
|
||||
@@ -5517,6 +5520,7 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
|
||||
|
||||
var creationTemp = await _institutionContractCreationTemp.Find(x => x.Id == request.TempId)
|
||||
.FirstOrDefaultAsync();
|
||||
// creationTemp.SetContractingPartyInfo(request.LegalType,request.RealParty,request.LegalParty);
|
||||
|
||||
if (creationTemp == null)
|
||||
{
|
||||
@@ -5767,9 +5771,9 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
|
||||
else
|
||||
{
|
||||
var monthly = institutionTemp.MonthlyPayment;
|
||||
|
||||
|
||||
institutionTemp.MonthlyPayment.TotalAmountWithoutDiscount = monthly.TotalAmount;
|
||||
|
||||
|
||||
res.Monthly = new()
|
||||
{
|
||||
PaymentAmount = monthly.PaymentAmount,
|
||||
|
||||
@@ -540,7 +540,7 @@ public class institutionContractController : AdminBaseController
|
||||
|
||||
#region Create
|
||||
|
||||
[HttpPost("creation/inquiry/")]
|
||||
[HttpPost("creation/inquiry")]
|
||||
public async Task<ActionResult<InstitutionContractCreationInquiryResult>> CreationInquiry(
|
||||
InstitutionContractCreationInquiryRequest request)
|
||||
{
|
||||
@@ -548,9 +548,8 @@ public class institutionContractController : AdminBaseController
|
||||
return res;
|
||||
}
|
||||
|
||||
[HttpGet("creation/get-representative")]
|
||||
public async Task<ActionResult<InstitutionContractCreationGetRepresentativeIdResponse>> GetRepresentatives(
|
||||
string nationalCode)
|
||||
[HttpPost("creation/set-contracting-party")]
|
||||
public async Task<ActionResult<InstitutionContractCreationGetRepresentativeIdResponse>> GetRepresentatives(string nationalCode)
|
||||
{
|
||||
var res = await _contractingPartyApplication.GetRepresentativeIdByNationalCode(nationalCode);
|
||||
return new InstitutionContractCreationGetRepresentativeIdResponse()
|
||||
|
||||
Reference in New Issue
Block a user