แก้ออกคำสั่งวินัย

This commit is contained in:
Kittapath 2024-07-08 20:15:54 +07:00
parent 12733ea779
commit f0b8724698
4 changed files with 174 additions and 172 deletions

View file

@ -471,8 +471,8 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
foreach (var d in req.result)
{
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
.Include(x=>x.DisciplineDisciplinary)
.Where(x => x.Status == "REPORT")
.Include(x => x.DisciplineDisciplinary)
//.Where(x => x.Status == "REPORT")
.Where(x => x.Id == d.id)
.FirstOrDefaultAsync();
if (data != null)
@ -491,7 +491,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
date = d.commandAffectDate,
detail = data.DisciplineDisciplinary.Title,
level = data.DisciplineDisciplinary.DisciplinaryFaultLevel,
refCommandDate = "",
refCommandDate = DateTime.Now,
refCommandNo = $"{d.commandNo}/{d.commandYear}",
unStigma = d.detail,
});
@ -537,7 +537,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
date = d.commandAffectDate,
detail = data.DisciplineDisciplinary.Title,
level = data.DisciplineDisciplinary.DisciplinaryFaultLevel,
refCommandDate = "",
refCommandDate = DateTime.Now,
refCommandNo = $"{d.commandNo}/{d.commandYear}",
unStigma = d.detail,
});
@ -582,7 +582,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
date = d.commandAffectDate,
detail = data1.DisciplineInvestigate.Title,
level = "",
refCommandDate = "",
refCommandDate = DateTime.Now,
refCommandNo = $"{d.commandNo}/{d.commandYear}",
unStigma = d.detail,
});
@ -594,8 +594,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
.Where(x => x.IsReport == "REPORT")
.Where(x => x.Id == d.id)
.FirstOrDefaultAsync();
if (data2 != null) {
data2.IsReport = "NEW";
if (data2 != null)
{
data2.IsReport = "NEW";
var baseAPI = _configuration["API"];
var apiUrlDiscipline = $"{baseAPI}/org/profile/discipline";
using (var client = new HttpClient())
@ -608,7 +609,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
date = d.commandAffectDate,
detail = data2.DisciplineDisciplinary.Title,
level = data2.DisciplineDisciplinary.DisciplinaryFaultLevel,
refCommandDate = "",
refCommandDate = DateTime.Now,
refCommandNo = $"{d.commandNo}/{d.commandYear}",
unStigma = d.detail,
});
@ -638,7 +639,8 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
.Where(x => x.Status == "REPORT")
.Where(x => x.Id == d.id)
.FirstOrDefaultAsync();
if (data != null) {
if (data != null)
{
data.Status = "DONE";
var baseAPI = _configuration["API"];
var apiUrlDiscipline = $"{baseAPI}/org/profile/discipline";
@ -652,7 +654,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
date = d.commandAffectDate,
detail = data.DisciplineDisciplinary.Title,
level = data.DisciplineDisciplinary.DisciplinaryFaultLevel,
refCommandDate = "",
refCommandDate = DateTime.Now,
refCommandNo = $"{d.commandNo}/{d.commandYear}",
unStigma = d.detail,
});