บันทึกเงินเดือนของผู้บรรจุ
This commit is contained in:
parent
69bd9c0a68
commit
bb9a0bc73e
6 changed files with 16338 additions and 6 deletions
|
|
@ -1,6 +1,7 @@
|
|||
using BMA.EHR.Application.Repositories;
|
||||
using BMA.EHR.Application.Repositories.Commands;
|
||||
using BMA.EHR.Application.Requests.Commands;
|
||||
using BMA.EHR.Application.Responses;
|
||||
using BMA.EHR.Command.Service.Requests;
|
||||
using BMA.EHR.Command.Service.Responses;
|
||||
using BMA.EHR.Domain.Common;
|
||||
|
|
@ -12,6 +13,7 @@ using Microsoft.AspNetCore.Authorization;
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Swashbuckle.AspNetCore.Annotations;
|
||||
using System.Security.Claims;
|
||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
|
||||
namespace BMA.EHR.Command.Service.Controllers
|
||||
{
|
||||
|
|
@ -2525,6 +2527,15 @@ namespace BMA.EHR.Command.Service.Controllers
|
|||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
foreach (var r in receivers)
|
||||
{
|
||||
var salary = await _repository.GetCommandReceiverSalary(r.PersonalId);
|
||||
r.SalaryAmount = salary.SalaryAmount;
|
||||
r.PositionSalaryAmount = salary.PositionSalaryAmount;
|
||||
r.MonthSalaryAmount = salary.MonthSalaryAmount;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -2587,9 +2598,18 @@ namespace BMA.EHR.Command.Service.Controllers
|
|||
}
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
default:
|
||||
{
|
||||
foreach (var r in receivers)
|
||||
{
|
||||
var salary = await _repository.GetCommandReceiverSalary(r.PersonalId);
|
||||
r.SalaryAmount = salary.SalaryAmount;
|
||||
r.PositionSalaryAmount = salary.PositionSalaryAmount;
|
||||
r.MonthSalaryAmount = salary.MonthSalaryAmount;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return Success(receivers);
|
||||
}
|
||||
catch
|
||||
|
|
@ -3042,8 +3062,25 @@ namespace BMA.EHR.Command.Service.Controllers
|
|||
try
|
||||
{
|
||||
var record = await _repository.GetCommandReceiverAsync(personalId);
|
||||
if (record == null)
|
||||
{
|
||||
throw new Exception(GlobalMessages.DataNotFound);
|
||||
}
|
||||
|
||||
var data = await _repository.GetPlacementSalaryAsync(record!.RefPlacementProfileId!.Value);
|
||||
var data = new PlacementSalaryResponse();
|
||||
|
||||
switch (record.Command.CommandType.CommandCode.ToUpper())
|
||||
{
|
||||
case "C-PM-01":
|
||||
case "C-PM-02":
|
||||
case "C-PM-03":
|
||||
case "C-PM-04":
|
||||
data = await _repository.GetPlacementSalaryAsync(record!.RefPlacementProfileId!.Value);
|
||||
break;
|
||||
default:
|
||||
data = await _repository.GetCommandReceiverSalary(personalId);
|
||||
break;
|
||||
}
|
||||
|
||||
return Success(data);
|
||||
}
|
||||
|
|
@ -3074,9 +3111,18 @@ namespace BMA.EHR.Command.Service.Controllers
|
|||
if (receiver == null)
|
||||
throw new Exception(GlobalMessages.DataNotFound);
|
||||
|
||||
await _repository.UpdatePlacementSalaryAsync(personalId, req);
|
||||
|
||||
return Success();
|
||||
switch (receiver.Command.CommandType.CommandCode.ToUpper())
|
||||
{
|
||||
case "C-PM-01":
|
||||
case "C-PM-02":
|
||||
case "C-PM-03":
|
||||
case "C-PM-04":
|
||||
await _repository.UpdatePlacementSalaryAsync(personalId, req);
|
||||
return Success();
|
||||
default:
|
||||
await _repository.UpdateCommandReceiverSalaryAsync(personalId, req);
|
||||
return Success();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue