fix Bug Get Receiver Salary
This commit is contained in:
parent
1afc238993
commit
7edd71e404
2 changed files with 8 additions and 3 deletions
|
|
@ -2421,7 +2421,12 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.FirstOrDefaultAsync(x => x.Id == recordId);
|
||||
|
||||
if (cmdReceiver == null)
|
||||
throw new Exception($"Invalid command receiver: {recordId}");
|
||||
return new PlacementSalaryResponse
|
||||
{
|
||||
SalaryAmount = 0,
|
||||
PositionSalaryAmount = 0,
|
||||
MonthSalaryAmount = 0
|
||||
};
|
||||
|
||||
return new PlacementSalaryResponse
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2643,7 +2643,7 @@ namespace BMA.EHR.Command.Service.Controllers
|
|||
{
|
||||
foreach (var r in receivers)
|
||||
{
|
||||
var salary = await _repository.GetCommandReceiverSalary(r.RefRecordId);
|
||||
var salary = await _repository.GetCommandReceiverSalary(r.PersonalId);
|
||||
r.SalaryAmount = salary.SalaryAmount;
|
||||
r.PositionSalaryAmount = salary.PositionSalaryAmount;
|
||||
r.MonthSalaryAmount = salary.MonthSalaryAmount;
|
||||
|
|
@ -2715,7 +2715,7 @@ namespace BMA.EHR.Command.Service.Controllers
|
|||
{
|
||||
foreach (var r in receivers)
|
||||
{
|
||||
var salary = await _repository.GetCommandReceiverSalary(r.RefRecordId);
|
||||
var salary = await _repository.GetCommandReceiverSalary(r.PersonalId);
|
||||
r.SalaryAmount = salary.SalaryAmount;
|
||||
r.PositionSalaryAmount = salary.PositionSalaryAmount;
|
||||
r.MonthSalaryAmount = salary.MonthSalaryAmount;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue