fix 海康增加数据获取

This commit is contained in:
2024-10-17 17:07:22 +08:00
parent b1347fbe18
commit bd28b24992

View File

@@ -22,9 +22,11 @@ public class GainfoService : IGainfoService
public async Task<List<GainfoOpenResponse>> GetAllGainfosAsync()
{
var factories = new[] { "2401", "301", "302", "303", "304", "305", "306", "307" };
var gainfos = await _dbContext.Queryable<GainfoEntity>()
.LeftJoin<DepartmentEntity>((x, d) => x.DepartmentNo == d.No)
.Where(x => x.Factory == "2401")
.Where(x => factories.Contains(x.Factory))
.Select((x, d) => new GainfoOpenResponse
{
Code = x.Code,
@@ -38,7 +40,7 @@ public class GainfoService : IGainfoService
var gainfoLeaves = await _dbContext.Queryable<GainfoEntity>().AS("GainfoLeave")
.LeftJoin<DepartmentEntity>((x, d) => x.DepartmentNo == d.No)
.Where(x => x.Factory == "2401")
.Where(x => factories.Contains(x.Factory))
.Select((x, d) => new GainfoOpenResponse
{
Code = x.Code,