fix 检测不存在

This commit is contained in:
2024-10-19 14:17:12 +08:00
parent f17fb62a72
commit bcd48ca35c

View File

@@ -58,7 +58,7 @@ public class AppointmentService : IAppointmentService
.Contains(p)) == false)
{
var workplaceAreas = areas.Where(x => x.Type == AppointmentAreaEnumType.Workplace).Select(x => x.CustomCode);
var notExistsAreas = workplaceAreas.Where(x => !item.ApplyWorkplaceAreas.Contains(x));
var notExistsAreas = item.ApplyWorkplaceAreas.Where(x => !workplaceAreas.Contains(x));
throw new UserFriendlyException($"车间区域{notExistsAreas.Join(",")}无效");
}