diff --git a/BMA.EHR.Application/Repositories/Reports/CandidateReportRepository.cs b/BMA.EHR.Application/Repositories/Reports/CandidateReportRepository.cs index 71fbf4be..fba0d7ca 100644 --- a/BMA.EHR.Application/Repositories/Reports/CandidateReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Reports/CandidateReportRepository.cs @@ -59,28 +59,28 @@ namespace BMA.EHR.Application.Repositories.Reports var monthDiff = 0; var dayDiff = 0; var sb = new StringBuilder(); - foreach (var career in careers) - { - var rangeObj = career.DurationStart.CalculateBetweenDateV2Value(career.DurationEnd); - yearDiff = yearDiff + rangeObj.years; - monthDiff = monthDiff + rangeObj.months; - dayDiff = dayDiff + rangeObj.days; - if (dayDiff >= 30) - { - monthDiff = monthDiff + (int)(dayDiff / 30); - dayDiff = dayDiff % 30; - } - if (monthDiff >= 12) - { - yearDiff = yearDiff + (int)(monthDiff / 12); - monthDiff = monthDiff % 12; - } - sb.Clear(); - sb.Append(yearDiff == 0 ? "" : $"{yearDiff} ปี "); - sb.Append(monthDiff == 0 ? "" : $"{monthDiff} เดือน "); - sb.Append(dayDiff == 0 ? "" : $"{dayDiff} วัน "); - sb.ToString(); - } + // foreach (var career in careers) + // { + // var rangeObj = career.DurationStart.CalculateBetweenDateV2Value(career.DurationEnd); + // yearDiff = yearDiff + rangeObj.years; + // monthDiff = monthDiff + rangeObj.months; + // dayDiff = dayDiff + rangeObj.days; + // if (dayDiff >= 30) + // { + // monthDiff = monthDiff + (int)(dayDiff / 30); + // dayDiff = dayDiff % 30; + // } + // if (monthDiff >= 12) + // { + // yearDiff = yearDiff + (int)(monthDiff / 12); + // monthDiff = monthDiff % 12; + // } + // sb.Clear(); + // sb.Append(yearDiff == 0 ? "" : $"{yearDiff} ปี "); + // sb.Append(monthDiff == 0 ? "" : $"{monthDiff} เดือน "); + // sb.Append(dayDiff == 0 ? "" : $"{dayDiff} วัน "); + // sb.ToString(); + // } var data = await _dbExamContext.Set().AsQueryable() .Where(x => x.Id == id)