Skip to content

Commit

Permalink
Merge pull request #554 from bcgov/yj
Browse files Browse the repository at this point in the history
chore: add lg_id param for the sp call
  • Loading branch information
ychung-mot committed Aug 21, 2024
2 parents aa2bb32 + 9836970 commit 0195d5a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion server/StrDss.Api/Controllers/BizLicensesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ public async Task<ActionResult> GetUploadHistory(long? orgId, int pageSize, int
//[HttpGet("process")]
//public async Task<ActionResult> ProcessUpload()
//{
// // var info = await _bizLicenseService.GetMatchingBusinessLicenseIdAndNo(256, "X567B");
// await _bizLicenseService.ProcessBizLicenseUploadAsync();
// return Ok();
//}
Expand Down
6 changes: 3 additions & 3 deletions server/StrDss.Data/Repositories/BizLicenseRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public interface IBizLicenseRepository
Task<(string?, long?)> GetBizLicenseNoAndLgId(long businessLicenceId);
Task CreateBizLicTempTable();
Task InsertRowToBizLicTempTable(BizLicenseRowUntyped row, long providingOrganizationId);
Task ProcessBizLicTempTable();
Task ProcessBizLicTempTable(long lgId);
Task<(long?, string?)> GetMatchingBusinessLicenseIdAndNo(long orgId, string effectiveBizLicNo);
}

Expand Down Expand Up @@ -150,9 +150,9 @@ INSERT INTO biz_lic_table (
await _dbContext.Database.ExecuteSqlRawAsync(insertSql, parameters.ToArray());
}

public async Task ProcessBizLicTempTable()
public async Task ProcessBizLicTempTable(long lgId)
{
await _dbContext.Database.ExecuteSqlRawAsync("CALL dss_process_biz_lic_table();");
await _dbContext.Database.ExecuteSqlRawAsync($"CALL dss_process_biz_lic_table({lgId});");
}

//public async Task<(long?, string?)> GetMatchingBusinessLicenseIdAndNo(long orgId, string effectiveBizLicNo)
Expand Down
2 changes: 1 addition & 1 deletion server/StrDss.Service/BizLicenseService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public async Task ProcessBizLicenseUploadAsync()

if (errorCount == 0)
{
await _bizLicenseRepo.ProcessBizLicTempTable();
await _bizLicenseRepo.ProcessBizLicTempTable(upload.ProvidingOrganizationId);
_logger.LogInformation($"Success: Finished Business License Upload {upload.UploadDeliveryId} - {upload.ProvidingOrganizationId} - {upload.ProvidingOrganization.OrganizationNm}");
}
else
Expand Down

0 comments on commit 0195d5a

Please sign in to comment.