Skip to content

Commit

Permalink
[SPDBT-3371] SP BL missing reference to SWL (#1907)
Browse files Browse the repository at this point in the history
# Description

This PR includes the following proposed change(s):

- [SPDBT-3371] SP BL missing reference to SWL
  • Loading branch information
peggy-quartech authored Nov 28, 2024
1 parent 77fadf8 commit c17a528
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Spd.Manager.Licence/BizLicAppContract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public abstract record BizLicenceApp : LicenceAppBase
public Guid? SoleProprietorSWLAppId { get; set; } //for swl apply for sole proprietor, they need to input swl app id here.
public ApplicationOriginTypeCode? SoleProprietorSWLAppOriginTypeCode { get; set; }
public Guid? SubmittedByPortalUserId { get; set; }
public Guid? ApplicantSwlLicenceId { get; set; } //for sole proprietor (registered or non-registered)
}

public record NonSwlContactInfo : ContactInfo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,17 @@ public async Task<BizLicApplicationCmdResp> SaveBizLicApplicationAsync(SaveBizLi
else
_context.SetLink(app, nameof(app.spd_CurrentExpiredLicenceId), null);

if (cmd.ApplicantSwlLicenceId != null)
{
var licence = _context.spd_licences.Where(l => l.spd_licenceid == cmd.ApplicantSwlLicenceId).FirstOrDefault();
if (licence != null)
{
_context.SetLink(app, nameof(spd_application.spd_ApplicantSWLNumberId), licence);
}
}
else
_context.SetLink(app, nameof(app.spd_ApplicantSWLNumberId), null);

SharedRepositoryFuncs.LinkSubmittedByPortalUser(_context, cmd.SubmittedByPortalUserId, app);

if (cmd.CategoryCodes.Any(c => c == WorkerCategoryTypeEnum.PrivateInvestigator) &&
Expand Down
4 changes: 2 additions & 2 deletions src/Spd.Resource.Repository/BizLicApplication/Contract.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using MediatR;
using Spd.Resource.Repository.Application;
using Spd.Resource.Repository.Application;
using Spd.Resource.Repository.Biz;
using Spd.Resource.Repository.PersonLicApplication;

Expand Down Expand Up @@ -45,6 +44,7 @@ public record BizLicApplication
public PrivateInvestigatorSwlContactInfo? PrivateInvestigatorSwlInfo { get; set; }
public bool? AgreeToCompleteAndAccurate { get; set; }
public Guid? SubmittedByPortalUserId { get; set; }
public Guid? ApplicantSwlLicenceId { get; set; } //for sole proprietor (registered or non-registered)
}

public record SaveBizLicApplicationCmd() : BizLicApplication
Expand Down

0 comments on commit c17a528

Please sign in to comment.