提示语

This commit is contained in:
tongfei
2023-11-30 18:05:54 +08:00
parent 883b5fd451
commit e22f576466
2 changed files with 16 additions and 3 deletions

View File

@@ -489,8 +489,19 @@ namespace WMS.Web.Domain.Services
//3.比对false为比对失败;
bool isRight = boxDetails.All(x => task_details.Any(t => t.MaterialId == x.MaterialId && t.AccruedQty >= x.Qty)) && boxDetails.Count <= task_details.Count;
if (!isRight)
return Result<ContrastMaterialsResponse>.ReFailure(ResultCodes.ContrastError);
if (!isRight)
{
var qtyIsError= boxDetails.All(x => task_details.Any(t => t.MaterialId == x.MaterialId && t.AccruedQty < x.Qty));
if (boxDetails.Count> task_details.Count && qtyIsError)
return Result<ContrastMaterialsResponse>.ReFailure(ResultCodes.ContrastError);
else if(qtyIsError)
return Result<ContrastMaterialsResponse>.ReFailure(ResultCodes.Contrast_Qty_Error);
else
return Result<ContrastMaterialsResponse>.ReFailure(ResultCodes.Contrast_Count_Error);
}
//4.是否任务单存在绑定箱号判断:存在的话,就不能收货或者非采购上架
bool isHave = task.Boxs.Where(x => dto.BoxBillNos.Contains(x.BoxBillNo)).Any();

View File

@@ -43,7 +43,9 @@ 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, "箱物料对应的采购订单匹配失败,请核对后再试!");
public static ValueTuple<int, string> ContrastError = (80003, "箱内产品和数量与来源单不一致");
public static ValueTuple<int, string> Contrast_Count_Error = (80003, "箱内产品和来源单不一致");
public static ValueTuple<int, string> Contrast_Qty_Error = (80003, "箱内产品数量超过可入库数量");
public static ValueTuple<int, string> ErpOrgError = (80004, "获取Erp相关组织数据失败请稍候再试");
public static ValueTuple<int, string> ErpSupplierError = (80005, "获取Erp相关供应商数据失败请稍候再试");