แก้ ไปประชุม/อบรม/สัมมนา/ปฏิบัติงานที่บ้านนอกสถานที่ ให้ startTime เป็น 09:30
This commit is contained in:
parent
9e953cd5d6
commit
2f1cd53493
1 changed files with 16 additions and 8 deletions
|
|
@ -852,14 +852,22 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
ProfileType = profile.ProfileType,
|
ProfileType = profile.ProfileType,
|
||||||
};
|
};
|
||||||
|
|
||||||
var checkInStatus = DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) >
|
var startTime = "";
|
||||||
DateTime.Parse($"{currentDate.ToString("yyyy-MM-dd")} {duty.StartTimeMorning}") ?
|
if (!data.IsLocation && data.LocationName == "ไปประชุม/อบรม/สัมมนา/ปฏิบัติงานที่บ้านนอกสถานที่")
|
||||||
|
{
|
||||||
|
startTime = "09:30";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
startTime = duty.StartTimeMorning;
|
||||||
|
|
||||||
DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) >
|
var checkInStatus = DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) >
|
||||||
DateTime.Parse($"{currentDate.ToString("yyyy-MM-dd")} {duty.EndTimeMorning}") ?
|
DateTime.Parse($"{currentDate.ToString("yyyy-MM-dd")} {startTime}") ?
|
||||||
"ABSENT" :
|
|
||||||
"LATE" :
|
DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) >
|
||||||
"NORMAL";
|
DateTime.Parse($"{currentDate.ToString("yyyy-MM-dd")} {duty.EndTimeMorning}") ?
|
||||||
|
"ABSENT" :
|
||||||
|
"LATE" :
|
||||||
|
"NORMAL";
|
||||||
|
|
||||||
// process - รอทำใน queue
|
// process - รอทำใน queue
|
||||||
var checkin_process = new ProcessUserTimeStamp
|
var checkin_process = new ProcessUserTimeStamp
|
||||||
|
|
@ -1798,7 +1806,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
|
|
||||||
var endTime = DateTime.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")}T{duty.EndTimeAfternoon}:00.0000000+07:00");
|
var endTime = DateTime.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")}T{duty.EndTimeAfternoon}:00.0000000+07:00");
|
||||||
|
|
||||||
var status = lastCheckIn == null ? "ABSENT" : lastCheckIn.CheckIn.Date < DateTime.Now.Date ? "NORMAL" : time < endTime ? "ABSENT" : "NORMAL";
|
var status = lastCheckIn == null ? "ABSENT" : lastCheckIn.CheckIn.Date < DateTime.Now.Date ? "NORMAL" : time < endTime ? "ABSENT" : "NORMAL";
|
||||||
|
|
||||||
return Success(new
|
return Success(new
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue