Browse Source

Merge branch 'develop' of http://132.232.92.186:3000/XinXiBu/OA2023 into develop

amigotrip 9 months ago
parent
commit
47cd808e3a

+ 13 - 2
OASystem/OASystem.Api/Controllers/FinancialController.cs

@@ -4551,7 +4551,7 @@ Group by PriceType ", dto.diId);
             var jw = JsonView(false);
             var userId = dto.UserId;
             var user =  _sqlSugar.Queryable<Sys_Users>().First(x=>x.Id == userId);
-            jw.Data = System.Array.Empty<string>();
+            //jw.Data = System.Array.Empty<string>();
 
             if (user == null)
             {
@@ -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
             {

+ 2 - 2
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -3883,8 +3883,8 @@ namespace OASystem.API.Controllers
             {
                 var byts = io.ConvertZipStream(Zips);
                 var path = "\\GroupModelFiles\\" + groupInfo.TeamName;
-                io.ByteToFile(byts, AppSettingsHelper.Get("GrpFileBasePath") + $"{path}\\{key.Name}_.Zip");
-                jw = JsonView(true, "success", new { url = AppSettingsHelper.Get("GrpFileBaseUrl") + $"{AppSettingsHelper.Get("GrpFileFtpPath")}{path}\\{key.Name}_.zip" });
+                io.ByteToFile(byts, AppSettingsHelper.Get("GrpFileBasePath") + $"{path}\\{groupInfo.TeamName}_{key.Name}_.Zip");
+                jw = JsonView(true, "success", new { url = AppSettingsHelper.Get("GrpFileBaseUrl") + $"{AppSettingsHelper.Get("GrpFileFtpPath")}{path}\\{groupInfo.TeamName}_{key.Name}_.Zip" });
             }
             else
             {