diff --git a/ds-wms-service/DS.WMS.Core/Op/Entity/BookingContractNo/BookingContractNoManage.cs b/ds-wms-service/DS.WMS.Core/Op/Entity/BookingContractNo/BookingContractNoManage.cs index 8e592ba3..b2bd865d 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Entity/BookingContractNo/BookingContractNoManage.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Entity/BookingContractNo/BookingContractNoManage.cs @@ -13,7 +13,7 @@ namespace DS.WMS.Core.Op.Entity /// 订舱合约号管理 /// [SqlSugar.SugarTable("booking_contract_manage", "订舱合约号管理")] - public class BookingContractNoManage : BaseModelV2 + public class BookingContractNoManage : BaseModel { /// /// 合约号编号 diff --git a/ds-wms-service/DS.WMS.Core/Op/Entity/BookingLabel/BookingLabel.cs b/ds-wms-service/DS.WMS.Core/Op/Entity/BookingLabel/BookingLabel.cs index ce5b2d80..71c55c58 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Entity/BookingLabel/BookingLabel.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Entity/BookingLabel/BookingLabel.cs @@ -11,7 +11,7 @@ namespace DS.WMS.Core.Op.Entity /// 订舱标签表 /// [SqlSugar.SugarTable("op_sea_booking_label", "订舱标签表")] - public class BookingLabel : BaseModelV2 + public class BookingLabel : BaseModel { /// /// 标签名称 diff --git a/ds-wms-service/DS.WMS.Core/Op/Entity/BookingLabel/BookingLabelAllocation.cs b/ds-wms-service/DS.WMS.Core/Op/Entity/BookingLabel/BookingLabelAllocation.cs index 625e199a..2aa54bef 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Entity/BookingLabel/BookingLabelAllocation.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Entity/BookingLabel/BookingLabelAllocation.cs @@ -10,8 +10,8 @@ namespace DS.WMS.Core.Op.Entity /// /// 订舱标签关联表 /// - [SqlSugar.SugarTable("booking_label_allocation", "订舱标签关联表")] - public class BookingLabelAllocation : BaseModelV2 + [SqlSugar.SugarTable("op_sea_booking_label_allocation", "订舱标签关联表")] + public class BookingLabelAllocation : BaseModel { /// /// 标签主键 diff --git a/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotAllocation.cs b/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotAllocation.cs index 3f60985c..6f10e3f7 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotAllocation.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotAllocation.cs @@ -12,7 +12,7 @@ namespace DS.WMS.Core.Op.Entity /// 舱位分配表 /// [SqlSugar.SugarTable("op_sea_booking_slot_allocation", "舱位分配表")] - public class BookingSlotAllocation : BaseModelV2 + public class BookingSlotAllocation : BaseModel { /// /// 舱位主键 diff --git a/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotAllocationCtn.cs b/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotAllocationCtn.cs index 39086ffd..c114efb8 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotAllocationCtn.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotAllocationCtn.cs @@ -12,7 +12,7 @@ namespace DS.WMS.Core.Op.Entity /// 舱位分配集装箱表 /// [SqlSugar.SugarTable("op_sea_booking_slot_allocation_ctn", "舱位分配集装箱表")] - public class BookingSlotAllocationCtn : BaseModelV2 + public class BookingSlotAllocationCtn : BaseModel { /// /// 舱位分配主键 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 59c6d111..3c5e80f1 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 @@ -13,7 +13,7 @@ namespace DS.WMS.Core.Op.Entity /// 舱位管理主信息 /// [SqlSugar.SugarTable("op_sea_booking_slot_base", "舱位管理主信息")] - public class BookingSlotBase : BaseModelV2 + public class BookingSlotBase : BaseModel { /// /// 舱位提单号 diff --git a/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotCompare.cs b/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotCompare.cs index 5ce64f1b..66e55927 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotCompare.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotCompare.cs @@ -13,7 +13,7 @@ namespace DS.WMS.Core.Op.Entity /// 舱位变更比对记录表 /// [SqlSugar.SugarTable("op_sea_booking_slot_compare", "舱位变更比对记录表")] - public class BookingSlotCompare : BaseModelV2 + public class BookingSlotCompare : BaseModel { /// /// 舱位主键 diff --git a/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotCtn.cs b/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotCtn.cs index cc4db2d5..4bd766f0 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotCtn.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotCtn.cs @@ -12,7 +12,7 @@ namespace DS.WMS.Core.Op.Entity /// 舱位集装箱管理 /// [SqlSugar.SugarTable("op_sea_booking_slot_ctn", "舱位集装箱管理")] - public class BookingSlotCtn : BaseModelV2 + public class BookingSlotCtn : BaseModel { /// /// 舱位主键 diff --git a/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotDemand.cs b/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotDemand.cs index a28b1c04..ad17b6da 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotDemand.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotDemand.cs @@ -11,7 +11,7 @@ namespace DS.WMS.Core.Op.Entity.BookingSlot /// 舱位分配表 /// [SqlSugar.SugarTable("op_sea_booking_slot_demand", "舱位分配表")] - public class BookingSlotDemand : BaseModelV2 + public class BookingSlotDemand : BaseModel { /// /// 客户ID diff --git a/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotDemandCtn.cs b/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotDemandCtn.cs index a1f6885a..ed5758e9 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotDemandCtn.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotDemandCtn.cs @@ -11,7 +11,7 @@ namespace DS.WMS.Core.Op.Entity /// 舱位需求预报记录箱信息 /// [SqlSugar.SugarTable("op_sea_booking_slot_demand_ctn", "舱位需求预报记录箱信息")] - public class BookingSlotDemandCtn : BaseModelV2 + public class BookingSlotDemandCtn : BaseModel { /// /// 舱位需求预报记录ID diff --git a/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotStock.cs b/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotStock.cs index a10f67ad..152053e1 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotStock.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotStock.cs @@ -13,7 +13,7 @@ namespace DS.WMS.Core.Op.Entity /// 舱位库存表 /// [SqlSugar.SugarTable("op_sea_booking_slot_stock", "舱位库存表")] - public class BookingSlotStock : BaseModelV2 + public class BookingSlotStock : BaseModel { /// /// 船名 diff --git a/ds-wms-service/DS.WMS.Core/Op/Entity/SpaceBooking/SpaceBookingOrder.cs b/ds-wms-service/DS.WMS.Core/Op/Entity/SpaceBooking/SpaceBookingOrder.cs index f3de88b8..89b13e68 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Entity/SpaceBooking/SpaceBookingOrder.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Entity/SpaceBooking/SpaceBookingOrder.cs @@ -11,7 +11,7 @@ namespace DS.WMS.Core.Op.Entity /// 预订舱记录表 /// [SqlSugar.SugarTable("op_sea_space_booking_order", "预订舱记录表")] - public class SpaceBookingOrder : BaseModelV2 + public class SpaceBookingOrder : BaseModel { /// /// 订舱id diff --git a/ds-wms-service/DS.WMS.Core/Op/Entity/SpaceBooking/SpaceBookingOrderCtn.cs b/ds-wms-service/DS.WMS.Core/Op/Entity/SpaceBooking/SpaceBookingOrderCtn.cs index 8afbddbc..92850361 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Entity/SpaceBooking/SpaceBookingOrderCtn.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Entity/SpaceBooking/SpaceBookingOrderCtn.cs @@ -11,7 +11,7 @@ namespace DS.WMS.Core.Op.Entity /// 预订舱记录表箱信息 /// [SqlSugar.SugarTable("op_sea_space_booking_order_ctn", "预订舱记录表箱信息")] - public class SpaceBookingOrderCtn : BaseModelV2 + public class SpaceBookingOrderCtn : BaseModel { /// /// 主记录ID diff --git a/ds-wms-service/DS.WMS.Core/Op/Entity/SpaceBooking/SpaceBookingOrderShipSchedule.cs b/ds-wms-service/DS.WMS.Core/Op/Entity/SpaceBooking/SpaceBookingOrderShipSchedule.cs index 28eaa26b..5f5c144e 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Entity/SpaceBooking/SpaceBookingOrderShipSchedule.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Entity/SpaceBooking/SpaceBookingOrderShipSchedule.cs @@ -11,7 +11,7 @@ namespace DS.WMS.Core.Op.Entity /// 预订舱记录表船期表信息 /// [SqlSugar.SugarTable("op_sea_space_booking_order_shipschedule", "预订舱记录表船期表信息")] - public class SpaceBookingOrderShipSchedule : BaseModelV2 + public class SpaceBookingOrderShipSchedule : BaseModel { /// /// 主记录ID 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 4e1cde58..1437a205 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 @@ -41,10 +41,11 @@ using DS.WMS.Core.Info.Dtos; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Hosting; using AngleSharp.Dom.Events; +using Microsoft.AspNetCore.Authorization; namespace DS.WMS.Core.Op.Method { - public class BookingSlotService //: IBookingSlotService + public class BookingSlotService : IBookingSlotService { private readonly IServiceProvider _serviceProvider; private readonly ISqlSugarClient db; @@ -2523,6 +2524,150 @@ namespace DS.WMS.Core.Op.Method return (true, "引入成功"); } + + + /// + /// 检索舱位对应的订舱订单(BY 舱位主键) + /// + /// 舱位ID + /// 返回回执 + public async Task SearchBookingSlotWithOrderById(long id) + { + return null; + } + + /// + /// 刷新库存 + /// + /// + /// + public async Task RefreshStock(BookingSlotStockUpdateModel input) + { + //input.TenantId = UserManager.TENANT_ID; + //更新库存 + //await _publisher.PublishAsync(new ChannelEventSource("BookingSlotStock:Update", input)); + } + + #region 订舱编号检索舱位信息 + /// + /// 订舱编号检索舱位信息 + /// + /// 订舱编号 + /// 船公司ID + /// + public async Task QueryBookingSlot(string slotBookingNo, string CarrierId) + { + long id = 0; + + try + { + var tenantDb = saasService.GetBizDbScopeById(user.TenantId); + + var model = tenantDb.Queryable().First(x => x.SlotBookingNo == slotBookingNo && x.CarrierCode == CarrierId); + + //if (model == null) + //throw Oops.Bah("舱位信息不存在"); + + id = model.Id; + } + catch (Exception ex) + { + //_logger.LogInformation($"订舱编号检索舱位信息失败,原因:{ex.Message}"); + } + + return id; + } + #endregion + + /// + /// 库存查询 + /// + /// + /// + public async Task PageStock(BookingSlotStockPageInput input) + { + return null; + } + + /// + /// 生成合票订舱订单 + /// + /// 生成订舱订单请求 + /// 返回回执 + public async Task MergeCreateBookingOrder(BookingGenerateDto model) + { + return null; + } + + /// + /// 估算差异重要提醒 + /// + /// 原舱位详情 + /// 新舱位详情 + /// 舱位ID + /// + [NonAction] + public async Task MeasureDiffCautionTask(ParserBCInfoDto bcSrcDto, ParserBCInfoDto bcTargetDto, long slotId) + { + return; + } + + /// + /// 检索舱位对应的订舱订单(BY 订舱编号) + /// + /// 订舱编号 + /// 租户ID + /// 返回回执 + + public async Task SearchBookingSlotWithOrderByNo(string slotBookingNo, long tenantId) + { + return null; + } + + /// + /// 导入舱位 + /// + /// 导入舱位文件 + /// 返回回执 + public async Task ImportSlotFromFile(IFormFile file) + { + return null; + } + + Task>> IBookingSlotService.GetAvailableSlots(BookingSlotBaseDto slotInput, List slotIdListInput, PageWithTotal pageInfo) + { + throw new NotImplementedException(); + } + + Task IBookingSlotService.Page(BookingSlotBasePageInput input) + { + throw new NotImplementedException(); + } + + Task IBookingSlotService.InnerApiReceive(BookingSlotBaseApiDto dto, DynameFileInfo file, DynameFileInfo modifyFile) + { + throw new NotImplementedException(); + } + + Task> IBookingSlotService.GetSlotCompareResult(long id, string batchNo) + { + throw new NotImplementedException(); + } + + Task IBookingSlotService.CreateBookingOrder(BookingGenerateDto model) + { + throw new NotImplementedException(); + } + + Task IBookingSlotService.ExcuteCompare(ParserBCInfoDto bcSrcDto, ParserBCInfoDto bcTargetDto) + { + throw new NotImplementedException(); + } + + Task> IBookingSlotService.GetSlotList(long[] ids) + { + throw new NotImplementedException(); + } } public static class LetterIndexUtil diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/SpaceBooking/SpaceBookingMSKAPIService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/SpaceBooking/SpaceBookingMSKAPIService.cs index 91a24057..7860e0e6 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/SpaceBooking/SpaceBookingMSKAPIService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/SpaceBooking/SpaceBookingMSKAPIService.cs @@ -1968,11 +1968,13 @@ namespace DS.WMS.Core.Op.Method if (model == null) throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingAPIOrderDeletedOrNoExists))); + DateTime nowDate = DateTime.Now; + if (opTypeName == "BookingConfirmation") { model.IsRecvBC = true; - model.LstRecvBCDate = DateTime.Now; - model.UpdateTime = model.LstRecvBCDate; + model.LstRecvBCDate = nowDate; + model.UpdateTime = nowDate; model.UpdateBy = long.Parse(user.UserId); //model.UpdatedUserName = UserManager.Name; @@ -1987,8 +1989,8 @@ namespace DS.WMS.Core.Op.Method else if (opTypeName == "Cancellation") { model.IsRecvBKCancel = true; - model.LstRecvBKCancelDate = DateTime.Now; - model.UpdateTime = model.LstRecvBKCancelDate; + model.LstRecvBKCancelDate = nowDate; + model.UpdateTime = nowDate; model.UpdateBy = long.Parse(user.UserId); //model.UpdatedUserName = UserManager.Name; diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/SpaceBooking/SpaceBookingMSKSPOTAPIService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/SpaceBooking/SpaceBookingMSKSPOTAPIService.cs index 2a831c31..07257a4b 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/SpaceBooking/SpaceBookingMSKSPOTAPIService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/SpaceBooking/SpaceBookingMSKSPOTAPIService.cs @@ -2052,11 +2052,13 @@ namespace DS.WMS.Core.Op.Method if (model == null) throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingAPIOrderDeletedOrNoExists))); + DateTime nowDate = DateTime.Now; + if (opTypeName == "BookingConfirmation") { model.IsRecvBC = true; - model.LstRecvBCDate = DateTime.Now; - model.UpdateTime = model.LstRecvBCDate; + model.LstRecvBCDate = nowDate; + model.UpdateTime = nowDate; model.UpdateBy = long.Parse(user.UserId); //model.UpdatedUserName = UserManager.Name; @@ -2072,8 +2074,8 @@ namespace DS.WMS.Core.Op.Method else if (opTypeName == "Cancellation") { model.IsRecvBKCancel = true; - model.LstRecvBKCancelDate = DateTime.Now; - model.UpdateTime = model.LstRecvBKCancelDate; + model.LstRecvBKCancelDate = nowDate; + model.UpdateTime = nowDate; model.UpdateBy = long.Parse(user.UserId); //model.UpdatedUserName = UserManager.Name; diff --git a/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj b/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj index 58cbe4a2..36f5284d 100644 --- a/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj +++ b/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj @@ -9,10 +9,6 @@ bin\Debug\net8.0\Api.xml - - - - diff --git a/ds-wms-service/DS.WMS.OpApi/Logs/internal-nlog.txt b/ds-wms-service/DS.WMS.OpApi/Logs/internal-nlog.txt index 6a0adc26..07dfb105 100644 --- a/ds-wms-service/DS.WMS.OpApi/Logs/internal-nlog.txt +++ b/ds-wms-service/DS.WMS.OpApi/Logs/internal-nlog.txt @@ -474,3 +474,24 @@ 2024-07-18 17:08:59.2425 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config 2024-07-18 17:08:59.2585 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile 2024-07-18 17:08:59.2585 Info Configuration initialized. +2024-07-18 17:11:43.2034 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-18 17:11:43.2174 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-18 17:11:43.2174 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-18 17:11:43.2306 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-18 17:11:43.2306 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config +2024-07-18 17:11:43.2396 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-18 17:11:43.2396 Info Configuration initialized. +2024-07-18 17:12:51.9894 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-18 17:12:51.9894 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-18 17:12:52.0042 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-18 17:12:52.0042 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-18 17:12:52.0042 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config +2024-07-18 17:12:52.0216 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-18 17:12:52.0216 Info Configuration initialized. +2024-07-18 17:15:47.6795 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-18 17:15:47.6795 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-18 17:15:47.6937 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-18 17:15:47.6937 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-18 17:15:47.7084 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config +2024-07-18 17:15:47.7084 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-18 17:15:47.7084 Info Configuration initialized.