|
@@ -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
|
|
|
{
|