优化1
This commit is contained in:
@@ -59,6 +59,7 @@ namespace WMS.Web.Domain.Services
|
||||
_inStockTaskRepositories = inStockTaskRepositories;
|
||||
_erpBasicDataExtendService = erpBasicDataExtendService;
|
||||
_serialNumbersRepositories = serialNumbersRepositories;
|
||||
_boxInventoryRepositories = boxInventoryRepositories;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -529,11 +530,21 @@ namespace WMS.Web.Domain.Services
|
||||
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);
|
||||
{
|
||||
if (task.Type == InstockType.Purchase)
|
||||
return Result<ContrastMaterialsResponse>.ReFailure(ResultCodes.Contrast_Purchase_Error);
|
||||
else
|
||||
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);
|
||||
{
|
||||
if (task.Type == InstockType.Purchase)
|
||||
return Result<ContrastMaterialsResponse>.ReFailure(ResultCodes.Contrast_Purchase_Count_Error);
|
||||
else
|
||||
return Result<ContrastMaterialsResponse>.ReFailure(ResultCodes.Contrast_Count_Error);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user