From cef6300e8e6c51735d26bf24e22719970c36cec0 Mon Sep 17 00:00:00 2001 From: chfei Date: Wed, 19 Aug 2026 15:35:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=88=97=E8=A1=A8=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=20=E5=90=8C=E6=AD=A5=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 29WxOrder.sln | 21 + .../Converters/OrderTaskStatusConverter.cs | 36 + .../Ctrls/OrderCtrls/OrderListCtrl.xaml | 2332 +++++++++-------- .../Ctrls/OrderCtrls/OrderListCtrl.xaml.cs | 203 +- .../Ctrls/OrderCtrls/OrderTaskDialogView.xaml | 241 ++ .../OrderCtrls/OrderTaskDialogView.xaml.cs | 185 ++ .../Services/ShopRevenueStatisticsService.cs | 9 +- 29WxOrderWpf/Services/PullWXOrderService.cs | 184 ++ 29WxOrderWpf/Services/ShipGiftService.cs | 43 +- 29WxOrderWpf/ViewModels/OrderTaskViewModel.cs | 42 + Work/29WxOrderWork.csproj | 12 + Work/ERP.API/ERPConfig.cs | 13 + Work/ERP.API/ERPHttp.cs | 40 + Work/ERP.API/Orders/PullWXOrderServiceApi.cs | 186 ++ Work/ERP.API/Orders/ShipGiftServiceApi.cs | 39 + Work/ERP.API/TaskStatus.cs | 26 + Work/KJDServer.API/KJDServerHttp.cs | 112 + Work/KJDServer.API/Models/OrderTask.cs | 43 + .../WXOrder/WxOrderServiceApi.cs | 30 + Work/_29Tools/BLL/HttpResponseWXBLL.cs | 21 +- .../Commons}/Result.cs | 2 +- WxOrder.Framework/WxOrder.Framework.csproj | 8 + test/WXOrder.Test/PullWXOrder.Test.cs | 28 + test/WXOrder.Test/WXOrder.Test.csproj | 29 + 24 files changed, 2674 insertions(+), 1211 deletions(-) create mode 100644 29WxOrderWpf/Converters/OrderTaskStatusConverter.cs create mode 100644 29WxOrderWpf/Ctrls/OrderCtrls/OrderTaskDialogView.xaml create mode 100644 29WxOrderWpf/Ctrls/OrderCtrls/OrderTaskDialogView.xaml.cs create mode 100644 29WxOrderWpf/Services/PullWXOrderService.cs create mode 100644 29WxOrderWpf/ViewModels/OrderTaskViewModel.cs create mode 100644 Work/ERP.API/ERPConfig.cs create mode 100644 Work/ERP.API/ERPHttp.cs create mode 100644 Work/ERP.API/Orders/PullWXOrderServiceApi.cs create mode 100644 Work/ERP.API/Orders/ShipGiftServiceApi.cs create mode 100644 Work/ERP.API/TaskStatus.cs create mode 100644 Work/KJDServer.API/KJDServerHttp.cs create mode 100644 Work/KJDServer.API/Models/OrderTask.cs create mode 100644 Work/KJDServer.API/WXOrder/WxOrderServiceApi.cs rename {29WxOrderWpf/Common => WxOrder.Framework/Commons}/Result.cs (91%) create mode 100644 test/WXOrder.Test/PullWXOrder.Test.cs create mode 100644 test/WXOrder.Test/WXOrder.Test.csproj diff --git a/29WxOrder.sln b/29WxOrder.sln index d2c7bd8..cbb0fa1 100644 --- a/29WxOrder.sln +++ b/29WxOrder.sln @@ -21,6 +21,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_SolutionItems", "_Solution EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WxOrder.Framework", "WxOrder.Framework\WxOrder.Framework.csproj", "{3123963C-A0EC-4AD5-9916-DC063F73490B}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".test", ".test", "{14261B9B-E3EA-4BC0-B08D-4B3591AC13E5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WXOrder.Test", "test\WXOrder.Test\WXOrder.Test.csproj", "{3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -97,6 +101,22 @@ Global {3123963C-A0EC-4AD5-9916-DC063F73490B}.Release|x64.Build.0 = Release|Any CPU {3123963C-A0EC-4AD5-9916-DC063F73490B}.Release|x86.ActiveCfg = Release|Any CPU {3123963C-A0EC-4AD5-9916-DC063F73490B}.Release|x86.Build.0 = Release|Any CPU + {3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}.Debug|x64.ActiveCfg = Debug|Any CPU + {3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}.Debug|x64.Build.0 = Debug|Any CPU + {3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}.Debug|x86.ActiveCfg = Debug|Any CPU + {3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}.Debug|x86.Build.0 = Debug|Any CPU + {3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}.Release|Any CPU.Build.0 = Release|Any CPU + {3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}.Release|x64.ActiveCfg = Release|Any CPU + {3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}.Release|x64.Build.0 = Release|Any CPU + {3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}.Release|x86.ActiveCfg = Release|Any CPU + {3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -105,6 +125,7 @@ Global {6461D807-B1C8-45F0-B388-E0CA1A418DE0} = {4A54DC2A-B47C-4ED1-A482-EE60161DB2C3} {1AD45D66-6872-4522-ACF0-04E2C0514048} = {4A54DC2A-B47C-4ED1-A482-EE60161DB2C3} {5A410EB5-06AD-97BB-2314-9D7A808E12F7} = {1A7830FA-AC8F-40FB-A232-F0626812B8BE} + {3790EC79-EA1D-4660-AB0D-EA0DE4FF77B7} = {14261B9B-E3EA-4BC0-B08D-4B3591AC13E5} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {38687A61-0347-49AC-98C7-E7F7148C0234} diff --git a/29WxOrderWpf/Converters/OrderTaskStatusConverter.cs b/29WxOrderWpf/Converters/OrderTaskStatusConverter.cs new file mode 100644 index 0000000..d852de0 --- /dev/null +++ b/29WxOrderWpf/Converters/OrderTaskStatusConverter.cs @@ -0,0 +1,36 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using Work.ERP.API; + +namespace _29WxOrderWpf.Converters +{ + /// + /// 订单任务状态转换: (int) → 中文描述。 + /// 1=执行中,2=已完成,3=已人为中断。 + /// + public class OrderTaskStatusConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value is int status) + { + switch ((TaskStatus)status) + { + case TaskStatus.Executing: + return "执行中"; + case TaskStatus.Completed: + return "已完成"; + case TaskStatus.ManuallyInterrupted: + return "已中断"; + } + } + return value?.ToString() ?? string.Empty; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotSupportedException(); + } + } +} diff --git a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml index f6c080a..381a983 100644 --- a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml +++ b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml @@ -1,1191 +1,1209 @@  + x:Class="_29WxOrderWpf.Ctrls.OrderCtrls.OrderListCtrl" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:c="clr-namespace:_29WxOrderWpf.Common" + xmlns:converters="clr-namespace:_29WxOrderWpf.Converters" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.OrderCtrls" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:usercontrols="clr-namespace:_29WxOrderWpf.UserControls" + xmlns:utils="clr-namespace:_29WxOrderWpf.Utils" + xmlns:wpf="WPFCommon" + d:DesignHeight="450" + d:DesignWidth="1560" + Loaded="Window_Loaded" + mc:Ignorable="d"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - - - 标题包含 - - - 标题不含 - - - - + + + + + 标题包含 + + + 标题不含 + + + + - - + + + + + + + + + + + + + + + + + + + + + +