Ver Fonte

添加列表总数

DuGuYang há 1 ano atrás
pai
commit
287ba22180

+ 7 - 4
Areas/Api/Controllers/v1/Main2/MerchantAddInfoController.cs

@@ -425,10 +425,11 @@ namespace MySystem.Areas.Api.Controllers.v1.Main2
         {
             value = PublicFunction.DesDecrypt(value);
             JsonData data = JsonMapper.ToObject(value);
-            List<Dictionary<string, object>> dataList = UnionPaySettlementRecordListDo(value);
-            return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
+            Dictionary<string, object> Other = new Dictionary<string, object>();
+            List<Dictionary<string, object>> dataList = UnionPaySettlementRecordListDo(value, out Other);
+            return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList, Other = Other });
         }
-        private List<Dictionary<string, object>> UnionPaySettlementRecordListDo(string value)
+        private List<Dictionary<string, object>> UnionPaySettlementRecordListDo(string value, out Dictionary<string, object> Other)
         {
             JsonData data = JsonMapper.ToObject(value);
             string MerchantName = data["MerchantName"].ToString(); //商户名称
@@ -456,7 +457,9 @@ namespace MySystem.Areas.Api.Controllers.v1.Main2
                 StartDate = datelist[0];
                 EndDate = datelist[1];
             }
-            var dataList = MySelfUtil.CardInComeRecordList(MerchantId, StartDate, EndDate,SettleStatus, pageSize, pageNum);
+            Other = new Dictionary<string, object>();
+            var dataList = MySelfUtil.CardInComeRecordList(MerchantId, StartDate, EndDate, SettleStatus, pageSize, pageNum, out Other);
+            Other = Other;
             return dataList;
         }
         #endregion

+ 5 - 1
Util/MySelf/MySelfUtil.cs

@@ -18,7 +18,7 @@ namespace MySystem
         /// 到账记录列表
         /// </summary>
         /// <returns></returns>
-        public static List<Dictionary<string, object>> CardInComeRecordList(int MerchantId, string StartDate, string EndDate, string SettleStatus, string pageSize, string pageNum)
+        public static List<Dictionary<string, object>> CardInComeRecordList(int MerchantId, string StartDate, string EndDate, string SettleStatus, string pageSize, string pageNum, out Dictionary<string, object> Other)
         {
             var merchantInfo = MerchantAddInfoService.Query(MerchantId);
             var SubjectType = 0;
@@ -26,10 +26,13 @@ namespace MySystem
             if (merchantInfo.SubjectType == "SUBJECT_TYPE_INDIVIDUAL") SubjectType = 2; //个体工商户
             if (merchantInfo.SubjectType == "SUBJECT_TYPE_SMALL") SubjectType = 3; //小微
             JsonData Info = JsonMapper.ToObject(HaoDaHelper.Instance.CardInComeRecord(merchantInfo.OutMchtNo, StartDate, EndDate, merchantInfo.MchtNo, "", SettleStatus, pageNum, pageSize));
+            Other = new Dictionary<string, object>();
+            int count = 0;
             List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
             if (Info["code"].ToString() == "0")
             {
                 var list = Info["data"]["list"];
+                count = int.Parse(Info["data"]["totalRows"].ToString());
                 for (int i = 0; i < list.Count; i++)
                 {
                     Dictionary<string, object> curData = new Dictionary<string, object>();
@@ -53,6 +56,7 @@ namespace MySystem
                     }
                 }
             }
+            Other.Add("Count", count); //总数
             return dataList;
         }
         #endregion