Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPDBT-3371] SP BL missing reference to SWL #1907

Merged
merged 1 commit into from
Nov 28, 2024
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
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