From 4697d4de683339a69d7342590fa26a45a6ba1242 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Tue, 29 Oct 2024 18:22:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9VOLTA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DS.WMS.Core/Op/EDI/VOLTAEdiHelper.cs | 35 ++++++++++++------- .../DJYChargeFee/DJYChargeFeeService.cs | 6 ++-- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/ds-wms-service/DS.WMS.Core/Op/EDI/VOLTAEdiHelper.cs b/ds-wms-service/DS.WMS.Core/Op/EDI/VOLTAEdiHelper.cs index 65c30a7d..a4130dc5 100644 --- a/ds-wms-service/DS.WMS.Core/Op/EDI/VOLTAEdiHelper.cs +++ b/ds-wms-service/DS.WMS.Core/Op/EDI/VOLTAEdiHelper.cs @@ -1041,19 +1041,30 @@ namespace DS.WMS.Core.Op.EDI Shipping = formatEdiStr("txt", bill.MARKS); ShippingList = formatlengthStr(Shipping, 35); - for (var i = 0; i < Math.Ceiling(Convert.ToDecimal(Convert.ToDecimal(ShippingList.Count) / Convert.ToDecimal(10))); i++) + //for (var i = 0; i < Math.Ceiling(Convert.ToDecimal(Convert.ToDecimal(ShippingList.Count) / Convert.ToDecimal(10))); i++) + //{ + // var tempstr = "44:"; + // for (var z = 0; z < 10; z++) + // { + // if ((i * 10 + z) < ShippingList.Count) + // tempstr = tempstr + ShippingList[i * 10 + z]; + // if (z < 9) tempstr = tempstr + ":"; + // } + // if (tempstr != "44:") + // { + // r.WriteLine(tempstr + "'"); + // icount++; + // } + //} + if (ShippingList.Count != 0 && Shipping.Length > 0) { - var tempstr = "44:"; - for (var z = 0; z < 10; z++) - { - if ((i * 10 + z) < ShippingList.Count) - tempstr = tempstr + ShippingList[i * 10 + z]; - if (z < 9) tempstr = tempstr + ":"; - } - if (tempstr != "44:") + for (var i = 0; i < ShippingList.Count; i++) { - r.WriteLine(tempstr + "'"); - icount++; + if (!string.IsNullOrWhiteSpace(ShippingList[i])) + { + r.WriteLine("44:" + ShippingList[i] + "'"); + icount = icount + 1; + } } } @@ -1069,7 +1080,7 @@ namespace DS.WMS.Core.Op.EDI { if (!string.IsNullOrWhiteSpace(ShippingList[i])) { - r.WriteLine("47:" + ShippingList[i]); + r.WriteLine("47:" + ShippingList[i]+ "'"); icount = icount + 1; //if (m <= 5) diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/DJYChargeFee/DJYChargeFeeService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/DJYChargeFee/DJYChargeFeeService.cs index 9d9f55ee..e954d22d 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/DJYChargeFee/DJYChargeFeeService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/DJYChargeFee/DJYChargeFeeService.cs @@ -140,10 +140,12 @@ namespace DS.WMS.Core.Op.Method string feeUserId = webAccountConfig.AppKey; string feeUserKey = webAccountConfig.AppSecret; - var c = tenantDb.Queryable().Filter(null, true).Count(x => x.Id == id); + string feeType = $"{(int)model.BSType}_{(int)model.SendType}"; + + var c = tenantDb.Queryable().Filter(null, true).Count(x => x.Id == id && x.FeeType == feeType); if (c > 0) { - Logger.Log(NLog.LogLevel.Info, $"{batchId}-已存在扣费记录,id:{id},提单号:{orderInfo.MBLNO}"); + Logger.Log(NLog.LogLevel.Info, $"{batchId}-已存在扣费记录,id:{id},提单号:{orderInfo.MBLNO} feeType={feeType}"); continue; }