This commit is contained in:
parent
c6663b35c3
commit
ccb183dc95
11 changed files with 20289 additions and 112 deletions
|
|
@ -366,6 +366,8 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
|
|||
posLevelName = p.posLevelName,
|
||||
|
||||
IsSend = p.IsReport,
|
||||
// DocumentReject = p.DocumentReject,
|
||||
RemarkReject = p.RemarkReject,
|
||||
IsDisciplinary = p.IsDisciplinary,
|
||||
profileType = p.profileType,
|
||||
CreatedAt = p.CreatedAt,
|
||||
|
|
@ -403,6 +405,18 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
|
|||
};
|
||||
disciplineInvestigateRelevantDocs.Add(_doc);
|
||||
}
|
||||
|
||||
// var persons = new List<dynamic>();
|
||||
// foreach (var doc in _data.Persons)
|
||||
// {
|
||||
// var _doc = new
|
||||
// {
|
||||
// doc.Id,
|
||||
// doc.FileName,
|
||||
// PathName = await _documentService.ImagesPath(doc.Id)
|
||||
// };
|
||||
// disciplineInvestigateRelevantDocs.Add(_doc);
|
||||
// }
|
||||
var data = new
|
||||
{
|
||||
_data.Id,
|
||||
|
|
@ -1167,18 +1181,33 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
|
|||
// [HttpPut("report/{commandTypeId:length(36)}")]
|
||||
public async Task<ActionResult<ResponseObject>> PostToReport([FromBody] DisciplineProfileRequest req)
|
||||
{
|
||||
foreach (var item in req.Id)
|
||||
foreach (var item in req.id)
|
||||
{
|
||||
var uppdated = await _context.DisciplineInvestigate_ProfileComplaints
|
||||
.FirstOrDefaultAsync(x => x.Id == item);
|
||||
if (uppdated == null)
|
||||
continue;
|
||||
|
||||
// uppdated.CommandTypeId = commandTypeId;
|
||||
uppdated.IsReport = "REPORT";
|
||||
uppdated.IsReport = "DONE";
|
||||
uppdated.RemarkReject = req.remark;
|
||||
uppdated.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
uppdated.LastUpdateUserId = UserId ?? "";
|
||||
uppdated.LastUpdatedAt = DateTime.Now;
|
||||
|
||||
if (Request.Form.Files != null && Request.Form.Files.Count != 0)
|
||||
{
|
||||
foreach (var file in Request.Form.Files)
|
||||
{
|
||||
var fileExtension = Path.GetExtension(file.FileName);
|
||||
var doc = await _documentService.UploadFileAsync(file, file.FileName);
|
||||
var _doc = await _context.Documents.AsQueryable()
|
||||
.FirstOrDefaultAsync(x => x.Id == doc.Id);
|
||||
if (_doc != null)
|
||||
{
|
||||
uppdated.DocumentReject = _doc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue