fix issue : SIT ระบบบันทึกเวลาปฏิบัติงาน>>ลงเวลาเข้า-ออกงาน (กรณีลงเวลาออกอีกวัน) #921
ระบบลงเวลาต้องมีการเช็คสถานะใน rabbitMQ ด้วยว่ามีการรอรันอยู่ไหม ลงเวลาเข้า/ออกงาน #894
This commit is contained in:
parent
9f0c03921d
commit
cec878cb94
1 changed files with 6 additions and 4 deletions
|
|
@ -538,14 +538,14 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
string taskId = Guid.NewGuid().ToString();
|
||||
var properties = channel.CreateBasicProperties();
|
||||
properties.Persistent = true;
|
||||
properties.MessageId = taskId; // แนบ Message ID เพื่อใช้ตรวจสอบ
|
||||
properties.MessageId = userId.ToString("D");// ระบบลงเวลาต้องมีการเช็คสถานะใน rabbitMQ ด้วยว่ามีการรอรันอยู่ไหม ลงเวลาเข้า/ออกงาน #894
|
||||
|
||||
channel.BasicPublish(exchange: "",
|
||||
routingKey: queue,
|
||||
basicProperties: properties,
|
||||
body: body);
|
||||
|
||||
return Success(new { date = currentDate, taskId = taskId });
|
||||
return Success(new { date = currentDate, taskId = taskId, keycloakId = userId });
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
@ -908,10 +908,12 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
{
|
||||
return Error(new Exception(GlobalMessages.DataNotFound), StatusCodes.Status404NotFound);
|
||||
}
|
||||
|
||||
// fix issue : SIT ระบบบันทึกเวลาปฏิบัติงาน>>ลงเวลาเข้า-ออกงาน (กรณีลงเวลาออกอีกวัน) #921
|
||||
var checkOutStatus = DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) <
|
||||
DateTime.Parse($"{currentDate.ToString("yyyy-MM-dd")} {duty.EndTimeAfternoon}") ?
|
||||
"ABSENT" :
|
||||
// "ABSENT" :
|
||||
checkout.CheckIn.Date < currentDate.Date ? "NORMAL" :
|
||||
"ABSENT" :
|
||||
DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) <
|
||||
DateTime.Parse($"{currentDate.ToString("yyyy-MM-dd")} {duty.EndTimeMorning}") ?
|
||||
"ABSENT" :
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue