Merge branch 'master' of https://codeup.aliyun.com/62ce7bca487c500c27f70a79/OPS/WMS-Api
This commit is contained in:
@@ -247,13 +247,22 @@ namespace WMS.Web.Domain.Services
|
||||
{
|
||||
_logger.LogInformation($"移箱:{JsonConvert.SerializeObject(dto)} 是否上架:{IsUp} 操作人:{loginInfo.UserInfo.StaffId}");
|
||||
//1.下架时 需要验证箱是否在库存里
|
||||
var boxIds = dto.Select(s => s.BoxId).ToList();
|
||||
var boxList = await _boxInventoryRepositories.GetList(boxIds);
|
||||
if (!IsUp)
|
||||
{
|
||||
var boxIds = dto.Select(s => s.BoxId).ToList();
|
||||
var boxList = await _boxInventoryRepositories.GetList(boxIds);
|
||||
if (boxIds.Count() != boxList.Count())
|
||||
return Result.ReFailure(ResultCodes.BoxInventoryNoDataError);
|
||||
}
|
||||
else
|
||||
{
|
||||
//上架时 箱子不能在库存里
|
||||
if (boxList.Count() > 0)
|
||||
{
|
||||
var boxs = await _boxRepositories.GetEntityList(boxList.Select(s => s.BoxId).ToList());
|
||||
return Result.ReFailure($"箱号{ string.Join(",", boxs.Select(s => s.BoxBillNo))} 已上架", 343433);
|
||||
}
|
||||
}
|
||||
List<MoveBoxRecord> entityList = new List<MoveBoxRecord>();
|
||||
foreach (var d in dto)
|
||||
{
|
||||
|
||||
@@ -218,10 +218,7 @@ namespace WMS.Web.Domain.Services
|
||||
UnitId = new ErpNumberDto(unitNumber), //物料带出来
|
||||
StockId = new ErpNumberDto(d.StockCode),
|
||||
SubStockId = new ErpSubStockDto(d.StockCode, d.Erp_SubStockCode),
|
||||
BeforeQty = d.BeforeQty,
|
||||
AfterQty = d.AfterQty,
|
||||
FinalQty = entity.ResultType == TakeStockType.Profit ? d.FinalQty : 0,
|
||||
LossQty = entity.ResultType == TakeStockType.Loss ? d.FinalQty : 0,
|
||||
Fnote = d.Remark
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user