diff --git a/ds-wms-service/DS.WMS.Core/Op/Interface/BookingSlot/IBookingSlotService.cs b/ds-wms-service/DS.WMS.Core/Op/Interface/BookingSlot/IBookingSlotService.cs
index 8b823b6d..948d11d4 100644
--- a/ds-wms-service/DS.WMS.Core/Op/Interface/BookingSlot/IBookingSlotService.cs
+++ b/ds-wms-service/DS.WMS.Core/Op/Interface/BookingSlot/IBookingSlotService.cs
@@ -127,7 +127,7 @@ namespace DS.WMS.Core.Op.Interface
///
/// 生成订舱订单请求
/// 返回回执
- Task CreateBookingOrder(BookingGenerateDto model);
+ Task> CreateBookingOrder(BookingGenerateDto model);
///
/// 检索舱位对应的订舱订单(BY 舱位主键)
@@ -152,7 +152,7 @@ namespace DS.WMS.Core.Op.Interface
/// BC详情
/// BC变更后详情
/// 返回回执
- Task ExcuteCompare(ParserBCInfoDto bcSrcDto, ParserBCInfoDto bcTargetDto);
+ Task> ExcuteCompare(ParserBCInfoDto bcSrcDto, ParserBCInfoDto bcTargetDto);
///
/// 推送BC变更比对
@@ -186,7 +186,7 @@ namespace DS.WMS.Core.Op.Interface
///
/// 舱位ID组
/// 返回舱位详情
- Task> GetSlotList(long[] ids);
+ Task>> GetSlotList(long[] ids);
///
/// 获取合票详情(生成合票需要先调此方法)
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 63ea924c..ddf82622 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
@@ -1582,7 +1582,8 @@ namespace DS.WMS.Core.Op.Method
Logger.Log(NLog.LogLevel.Info, $"批次={batchNo} slotId={slotId} 开始请求比对结果");
- var compareResult = await ExcuteCompare(bcSrcDto, bcTargetDto);
+ var rlt = await ExcuteCompare(bcSrcDto, bcTargetDto);
+ var compareResult = rlt.Data;
Logger.Log(NLog.LogLevel.Info, $"批次={batchNo} slotId={slotId} 请求比对结果完成,结果={JsonConvert.SerializeObject(compareResult)}");
@@ -1611,9 +1612,9 @@ namespace DS.WMS.Core.Op.Method
CreateTime = nowDate,
UpdateTime = nowDate,
CreateBy = long.Parse(user.UserId),
- //CreatedUserName = UserManager.Name,
+ CreateUserName = user.UserName,
UpdateBy = long.Parse(user.UserId),
- //UpdatedUserName = UserManager.Name,
+ UpdateUserName = user.UserName,
CompareType = "BC_MODIFY",
CompareRlt = JsonConvert.SerializeObject(compareResult.extra.ShowDetailList),
};
@@ -1625,7 +1626,7 @@ namespace DS.WMS.Core.Op.Method
hisInfo.CompareDiffNum = compareResult.extra.IsExistsDiff ? compareResult.extra.ShowDetailList.Count : 0;
hisInfo.UpdateTime = nowDate;
hisInfo.UpdateBy = long.Parse(user.UserId);
- //hisInfo.UpdatedUserName = user.UserName;
+ hisInfo.UpdateUserName = user.UserName;
hisInfo.CompareRlt = JsonConvert.SerializeObject(compareResult.extra.ShowDetailList);
@@ -1636,7 +1637,7 @@ namespace DS.WMS.Core.Op.Method
it.CompareRlt,
it.UpdateTime,
it.UpdateBy,
- //it.UpdatedUserName
+ it.UpdateUserName
}).ExecuteCommandAsync();
}
//throw Oops.Oh($"舱位主键{slotId}请求BC比对失败,返回为空");
@@ -1660,8 +1661,7 @@ namespace DS.WMS.Core.Op.Method
/// BC详情
/// BC变更后详情
/// 返回回执
- [NonAction]
- public async Task ExcuteCompare(ParserBCInfoDto bcSrcDto, ParserBCInfoDto bcTargetDto)
+ public async Task> ExcuteCompare(ParserBCInfoDto bcSrcDto, ParserBCInfoDto bcTargetDto)
{
TaskManageExcuteResultDto model = null;
/*
@@ -1715,7 +1715,10 @@ namespace DS.WMS.Core.Op.Method
}
}
- return model;
+ if (model != null)
+ return DataResult.Success(model);
+
+ return DataResult.FailedData(model); ;
}
#endregion
@@ -2833,20 +2836,31 @@ namespace DS.WMS.Core.Op.Method
throw new NotImplementedException();
}
- Task IBookingSlotService.CreateBookingOrder(BookingGenerateDto model)
+ #region 获取舱位详情列表
+ ///
+ /// 获取舱位详情列表
+ ///
+ /// 舱位ID组
+ /// 返回舱位详情
+ public async Task>> GetSlotList(long[] ids)
{
- throw new NotImplementedException();
- }
+ var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
- Task IBookingSlotService.ExcuteCompare(ParserBCInfoDto bcSrcDto, ParserBCInfoDto bcTargetDto)
- {
- throw new NotImplementedException();
- }
+ var slotList = await tenantDb.Queryable().Where(u => ids.Contains(u.Id) && u.Deleted == false).ToListAsync();
+ if (slotList.Count == 0)
+ {
+ //未查询到此舱位信息,可能已被删除,请重新查询后重试
+ throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.BookingSlotBaseInfoNull)));
+ }
- Task> IBookingSlotService.GetSlotList(long[] ids)
- {
- throw new NotImplementedException();
+ var data = slotList.Select(a => a.Adapt()).ToList();
+
+ if (data.Count > 0)
+ return DataResult>.Success(data);
+
+ return DataResult>.FailedData(data);
}
+ #endregion
}
public static class LetterIndexUtil