fix 增加返回大华人脸柜2401离职人员处理
This commit is contained in:
@@ -51,29 +51,27 @@ public class GainfoService : IGainfoService
|
||||
})
|
||||
.ToListAsync();
|
||||
|
||||
// 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,
|
||||
// DepartmentNo = x.DepartmentNo,
|
||||
// DepartmentName = d.Name,
|
||||
// Name = x.Name,
|
||||
// Gender = x.Gender,
|
||||
// Factory = x.Factory,
|
||||
// Status = GainfoStatusEnumType.Leave,
|
||||
// })
|
||||
// .ToListAsync();
|
||||
//
|
||||
// return gainfos.Concat(gainfoLeaves).ToList();
|
||||
var gainfoLeaves = await _dbContext.Queryable<GainfoEntity>().AS("GainfoLeave")
|
||||
.LeftJoin<DepartmentEntity>((x, d) => x.DepartmentNo == d.No)
|
||||
.Where(x => x.Factory == "2401")
|
||||
.Where(x => SqlFunc.Subqueryable<GainfoEntity>()
|
||||
.Where(p => p.Factory == "2401")
|
||||
.Where(p => p.Code == x.Code)
|
||||
.NotAny()
|
||||
)
|
||||
.Select((x, d) => new GainfoOpenResponse
|
||||
{
|
||||
Code = x.Code,
|
||||
DepartmentNo = x.DepartmentNo,
|
||||
DepartmentName = d.Name,
|
||||
Name = x.Name,
|
||||
Gender = x.Gender,
|
||||
Factory = x.Factory,
|
||||
Status = GainfoStatusEnumType.Leave,
|
||||
})
|
||||
.ToListAsync();
|
||||
|
||||
return gainfos;
|
||||
return gainfos.Concat(gainfoLeaves).ToList();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
Reference in New Issue
Block a user