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>
|
||||
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<DepartmentEntity>((record, ga, department) => ga.DepartmentNo == department.No)
|
||||
.LeftJoin<CanteenBusinessPlaceEntity>((record, ga, department, bplace) => record.BusinessPlaceCode == bplace.Code)
|
||||
@@ -128,12 +128,14 @@ public class BalanceService : IBalanceService
|
||||
DepartmentName = department.Name,
|
||||
BusinessPlaceName = bplace.Name,
|
||||
BusinessShiftName = bshift.Name,
|
||||
CostDateTime = record.CreateTime // todo
|
||||
});
|
||||
CostDateTime = record.CostDateTime
|
||||
}).ToPageListAsync(request);
|
||||
|
||||
//.ToPageListAsync(request);
|
||||
await Console.Out.WriteLineAsync(query.ToSqlValue());
|
||||
return await query.ToPageListAsync(request);
|
||||
|
||||
var sum = page.Data.Sum(x => Math.Abs(x.Amount));
|
||||
page.Data.ForEach(x => x.Sum = sum);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
public async Task<Pagination<BalanceRecordUserResponse>> GetPageByUserAsync(BalanceRecordUserPageRequest request)
|
||||
|
||||
Reference in New Issue
Block a user