Selaa lähdekoodia

经营数据-交易详情,返现列表增加发给其他消费者的返现列表

lcl 10 kuukautta sitten
vanhempi
commit
f9b74e5dfd
1 muutettua tiedostoa jossa 16 lisäystä ja 1 poistoa
  1. 16 1
      Util/Business/BusinessUtil.cs

+ 16 - 1
Util/Business/BusinessUtil.cs

@@ -183,6 +183,7 @@ namespace MySystem
                 obj.Add("Kind", 2); //通道(1 直连 2 银联)
                 obj.Add("LeaveAmount", leaveAmount); //剩余返现金额
                 obj.Add("MerchantName", MerchantInfoService.Query(int.Parse(subdata["MerchantId"].ToString())).Name); //交易门店
+
                 List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
                 List<Dictionary<string, object>> dics = ConsumerProfitService.List(relationData, " and OrderId=" + int.Parse(subdata["Id"].ToString()) + "", 1, 999);
                 foreach (Dictionary<string, object> dic in dics)
@@ -194,8 +195,22 @@ namespace MySystem
                     cdata.Add("ProfitAmount", decimal.Parse(dic["GetMoney"].ToString()).ToString("f2")); //分红金额
                     dataList.Add(cdata);
                 }
-                obj.Add("ProfitTotalAmount", ConsumerProfitService.Sum(" OrderId=" + int.Parse(subdata["Id"].ToString()) + "", "GetMoney").ToString("f2")); //分红总金额
                 obj.Add("ProfitList", dataList); //订单分红记录列表
+                obj.Add("ProfitTotalAmount", ConsumerProfitService.Sum(" OrderId=" + int.Parse(subdata["Id"].ToString()) + "", "GetMoney").ToString("f2")); //分红总金额
+
+                List<Dictionary<string, object>> dataList2 = new List<Dictionary<string, object>>();
+                List<Dictionary<string, object>> dics2 = ConsumerProfitService.List(relationData, " and Sort=" + int.Parse(subdata["Id"].ToString()) + "", 1, 999);
+                foreach (Dictionary<string, object> dic in dics2)
+                {
+                    Dictionary<string, object> cdata = new Dictionary<string, object>();
+                    var CreateDate = DateTime.Parse(dic["CreateDate"].ToString());
+                    var TradeDate = CreateDate.Month + "月" + CreateDate.Day + "日" + " " + CreateDate.ToString("HH:mm");
+                    cdata.Add("ProfitDate", TradeDate); //分红时间
+                    cdata.Add("ProfitAmount", decimal.Parse(dic["GetMoney"].ToString()).ToString("f2")); //分红金额
+                    dataList2.Add(cdata);
+                }
+                obj.Add("ProfitList2", dataList2); //订单分红记录列表
+                obj.Add("ProfitTotalAmount2", ConsumerProfitService.Sum(" Sort=" + int.Parse(subdata["Id"].ToString()) + "", "GetMoney").ToString("f2")); //分红总金额
             }
             return obj;
         }