Skip to content

Commit

Permalink
Merge pull request #604 from bcgov/yj
Browse files Browse the repository at this point in the history
Yj
  • Loading branch information
ychung-mot authored Sep 6, 2024
2 parents b224f41 + 75c2761 commit 6eacb43
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/StrDss.Data/Repositories/BizLicenceRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ public async Task ProcessBizLicTempTable(long lgId)
{
var processStopwatch = Stopwatch.StartNew();

_dbContext.Database.SetCommandTimeout(300);

await _dbContext.Database.ExecuteSqlRawAsync($"CALL dss_process_biz_lic_table({lgId});");

processStopwatch.Stop();
Expand Down
10 changes: 10 additions & 0 deletions server/StrDss.Service/RentalListingService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,16 @@ public async Task<Dictionary<string, List<string>>> UpdateAddressAsync(UpdateLis
if (addressEntity.ContainingOrganizationId != originalOrgId)
{
listingEntity.IsLgTransferred = true;

listingEntity.IsChangedBusinessLicence = false;
listingEntity.EffectiveBusinessLicenceNo = CommonUtils.SanitizeAndUppercaseString(listingEntity.BusinessLicenceNo);
listingEntity.GoverningBusinessLicenceId = null;

if (addressEntity.ContainingOrganizationId != null && listingEntity.EffectiveBusinessLicenceNo.IsNotEmpty())
{
var (bizLicId, _) = await _bizLicenceRepo.GetMatchingBusinessLicenceIdAndNo(addressEntity.ContainingOrganizationId.Value, listingEntity.BusinessLicenceNo);
listingEntity.GoverningBusinessLicenceId = bizLicId;
}
}

listingEntity.IsChangedAddress = true;
Expand Down

0 comments on commit 6eacb43

Please sign in to comment.