修改舱位实体类

修改舱位接口
usertest
jianghaiqing 4 months ago
parent f15307c7d3
commit 609fafcd42

@ -13,7 +13,7 @@ namespace DS.WMS.Core.Op.Entity
/// 订舱合约号管理 /// 订舱合约号管理
/// </summary> /// </summary>
[SqlSugar.SugarTable("booking_contract_manage", "订舱合约号管理")] [SqlSugar.SugarTable("booking_contract_manage", "订舱合约号管理")]
public class BookingContractNoManage : BaseModelV2<long> public class BookingContractNoManage : BaseModel<long>
{ {
/// <summary> /// <summary>
/// 合约号编号 /// 合约号编号

@ -11,7 +11,7 @@ namespace DS.WMS.Core.Op.Entity
/// 订舱标签表 /// 订舱标签表
/// </summary> /// </summary>
[SqlSugar.SugarTable("op_sea_booking_label", "订舱标签表")] [SqlSugar.SugarTable("op_sea_booking_label", "订舱标签表")]
public class BookingLabel : BaseModelV2<long> public class BookingLabel : BaseModel<long>
{ {
/// <summary> /// <summary>
/// 标签名称 /// 标签名称

@ -10,8 +10,8 @@ namespace DS.WMS.Core.Op.Entity
/// <summary> /// <summary>
/// 订舱标签关联表 /// 订舱标签关联表
/// </summary> /// </summary>
[SqlSugar.SugarTable("booking_label_allocation", "订舱标签关联表")] [SqlSugar.SugarTable("op_sea_booking_label_allocation", "订舱标签关联表")]
public class BookingLabelAllocation : BaseModelV2<long> public class BookingLabelAllocation : BaseModel<long>
{ {
/// <summary> /// <summary>
/// 标签主键 /// 标签主键

@ -12,7 +12,7 @@ namespace DS.WMS.Core.Op.Entity
/// 舱位分配表 /// 舱位分配表
/// </summary> /// </summary>
[SqlSugar.SugarTable("op_sea_booking_slot_allocation", "舱位分配表")] [SqlSugar.SugarTable("op_sea_booking_slot_allocation", "舱位分配表")]
public class BookingSlotAllocation : BaseModelV2<long> public class BookingSlotAllocation : BaseModel<long>
{ {
/// <summary> /// <summary>
/// 舱位主键 /// 舱位主键

@ -12,7 +12,7 @@ namespace DS.WMS.Core.Op.Entity
/// 舱位分配集装箱表 /// 舱位分配集装箱表
/// </summary> /// </summary>
[SqlSugar.SugarTable("op_sea_booking_slot_allocation_ctn", "舱位分配集装箱表")] [SqlSugar.SugarTable("op_sea_booking_slot_allocation_ctn", "舱位分配集装箱表")]
public class BookingSlotAllocationCtn : BaseModelV2<long> public class BookingSlotAllocationCtn : BaseModel<long>
{ {
/// <summary> /// <summary>
/// 舱位分配主键 /// 舱位分配主键

@ -13,7 +13,7 @@ namespace DS.WMS.Core.Op.Entity
/// 舱位管理主信息 /// 舱位管理主信息
/// </summary> /// </summary>
[SqlSugar.SugarTable("op_sea_booking_slot_base", "舱位管理主信息")] [SqlSugar.SugarTable("op_sea_booking_slot_base", "舱位管理主信息")]
public class BookingSlotBase : BaseModelV2<long> public class BookingSlotBase : BaseModel<long>
{ {
/// <summary> /// <summary>
/// 舱位提单号 /// 舱位提单号

@ -13,7 +13,7 @@ namespace DS.WMS.Core.Op.Entity
/// 舱位变更比对记录表 /// 舱位变更比对记录表
/// </summary> /// </summary>
[SqlSugar.SugarTable("op_sea_booking_slot_compare", "舱位变更比对记录表")] [SqlSugar.SugarTable("op_sea_booking_slot_compare", "舱位变更比对记录表")]
public class BookingSlotCompare : BaseModelV2<long> public class BookingSlotCompare : BaseModel<long>
{ {
/// <summary> /// <summary>
/// 舱位主键 /// 舱位主键

@ -12,7 +12,7 @@ namespace DS.WMS.Core.Op.Entity
/// 舱位集装箱管理 /// 舱位集装箱管理
/// </summary> /// </summary>
[SqlSugar.SugarTable("op_sea_booking_slot_ctn", "舱位集装箱管理")] [SqlSugar.SugarTable("op_sea_booking_slot_ctn", "舱位集装箱管理")]
public class BookingSlotCtn : BaseModelV2<long> public class BookingSlotCtn : BaseModel<long>
{ {
/// <summary> /// <summary>
/// 舱位主键 /// 舱位主键

@ -11,7 +11,7 @@ namespace DS.WMS.Core.Op.Entity.BookingSlot
/// 舱位分配表 /// 舱位分配表
/// </summary> /// </summary>
[SqlSugar.SugarTable("op_sea_booking_slot_demand", "舱位分配表")] [SqlSugar.SugarTable("op_sea_booking_slot_demand", "舱位分配表")]
public class BookingSlotDemand : BaseModelV2<long> public class BookingSlotDemand : BaseModel<long>
{ {
/// <summary> /// <summary>
/// 客户ID /// 客户ID

@ -11,7 +11,7 @@ namespace DS.WMS.Core.Op.Entity
/// 舱位需求预报记录箱信息 /// 舱位需求预报记录箱信息
/// </summary> /// </summary>
[SqlSugar.SugarTable("op_sea_booking_slot_demand_ctn", "舱位需求预报记录箱信息")] [SqlSugar.SugarTable("op_sea_booking_slot_demand_ctn", "舱位需求预报记录箱信息")]
public class BookingSlotDemandCtn : BaseModelV2<long> public class BookingSlotDemandCtn : BaseModel<long>
{ {
/// <summary> /// <summary>
/// 舱位需求预报记录ID /// 舱位需求预报记录ID

@ -13,7 +13,7 @@ namespace DS.WMS.Core.Op.Entity
/// 舱位库存表 /// 舱位库存表
/// </summary> /// </summary>
[SqlSugar.SugarTable("op_sea_booking_slot_stock", "舱位库存表")] [SqlSugar.SugarTable("op_sea_booking_slot_stock", "舱位库存表")]
public class BookingSlotStock : BaseModelV2<long> public class BookingSlotStock : BaseModel<long>
{ {
/// <summary> /// <summary>
/// 船名 /// 船名

@ -11,7 +11,7 @@ namespace DS.WMS.Core.Op.Entity
/// 预订舱记录表 /// 预订舱记录表
/// </summary> /// </summary>
[SqlSugar.SugarTable("op_sea_space_booking_order", "预订舱记录表")] [SqlSugar.SugarTable("op_sea_space_booking_order", "预订舱记录表")]
public class SpaceBookingOrder : BaseModelV2<long> public class SpaceBookingOrder : BaseModel<long>
{ {
/// <summary> /// <summary>
/// 订舱id /// 订舱id

@ -11,7 +11,7 @@ namespace DS.WMS.Core.Op.Entity
/// 预订舱记录表箱信息 /// 预订舱记录表箱信息
/// </summary> /// </summary>
[SqlSugar.SugarTable("op_sea_space_booking_order_ctn", "预订舱记录表箱信息")] [SqlSugar.SugarTable("op_sea_space_booking_order_ctn", "预订舱记录表箱信息")]
public class SpaceBookingOrderCtn : BaseModelV2<long> public class SpaceBookingOrderCtn : BaseModel<long>
{ {
/// <summary> /// <summary>
/// 主记录ID /// 主记录ID

@ -11,7 +11,7 @@ namespace DS.WMS.Core.Op.Entity
/// 预订舱记录表船期表信息 /// 预订舱记录表船期表信息
/// </summary> /// </summary>
[SqlSugar.SugarTable("op_sea_space_booking_order_shipschedule", "预订舱记录表船期表信息")] [SqlSugar.SugarTable("op_sea_space_booking_order_shipschedule", "预订舱记录表船期表信息")]
public class SpaceBookingOrderShipSchedule : BaseModelV2<long> public class SpaceBookingOrderShipSchedule : BaseModel<long>
{ {
/// <summary> /// <summary>
/// 主记录ID /// 主记录ID

@ -41,10 +41,11 @@ using DS.WMS.Core.Info.Dtos;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using AngleSharp.Dom.Events; using AngleSharp.Dom.Events;
using Microsoft.AspNetCore.Authorization;
namespace DS.WMS.Core.Op.Method namespace DS.WMS.Core.Op.Method
{ {
public class BookingSlotService //: IBookingSlotService public class BookingSlotService : IBookingSlotService
{ {
private readonly IServiceProvider _serviceProvider; private readonly IServiceProvider _serviceProvider;
private readonly ISqlSugarClient db; private readonly ISqlSugarClient db;
@ -2523,6 +2524,150 @@ namespace DS.WMS.Core.Op.Method
return (true, "引入成功"); return (true, "引入成功");
} }
/// <summary>
/// 检索舱位对应的订舱订单(BY 舱位主键)
/// </summary>
/// <param name="id">舱位ID</param>
/// <returns>返回回执</returns>
public async Task<BookingSlotWithOrderDto> SearchBookingSlotWithOrderById(long id)
{
return null;
}
/// <summary>
/// 刷新库存
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public async Task RefreshStock(BookingSlotStockUpdateModel input)
{
//input.TenantId = UserManager.TENANT_ID;
//更新库存
//await _publisher.PublishAsync(new ChannelEventSource("BookingSlotStock:Update", input));
}
#region 订舱编号检索舱位信息
/// <summary>
/// 订舱编号检索舱位信息
/// </summary>
/// <param name="slotBookingNo">订舱编号</param>
/// <param name="CarrierId">船公司ID</param>
/// <returns></returns>
public async Task<long> QueryBookingSlot(string slotBookingNo, string CarrierId)
{
long id = 0;
try
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var model = tenantDb.Queryable<BookingSlotBase>().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
/// <summary>
/// 库存查询
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public async Task<dynamic> PageStock(BookingSlotStockPageInput input)
{
return null;
}
/// <summary>
/// 生成合票订舱订单
/// </summary>
/// <param name="model">生成订舱订单请求</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> MergeCreateBookingOrder(BookingGenerateDto model)
{
return null;
}
/// <summary>
/// 估算差异重要提醒
/// </summary>
/// <param name="bcSrcDto">原舱位详情</param>
/// <param name="bcTargetDto">新舱位详情</param>
/// <param name="slotId">舱位ID</param>
/// <returns></returns>
[NonAction]
public async Task MeasureDiffCautionTask(ParserBCInfoDto bcSrcDto, ParserBCInfoDto bcTargetDto, long slotId)
{
return;
}
/// <summary>
/// 检索舱位对应的订舱订单(BY 订舱编号)
/// </summary>
/// <param name="slotBookingNo">订舱编号</param>
/// <param name="tenantId">租户ID</param>
/// <returns>返回回执</returns>
public async Task<BookingSlotWithOrderDto> SearchBookingSlotWithOrderByNo(string slotBookingNo, long tenantId)
{
return null;
}
/// <summary>
/// 导入舱位
/// </summary>
/// <param name="file">导入舱位文件</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> ImportSlotFromFile(IFormFile file)
{
return null;
}
Task<DataResult<List<BookingSlotBaseWithCtnDto>>> IBookingSlotService.GetAvailableSlots(BookingSlotBaseDto slotInput, List<long> slotIdListInput, PageWithTotal pageInfo)
{
throw new NotImplementedException();
}
Task<dynamic> IBookingSlotService.Page(BookingSlotBasePageInput input)
{
throw new NotImplementedException();
}
Task<long> IBookingSlotService.InnerApiReceive(BookingSlotBaseApiDto dto, DynameFileInfo file, DynameFileInfo modifyFile)
{
throw new NotImplementedException();
}
Task<List<CompareResultDetailInfo>> IBookingSlotService.GetSlotCompareResult(long id, string batchNo)
{
throw new NotImplementedException();
}
Task<TaskManageOrderResultDto> IBookingSlotService.CreateBookingOrder(BookingGenerateDto model)
{
throw new NotImplementedException();
}
Task<string> IBookingSlotService.ExcuteCompare(ParserBCInfoDto bcSrcDto, ParserBCInfoDto bcTargetDto)
{
throw new NotImplementedException();
}
Task<List<BookingSlotBaseSaveOutput>> IBookingSlotService.GetSlotList(long[] ids)
{
throw new NotImplementedException();
}
} }
public static class LetterIndexUtil public static class LetterIndexUtil

@ -1968,11 +1968,13 @@ namespace DS.WMS.Core.Op.Method
if (model == null) if (model == null)
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingAPIOrderDeletedOrNoExists))); throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingAPIOrderDeletedOrNoExists)));
DateTime nowDate = DateTime.Now;
if (opTypeName == "BookingConfirmation") if (opTypeName == "BookingConfirmation")
{ {
model.IsRecvBC = true; model.IsRecvBC = true;
model.LstRecvBCDate = DateTime.Now; model.LstRecvBCDate = nowDate;
model.UpdateTime = model.LstRecvBCDate; model.UpdateTime = nowDate;
model.UpdateBy = long.Parse(user.UserId); model.UpdateBy = long.Parse(user.UserId);
//model.UpdatedUserName = UserManager.Name; //model.UpdatedUserName = UserManager.Name;
@ -1987,8 +1989,8 @@ namespace DS.WMS.Core.Op.Method
else if (opTypeName == "Cancellation") else if (opTypeName == "Cancellation")
{ {
model.IsRecvBKCancel = true; model.IsRecvBKCancel = true;
model.LstRecvBKCancelDate = DateTime.Now; model.LstRecvBKCancelDate = nowDate;
model.UpdateTime = model.LstRecvBKCancelDate; model.UpdateTime = nowDate;
model.UpdateBy = long.Parse(user.UserId); model.UpdateBy = long.Parse(user.UserId);
//model.UpdatedUserName = UserManager.Name; //model.UpdatedUserName = UserManager.Name;

@ -2052,11 +2052,13 @@ namespace DS.WMS.Core.Op.Method
if (model == null) if (model == null)
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingAPIOrderDeletedOrNoExists))); throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingAPIOrderDeletedOrNoExists)));
DateTime nowDate = DateTime.Now;
if (opTypeName == "BookingConfirmation") if (opTypeName == "BookingConfirmation")
{ {
model.IsRecvBC = true; model.IsRecvBC = true;
model.LstRecvBCDate = DateTime.Now; model.LstRecvBCDate = nowDate;
model.UpdateTime = model.LstRecvBCDate; model.UpdateTime = nowDate;
model.UpdateBy = long.Parse(user.UserId); model.UpdateBy = long.Parse(user.UserId);
//model.UpdatedUserName = UserManager.Name; //model.UpdatedUserName = UserManager.Name;
@ -2072,8 +2074,8 @@ namespace DS.WMS.Core.Op.Method
else if (opTypeName == "Cancellation") else if (opTypeName == "Cancellation")
{ {
model.IsRecvBKCancel = true; model.IsRecvBKCancel = true;
model.LstRecvBKCancelDate = DateTime.Now; model.LstRecvBKCancelDate = nowDate;
model.UpdateTime = model.LstRecvBKCancelDate; model.UpdateTime = nowDate;
model.UpdateBy = long.Parse(user.UserId); model.UpdateBy = long.Parse(user.UserId);
//model.UpdatedUserName = UserManager.Name; //model.UpdatedUserName = UserManager.Name;

@ -9,10 +9,6 @@
<DocumentationFile>bin\Debug\net8.0\Api.xml</DocumentationFile> <DocumentationFile>bin\Debug\net8.0\Api.xml</DocumentationFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<Compile Remove="Controllers\BookingSlotServiceController.cs" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\DS.Module.AutofacModule\DS.Module.AutofacModule.csproj" /> <ProjectReference Include="..\DS.Module.AutofacModule\DS.Module.AutofacModule.csproj" />
<ProjectReference Include="..\DS.Module.Core\DS.Module.Core.csproj" /> <ProjectReference Include="..\DS.Module.Core\DS.Module.Core.csproj" />

@ -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.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 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: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.

Loading…
Cancel
Save