From 7804a59bcc39adf496344c8e47d052a3a98938d6 Mon Sep 17 00:00:00 2001
From: shanj <18996038927@163.com>
Date: Sat, 19 Feb 2022 18:39:47 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=8A=E6=97=A5=E4=B8=9A=E7=BB=A9=E6=94=B9?=
=?UTF-8?q?=E4=B8=BA=E4=B8=9A=E7=BB=A9=E7=BB=9F=E8=AE=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
BBWY.Client/APIServices/StatisticsService.cs | 9 ++++++---
BBWY.Client/ViewModels/Order/OrderListViewModel.cs | 10 +++++-----
BBWY.Client/Views/Order/OrderList.xaml | 4 ++--
BBWY.Server.API/Controllers/StatisticsController.cs | 4 ++--
BBWY.Server.Business/Statistics/StatisticsBusiness.cs | 9 +++++----
.../Request/Statistics/ToDayOrderAchievementRequest.cs | 10 ++++++++--
...ievementResponse.cs => OrderAchievementResponse.cs} | 2 +-
7 files changed, 29 insertions(+), 19 deletions(-)
rename BBWY.Server.Model/Dto/Response/Statistics/{ToDayOrderAchievementResponse.cs => OrderAchievementResponse.cs} (96%)
diff --git a/BBWY.Client/APIServices/StatisticsService.cs b/BBWY.Client/APIServices/StatisticsService.cs
index df806421..22d7d3c7 100644
--- a/BBWY.Client/APIServices/StatisticsService.cs
+++ b/BBWY.Client/APIServices/StatisticsService.cs
@@ -1,6 +1,7 @@
using BBWY.Client.Models;
using BBWY.Common.Http;
using BBWY.Common.Models;
+using System;
using System.Net.Http;
namespace BBWY.Client.APIServices
@@ -16,11 +17,13 @@ namespace BBWY.Client.APIServices
/// 今日业绩统计
///
///
- public ApiResponse GetTodayAchievementStatistics()
+ public ApiResponse GetTodayAchievementStatistics(DateTime startTime, DateTime endTime)
{
- return SendRequest(globalContext.BBYWApiHost, "Api/Statistics/GetTodayAchievementStatistics", new
+ return SendRequest(globalContext.BBYWApiHost, "Api/Statistics/GetOrderAchievementStatistics", new
{
- ShopId = globalContext.User.Shop.ShopId
+ globalContext.User.Shop.ShopId,
+ startTime,
+ endTime
},
null, HttpMethod.Post);
}
diff --git a/BBWY.Client/ViewModels/Order/OrderListViewModel.cs b/BBWY.Client/ViewModels/Order/OrderListViewModel.cs
index d7afa335..2d73a25c 100644
--- a/BBWY.Client/ViewModels/Order/OrderListViewModel.cs
+++ b/BBWY.Client/ViewModels/Order/OrderListViewModel.cs
@@ -108,7 +108,7 @@ namespace BBWY.Client.ViewModels
{
PageIndex = 1;
Task.Factory.StartNew(() => LoadOrder(1));
- Task.Factory.StartNew(LoadTodayAchievement);
+ Task.Factory.StartNew(() => LoadTodayAchievement(StartDate, EndDate));
});
CopyTextCommand = new RelayCommand(s => Clipboard.SetText(s));
CopyOrderWaybillCommand = new RelayCommand(o => Clipboard.SetText(o.WaybillNo));
@@ -118,12 +118,12 @@ namespace BBWY.Client.ViewModels
StartDate = DateTime.Now.Date.AddDays(d * -1);
PageIndex = 1;
Task.Factory.StartNew(() => LoadOrder(1));
- Task.Factory.StartNew(LoadTodayAchievement);
+ Task.Factory.StartNew(() => LoadTodayAchievement(StartDate, EndDate));
});
OrderPageIndexChangedCommand = new RelayCommand(p =>
{
Task.Factory.StartNew(() => LoadOrder(p.PageIndex));
- Task.Factory.StartNew(LoadTodayAchievement);
+ Task.Factory.StartNew(() => LoadTodayAchievement(StartDate, EndDate));
});
DecodeConsigneeCommand = new RelayCommand(DecodeConsignee);
ChooseStorageTypeCommand = new RelayCommand