修复bug

This commit is contained in:
18942506660
2023-11-13 15:38:48 +08:00
parent fc05ef6dde
commit 646c8afd3b
2 changed files with 6 additions and 0 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

@@ -26,6 +26,7 @@ namespace WMS.Web.Domain.Values
public static ValueTuple<int, string> MergeStatusError = (70000, "所选单据数据不一致,不能合并");
public static ValueTuple<int, string> OutStockQtyError = (70001, "可出库数量不足");
public static ValueTuple<int, string> OutStockTaskNoData = (70002, "出库任务数据不存在");
public static ValueTuple<int, string> OutStockMaterialError = (70003, "出库物料在任务单中不存在");
public static ValueTuple<int, string> BoxNoData = (80000, "箱信息不存在");
public static ValueTuple<int, string> BoxMateriaNoData = (800010, "箱对应物料信息不存在");