From 399ba617c42e025b0cbaa7554c6ff522a131c3df Mon Sep 17 00:00:00 2001 From: Administrator Date: Thu, 18 Dec 2025 15:41:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=20Windows=207=20?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E6=80=A7=EF=BC=8C=E8=B0=83=E6=95=B4=20Excel?= =?UTF-8?q?=20=E5=AF=BC=E5=87=BA=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - setup.iss: 改用 classic 向导样式,降低 MinVersion 要求 - setup.iss: 添加 x86/x64 架构支持声明 - Excel 导出: 移除"订单金额"列,新增"数量"列 - Order 模型: 添加 TotalQuantity 属性计算商品总数量 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- PackagingMallShipper/Models/Order.cs | 18 ++++++++++++++++++ PackagingMallShipper/Services/ExcelService.cs | 4 ++-- setup.iss | 11 +++++++---- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/PackagingMallShipper/Models/Order.cs b/PackagingMallShipper/Models/Order.cs index 10300cf..4573243 100644 --- a/PackagingMallShipper/Models/Order.cs +++ b/PackagingMallShipper/Models/Order.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using Newtonsoft.Json; namespace PackagingMallShipper.Models @@ -59,6 +60,23 @@ namespace PackagingMallShipper.Models } } } + + public int TotalQuantity + { + get + { + if (string.IsNullOrEmpty(GoodsJson)) return 0; + try + { + var goods = JsonConvert.DeserializeObject>(GoodsJson); + return goods.Sum(g => g.Number); + } + catch + { + return 0; + } + } + } } public class GoodsItem diff --git a/PackagingMallShipper/Services/ExcelService.cs b/PackagingMallShipper/Services/ExcelService.cs index b116165..6b97c96 100644 --- a/PackagingMallShipper/Services/ExcelService.cs +++ b/PackagingMallShipper/Services/ExcelService.cs @@ -31,7 +31,7 @@ namespace PackagingMallShipper.Services { "订单号", "下单时间", "收件人", "联系电话", "省份", "城市", "区县", "详细地址", - "商品信息", "订单金额", "快递公司", "快递单号" + "商品信息", "数量", "快递公司", "快递单号" }; for (int i = 0; i < headers.Length; i++) @@ -57,7 +57,7 @@ namespace PackagingMallShipper.Services worksheet.Cell(row, 7).Value = order.LogisticsDistrict; worksheet.Cell(row, 8).Value = order.LogisticsAddress; worksheet.Cell(row, 9).Value = order.GoodsInfo; - worksheet.Cell(row, 10).Value = order.AmountReal; + worksheet.Cell(row, 10).Value = order.TotalQuantity; worksheet.Cell(row, 11).Value = ""; worksheet.Cell(row, 12).Value = ""; } diff --git a/setup.iss b/setup.iss index 2cb3654..f91694f 100644 --- a/setup.iss +++ b/setup.iss @@ -23,10 +23,13 @@ Compression=lzma2/ultra64 SolidCompression=yes ; 权限设置 PrivilegesRequired=admin -; 系统要求 - Windows 7 SP1 或更高版本 -MinVersion=6.1.7601 -; 安装向导设置 -WizardStyle=modern +; 系统要求 - Windows 7 或更高版本 +; 注意:.NET Framework 4.6.2 需要 Windows 7 SP1,但安装程序本身可以在无SP1的Win7上运行并提示 +MinVersion=6.1 +; 架构支持 - 同时支持32位和64位系统 +ArchitecturesAllowed=x86compatible x64compatible +; 安装向导设置 - 使用classic样式以获得最佳Windows 7兼容性 +WizardStyle=classic DisableProgramGroupPage=yes ; 卸载设置 UninstallDisplayName={#MyAppName}