对比失败,直接接口返回错误信息
This commit is contained in:
@@ -241,13 +241,14 @@ namespace WMS.Web.Domain.Services
|
||||
|
||||
//3.比对
|
||||
bool isRight = box.Details.All(x => task.Details.Any(t => t.MaterialId == x.MaterialId && t.AccruedQty == x.Qty)) && box.Details.Count == task.Details.Count;
|
||||
if(!isRight)
|
||||
return Result<ContrastMaterialsResponse>.ReFailure(ResultCodes.ContrastError);
|
||||
|
||||
//4.返回对比结果:true为比对成功,false为比对失败;并把箱ID和箱号返回
|
||||
var response = new ContrastMaterialsResponse();
|
||||
response.BoxBillNo = box.BoxBillNo;
|
||||
response.BoxId = box.Id;
|
||||
response.TotalCount = box.Details.Sum(x => x.Qty);
|
||||
response.IsRight = isRight;
|
||||
response.TotalCount = box.Details.Sum(x => x.Qty);
|
||||
return Result<ContrastMaterialsResponse>.ReSuccess(response);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace WMS.Web.Domain.Values
|
||||
public static ValueTuple<int, string> ErpStockNoData = (900000, "Erp仓库信息不完整");
|
||||
public static ValueTuple<int, string> Box_NoBind_Task_Data = (80001, "该箱号不在收货信息中,请核对再试!");
|
||||
public static ValueTuple<int, string> OrderNoData = (80002, "单据信息不存在,请核对后再试!");
|
||||
public static ValueTuple<int, string> ContrastError = (80003, "箱物料对应的采购订单匹配失败,请核对后再试!");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user