|
|
|
@ -978,7 +978,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
|
|
|
|
|
dto.DataObj.CtnList.ForEach(t =>
|
|
|
|
|
{
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(t.CtnAll) && string.IsNullOrWhiteSpace(t.CtnCode))
|
|
|
|
|
if ((!string.IsNullOrWhiteSpace(t.CtnAll) && string.IsNullOrWhiteSpace(t.CtnCode)) || (!string.IsNullOrWhiteSpace(t.CtnAll) && t.CtnAll == t.CtnCode))
|
|
|
|
|
{
|
|
|
|
|
var ctnCode = ctnCodeList.FirstOrDefault(a => !string.IsNullOrWhiteSpace(a.CtnName) &&
|
|
|
|
|
a.CtnName.Equals(t.CtnAll, StringComparison.OrdinalIgnoreCase));
|
|
|
|
@ -1799,7 +1799,8 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var list = await GetAvailableSlots(null, model.MergeList, null);
|
|
|
|
|
var getRlt = await GetAvailableSlots(null, model.MergeList, null);
|
|
|
|
|
var list = getRlt.Data;
|
|
|
|
|
|
|
|
|
|
//舱位合票失败,校验库存为不可用,请确认正确的库存
|
|
|
|
|
if (list.Count == 0)
|
|
|
|
@ -1853,14 +1854,14 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
/// <param name="pageInfo">可选:分页信息</param>
|
|
|
|
|
public async Task<DataResult<SqlSugarPagedList<BookingSlotBaseWithCtnDto>>> GetAvailableSlots(BookingSlotBaseDto input,PageWithTotal pageInfo)
|
|
|
|
|
{
|
|
|
|
|
var result = await GetAvailableSlots(input, null, pageInfo);
|
|
|
|
|
var rlt = await GetAvailableSlots(input, null, pageInfo);
|
|
|
|
|
|
|
|
|
|
SqlSugarPagedList<BookingSlotBaseWithCtnDto> pageResult = new()
|
|
|
|
|
{
|
|
|
|
|
PageIndex = pageInfo.PageNo,
|
|
|
|
|
PageSize = pageInfo.PageSize,
|
|
|
|
|
TotalCount = pageInfo.Total,
|
|
|
|
|
Items = result,
|
|
|
|
|
Items = rlt.Data,
|
|
|
|
|
};
|
|
|
|
|
return DataResult<SqlSugarPagedList<BookingSlotBaseWithCtnDto>>.Success(pageResult);
|
|
|
|
|
}
|
|
|
|
@ -1874,7 +1875,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
/// <param name="slotIdListInput">筛选条件2:舱位主键列表</param>
|
|
|
|
|
/// <param name="pageInfo">筛选条件3:分页</param>
|
|
|
|
|
/// <returns>可用的舱位列表(含可用的箱子列表)</returns>
|
|
|
|
|
public async Task<List<BookingSlotBaseWithCtnDto>> GetAvailableSlots(BookingSlotBaseDto slotInput = null,
|
|
|
|
|
public async Task<DataResult<List<BookingSlotBaseWithCtnDto>>> GetAvailableSlots(BookingSlotBaseDto slotInput = null,
|
|
|
|
|
List<long> slotIdListInput = null,
|
|
|
|
|
PageWithTotal pageInfo = null)
|
|
|
|
|
{
|
|
|
|
@ -1985,7 +1986,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
return DataResult<List<BookingSlotBaseWithCtnDto>>.Success(result);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -2022,8 +2023,9 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
}
|
|
|
|
|
var slotIdList = slots.Select(s => s.Id).ToList();
|
|
|
|
|
|
|
|
|
|
var lsRlt = await GetAvailableSlots(null, slotIdList);
|
|
|
|
|
// 查询可用舱位及箱子列表
|
|
|
|
|
var latestSlotList = await GetAvailableSlots(null, slotIdList);
|
|
|
|
|
var latestSlotList = lsRlt.Data;
|
|
|
|
|
|
|
|
|
|
// 判断余量是否满足需求
|
|
|
|
|
foreach (var inSlotItem in slots)
|
|
|
|
@ -3469,10 +3471,6 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
Task<DataResult<List<BookingSlotBaseWithCtnDto>>> IBookingSlotService.GetAvailableSlots(BookingSlotBaseDto slotInput, List<long> slotIdListInput, PageWithTotal pageInfo)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 舱位台账查询
|
|
|
|
@ -3662,10 +3660,42 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Task<List<CompareResultDetailInfo>> IBookingSlotService.GetSlotCompareResult(long id, string batchNo)
|
|
|
|
|
#region 获取舱位变更比对结果
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取舱位变更比对结果
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id">舱位主键</param>
|
|
|
|
|
/// <param name="batchNo">批次号</param>
|
|
|
|
|
/// <returns>返回舱位变更比对结果</returns>
|
|
|
|
|
public async Task<DataResult<List<CompareResultDetailInfo>>> GetSlotCompareResult(long id, string batchNo)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
|
|
|
|
|
|
var compareInfo = await tenantDb.Queryable<BookingSlotCompare>()
|
|
|
|
|
.FirstAsync(t => t.SlotId == id && t.CompareBatchNo == batchNo);
|
|
|
|
|
|
|
|
|
|
if (compareInfo == null)
|
|
|
|
|
{
|
|
|
|
|
//舱位变更比对结果不存在
|
|
|
|
|
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.BookingSlotCompareNull)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(compareInfo.CompareRlt))
|
|
|
|
|
{
|
|
|
|
|
//获取舱位变更比对结果错误,比对内容不存在
|
|
|
|
|
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.BookingSlotCompareJsonNull)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(compareInfo.CompareRlt))
|
|
|
|
|
{
|
|
|
|
|
var data = JsonConvert.DeserializeObject<List<CompareResultDetailInfo>>(compareInfo.CompareRlt);
|
|
|
|
|
|
|
|
|
|
return DataResult<List<CompareResultDetailInfo>>.Success(data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return DataResult<List<CompareResultDetailInfo>>.FailedData(new List<CompareResultDetailInfo>());
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 获取舱位详情列表
|
|
|
|
|
/// <summary>
|
|
|
|
|