Skip to content

Commit 6eacb43

Browse files
authored
Merge pull request #604 from bcgov/yj
Yj
2 parents b224f41 + 75c2761 commit 6eacb43

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

server/StrDss.Data/Repositories/BizLicenceRepository.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ public async Task ProcessBizLicTempTable(long lgId)
159159
{
160160
var processStopwatch = Stopwatch.StartNew();
161161

162+
_dbContext.Database.SetCommandTimeout(300);
163+
162164
await _dbContext.Database.ExecuteSqlRawAsync($"CALL dss_process_biz_lic_table({lgId});");
163165

164166
processStopwatch.Stop();

server/StrDss.Service/RentalListingService.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,16 @@ public async Task<Dictionary<string, List<string>>> UpdateAddressAsync(UpdateLis
469469
if (addressEntity.ContainingOrganizationId != originalOrgId)
470470
{
471471
listingEntity.IsLgTransferred = true;
472+
473+
listingEntity.IsChangedBusinessLicence = false;
474+
listingEntity.EffectiveBusinessLicenceNo = CommonUtils.SanitizeAndUppercaseString(listingEntity.BusinessLicenceNo);
475+
listingEntity.GoverningBusinessLicenceId = null;
476+
477+
if (addressEntity.ContainingOrganizationId != null && listingEntity.EffectiveBusinessLicenceNo.IsNotEmpty())
478+
{
479+
var (bizLicId, _) = await _bizLicenceRepo.GetMatchingBusinessLicenceIdAndNo(addressEntity.ContainingOrganizationId.Value, listingEntity.BusinessLicenceNo);
480+
listingEntity.GoverningBusinessLicenceId = bizLicId;
481+
}
472482
}
473483

474484
listingEntity.IsChangedAddress = true;

0 commit comments

Comments
 (0)