From eef344635a34dfe5e2ac7da5b6f2c072945adc7b Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Thu, 25 Jul 2024 11:53:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=88=B1=E4=BD=8DAPI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookingSlot/BookingSlotBaseSaveOutput.cs | 29 ++++++++++++-- .../Op/Entity/BookingSlot/BookingSlotBase.cs | 4 +- .../Method/BookingSlot/BookingSlotService.cs | 38 +++++++++---------- ds-wms-service/DS.WMS.Test/SaasTest.cs | 4 +- 4 files changed, 48 insertions(+), 27 deletions(-) diff --git a/ds-wms-service/DS.WMS.Core/Op/Dtos/BookingSlot/BookingSlotBaseSaveOutput.cs b/ds-wms-service/DS.WMS.Core/Op/Dtos/BookingSlot/BookingSlotBaseSaveOutput.cs index 762100a3..2673a7a8 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Dtos/BookingSlot/BookingSlotBaseSaveOutput.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Dtos/BookingSlot/BookingSlotBaseSaveOutput.cs @@ -87,7 +87,13 @@ namespace DS.WMS.Core.Op.Dtos /// 收货地代码 /// [Description("收货地代码")] - public string PlaceReceiptId { get; set; } + public string PlaceReceiptCode { get; set; } + + /// + /// 收货地主键 + /// + [Description("收货地主键")] + public Nullable PlaceReceiptId { get; set; } /// /// 收货地 @@ -99,7 +105,12 @@ namespace DS.WMS.Core.Op.Dtos /// 交货地代码 /// [Description("交货地代码")] - public string PlaceDeliveryId { get; set; } + public string PlaceDeliveryCode { get; set; } + + /// + /// 交货地主键 + /// + public Nullable PlaceDeliveryId { get; set; } /// /// 交货地 @@ -111,7 +122,12 @@ namespace DS.WMS.Core.Op.Dtos /// 装货港代码 /// [Description("装货港代码")] - public string PortLoadId { get; set; } + public string PortLoadCode { get; set; } + + /// + /// 装货港主键 + /// + public Nullable PortLoadId { get; set; } /// /// 装货港 @@ -123,7 +139,12 @@ namespace DS.WMS.Core.Op.Dtos /// 卸货港代码 /// [Description("卸货港代码")] - public string PortDischargeId { get; set; } + public string PortDischargeCode { get; set; } + + /// + /// 卸货港主键 + /// + public Nullable PortDischargeId { get; set; } /// /// 卸货港 diff --git a/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotBase.cs b/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotBase.cs index 3c5e80f1..96674243 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotBase.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotBase.cs @@ -138,7 +138,7 @@ namespace DS.WMS.Core.Op.Entity /// /// 装货港主键 /// - [SqlSugar.SugarColumn(ColumnDescription = "装货港主键", Length = 10, IsNullable = true)] + [SqlSugar.SugarColumn(ColumnDescription = "装货港主键", IsNullable = true)] public Nullable PortLoadId { get; set; } /// @@ -156,7 +156,7 @@ namespace DS.WMS.Core.Op.Entity /// /// 卸货港主键 /// - [SqlSugar.SugarColumn(ColumnDescription = "卸货港主键", Length = 10, IsNullable = true)] + [SqlSugar.SugarColumn(ColumnDescription = "卸货港主键", IsNullable = true)] public Nullable PortDischargeId { get; set; } /// diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/BookingSlot/BookingSlotService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/BookingSlot/BookingSlotService.cs index afda896d..17d43ad5 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/BookingSlot/BookingSlotService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/BookingSlot/BookingSlotService.cs @@ -177,8 +177,8 @@ namespace DS.WMS.Core.Op.Method || oldObj.Voyno != model.Voyno || oldObj.BookingSlotType != model.BookingSlotType || oldObj.CarrierCode != model.CarrierCode - || oldObj.PortLoadId != model.PortLoadCode - || oldObj.PortDischargeId != model.PortDischargeCode) + || oldObj.PortLoadCode != model.PortLoadCode + || oldObj.PortDischargeCode != model.PortDischargeCode) { isNeedUpdateOldStock = true; } @@ -194,8 +194,8 @@ namespace DS.WMS.Core.Op.Method ContractNo = oldObj.ContractNo, Vessel = oldObj.Vessel, Voyno = oldObj.Voyno, - PortLoadId = oldObj.PortLoadId, - PortDischargeId = oldObj.PortDischargeId, + PortLoadId = oldObj.PortLoadCode, + PortDischargeId = oldObj.PortDischargeCode, TenantId = long.Parse(user.TenantId) }); } @@ -372,14 +372,14 @@ namespace DS.WMS.Core.Op.Method { DataObj = new BookingSlotBaseApiSaveDto { - PortDischargeId = model.PortDischargeCode, + PortDischargeCode = model.PortDischargeCode, PortDischarge = model.PortDischarge, - PortLoadId = model.PortLoadCode, + PortLoadCode = model.PortLoadCode, PortLoad = model.PortLoad, PlaceDelivery = model.PlaceDelivery, - PlaceDeliveryId = model.PlaceDeliveryCode, + PlaceDeliveryCode = model.PlaceDeliveryCode, PlaceReceipt = model.PlaceReceipt, - PlaceReceiptId = model.PlaceReceiptCode, + PlaceReceiptCode = model.PlaceReceiptCode, } }; @@ -432,7 +432,7 @@ namespace DS.WMS.Core.Op.Method if (regList[j].name.Equals("PORTLOADID", StringComparison.OrdinalIgnoreCase)) { - isSucc = CheckLabel("PORTLOADID", dto.DataObj.PortLoadId, regList[j].val, regList[j].master, operEnum); + isSucc = CheckLabel("PORTLOADID", dto.DataObj.PortLoadCode, regList[j].val, regList[j].master, operEnum); if (isSucc) { @@ -481,7 +481,7 @@ namespace DS.WMS.Core.Op.Method } else if (regList[j].name.Equals("PORTDISCHARGEID", StringComparison.OrdinalIgnoreCase)) { - isSucc = CheckLabel("PORTDISCHARGEID", dto.DataObj.PortDischargeId, regList[j].val, regList[j].master, operEnum); + isSucc = CheckLabel("PORTDISCHARGEID", dto.DataObj.PortDischargeCode, regList[j].val, regList[j].master, operEnum); if (isSucc) { @@ -1030,7 +1030,7 @@ namespace DS.WMS.Core.Op.Method else { dto.DataObj.PortLoad = portInfo.Data.PortName; - dto.DataObj.PortLoadId = portInfo.Data.EdiCode; + dto.DataObj.PortLoadCode = portInfo.Data.EdiCode; } } else @@ -1077,7 +1077,7 @@ namespace DS.WMS.Core.Op.Method var portInfo = await PlaceDeliveryToPort(portEnName, portCodeList, () => _mappingPortService.GetAllList()); - if (portInfo.Succeeded) + if (!portInfo.Succeeded) { Logger.Log(NLog.LogLevel.Info, $"通过交货地城市名称未匹配到港口信息,订舱编号:{dto.DataObj.SlotBookingNo}"); } @@ -1095,7 +1095,7 @@ namespace DS.WMS.Core.Op.Method } dto.DataObj.PortDischarge = portInfo.Data?.PortName; - dto.DataObj.PortDischargeId = portInfo.Data?.EdiCode; + dto.DataObj.PortDischargeCode = portInfo.Data?.EdiCode; @@ -1275,8 +1275,8 @@ namespace DS.WMS.Core.Op.Method || oldObj.Voyno != model.Voyno || oldObj.BookingSlotType != model.BookingSlotType || oldObj.CarrierId != model.CarrierId - || oldObj.PortLoadId != model.PortLoadCode - || oldObj.PortDischargeId != model.PortDischargeCode) + || oldObj.PortLoadCode != model.PortLoadCode + || oldObj.PortDischargeCode != model.PortDischargeCode) { isNeedUpdateOldStock = true; } @@ -1292,8 +1292,8 @@ namespace DS.WMS.Core.Op.Method ContractNo = oldObj.ContractNo, Vessel = oldObj.Vessel, Voyno = oldObj.Voyno, - PortLoadId = oldObj.PortLoadId, - PortDischargeId = oldObj.PortDischargeId, + PortLoadId = oldObj.PortLoadCode, + PortDischargeId = oldObj.PortDischargeCode, TenantId = long.Parse(user.TenantId) }); } @@ -1471,7 +1471,7 @@ namespace DS.WMS.Core.Op.Method var newFile = new OpFile { - Id = SnowFlakeSingle.Instance.NextId(), + //Id = SnowFlakeSingle.Instance.NextId(), FileName = fileName, FilePath = FilePath, TypeCode = fileTypeCode, @@ -1479,7 +1479,7 @@ namespace DS.WMS.Core.Op.Method LinkId = boookId, }; - await tenantDb.Insertable(newFile).ExecuteCommandAsync(); + await tenantDb.Insertable(newFile).ExecuteCommandAsync(); return DataResult.Success(string.Empty); } diff --git a/ds-wms-service/DS.WMS.Test/SaasTest.cs b/ds-wms-service/DS.WMS.Test/SaasTest.cs index 1e1a38b8..e75d20a5 100644 --- a/ds-wms-service/DS.WMS.Test/SaasTest.cs +++ b/ds-wms-service/DS.WMS.Test/SaasTest.cs @@ -215,7 +215,7 @@ public class SaasTest //tenantDb.CodeFirst.InitTables(typeof(SpaceBookingOrder)); //tenantDb.CodeFirst.InitTables(typeof(SpaceBookingOrderCtn)); //tenantDb.CodeFirst.InitTables(typeof(SpaceBookingOrderShipSchedule)); - //tenantDb.CodeFirst.InitTables(typeof(BookingSlotBase)); + tenantDb.CodeFirst.InitTables(typeof(BookingSlotBase)); //tenantDb.CodeFirst.InitTables(typeof(BookingSlotCtn)); //tenantDb.CodeFirst.InitTables(typeof(BookingSlotStock)); //tenantDb.CodeFirst.InitTables(typeof(BookingSlotAllocation)); @@ -227,7 +227,7 @@ public class SaasTest //tenantDb.CodeFirst.InitTables(typeof(BookingLabel)); //tenantDb.CodeFirst.InitTables(typeof(BookingLabelAllocation)); - tenantDb.CodeFirst.InitTables(typeof(InfoClient)); + //tenantDb.CodeFirst.InitTables(typeof(InfoClient)); //tenantDb.CodeFirst.InitTables(typeof(CodeThirdParty)); //tenantDb.CodeFirst.InitTables(typeof(CheckBillAutoDetail)); //db.CodeFirst.InitTables(typeof(OpBusinessTruckCtn));