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}