|
@@ -8436,7 +8436,6 @@ WHERE
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> CorporateProfitExcelDownload(CorporateProfitExcelDownloadDto dto)
|
|
|
{
|
|
|
-
|
|
|
int portType = dto.PortType,
|
|
|
userId = dto.UserId,
|
|
|
pageId = dto.PageId,
|
|
@@ -8620,11 +8619,11 @@ WHERE
|
|
|
otherTypeIds.AddRange(inforTypeIds);
|
|
|
otherTypeIds.AddRange(competitionTypeIds);
|
|
|
|
|
|
- decimal monthAllIncomes = groupItems.Sum(x => x.ReceivedAmount),
|
|
|
- monthTzIncomes = groupItems.Where(x => groupTypeIds.Contains(x.TeamDid)).Sum(x => x.ReceivedAmount),
|
|
|
- monthHwIncomes = groupItems.Where(x => inforTypeIds.Contains(x.TeamDid)).Sum(x => x.ReceivedAmount),
|
|
|
- monthSsIncomes = groupItems.Where(x => competitionTypeIds.Contains(x.TeamDid)).Sum(x => x.ReceivedAmount),
|
|
|
- monthQtIncomes = groupItems.Where(x => !otherTypeIds.Contains(x.TeamDid)).Sum(x => x.ReceivedAmount),
|
|
|
+ decimal monthAllIncomes = groupItems.Sum(x => x.ReceivableAmount),
|
|
|
+ monthTzIncomes = groupItems.Where(x => groupTypeIds.Contains(x.TeamDid)).Sum(x => x.ReceivableAmount),
|
|
|
+ monthHwIncomes = groupItems.Where(x => inforTypeIds.Contains(x.TeamDid)).Sum(x => x.ReceivableAmount),
|
|
|
+ monthSsIncomes = groupItems.Where(x => competitionTypeIds.Contains(x.TeamDid)).Sum(x => x.ReceivableAmount),
|
|
|
+ monthQtIncomes = groupItems.Where(x => !otherTypeIds.Contains(x.TeamDid)).Sum(x => x.ReceivableAmount),
|
|
|
monthAllCost = groupItems.Sum(x => x.CostTotal),
|
|
|
monthTzCost = groupItems.Where(x => groupTypeIds.Contains(x.TeamDid)).Sum(x => x.CostTotal),
|
|
|
monthHwCost = groupItems.Where(x => inforTypeIds.Contains(x.TeamDid)).Sum(x => x.CostTotal),
|
|
@@ -8635,11 +8634,11 @@ WHERE
|
|
|
monthHwGross = monthHwIncomes - monthHwCost,
|
|
|
monthSsGross = monthSsIncomes - monthSsCost,
|
|
|
monthQtGross = monthQtIncomes - monthQtCost,
|
|
|
- yearAllIncomes = yearGroupItems.Sum(x => x.ReceivedAmount),
|
|
|
- yearTzIncomes = yearGroupItems.Where(x => groupTypeIds.Contains(x.TeamDid)).Sum(x => x.ReceivedAmount),
|
|
|
- yearHwIncomes = yearGroupItems.Where(x => inforTypeIds.Contains(x.TeamDid)).Sum(x => x.ReceivedAmount),
|
|
|
- yearSsIncomes = yearGroupItems.Where(x => competitionTypeIds.Contains(x.TeamDid)).Sum(x => x.ReceivedAmount),
|
|
|
- yearQtIncomes = yearGroupItems.Where(x => !otherTypeIds.Contains(x.TeamDid)).Sum(x => x.ReceivedAmount),
|
|
|
+ yearAllIncomes = yearGroupItems.Sum(x => x.ReceivableAmount),
|
|
|
+ yearTzIncomes = yearGroupItems.Where(x => groupTypeIds.Contains(x.TeamDid)).Sum(x => x.ReceivableAmount),
|
|
|
+ yearHwIncomes = yearGroupItems.Where(x => inforTypeIds.Contains(x.TeamDid)).Sum(x => x.ReceivableAmount),
|
|
|
+ yearSsIncomes = yearGroupItems.Where(x => competitionTypeIds.Contains(x.TeamDid)).Sum(x => x.ReceivableAmount),
|
|
|
+ yearQtIncomes = yearGroupItems.Where(x => !otherTypeIds.Contains(x.TeamDid)).Sum(x => x.ReceivableAmount),
|
|
|
yearAllCost = yearGroupItems.Sum(x => x.CostTotal),
|
|
|
yearTzCost = yearGroupItems.Where(x => groupTypeIds.Contains(x.TeamDid)).Sum(x => x.CostTotal),
|
|
|
yearHwCost = yearGroupItems.Where(x => inforTypeIds.Contains(x.TeamDid)).Sum(x => x.CostTotal),
|