Merge branch 'development' of https://git.dlhis.com/liguoyang/jinko.yikatong into development
This commit is contained in:
@@ -114,4 +114,9 @@ public class BalanceRecordResponse
|
|||||||
/// 记录产生时间
|
/// 记录产生时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime CostDateTime { get; set; }
|
public DateTime CostDateTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 汇总金额
|
||||||
|
/// </summary>
|
||||||
|
public decimal Sum { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ public class BalanceService : IBalanceService
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
var query = _dbContext.Queryable<BalanceRecordEntity>()
|
var page = await _dbContext.Queryable<BalanceRecordEntity>()
|
||||||
.LeftJoin<GainfoEntity>((record, ga) => record.UserNo == ga.No)
|
.LeftJoin<GainfoEntity>((record, ga) => record.UserNo == ga.No)
|
||||||
.LeftJoin<DepartmentEntity>((record, ga, department) => ga.DepartmentNo == department.No)
|
.LeftJoin<DepartmentEntity>((record, ga, department) => ga.DepartmentNo == department.No)
|
||||||
.LeftJoin<CanteenBusinessPlaceEntity>((record, ga, department, bplace) => record.BusinessPlaceCode == bplace.Code)
|
.LeftJoin<CanteenBusinessPlaceEntity>((record, ga, department, bplace) => record.BusinessPlaceCode == bplace.Code)
|
||||||
@@ -128,12 +128,14 @@ public class BalanceService : IBalanceService
|
|||||||
DepartmentName = department.Name,
|
DepartmentName = department.Name,
|
||||||
BusinessPlaceName = bplace.Name,
|
BusinessPlaceName = bplace.Name,
|
||||||
BusinessShiftName = bshift.Name,
|
BusinessShiftName = bshift.Name,
|
||||||
CostDateTime = record.CreateTime // todo
|
CostDateTime = record.CostDateTime
|
||||||
});
|
}).ToPageListAsync(request);
|
||||||
|
|
||||||
//.ToPageListAsync(request);
|
|
||||||
await Console.Out.WriteLineAsync(query.ToSqlValue());
|
var sum = page.Data.Sum(x => Math.Abs(x.Amount));
|
||||||
return await query.ToPageListAsync(request);
|
page.Data.ForEach(x => x.Sum = sum);
|
||||||
|
|
||||||
|
return page;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<Pagination<BalanceRecordUserResponse>> GetPageByUserAsync(BalanceRecordUserPageRequest request)
|
public async Task<Pagination<BalanceRecordUserResponse>> GetPageByUserAsync(BalanceRecordUserPageRequest request)
|
||||||
|
|||||||
Reference in New Issue
Block a user