|
|
|
@ -46,6 +46,7 @@ using DS.WMS.Core.Map.Interface;
|
|
|
|
|
using DS.WMS.Core.Code.Interface;
|
|
|
|
|
using DS.WMS.Core.Code.Method;
|
|
|
|
|
using DS.WMS.Core.Map.Method;
|
|
|
|
|
using DS.Module.Core.Extensions;
|
|
|
|
|
|
|
|
|
|
namespace DS.WMS.Core.Op.Method
|
|
|
|
|
{
|
|
|
|
@ -2539,28 +2540,55 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
return (true, "引入成功");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 检索舱位对应的订舱订单(BY 舱位主键)
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 检索舱位对应的订舱订单(BY 舱位主键)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id">舱位ID</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
public async Task<BookingSlotWithOrderDto> SearchBookingSlotWithOrderById(long id)
|
|
|
|
|
public async Task<DataResult<BookingSlotWithOrderDto>> SearchBookingSlotWithOrderById(long id)
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
BookingSlotWithOrderDto dto = null;
|
|
|
|
|
|
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
|
|
|
|
|
|
var slotInfo = await tenantDb.Queryable<BookingSlotBase>().FirstAsync(a => a.Id == id);
|
|
|
|
|
|
|
|
|
|
if (slotInfo == null)
|
|
|
|
|
{
|
|
|
|
|
Logger.Log(NLog.LogLevel.Info, $"id={id} 获取舱位失败,舱位不存在或已作废");
|
|
|
|
|
|
|
|
|
|
return DataResult<BookingSlotWithOrderDto>.FailedData(dto);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var list = tenantDb.Queryable<BookingSlotAllocation>().Where(a => a.BookingSlotId == id).ToList();
|
|
|
|
|
|
|
|
|
|
dto = new BookingSlotWithOrderDto
|
|
|
|
|
{
|
|
|
|
|
BookingSlotId = slotInfo.Id,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if (list.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
dto.HasBookingOrder = true;
|
|
|
|
|
dto.BookingOrderList = list.Select(x => x.Id).ToList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return DataResult<BookingSlotWithOrderDto>.Success(dto);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 刷新库存
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 刷新库存
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="input"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public async Task RefreshStock(BookingSlotStockUpdateModel input)
|
|
|
|
|
/// <param name="input">请求参数</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
public async Task<DataResult<string>> RefreshStock(BookingSlotStockUpdateModel input)
|
|
|
|
|
{
|
|
|
|
|
//input.TenantId = UserManager.TENANT_ID;
|
|
|
|
|
//更新库存
|
|
|
|
|
//await _publisher.PublishAsync(new ChannelEventSource("BookingSlotStock:Update", input));
|
|
|
|
|
return await _bookingSlotStockService.BookingSlotStock(input);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 订舱编号检索舱位信息
|
|
|
|
|
/// <summary>
|
|
|
|
@ -2593,15 +2621,27 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 库存台账查询
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 库存查询
|
|
|
|
|
/// 库存台账查询
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="input"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public async Task<dynamic> PageStock(BookingSlotStockPageInput input)
|
|
|
|
|
public async Task<DataResult<List<BookingSlotStockDto>>> GetPageStockAsync(PageRequest querySearch)
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
|
|
|
|
|
|
//序列化查询条件
|
|
|
|
|
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(querySearch.QueryCondition);
|
|
|
|
|
var result = tenantDb.Queryable<BookingSlotStock>()
|
|
|
|
|
.Select<BookingSlotStockDto>()
|
|
|
|
|
.Where(whereList);
|
|
|
|
|
|
|
|
|
|
var list = result.ToList();
|
|
|
|
|
|
|
|
|
|
return await result.ToQueryPageAsync(querySearch.PageCondition);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 生成合票订舱订单
|
|
|
|
|