fix 过滤在职人员

This commit is contained in:
2025-04-22 10:43:58 +08:00
parent 9ce29ba833
commit 6198e4bb8e

View File

@@ -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,