Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ public async Task<dynamic> GetSupplierByBusinessNumber(string bn9)
return await supplierService.GetCasSupplierInformationByBn9Async(bn9);
}

public async Task UpdateSupplierByBusinessNumber(string bn9, Guid applicantId)
{
await supplierService.UpdateApplicantSupplierInfoByBn9(bn9, applicantId);
}

[HttpPost("api/app/applicant/{applicantId}/site/{siteId}")]
public async Task DefaultApplicantSite(Guid applicantId, Guid siteId)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ public interface IApplicantSupplierAppService : IApplicationService
Task<dynamic> GetSupplierByNumber(string supplierNumber);
Task<SupplierDto?> GetSupplierByApplicantIdAsync(Guid applicantId);
Task<List<Site>> GetSitesBySupplierIdAsync(Guid supplierId);
Task UpdateSupplierByBusinessNumberAsync(string businessNumber, Guid applicantId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ public async Task<string> ApplicantLookupByBceidBusinesName(string bceidBusiness
});
}

if (applicant.OrgNumber == null)
if (applicant.OrgNumber.IsNullOrEmpty() || applicant.BusinessNumber.IsNullOrEmpty())
{
applicant = await applicantAppService.UpdateApplicantOrgMatchAsync(applicant);
if (applicant?.OrgNumber != null)
if (applicant?.OrgNumber != null && applicant?.BusinessNumber != null)
{
try
{
Expand Down Expand Up @@ -128,12 +128,13 @@ private async Task<string> FormatApplicantJsonAsync(Applicant? applicant)
ApplicantName = applicant.ApplicantName,
UnityApplicantId = applicant.UnityApplicantId,
BcSocietyNumber = bcSocietyNumber,
OrgName = applicant.OrgName,
OrgNumber = applicant.OrgNumber,
BusinessNumber = applicant.BusinessNumber,
Sector = applicant.Sector,
OperatingStartDate = operatingDate,
FiscalYearDay = applicant.FiscalDay.ToString(),
FiscalYearMonth = applicant.FiscalMonth,
BusinessNumber = applicant.BusinessNumber,
RedStop = applicant.RedStop,
IndigenousOrgInd = applicant.IndigenousOrgInd,
PhysicalAddressUnit = applicantPhysicalAgent?.Unit ?? "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ public class ApplicantResult
public string? ApplicantName { get; set; } = string.Empty;
public string? UnityApplicantId { get; set; } = string.Empty;
public string? BcSocietyNumber { get; set; } = string.Empty;
public string? OrgName { get; set; } = string.Empty;
public string? OrgNumber { get; set; } = string.Empty;
public string? BusinessNumber { get; set; } = string.Empty;
public string? Sector { get; set; } = string.Empty;
public string? OperatingStartDate { get; set; } = string.Empty;
public string? FiscalYearDay { get; set; } = string.Empty;
public string? FiscalYearMonth { get; set; } = string.Empty;
public string? BusinessNumber { get; set; } = string.Empty;
public bool? RedStop { get; set; }
public string? IndigenousOrgInd { get; set; } = string.Empty;
public string? PhysicalAddressUnit { get; set; } = string.Empty;
Expand Down