fix 获取不到工号问题
This commit is contained in:
@@ -203,12 +203,19 @@ public class AppointmentService : IAppointmentService
|
||||
await GenerateDeviceTasksAsync(detail, true, DeviceTaskEnumType.Delete, $"强制离场:{reason}");
|
||||
await _dbContext.UpdateAsync(detail);
|
||||
|
||||
var appointment = await _dbContext.Queryable<VisitorAppointmentEntity>().Where(x => x.No == detail.No).SingleAsync();
|
||||
await _jinkoApiService.SendWorkMessageAsync(new DingTalkWorkMessageRequest
|
||||
try
|
||||
{
|
||||
WorkCodes = new List<string> { appointment.Code },
|
||||
Content = $"您的访客预约《{appointment.Title}》中的访客{detail.Name}已被强制离场,原因:{reason}。"
|
||||
});
|
||||
var appointment = await _dbContext.Queryable<VisitorAppointmentEntity>().Where(x => x.No == detail.No).SingleAsync();
|
||||
await _jinkoApiService.SendWorkMessageAsync(new DingTalkWorkMessageRequest
|
||||
{
|
||||
WorkCodes = new List<string> { appointment.Code },
|
||||
Content = $"您的访客预约《{appointment.Title}》中的访客{detail.Name}已被强制离场,原因:{reason}。"
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "发送访客离场通知失败:{msg}", ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<Pagination<AppointmentDetailResponse>> GetRecordPageByIdNoAsync(AppointmentIdNoPageRequest request)
|
||||
|
||||
Reference in New Issue
Block a user