fix 过滤
This commit is contained in:
@@ -25,6 +25,7 @@ public class DevicePermissionManuallyService : IDevicePermissionManuallyService
|
||||
return await _dbContext.Queryable<DevicePermissionManuallyEntity>()
|
||||
.LeftJoin<DeviceEntity>((x, d) => x.DeviceCode == d.Code)
|
||||
.LeftJoin<GainfoEntity>((x, d, g) => x.UserNo == g.No)
|
||||
.WhereIF(requestDto.Search.IsPresent(), (x, d, g) => g.Code == requestDto.Search || g.Name.Contains(requestDto.Search))
|
||||
.Select((x, d, g) => new DevicePermissionManuallyResponse
|
||||
{
|
||||
Id = x.Id,
|
||||
|
||||
@@ -6,6 +6,7 @@ using Dlhis.Entity.Basic.Entity;
|
||||
using Dlhis.Entity.Basic.Enums;
|
||||
using Dlhis.Entity.Common.Enums;
|
||||
using Dlhis.Entity.Device.Entities;
|
||||
using Dlhis.Entity.Device.Enums;
|
||||
using Dlhis.Jip.Api;
|
||||
using Dlhis.Jip.Api.Requests;
|
||||
using Kurisu.AspNetCore.Authentication.Abstractions;
|
||||
@@ -177,6 +178,7 @@ public class WorkGridScheduleService : IWorkGridScheduleService
|
||||
.WhereIF(request.UserCode.IsPresent(), log => log.UserUniqueNo == request.UserCode)
|
||||
.WhereIF(request.UserCode.IsEmpty(), log => SqlFunc.Subqueryable<WorkGridUserEntity>().Where(p => p.WorkGridCode == workGrid.Code && p.UserCode == log.UserUniqueNo).Any())
|
||||
.Where(log => log.WorkGridInfo.StartsWith(filterString))
|
||||
.Where((log, d) => d.Type == DeviceTypeEnumType.Attendance || (d.Type == DeviceTypeEnumType.Door && d.AsAttendance))
|
||||
.OrderBy(log => log.RaiseDateTime)
|
||||
.Select((log, d, ga) => new WorkGridScheduleAttendancePageResponse
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user