ปรับ logic การส่งไฟล์ภาพ #2521
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m53s
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m53s
This commit is contained in:
parent
a16ef7ac55
commit
81dc7f4544
1 changed files with 12 additions and 9 deletions
|
|
@ -597,7 +597,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
LocationName = data.LocationName,
|
||||
Remark = data.Remark,
|
||||
CheckInFileName = data.Img == null ? "no-file" : data.Img.FileName,
|
||||
//CheckInFileBytes = checkFileBytes,
|
||||
CheckInFileBytes = checkFileBytes,
|
||||
Token = AccessToken ?? ""
|
||||
};
|
||||
|
||||
|
|
@ -615,7 +615,16 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
properties.Persistent = true;
|
||||
properties.MessageId = taskId;
|
||||
|
||||
// บันทึกสถานะงานก่อนส่งไป RabbitMQ
|
||||
// ส่งไป RabbitMQ
|
||||
channel.BasicPublish(exchange: "",
|
||||
routingKey: queue,
|
||||
basicProperties: properties,
|
||||
body: body);
|
||||
|
||||
// Clear Byte data Before Save to DB
|
||||
checkData.CheckInFileBytes = new byte[0];
|
||||
|
||||
// บันทึกสถานะงานหลังส่งไป RabbitMQ
|
||||
jobStatus = new CheckInJobStatus
|
||||
{
|
||||
TaskId = Guid.Parse(taskId),
|
||||
|
|
@ -628,12 +637,6 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
};
|
||||
await _checkInJobStatusRepository.AddAsync(jobStatus);
|
||||
|
||||
// ส่งไป RabbitMQ
|
||||
channel.BasicPublish(exchange: "",
|
||||
routingKey: queue,
|
||||
basicProperties: properties,
|
||||
body: body);
|
||||
|
||||
return Success(new { date = currentDate, taskId = taskId, keycloakId = userId });
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue