fix .
This commit is contained in:
@@ -42,7 +42,7 @@ public class CostUploadJob : BaseJob
|
|||||||
.Distinct()
|
.Distinct()
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
Logger.LogInformation("CostUploadJob消费上传人员:{count}", userCodeAll.Count);
|
Logger.LogInformation("CostUploadJob消费上传人员:{count},统计区间为{s}{e}", userCodeAll.Count, s.ToString("yyyy-MM-dd"), endDayOfMonth.ToString("yyyy-MM-dd"));
|
||||||
|
|
||||||
foreach (var userCodes in userCodeAll.Chunk(100))
|
foreach (var userCodes in userCodeAll.Chunk(100))
|
||||||
{
|
{
|
||||||
@@ -57,13 +57,18 @@ public class CostUploadJob : BaseJob
|
|||||||
.Where(x => !BalanceRecordSourceConstants.IgnoreSources.Contains(x.Source))
|
.Where(x => !BalanceRecordSourceConstants.IgnoreSources.Contains(x.Source))
|
||||||
.SumAsync(x => x.Amount);
|
.SumAsync(x => x.Amount);
|
||||||
|
|
||||||
if (balance == 0)
|
if (balance != 0)
|
||||||
{
|
{
|
||||||
|
dict.Add(userCode, Math.Abs(balance));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!dict.Any())
|
||||||
|
{
|
||||||
|
Logger.LogInformation("CostUploadJob统计人员:{count}", dict.Count);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
dict.Add(userCode, Math.Abs(balance));
|
|
||||||
}
|
|
||||||
var request = new UploadCostRequest
|
var request = new UploadCostRequest
|
||||||
{
|
{
|
||||||
Data = dict.Select(x => new UploadCostItemRequest
|
Data = dict.Select(x => new UploadCostItemRequest
|
||||||
|
|||||||
Reference in New Issue
Block a user