This commit is contained in:
tongfei
2023-11-13 16:07:22 +08:00
5 changed files with 20 additions and 9 deletions

View File

@@ -60,6 +60,11 @@ namespace WMS.Web.Domain.Services
//nos.Add(outStockTask.SourceBillNo);
//var res = await _outStockTaskService.Ssyn(nos);
//if (!res.IsSuccess) return Result.ReSuccess();
//上传的物料在任务单里没有找到不能出库
var ex = dto.Details.Select(s=>s.MaterialId).Except(outStockTask.Details.Select(s=>s.MaterialId)).ToList();
if (ex.Count() > 0)
return Result.ReFailure(ResultCodes.OutStockMaterialError);
OutStock entity = new OutStock();
entity.Create(loginInfo.UserInfo.StaffId, outStockTask);

View File

@@ -298,7 +298,7 @@ namespace WMS.Web.Domain.Services
public async Task<Result> InStock(InStock inStock, LoginInDto loginInfo, bool isTransaction = true)
{
//获取序列号信息
var serialNumbers = new List<string>();// inStock.Details.SelectMany(s => s.SerialNumbers).ToList();
var serialNumbers = inStock.Details.SelectMany(s => s.SerialNumbers).ToList();
var entityList = await _serialNumbersRepositories.GetEntityList(serialNumbers);
var boxIds = entityList.Select(s => s.BoxId).ToList();
var boxList = await _boxRepositories.GetEntityList(boxIds);