|
@@ -1144,6 +1144,9 @@ namespace OASystem.API.Controllers
|
|
|
List<int> diIds = new List<int>();
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
return Ok(JsonView(true));
|
|
|
#endregion
|
|
|
|
|
@@ -1157,7 +1160,6 @@ namespace OASystem.API.Controllers
|
|
|
private async Task< List<CorporateProfit>> CorporateProfit1(List<int> diIds)
|
|
|
{
|
|
|
List < CorporateProfit > corporateProfits = new List<CorporateProfit>();
|
|
|
- string diIdStr = string.Join(",", diIds);
|
|
|
if (diIds.Count < 1)
|
|
|
{
|
|
|
return corporateProfits;
|
|
@@ -1165,6 +1167,12 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
#region 计算团组利润
|
|
|
|
|
|
+
|
|
|
+ string diIdStr = string.Join(",", diIds);
|
|
|
+
|
|
|
+ string sql = string.Format(@$"Select * From Grp_DelegationInfo Where Isdel = 0 And Id In ({diIdStr})");
|
|
|
+ var groupInfos = await _sqlSugar.SqlQueryable<Grp_DelegationInfo>(sql).ToListAsync();
|
|
|
+
|
|
|
#region 费用类型 币种,转账,客户信息
|
|
|
|
|
|
List<Sys_SetData> _setDatas = await _sqlSugar.Queryable<Sys_SetData>().Where(it => it.IsDel == 0).ToListAsync();
|
|
@@ -1177,7 +1185,6 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
List<ExpenditureInfo> expenditureInfos = new List<ExpenditureInfo>();
|
|
|
|
|
|
-
|
|
|
#region 团组收入
|
|
|
|
|
|
/*
|
|
@@ -1495,10 +1502,11 @@ namespace OASystem.API.Controllers
|
|
|
_receivableProfit = _amountReceivable - promTotalAmount - _totalExpenditure;
|
|
|
_receivedProfit = _amountReceived - promTotalAmount - _totalExpenditure;
|
|
|
|
|
|
+ var groupInfo = groupInfos.Find(it => it.Id == _diId);
|
|
|
corporateProfits.Add(new CorporateProfit() {
|
|
|
DiId = _diId,
|
|
|
- TeamName = "",
|
|
|
- CreateDt = "",
|
|
|
+ TeamName = groupInfo?.TeamName ?? "Unkwnon",
|
|
|
+ CreateDt = groupInfo?.CreateTime.ToString("yyyy-MM-dd") ?? "Unkwnon",
|
|
|
TotalExpenditure = _totalExpenditure,
|
|
|
ExpenditureItem = expenditureInfos,
|
|
|
AmountReceivable = _amountReceivable,
|