fix 海康增加数据获取
This commit is contained in:
@@ -22,9 +22,11 @@ public class GainfoService : IGainfoService
|
|||||||
|
|
||||||
public async Task<List<GainfoOpenResponse>> GetAllGainfosAsync()
|
public async Task<List<GainfoOpenResponse>> GetAllGainfosAsync()
|
||||||
{
|
{
|
||||||
|
var factories = new[] { "2401", "301", "302", "303", "304", "305", "306", "307" };
|
||||||
|
|
||||||
var gainfos = await _dbContext.Queryable<GainfoEntity>()
|
var gainfos = await _dbContext.Queryable<GainfoEntity>()
|
||||||
.LeftJoin<DepartmentEntity>((x, d) => x.DepartmentNo == d.No)
|
.LeftJoin<DepartmentEntity>((x, d) => x.DepartmentNo == d.No)
|
||||||
.Where(x => x.Factory == "2401")
|
.Where(x => factories.Contains(x.Factory))
|
||||||
.Select((x, d) => new GainfoOpenResponse
|
.Select((x, d) => new GainfoOpenResponse
|
||||||
{
|
{
|
||||||
Code = x.Code,
|
Code = x.Code,
|
||||||
@@ -38,7 +40,7 @@ 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 => x.Factory == "2401")
|
.Where(x => factories.Contains(x.Factory))
|
||||||
.Select((x, d) => new GainfoOpenResponse
|
.Select((x, d) => new GainfoOpenResponse
|
||||||
{
|
{
|
||||||
Code = x.Code,
|
Code = x.Code,
|
||||||
|
|||||||
Reference in New Issue
Block a user