Merge branch 'develop' into develop-tee

This commit is contained in:
setthawutttty 2023-07-12 16:44:38 +07:00
commit 03d87a6b5e
3 changed files with 21 additions and 9 deletions

View file

@ -113,7 +113,7 @@ namespace BMA.EHR.Placement.Service.Controllers
BmaOfficer = x.IsOfficer,
StatusId = x.PlacementStatus,
Number = x.Number,
Disclaim = x.IsRelief,
Deferment = x.IsRelief,
}).ToListAsync();
var result = new List<dynamic>();
@ -133,7 +133,7 @@ namespace BMA.EHR.Placement.Service.Controllers
BmaOfficer = await _documentService.CheckBmaOfficer(p.IdCard),
p.StatusId,
p.Number,
p.Disclaim,
p.Deferment,
};
result.Add(_data);
}
@ -165,8 +165,8 @@ namespace BMA.EHR.Placement.Service.Controllers
BmaOfficer = x.IsOfficer,
StatusId = x.PlacementStatus,
Number = x.Number,
Disclaim = x.IsRelief,
}).ToListAsync();
Deferment = x.IsRelief,
}).OrderBy(x => x.Number).ToListAsync();
var result = new List<dynamic>();
foreach (var p in data)
@ -185,7 +185,7 @@ namespace BMA.EHR.Placement.Service.Controllers
BmaOfficer = await _documentService.CheckBmaOfficer(p.IdCard),
p.StatusId,
p.Number,
p.Disclaim,
p.Deferment,
};
result.Add(_data);
}
@ -353,7 +353,7 @@ namespace BMA.EHR.Placement.Service.Controllers
}
[HttpPost("pass/deferment"), DisableRequestSizeLimit]
public async Task<ActionResult<ResponseObject>> UpdatePersonDeferment()
public async Task<ActionResult<ResponseObject>> UpdatePersonDeferment([FromForm] PersonDefermentRequest req)
{
var person = await _context.PlacementProfiles.FindAsync(Request.Form.ContainsKey("personalId") ? Guid.Parse(Request.Form["personalId"]) : Guid.Parse("00000000-0000-0000-0000-000000000000"));
if (person == null)
@ -773,7 +773,7 @@ namespace BMA.EHR.Placement.Service.Controllers
var positionPath = await _context.PositionPaths.FirstOrDefaultAsync(x => x.Id == req.PositionPathId);
if (positionPath == null && req.PositionPathId != null)
return Error(GlobalMessages.DataNotFound, 404);
if (req.Id == null)
{
var data = new PlacementEducation
@ -808,7 +808,7 @@ namespace BMA.EHR.Placement.Service.Controllers
if (education == null)
return Error(GlobalMessages.EducationNotFound, 404);
education.EducationLevel = educationLevel;
education.EducationLevel = educationLevel;
education.PositionPath = positionPath;
education.Institute = req.Institute;
education.Degree = req.Degree;

View file

@ -3,9 +3,10 @@ using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Placement.Service.Requests
{
public class PersonDisclaimRequest
public class PersonDefermentRequest
{
public Guid PersonalId { get; set; }
public string Note { get; set; }
public FormFile? File { get; set; }
}
}

View file

@ -0,0 +1,11 @@
using BMA.EHR.Domain.Models.MetaData;
using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Placement.Service.Requests
{
public class PersonDisclaimRequest
{
public Guid PersonalId { get; set; }
public string Note { get; set; }
}
}