fix 完整提示
This commit is contained in:
@@ -58,15 +58,24 @@ public class AppointmentService : IAppointmentService
|
|||||||
|
|
||||||
var invalids = new[] { GainfoUserTypeEnumType.Normal, GainfoUserTypeEnumType.SecurityWhite };
|
var invalids = new[] { GainfoUserTypeEnumType.Normal, GainfoUserTypeEnumType.SecurityWhite };
|
||||||
|
|
||||||
var idNos = request.Items.Where(x => x.IsEnterDoorArea).Select(x => x.IdNo).Distinct().ToList();
|
var enterDoorAreaIdNos = request.Items.Where(x => x.IsEnterDoorArea).Select(x => x.IdNo).Distinct().ToList();
|
||||||
var errors = await _dbContext.Queryable<GainfoEntity>()
|
var errors = await _dbContext.Queryable<GainfoEntity>()
|
||||||
.Where(x => idNos.Contains(x.IdNo) || idNos.Contains(x.Code))
|
.Where(x => enterDoorAreaIdNos.Contains(x.IdNo) || enterDoorAreaIdNos.Contains(x.Code))
|
||||||
.Where(x => invalids.Contains(x.Type))
|
.Where(x => invalids.Contains(x.Type))
|
||||||
.Select(x => x.IdNo + x.Name)
|
.Select(x => x.IdNo + x.Name)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
errors.ThrowIfExists($"内部人员无法发起门岗预约({errors.Join(",")})");
|
errors.ThrowIfExists($"内部人员无法发起门岗预约({errors.Join(",")})");
|
||||||
|
|
||||||
|
var idNos = request.Items.Select(x => x.IdNo).Distinct().ToList();
|
||||||
|
var outsources = await _dbContext.Queryable<GainfoEntity>()
|
||||||
|
.Where(x => idNos.Contains(x.IdNo) || idNos.Contains(x.Code))
|
||||||
|
.Where(x => x.Type == GainfoUserTypeEnumType.Outsource)
|
||||||
|
.Select(x => x.IdNo + x.Name)
|
||||||
|
.ToListAsync();
|
||||||
|
|
||||||
|
outsources.ThrowIfExists($"存在外包人员申请,请检查一下人员:{outsources.Join(",")}");
|
||||||
|
|
||||||
foreach (var item in request.Items)
|
foreach (var item in request.Items)
|
||||||
{
|
{
|
||||||
if (item.IsEnterDoorArea && areas.Where(x => x.Type == AppointmentAreaEnumType.Door)
|
if (item.IsEnterDoorArea && areas.Where(x => x.Type == AppointmentAreaEnumType.Door)
|
||||||
|
|||||||
Reference in New Issue
Block a user