This commit is contained in:
parent
2d0d5eb2b8
commit
de61f55a0d
4 changed files with 80 additions and 88 deletions
|
|
@ -826,58 +826,72 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
return res;
|
||||
}
|
||||
|
||||
public async Task<List<GetSumApproveLeaveByRootDto>> GetSumApproveLeaveByRootAndRange(DateTime startDate, DateTime endDate, string type)
|
||||
public async Task<List<GetSumApproveLeaveByRootDto>> GetSumApproveLeaveByRootAndRange(DateTime startDate, DateTime endDate, string type, string role, string nodeId, int node)
|
||||
{
|
||||
var data = await _dbContext.Set<LeaveRequest>().AsQueryable()
|
||||
.Include(x => x.Type)
|
||||
.Where(x => x.ProfileType == type.Trim().ToUpper())
|
||||
.Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date)
|
||||
.Where(x => x.LeaveStatus == "APPROVE").ToListAsync();
|
||||
var _nodeId = Guid.Parse(nodeId);
|
||||
var data = new List<LeaveRequest>();
|
||||
if (role == "OWNER" || role == "CHILD")
|
||||
{
|
||||
data = await _dbContext.Set<LeaveRequest>().AsQueryable()
|
||||
.Include(x => x.Type)
|
||||
.Where(x => x.ProfileType == type.Trim().ToUpper())
|
||||
.Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date)
|
||||
.Where(x => node == 4 ? x.Child4Id == _nodeId : (node == 3 ? x.Child3Id == _nodeId : (node == 2 ? x.Child2Id == _nodeId : (node == 1 ? x.Child1Id == _nodeId : (node == 0 ? x.RootId == _nodeId : true)))))
|
||||
.Where(x => x.LeaveStatus == "APPROVE").ToListAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
data = await _dbContext.Set<LeaveRequest>().AsQueryable()
|
||||
.Include(x => x.Type)
|
||||
.Where(x => x.ProfileType == type.Trim().ToUpper())
|
||||
.Where(x => x.LeaveStartDate.Date >= startDate.Date && x.LeaveStartDate.Date <= endDate.Date)
|
||||
.Where(x => node == 4 ? x.Child4Id == _nodeId : (node == 3 ? x.Child3Id == _nodeId : (node == 2 ? x.Child2Id == _nodeId : (node == 1 ? x.Child1Id == _nodeId : (node == 0 ? x.RootId == _nodeId : true)))))
|
||||
.Where(x => node == 0 ? x.Child1Id == null : (node == 1 ? x.Child2Id == null : (node == 2 ? x.Child3Id == null : (node == 3 ? x.Child4Id == null : true))))
|
||||
.Where(x => x.LeaveStatus == "APPROVE").ToListAsync();
|
||||
}
|
||||
|
||||
var res = (from d in data
|
||||
group d by new { d.Root, d.Child1, d.Child2, d.Child3, d.Child4, LeaveTypeId = d.Type.Id, LeaveTypeCode = d.Type.Code } into grp
|
||||
group d by new { d.Root, d.Child1, d.Child2, d.Child3, d.Child4 } into grp
|
||||
orderby grp.Key.Root, grp.Key.Child1, grp.Key.Child2, grp.Key.Child3, grp.Key.Child4
|
||||
select new GetSumApproveLeaveByRootDto
|
||||
{
|
||||
Root = grp.Key.Root,
|
||||
LeaveTypeId = grp.Key.LeaveTypeId,
|
||||
LeaveTypeCode = grp.Key.LeaveTypeCode,
|
||||
Root = $"{grp.Key.Root}{(!string.IsNullOrEmpty(grp.Key.Child1) ? "/" + grp.Key.Child1 : "")}{(!string.IsNullOrEmpty(grp.Key.Child2) ? "/" + grp.Key.Child2 : "")}{(!string.IsNullOrEmpty(grp.Key.Child3) ? "/" + grp.Key.Child3 : "")}{(!string.IsNullOrEmpty(grp.Key.Child4) ? "/" + grp.Key.Child4 : "")}",
|
||||
SumLeaveDay = grp.Sum(x => x.LeaveTotal),
|
||||
sickDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-001").Sum(x => x.LeaveTotal),
|
||||
maternityDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-002").Sum(x => x.LeaveTotal),
|
||||
wifeDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-003").Sum(x => x.LeaveTotal),
|
||||
personalDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-004").Sum(x => x.LeaveTotal),
|
||||
restDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-005").Sum(x => x.LeaveTotal),
|
||||
ordainDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-006").Sum(x => x.LeaveTotal),
|
||||
absentDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-007").Sum(x => x.LeaveTotal),
|
||||
studyDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-008").Sum(x => x.LeaveTotal),
|
||||
agencyDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-009").Sum(x => x.LeaveTotal),
|
||||
coupleDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-010").Sum(x => x.LeaveTotal),
|
||||
therapyDayCountMale = grp.Where(x => x.Gender == "ชาย" && x.LeaveTypeCode == "LV-011").Sum(x => x.LeaveTotal),
|
||||
|
||||
sickDayCountMale = grp.Where(x => x.Gender == "ชาย").Sum(x => x.LeaveTotal),
|
||||
maternityDayCountMale = grp.Where(x => x.Gender == "ชาย").Sum(x => x.LeaveTotal),
|
||||
wifeDayCountMale = grp.Where(x => x.Gender == "ชาย").Sum(x => x.LeaveTotal),
|
||||
personalDayCountMale = grp.Where(x => x.Gender == "ชาย").Sum(x => x.LeaveTotal),
|
||||
restDayCountMale = grp.Where(x => x.Gender == "ชาย").Sum(x => x.LeaveTotal),
|
||||
ordainDayCountMale = grp.Where(x => x.Gender == "ชาย").Sum(x => x.LeaveTotal),
|
||||
absentDayCountMale = grp.Where(x => x.Gender == "ชาย").Sum(x => x.LeaveTotal),
|
||||
studyDayCountMale = grp.Where(x => x.Gender == "ชาย").Sum(x => x.LeaveTotal),
|
||||
agencyDayCountMale = grp.Where(x => x.Gender == "ชาย").Sum(x => x.LeaveTotal),
|
||||
coupleDayCountMale = grp.Where(x => x.Gender == "ชาย").Sum(x => x.LeaveTotal),
|
||||
therapyDayCountMale = grp.Where(x => x.Gender == "ชาย").Sum(x => x.LeaveTotal),
|
||||
sickDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-001").Sum(x => x.LeaveTotal),
|
||||
maternityDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-002").Sum(x => x.LeaveTotal),
|
||||
wifeDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-003").Sum(x => x.LeaveTotal),
|
||||
personalDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-004").Sum(x => x.LeaveTotal),
|
||||
restDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-005").Sum(x => x.LeaveTotal),
|
||||
ordainDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-006").Sum(x => x.LeaveTotal),
|
||||
absentDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-007").Sum(x => x.LeaveTotal),
|
||||
studyDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-008").Sum(x => x.LeaveTotal),
|
||||
agencyDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-009").Sum(x => x.LeaveTotal),
|
||||
coupleDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-010").Sum(x => x.LeaveTotal),
|
||||
therapyDayCountFemale = grp.Where(x => x.Gender == "หญิง" && x.LeaveTypeCode == "LV-011").Sum(x => x.LeaveTotal),
|
||||
|
||||
sickDayCountFemale = grp.Where(x => x.Gender == "หญิง").Sum(x => x.LeaveTotal),
|
||||
maternityDayCountFemale = grp.Where(x => x.Gender == "หญิง").Sum(x => x.LeaveTotal),
|
||||
wifeDayCountFemale = grp.Where(x => x.Gender == "หญิง").Sum(x => x.LeaveTotal),
|
||||
personalDayCountFemale = grp.Where(x => x.Gender == "หญิง").Sum(x => x.LeaveTotal),
|
||||
restDayCountFemale = grp.Where(x => x.Gender == "หญิง").Sum(x => x.LeaveTotal),
|
||||
ordainDayCountFemale = grp.Where(x => x.Gender == "หญิง").Sum(x => x.LeaveTotal),
|
||||
absentDayCountFemale = grp.Where(x => x.Gender == "หญิง").Sum(x => x.LeaveTotal),
|
||||
studyDayCountFemale = grp.Where(x => x.Gender == "หญิง").Sum(x => x.LeaveTotal),
|
||||
agencyDayCountFemale = grp.Where(x => x.Gender == "หญิง").Sum(x => x.LeaveTotal),
|
||||
coupleDayCountFemale = grp.Where(x => x.Gender == "หญิง").Sum(x => x.LeaveTotal),
|
||||
therapyDayCountFemale = grp.Where(x => x.Gender == "หญิง").Sum(x => x.LeaveTotal),
|
||||
|
||||
sickDayCountNo = grp.Where(x => x.Gender == "ชาย" && x.Gender == "หญิง").Sum(x => x.LeaveTotal),
|
||||
maternityDayCountNo = grp.Where(x => x.Gender == "ชาย" && x.Gender == "หญิง").Sum(x => x.LeaveTotal),
|
||||
wifeDayCountNo = grp.Where(x => x.Gender == "ชาย" && x.Gender == "หญิง").Sum(x => x.LeaveTotal),
|
||||
personalDayCountNo = grp.Where(x => x.Gender == "ชาย" && x.Gender == "หญิง").Sum(x => x.LeaveTotal),
|
||||
restDayCountNo = grp.Where(x => x.Gender == "ชาย" && x.Gender == "หญิง").Sum(x => x.LeaveTotal),
|
||||
ordainDayCountNo = grp.Where(x => x.Gender == "ชาย" && x.Gender == "หญิง").Sum(x => x.LeaveTotal),
|
||||
absentDayCountNo = grp.Where(x => x.Gender == "ชาย" && x.Gender == "หญิง").Sum(x => x.LeaveTotal),
|
||||
studyDayCountNo = grp.Where(x => x.Gender == "ชาย" && x.Gender == "หญิง").Sum(x => x.LeaveTotal),
|
||||
agencyDayCountNo = grp.Where(x => x.Gender == "ชาย" && x.Gender == "หญิง").Sum(x => x.LeaveTotal),
|
||||
coupleDayCountNo = grp.Where(x => x.Gender == "ชาย" && x.Gender == "หญิง").Sum(x => x.LeaveTotal),
|
||||
therapyDayCountNo = grp.Where(x => x.Gender == "ชาย" && x.Gender == "หญิง").Sum(x => x.LeaveTotal),
|
||||
sickDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-001").Sum(x => x.LeaveTotal),
|
||||
maternityDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-002").Sum(x => x.LeaveTotal),
|
||||
wifeDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-003").Sum(x => x.LeaveTotal),
|
||||
personalDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-004").Sum(x => x.LeaveTotal),
|
||||
restDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-005").Sum(x => x.LeaveTotal),
|
||||
ordainDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-006").Sum(x => x.LeaveTotal),
|
||||
absentDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-007").Sum(x => x.LeaveTotal),
|
||||
studyDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-008").Sum(x => x.LeaveTotal),
|
||||
agencyDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-009").Sum(x => x.LeaveTotal),
|
||||
coupleDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-010").Sum(x => x.LeaveTotal),
|
||||
therapyDayCountNo = grp.Where(x => x.Gender != "ชาย" && x.Gender != "หญิง" && x.LeaveTypeCode == "LV-011").Sum(x => x.LeaveTotal),
|
||||
})
|
||||
.ToList();
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,6 @@
|
|||
{
|
||||
public string Root { get; set; } = string.Empty;
|
||||
|
||||
public Guid LeaveTypeId { get; set; }
|
||||
|
||||
public string LeaveTypeCode { get; set; } = string.Empty;
|
||||
|
||||
public double SumLeaveDay { get; set; }
|
||||
|
||||
public double sickDayCountMale { get; set; }
|
||||
|
|
|
|||
|
|
@ -848,14 +848,11 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
var emp = new
|
||||
{
|
||||
no = count,
|
||||
fullName = $"{p.Prefix}{p.FirstName} {p.LastName}",// _userProfileRepository.GetUserFullName(p.Keycloak ?? Guid.Empty, AccessToken),
|
||||
fullName = $"{p.Prefix}{p.FirstName} {p.LastName}",
|
||||
position = p.Position == null ? "" : p.Position,
|
||||
//positionLevel = p.PosLevel == null ? "" : p.PosLevel,
|
||||
//posNo = p.ProfileSalary == null ? "" : p.ProfileSalary.PosNo,
|
||||
positionLevel = p.PositionLevel == null ? "" : p.PositionLevel,
|
||||
posNo = p.PosNo == null ? "" : p.PosNo,
|
||||
reason = "",
|
||||
|
||||
sickDayCount = sickDayCount,
|
||||
maternityDayCount = maternityDayCount,
|
||||
wifeDayCount = wifeDayCount,
|
||||
|
|
@ -887,33 +884,31 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
count++;
|
||||
}
|
||||
|
||||
var text = "";
|
||||
var leaveTitleType = "";
|
||||
if (req.Type.Trim().ToUpper() == "FULL")
|
||||
{
|
||||
text = "หนึ่งปี";
|
||||
leaveTitleType = "หนึ่งปี";
|
||||
}
|
||||
else if (req.Type.Trim().ToUpper() == "HAFT")
|
||||
{
|
||||
text = "ครึ่งปี";
|
||||
leaveTitleType = "ครึ่งปี";
|
||||
}
|
||||
else if (req.Type.Trim().ToUpper() == "MONTH")
|
||||
{
|
||||
text = "หนึ่งเดือน";
|
||||
leaveTitleType = "หนึ่งเดือน";
|
||||
}
|
||||
var enddate = req.EndDate.Date == req.StartDate.Date ? "" : $" - {req.EndDate.Date.ToThaiShortDate().ToThaiNumber()}";
|
||||
var result = new
|
||||
{
|
||||
template = "LeaveHalfYear-Officer",
|
||||
reportName = "LeaveHalfYear-Officer",
|
||||
template = "LeaveYear-Officer",
|
||||
reportName = "LeaveYear-Officer",
|
||||
data = new
|
||||
{
|
||||
leaveDateStart = req.StartDate.Date.ToThaiShortDate().ToThaiNumber(),
|
||||
leaveDateEnd = req.EndDate.Date.ToThaiShortDate().ToThaiNumber(),
|
||||
dateTimeStamp = $"ณ วันที่ {req.StartDate.Date.ToThaiShortDate().ToThaiNumber()}{enddate}",
|
||||
dateTimeStamp = $"วันที่ {req.StartDate.Date.ToThaiShortDate().ToThaiNumber()}{enddate}",
|
||||
organizationName = profile?.FirstOrDefault()?.Oc ?? "",
|
||||
employees = employees,
|
||||
headerText = type.Trim().ToUpper() == "OFFICER" ? "ข้าราชการสามัญ" : "ลูกจ้างประจำ",
|
||||
text = text
|
||||
leaveTitleType = leaveTitleType,
|
||||
employees = employees,
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -980,27 +975,22 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
var studyTotal = 0;
|
||||
var workTotal = 0;
|
||||
var seminarTotal = 0;
|
||||
|
||||
|
||||
foreach (var dd in dateList)
|
||||
{
|
||||
foreach (var p in profile)
|
||||
{
|
||||
|
||||
var keycloakUserId = p.Keycloak ?? Guid.Empty;
|
||||
|
||||
var timeStamps = await _processUserTimeStampRepository.GetTimestampByDateAsync(keycloakUserId, dd);
|
||||
|
||||
var fullName = $"{p.Prefix}{p.FirstName} {p.LastName}"; // _userProfileRepository.GetUserFullName(keycloakUserId, AccessToken);
|
||||
|
||||
|
||||
var defaultRound = await _dutyTimeRepository.GetDefaultAsync();
|
||||
if (defaultRound == null)
|
||||
{
|
||||
return Error("ไม่พบรอบการลงเวลา Default", StatusCodes.Status404NotFound);
|
||||
}
|
||||
|
||||
//var userRound = await _dutyTimeRepository.GetByIdAsync(profile.DutyTimeId ?? Guid.Empty);
|
||||
var effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(p.Id);
|
||||
var roundId = effectiveDate != null ? effectiveDate.DutyTimeId : Guid.Empty;
|
||||
var userRound = await _dutyTimeRepository.GetByIdAsync(roundId);
|
||||
|
|
@ -1067,7 +1057,6 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
else
|
||||
remarkStr = "";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1078,15 +1067,12 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
dutyTimeName = $"{duty.StartTimeMorning} - {duty.EndTimeAfternoon} น.",
|
||||
checkInLocation = timeStamps == null ? "" : timeStamps.CheckInPOI,
|
||||
checkInTime = timeStamps == null ? "" : $"{timeStamps.CheckIn.ToString("HH:mm")} น.",
|
||||
|
||||
checkOutLocation = timeStamps == null ? "" : timeStamps.CheckOutPOI ?? "",
|
||||
checkOutTime = timeStamps == null ? "" :
|
||||
timeStamps.CheckOut != null ?
|
||||
$"{timeStamps.CheckOut.Value.ToString("HH:mm")} น." :
|
||||
"",
|
||||
//remark = timeStamps == null ? "ขาดราชการ" : "",
|
||||
remark = remarkStr,
|
||||
|
||||
checkInDate = timeStamps == null ? dd.Date.ToThaiFullDate2().ToThaiNumber() : timeStamps.CheckIn.Date.ToThaiFullDate2().ToThaiNumber(),
|
||||
checkedOutDate = timeStamps == null ? dd.Date.ToThaiFullDate2().ToThaiNumber() :
|
||||
timeStamps.CheckOut != null ?
|
||||
|
|
@ -1106,7 +1092,6 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if (leaveReq != null)
|
||||
{
|
||||
switch (leaveReq.Type.Code.ToUpper())
|
||||
|
|
@ -1122,20 +1107,18 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
studyTotal += 1;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
employees.Add(emp);
|
||||
count++;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var enddate = req.EndDate.Date == req.StartDate.Date ? "" : $" - {req.EndDate.Date.ToThaiShortDate().ToThaiNumber()}";
|
||||
var item = new
|
||||
{
|
||||
dateTimeStamp = $"ณ วันที่ {req.StartDate.Date.ToThaiShortDate().ToThaiNumber()}{enddate}",
|
||||
organizationName = profile?.FirstOrDefault()?.Oc ?? "",
|
||||
officerTotal = profile.Count,
|
||||
workTotal = workTotal,
|
||||
restTotal = restTotal,
|
||||
|
|
@ -1149,9 +1132,9 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
|
||||
var result = new
|
||||
{
|
||||
template = "TimeStamp-Day",
|
||||
reportName = "TimeStamp-Day",
|
||||
data = item
|
||||
template = "TimeStamp",
|
||||
reportName = "TimeStamp",
|
||||
data = item,
|
||||
};
|
||||
|
||||
return Success(result);
|
||||
|
|
@ -1232,14 +1215,14 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
var item = new
|
||||
{
|
||||
dateTimeStamp = $"ณ วันที่ {req.StartDate.Date.ToThaiShortDate().ToThaiNumber()}{enddate}",
|
||||
// officerTotal = profile.Count,
|
||||
organizationName = _userProfileRepository.GetOc(Guid.Parse(req.nodeId), req.node, AccessToken)?.Root ?? "",
|
||||
employees = employees
|
||||
};
|
||||
|
||||
var result = new
|
||||
{
|
||||
template = "TimeStamp-Day",
|
||||
reportName = "TimeStamp-Day",
|
||||
template = "late",
|
||||
reportName = "late",
|
||||
data = item
|
||||
};
|
||||
|
||||
|
|
@ -1273,13 +1256,12 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
{
|
||||
return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden);
|
||||
}
|
||||
Console.WriteLine(jsonData["result"]);
|
||||
var leaveDays = await _leaveRequestRepository.GetSumApproveLeaveByRootAndRange(req.StartDate, req.EndDate, type);
|
||||
var leaveDays = await _leaveRequestRepository.GetSumApproveLeaveByRootAndRange(req.StartDate, req.EndDate, type, jsonData["result"]?.ToString(), req.nodeId, req.node);
|
||||
var enddate = req.EndDate.Date == req.StartDate.Date ? "" : $" - {req.EndDate.Date.ToThaiShortDate().ToThaiNumber()}";
|
||||
var result = new
|
||||
{
|
||||
template = "LeaveHalfYear-Officer",
|
||||
reportName = "LeaveHalfYear-Officer",
|
||||
template = "leave2",
|
||||
reportName = "leave2",
|
||||
data = new
|
||||
{
|
||||
dateTimeStamp = $"ณ วันที่ {req.StartDate.Date.ToThaiShortDate().ToThaiNumber()}{enddate}",
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ namespace BMA.EHR.Leave.Service.DTOs.Reports
|
|||
public DateTime StartDate { get; set; } = DateTime.MinValue;
|
||||
public DateTime EndDate { get; set; } = DateTime.MinValue;
|
||||
public string? Type { get; set; } = string.Empty;
|
||||
public int? node { get; set; }
|
||||
public string? nodeId { get; set; } = string.Empty;
|
||||
public int node { get; set; }
|
||||
public string nodeId { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue