fix 获取不到工号问题

This commit is contained in:
2025-12-12 12:23:57 +08:00
parent 151ce72ae7
commit d357882588

View File

@@ -203,6 +203,8 @@ public class AppointmentService : IAppointmentService
await GenerateDeviceTasksAsync(detail, true, DeviceTaskEnumType.Delete, $"强制离场:{reason}");
await _dbContext.UpdateAsync(detail);
try
{
var appointment = await _dbContext.Queryable<VisitorAppointmentEntity>().Where(x => x.No == detail.No).SingleAsync();
await _jinkoApiService.SendWorkMessageAsync(new DingTalkWorkMessageRequest
{
@@ -210,6 +212,11 @@ public class AppointmentService : IAppointmentService
Content = $"您的访客预约《{appointment.Title}》中的访客{detail.Name}已被强制离场,原因:{reason}。"
});
}
catch (Exception ex)
{
_logger.LogError(ex, "发送访客离场通知失败:{msg}", ex.Message);
}
}
public async Task<Pagination<AppointmentDetailResponse>> GetRecordPageByIdNoAsync(AppointmentIdNoPageRequest request)
{