Browse Source

提成添加总金额

yuanrf 7 months ago
parent
commit
8a64ac5dfe
1 changed files with 12 additions and 1 deletions
  1. 12 1
      OASystem/OASystem.Api/Controllers/FinancialController.cs

+ 12 - 1
OASystem/OASystem.Api/Controllers/FinancialController.cs

@@ -4994,11 +4994,22 @@ Group by PriceType ", dto.diId);
 
             }
 
-            jw.Data = resultArr;
             if (resultArr.Count > 0)
             {
                 jw.Code = 200;
                 jw.Msg = "success!";
+                decimal total = 0;
+                foreach (var item in resultArr)
+                {
+                    var number = item.GetType().GetProperty("price")?.GetValue(item)?.ToString();
+                    total += decimal.TryParse(number,out decimal numberInt) ? numberInt : 0.00M;
+                }
+
+                jw.Data = new
+                {
+                    resultArr,
+                    totalPrice = total,
+                };
             }
             else
             {