report 1-4 เำิม่หมายเหตุแนวนอน

This commit is contained in:
Kittapath 2023-10-08 12:41:53 +07:00
parent 5530c2f9e4
commit 2da120f958
32 changed files with 51300 additions and 13 deletions

View file

@ -260,6 +260,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
Round = x.Round,
Total = x.Total,
TypeReport = x.TypeReport,
SignDate = x.SignDate,
Detail = x.Detail,
Json = true,
Document = x.Document == null ? false : true,
@ -282,6 +283,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
Round = retire.Round,
Total = retire.RetirementProfiles.Count(),
TypeReport = retire.TypeReport,
SignDate = retire.SignDate,
Detail = retire.Detail,
Json = false,
Document = retire.Document == null ? false : true,
@ -439,6 +441,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
RetirementPeriod = retire,
Round = retire.Round,
TypeReport = retire.TypeReport,
SignDate = retire.SignDate,
Detail = retire.Detail,
Year = retire.Year,
Type = retire.Type,
@ -458,6 +461,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
retire.Document = null;
retire.Round = retire.Round + 1;
retire.TypeReport = req.Option.Trim().ToUpper();
retire.SignDate = null;
retire.CreatedUserId = UserId ?? "System Administrator";
retire.CreatedFullName = FullName ?? "";
retire.CreatedAt = DateTime.Now;
@ -597,7 +601,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
};
profile_news.Add(data);
}
return Success(new { retire.Id, retire.CreatedAt, retire.Year, retire.Round, retire.Type, retire.TypeReport, retire.Detail, profile = profile_news });
return Success(new { retire.Id, retire.CreatedAt, retire.Year, retire.Round, retire.Type, retire.TypeReport, retire.SignDate, retire.Detail, profile = profile_news });
}
/// <summary>
@ -632,7 +636,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
var responseTask = client.GetAsync(url);
var results = responseTask.Result;
var filehis = profileHistorys.Document == null ? null : await _documentService.ImagesPath(profileHistorys.Document.Id);
return Success(new { Json = true, profileHistorys.Id, profileHistorys.CreatedAt, profileHistorys.Year, profileHistorys.Round, profileHistorys.Type, profileHistorys.TypeReport, profileHistorys.Detail, profile = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ProfileJsonRequest>>(results.Content.ReadAsStringAsync().Result), File = filehis });
return Success(new { Json = true, profileHistorys.Id, profileHistorys.CreatedAt, profileHistorys.Year, profileHistorys.Round, profileHistorys.Type, profileHistorys.TypeReport, profileHistorys.SignDate, profileHistorys.Detail, profile = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ProfileJsonRequest>>(results.Content.ReadAsStringAsync().Result), File = filehis });
}
}
var profile_new = await _context.RetirementProfiles
@ -692,7 +696,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
}
var file = retire.Document == null ? null : await _documentService.ImagesPath(retire.Document.Id);
return Success(new { Json = false, retire.Id, retire.CreatedAt, retire.Year, retire.Round, retire.Type, retire.TypeReport, retire.Detail, profile = profile_news, File = file });
return Success(new { Json = false, retire.Id, retire.CreatedAt, retire.Year, retire.Round, retire.Type, retire.TypeReport, retire.SignDate, retire.Detail, profile = profile_news, File = file });
}
/// <summary>
@ -919,6 +923,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
var doc = await _documentService.UploadFileAsync(file, file.FileName);
var _doc = await _context.Documents.AsQueryable()
.FirstOrDefaultAsync(x => x.Id == doc.Id);
retire.SignDate = req.signDate;
retire.Document = _doc;
retire.LastUpdateFullName = FullName ?? "System Administrator";
retire.LastUpdateUserId = UserId ?? "";