DuGuYang 3 年 前
コミット
05827977d6
1 ファイル変更10 行追加10 行削除
  1. 10 10
      Areas/Admin/Controllers/MainServer/OrdersController.cs

+ 10 - 10
Areas/Admin/Controllers/MainServer/OrdersController.cs

@@ -770,7 +770,7 @@ namespace MySystem.Areas.Admin.Controllers
         /// 导出Excel
         /// 导出Excel
         /// </summary>
         /// </summary>
         /// <returns></returns>
         /// <returns></returns>
-        public string ExportExcel(Orders data, string UserIdMakerCode, string UserIdRealName, string PayModeSelect, string StoreIdStoreNo, string StoreIdStoreName, string RefundStatusSelect, string DeliveryTypeSelect, string SendStatusSelect, string ProductIdSelect, string StoreTypeSelect, string StoreUserIdMakerCode, string StoreUserIdRealName, string PayStatusSelect, string PayDateData, string RedisKey = "ExportKey")
+        public string ExportExcel(Orders data, string UserIdMakerCode, string UserIdRealName, string PayModeSelect, string StoreIdStoreNo, string StoreIdStoreName, string RefundStatusSelect, string DeliveryTypeSelect, string SendStatusSelect, string ProductIdSelect, string StoreTypeSelect, string StoreUserIdMakerCode, string StoreUserIdRealName, string PayStatusSelect, string RedisKey = "ExportKey")
         {
         {
             Dictionary<string, string> Fields = new Dictionary<string, string>();
             Dictionary<string, string> Fields = new Dictionary<string, string>();
             Fields.Add("CreateDate", "3"); //时间
             Fields.Add("CreateDate", "3"); //时间
@@ -850,14 +850,6 @@ namespace MySystem.Areas.Admin.Controllers
             {
             {
                 condition += " and PayStatus=" + PayStatusSelect;
                 condition += " and PayStatus=" + PayStatusSelect;
             }
             }
-            //支付时间
-            if (!string.IsNullOrEmpty(PayDateData))
-            {
-                string[] datelist = PayDateData.Split(new string[] { " - " }, StringSplitOptions.None);
-                string start = datelist[0];
-                string end = datelist[1];
-                condition += " and PayDate>='" + start + " 00:00:00' and PayDate<='" + end + " 23:59:59'";
-            }
             //创建工作薄
             //创建工作薄
             var workbook = new XSSFWorkbook();
             var workbook = new XSSFWorkbook();
             //创建表
             //创建表
@@ -1054,7 +1046,7 @@ namespace MySystem.Areas.Admin.Controllers
         /// 导出Excel
         /// 导出Excel
         /// </summary>
         /// </summary>
         /// <returns></returns>
         /// <returns></returns>
-        public JsonResult ExportsExcel(Orders data, string UserIdMakerCode, string UserIdRealName, string PayModeSelect, string StoreIdStoreNo, string StoreIdStoreName, string RefundStatusSelect, string DeliveryTypeSelect, string SendStatusSelect, string ProductIdSelect, string StoreTypeSelect, string StoreUserIdMakerCode, string StoreUserIdRealName, string PayStatusSelect, string RedisKey = "ExportKey")
+        public JsonResult ExportsExcel(Orders data, string UserIdMakerCode, string UserIdRealName, string PayModeSelect, string StoreIdStoreNo, string StoreIdStoreName, string RefundStatusSelect, string DeliveryTypeSelect, string SendStatusSelect, string ProductIdSelect, string StoreTypeSelect, string StoreUserIdMakerCode, string StoreUserIdRealName, string PayStatusSelect, string PayDateData, string RedisKey = "ExportKey")
         {
         {
             Dictionary<string, string> Fields = new Dictionary<string, string>();
             Dictionary<string, string> Fields = new Dictionary<string, string>();
             Fields.Add("CreateDate", "3"); //时间
             Fields.Add("CreateDate", "3"); //时间
@@ -1134,6 +1126,14 @@ namespace MySystem.Areas.Admin.Controllers
             {
             {
                 condition += " and PayStatus=" + PayStatusSelect;
                 condition += " and PayStatus=" + PayStatusSelect;
             }
             }
+            //支付时间
+            if (!string.IsNullOrEmpty(PayDateData))
+            {
+                string[] datelist = PayDateData.Split(new string[] { " - " }, StringSplitOptions.None);
+                string start = datelist[0];
+                string end = datelist[1];
+                condition += " and PayDate>='" + start + " 00:00:00' and PayDate<='" + end + " 23:59:59'";
+            }
             Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("Orders", Fields, "Id desc", "0", 1, 20000, condition, "UserId,OrderNo,RealName,Mobile,TotalPrice,Areas,Address,ErpName,ErpCode,SendDate,PayMode,PayDate,TradeNo,StoreId,RefundStatus,DeliveryType,SendStatus,ProductId,StoreContact,StoreType,StoreUserId,TopUserId,PayStatus,BuyCount,Remark,Id", false);
             Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("Orders", Fields, "Id desc", "0", 1, 20000, condition, "UserId,OrderNo,RealName,Mobile,TotalPrice,Areas,Address,ErpName,ErpCode,SendDate,PayMode,PayDate,TradeNo,StoreId,RefundStatus,DeliveryType,SendStatus,ProductId,StoreContact,StoreType,StoreUserId,TopUserId,PayStatus,BuyCount,Remark,Id", false);
             List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
             List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
             foreach (Dictionary<string, object> dic in diclist)
             foreach (Dictionary<string, object> dic in diclist)