add address details
This commit is contained in:
@@ -958,8 +958,10 @@ public class InstitutionContractApplication : IInstitutionContractApplication
|
||||
}
|
||||
OperationResult<PersonalContractingParty> contractingPartyResult = command.ContractingPartyLegalType switch
|
||||
{
|
||||
LegalType.Legal => await CreateLegalContractingPartyEntity(command.LegalParty, command.RepresentativeId),
|
||||
LegalType.Real => await CreateRealContractingPartyEntity(command.RealParty, command.RepresentativeId),
|
||||
LegalType.Legal => await CreateLegalContractingPartyEntity(command.LegalParty, command.RepresentativeId,command.Address,
|
||||
command.City,command.Province),
|
||||
LegalType.Real => await CreateRealContractingPartyEntity(command.RealParty, command.RepresentativeId,command.Address,
|
||||
command.City,command.Province),
|
||||
_ => throw new BadRequestException("نوع طرف قرارداد مشخص نشده است")
|
||||
};
|
||||
|
||||
@@ -1229,7 +1231,7 @@ public class InstitutionContractApplication : IInstitutionContractApplication
|
||||
}
|
||||
|
||||
private async Task<OperationResult<PersonalContractingParty>> CreateLegalContractingPartyEntity(
|
||||
CreateInstitutionContractLegalPartyRequest request, long representativeId)
|
||||
CreateInstitutionContractLegalPartyRequest request, long representativeId,string address,string city,string state)
|
||||
{
|
||||
var opration = new OperationResult<PersonalContractingParty>();
|
||||
|
||||
@@ -1260,8 +1262,8 @@ public class InstitutionContractApplication : IInstitutionContractApplication
|
||||
var legalContractingParty = new PersonalContractingParty("*", request.CompanyName,
|
||||
"*", "*", request.RegisterId, request.NationalId,
|
||||
"حقوقی",
|
||||
request.PhoneNumber, request.PhoneNumber, null, representativeId, representative.FullName,
|
||||
archiveCode, null, null, null, null, request.FName, request.LName, request.Position);
|
||||
request.PhoneNumber, request.PhoneNumber,address, representativeId, representative.FullName,
|
||||
archiveCode, state, city, null, null, request.FName, request.LName, request.Position);
|
||||
|
||||
|
||||
await _contractingPartyRepository.CreateAsync(legalContractingParty);
|
||||
@@ -1271,7 +1273,8 @@ public class InstitutionContractApplication : IInstitutionContractApplication
|
||||
}
|
||||
|
||||
private async Task<OperationResult<PersonalContractingParty>> CreateRealContractingPartyEntity(
|
||||
CreateInstitutionContractRealPartyRequest request, long representativeId)
|
||||
CreateInstitutionContractRealPartyRequest request, long representativeId,string address,
|
||||
string city,string province)
|
||||
{
|
||||
var operation = new OperationResult<PersonalContractingParty>();
|
||||
|
||||
@@ -1299,8 +1302,8 @@ public class InstitutionContractApplication : IInstitutionContractApplication
|
||||
var personalContractingParty = new PersonalContractingParty(request.FName, request.LName,
|
||||
request.NationalCode, request.IdNumber, "*", "*",
|
||||
"حقیقی",
|
||||
request.PhoneNumber, request.PhoneNumber, null, representativeId, representative.FullName, archiveCode,
|
||||
null, null, null, null, null, null);
|
||||
request.PhoneNumber, request.PhoneNumber, address, representativeId, representative.FullName, archiveCode,
|
||||
province, city, null, null, null, null);
|
||||
|
||||
|
||||
await _contractingPartyRepository.CreateAsync(personalContractingParty);
|
||||
|
||||
@@ -153,6 +153,8 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati
|
||||
result.City = contractingParty.City;
|
||||
result.State = contractingParty.State;
|
||||
result.RepresentativeId = contractingParty.RepresentativeId;
|
||||
result.NationalCode = contractingParty.Nationalcode;
|
||||
|
||||
|
||||
return op.Succcedded(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user