fix 移除外包的访客控制
This commit is contained in:
@@ -67,14 +67,14 @@ public class AppointmentService : IAppointmentService
|
|||||||
|
|
||||||
errors.ThrowIfExists($"内部人员无法发起门岗预约({errors.Join(",")})");
|
errors.ThrowIfExists($"内部人员无法发起门岗预约({errors.Join(",")})");
|
||||||
|
|
||||||
var idNos = request.Items.Select(x => x.IdNo).Distinct().ToList();
|
//var idNos = request.Items.Select(x => x.IdNo).Distinct().ToList();
|
||||||
var outsources = await _dbContext.Queryable<GainfoEntity>()
|
//var outsources = await _dbContext.Queryable<GainfoEntity>()
|
||||||
.Where(x => idNos.Contains(x.IdNo) || idNos.Contains(x.Code))
|
// .Where(x => idNos.Contains(x.IdNo) || idNos.Contains(x.Code))
|
||||||
.Where(x => x.Type == GainfoUserTypeEnumType.Outsource)
|
// .Where(x => x.Type == GainfoUserTypeEnumType.Outsource)
|
||||||
.Select(x => x.IdNo + x.Name)
|
// .Select(x => x.IdNo + x.Name)
|
||||||
.ToListAsync();
|
// .ToListAsync();
|
||||||
|
|
||||||
outsources.ThrowIfExists($"存在外包人员申请,请检查一下人员:{outsources.Join(",")}");
|
//outsources.ThrowIfExists($"存在外包人员申请,请检查一下人员:{outsources.Join(",")}");
|
||||||
|
|
||||||
foreach (var item in request.Items)
|
foreach (var item in request.Items)
|
||||||
{
|
{
|
||||||
@@ -126,10 +126,10 @@ public class AppointmentService : IAppointmentService
|
|||||||
|
|
||||||
await _dbContext.UpdateAsync(gainfo);
|
await _dbContext.UpdateAsync(gainfo);
|
||||||
}
|
}
|
||||||
else if (gainfo.Type == GainfoUserTypeEnumType.Outsource)
|
//else if (gainfo.Type == GainfoUserTypeEnumType.Outsource)
|
||||||
{
|
//{
|
||||||
throw new UserFriendlyException($"访客类型有误!,请检查{gainfo.Name},{gainfo.IdNo}");
|
// throw new UserFriendlyException($"访客类型有误!,请检查{gainfo.Name},{gainfo.IdNo}");
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
var detail = new VisitorAppointmentDetailEntity
|
var detail = new VisitorAppointmentDetailEntity
|
||||||
|
|||||||
Reference in New Issue
Block a user