From e001065463ae82206ebf72b4bf6fc81459b2a6cf Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Tue, 29 Oct 2024 18:05:48 +0800 Subject: [PATCH 1/2] =?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-service/DS.WMS.Core/DS.WMS.Core.csproj | 1 + .../DS.WMS.Core/Op/EDI/VOLTAEdiHelper.cs | 53 ++++++++++--------- .../Op/Entity/BLIssueManage/BLManageBase.cs | 53 +++++++++++++++++++ 3 files changed, 82 insertions(+), 25 deletions(-) create mode 100644 ds-wms-service/DS.WMS.Core/Op/Entity/BLIssueManage/BLManageBase.cs diff --git a/ds-wms-service/DS.WMS.Core/DS.WMS.Core.csproj b/ds-wms-service/DS.WMS.Core/DS.WMS.Core.csproj index 96cee4a7..cd8adcdf 100644 --- a/ds-wms-service/DS.WMS.Core/DS.WMS.Core.csproj +++ b/ds-wms-service/DS.WMS.Core/DS.WMS.Core.csproj @@ -40,6 +40,7 @@ + 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 c9929a44..65c30a7d 100644 --- a/ds-wms-service/DS.WMS.Core/Op/EDI/VOLTAEdiHelper.cs +++ b/ds-wms-service/DS.WMS.Core/Op/EDI/VOLTAEdiHelper.cs @@ -1067,35 +1067,38 @@ namespace DS.WMS.Core.Op.EDI for (var i = 0; i < ShippingList.Count; i++) { - if (ShippingList[i] != "") + if (!string.IsNullOrWhiteSpace(ShippingList[i])) { - if (m <= 5) - { - if (m == 1) strtemp = "47:" + ShippingList[i] + ":"; - else - { - if (m == 5) - strtemp = strtemp + ShippingList[i]; - else - strtemp = strtemp + ShippingList[i] + ":"; - } - } - else - { - m = 1; - r.WriteLine(strtemp + "'"); - strtemp = "47:" + ShippingList[i] + ":"; - icount = icount + 1; - } - m = m + 1; + r.WriteLine("47:" + ShippingList[i]); + icount = icount + 1; + + //if (m <= 5) + //{ + // if (m == 1) strtemp = "47:" + ShippingList[i] + ":"; + // else + // { + // if (m == 5) + // strtemp = strtemp + ShippingList[i]; + // else + // strtemp = strtemp + ShippingList[i] + ":"; + // } + //} + //else + //{ + // m = 1; + // r.WriteLine(strtemp + "'"); + // strtemp = "47:" + ShippingList[i] + ":"; + // icount = icount + 1; + //} + //m = m + 1; } } } - if (!string.IsNullOrWhiteSpace(strtemp)) - { - r.WriteLine(strtemp + "'"); - icount = icount + 1; - } + //if (!string.IsNullOrWhiteSpace(strtemp)) + //{ + // r.WriteLine(strtemp + "'"); + // icount = icount + 1; + //} var ISSOC = "N"; if (bill.ISCONTAINERSOC) ISSOC = "Y"; diff --git a/ds-wms-service/DS.WMS.Core/Op/Entity/BLIssueManage/BLManageBase.cs b/ds-wms-service/DS.WMS.Core/Op/Entity/BLIssueManage/BLManageBase.cs new file mode 100644 index 00000000..2c31bf97 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/Op/Entity/BLIssueManage/BLManageBase.cs @@ -0,0 +1,53 @@ +using DS.Module.Core.Data; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DS.WMS.Core.Op.Entity.BLManage +{ + /// + /// 提单管理主信息 + /// + [SqlSugar.SugarTable("op_sea_bl_issue_base", "提单管理主信息")] + public class BLManageBase : BaseModel + { + /// + /// 订舱主键,关联订舱主表ID + /// + [SqlSugar.SugarColumn(ColumnDescription = "订舱主键", IsNullable = true)] + public long BookingId { get; set; } + + + /// + /// 单证编号 + /// + [SqlSugar.SugarColumn(ColumnDescription = "单证编号", Length = 64, IsNullable = true)] + public string BLNo { get; set; } + + /// + /// 单证类型 + /// + [SqlSugar.SugarColumn(ColumnDescription = "单证类型", Length = 20, IsNullable = true)] + public string BLType { get; set; } + + /// + /// 单证类型名称 + /// + [SqlSugar.SugarColumn(ColumnDescription = "单证类型名称", Length = 50, IsNullable = true)] + public string BLTypeName { get; set; } + + /// + /// 状态代码 + /// + [SqlSugar.SugarColumn(ColumnDescription = "状态代码", Length = 20, IsNullable = true)] + public string Status { get; set; } + + /// + /// 状态名称 + /// + [SqlSugar.SugarColumn(ColumnDescription = "状态名称", Length = 50, IsNullable = true)] + public string StatusName { get; set; } + } +} From 4697d4de683339a69d7342590fa26a45a6ba1242 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Tue, 29 Oct 2024 18:22:55 +0800 Subject: [PATCH 2/2] =?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; }