fix 设备人员详情
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using Dlhis.Basic.Device.Request;
|
||||
using Dlhis.Basic.Device.Response;
|
||||
using Dlhis.Entity.Basic.Entity;
|
||||
using Dlhis.Entity.Basic.Enums;
|
||||
using Dlhis.Entity.Device.Entities;
|
||||
using Dlhis.Entity.Device.Enums;
|
||||
using Dlhis.Entity.Sys.Entities;
|
||||
@@ -227,8 +228,11 @@ public class DevicePermissionService : IDevicePermissionService
|
||||
|
||||
public async Task<Pagination<DeviceGainfoResponse>> GetGainfoPageByDeviceAsync(DeviceWithGainfoRequest request)
|
||||
{
|
||||
var device = await _dbContext.Queryable<DeviceEntity>().Where(x => x.UniqueNo == request.DeviceUniqueNo).SingleAsync();
|
||||
var device = await _dbContext.Queryable<DeviceEntity>()
|
||||
.Where(x => x.UniqueNo == request.DeviceUniqueNo)
|
||||
.SingleAsync();
|
||||
device.ThrowIfNull("设备不存在");
|
||||
|
||||
var departments = await _dbContext.Queryable<DepartmentEntity>().ToListAsync();
|
||||
|
||||
//当前设备的分组
|
||||
@@ -283,6 +287,7 @@ public class DevicePermissionService : IDevicePermissionService
|
||||
|
||||
var page = await _dbContext.Queryable<GainfoEntity>()
|
||||
.Where(x => ids.Contains(x.Id))
|
||||
.WhereIF(device.Type == DeviceTypeEnumType.Meal, x => x.Type != GainfoUserTypeEnumType.External && x.Type != GainfoUserTypeEnumType.Outsource)
|
||||
.WhereIF(request.Search.IsPresent(), x => x.Code == request.Search || x.Name.Contains(request.Search))
|
||||
.Select<DeviceGainfoResponse>()
|
||||
.ToPageListAsync(request);
|
||||
|
||||
Reference in New Issue
Block a user