fix 过滤在职人员
This commit is contained in:
@@ -8,6 +8,7 @@ using Kurisu.AspNetCore.CustomClass;
|
||||
using Kurisu.AspNetCore.DataAccess.Dto;
|
||||
using Kurisu.AspNetCore.DataAccess.SqlSugar.Extensions;
|
||||
using Kurisu.AspNetCore.DataAccess.SqlSugar.Services;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Dlhis.External.OpenApi.Services.Implements;
|
||||
|
||||
@@ -42,6 +43,11 @@ public class GainfoService : IGainfoService
|
||||
var gainfoLeaves = await _dbContext.Queryable<GainfoEntity>().AS("GainfoLeave")
|
||||
.LeftJoin<DepartmentEntity>((x, d) => x.DepartmentNo == d.No)
|
||||
.Where(x => factories.Contains(x.Factory))
|
||||
.Where(x => SqlFunc.Subqueryable<GainfoEntity>()
|
||||
.Where(p => factories.Contains(p.Factory))
|
||||
.Where(p => p.Code == x.Code)
|
||||
.NotAny()
|
||||
)
|
||||
.Select((x, d) => new GainfoOpenResponse
|
||||
{
|
||||
Code = x.Code,
|
||||
@@ -74,7 +80,7 @@ public class GainfoService : IGainfoService
|
||||
Status = GainfoStatusEnumType.Working,
|
||||
})
|
||||
.ToListAsync();
|
||||
|
||||
|
||||
return gainfos;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user