|
@@ -303,7 +303,11 @@ namespace Hotline.Api.Controllers
|
|
var scheduling = await _schedulingRepository.GetAsync(dto.Id, HttpContext.RequestAborted);
|
|
var scheduling = await _schedulingRepository.GetAsync(dto.Id, HttpContext.RequestAborted);
|
|
if (scheduling is null)
|
|
if (scheduling is null)
|
|
throw UserFriendlyException.SameMessage("无效排班信息");
|
|
throw UserFriendlyException.SameMessage("无效排班信息");
|
|
|
|
+ var shift = await _schedulingShiftRepository.GetAsync(dto.ShiftId, HttpContext.RequestAborted);
|
|
|
|
+ if (shift == null)
|
|
|
|
+ throw UserFriendlyException.SameMessage("传入排班班次信息错误");
|
|
_mapper.Map(dto, scheduling);
|
|
_mapper.Map(dto, scheduling);
|
|
|
|
+ scheduling.ShiftName = shift.Name;
|
|
await _schedulingRepository.UpdateAsync(scheduling, HttpContext.RequestAborted);
|
|
await _schedulingRepository.UpdateAsync(scheduling, HttpContext.RequestAborted);
|
|
}
|
|
}
|
|
|
|
|