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