Browse Source

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

lcl 11 tháng trước cách đây
mục cha
commit
09f4ab56a5
1 tập tin đã thay đổi với 17 bổ sung3 xóa
  1. 17 3
      Util/BusinessUtil.cs

+ 17 - 3
Util/BusinessUtil.cs

@@ -181,9 +181,11 @@ namespace MySystem
                 obj.Add("ReturnFlag", int.Parse(subdata["ReturnFlag"].ToString())); //返现标记(0 否 1 是)
                 obj.Add("Kind", 1); //通道(1 直连 2 银联)
                 obj.Add("LeaveAmount", leaveAmount); //剩余返现金额
+                MerchantInfo merchant = new MerchantInfoService().Query(int.Parse(function.CheckInt(subdata["MerchantId"].ToString())));
+                obj.Add("MerchantName", merchant.Name); //门店名称
+
                 List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
                 List<Dictionary<string, object>> dics = new ConsumerProfitService().List(new List<FieldItem>(), " and OrderId=" + int.Parse(subdata["Id"].ToString()) + "", 1, 999);
-
                 foreach (Dictionary<string, object> dic in dics)
                 {
                     Dictionary<string, object> cdata = new Dictionary<string, object>();
@@ -194,9 +196,21 @@ namespace MySystem
                     dataList.Add(cdata);
                 }
                 obj.Add("ProfitTotalAmount", new ConsumerProfitService().Sum("GetMoney", " and OrderId=" + int.Parse(subdata["Id"].ToString()) + "")["GetMoney"]); //分红总金额
-                MerchantInfo merchant = new MerchantInfoService().Query(int.Parse(function.CheckInt(subdata["MerchantId"].ToString())));
-                obj.Add("MerchantName", merchant.Name); //门店名称
                 obj.Add("ProfitList", dataList); //订单分红记录列表
+
+                List<Dictionary<string, object>> dataList2 = new List<Dictionary<string, object>>();
+                List<Dictionary<string, object>> dics2 = new ConsumerProfitService().List(new List<FieldItem>(), " 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", dic["GetMoney"].ToString()); //分红金额
+                    dataList2.Add(cdata);
+                }
+                obj.Add("ProfitTotalAmount2", new ConsumerProfitService().Sum("GetMoney", " and Sort=" + int.Parse(subdata["Id"].ToString()) + "")["GetMoney"]); //分红总金额
+                obj.Add("ProfitList2", dataList2); //订单分红记录列表
             }
             return obj;
         }