优化1
This commit is contained in:
@@ -59,6 +59,7 @@ namespace WMS.Web.Domain.Services
|
|||||||
_inStockTaskRepositories = inStockTaskRepositories;
|
_inStockTaskRepositories = inStockTaskRepositories;
|
||||||
_erpBasicDataExtendService = erpBasicDataExtendService;
|
_erpBasicDataExtendService = erpBasicDataExtendService;
|
||||||
_serialNumbersRepositories = serialNumbersRepositories;
|
_serialNumbersRepositories = serialNumbersRepositories;
|
||||||
|
_boxInventoryRepositories = boxInventoryRepositories;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <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));
|
var qtyIsError = boxDetails.All(x => task_details.Any(t => t.MaterialId == x.MaterialId && t.AccruedQty < x.Qty));
|
||||||
|
|
||||||
if (boxDetails.Count > task_details.Count && qtyIsError)
|
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)
|
else if (qtyIsError)
|
||||||
return Result<ContrastMaterialsResponse>.ReFailure(ResultCodes.Contrast_Qty_Error);
|
return Result<ContrastMaterialsResponse>.ReFailure(ResultCodes.Contrast_Qty_Error);
|
||||||
else
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ namespace WMS.Web.Domain.Values
|
|||||||
public static ValueTuple<int, string> Box_NoBind_Task_Data = (80001, "该箱号不在收货信息中,请核对再试!");
|
public static ValueTuple<int, string> Box_NoBind_Task_Data = (80001, "该箱号不在收货信息中,请核对再试!");
|
||||||
public static ValueTuple<int, string> OrderNoData = (80002, "单据信息不存在,请核对后再试!");
|
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_Purchase_Error = (80003, "箱内产品和数量与来源单不一致");
|
||||||
|
public static ValueTuple<int, string> Contrast_Purchase_Count_Error = (80003, "箱内产品和采购单不一致");
|
||||||
public static ValueTuple<int, string> Contrast_Count_Error = (80003, "箱内产品和来源单不一致");
|
public static ValueTuple<int, string> Contrast_Count_Error = (80003, "箱内产品和来源单不一致");
|
||||||
public static ValueTuple<int, string> Contrast_Qty_Error = (80003, "箱内产品数量超过可入库数量");
|
public static ValueTuple<int, string> Contrast_Qty_Error = (80003, "箱内产品数量超过可入库数量");
|
||||||
|
|
||||||
@@ -52,7 +54,7 @@ namespace WMS.Web.Domain.Values
|
|||||||
public static ValueTuple<int, string> ErpSupplierError = (80005, "获取Erp相关供应商数据失败,请稍候再试!");
|
public static ValueTuple<int, string> ErpSupplierError = (80005, "获取Erp相关供应商数据失败,请稍候再试!");
|
||||||
public static ValueTuple<int, string> ErpStockError = (80006, "获取Erp相关仓库数据失败,请稍候再试!");
|
public static ValueTuple<int, string> ErpStockError = (80006, "获取Erp相关仓库数据失败,请稍候再试!");
|
||||||
public static ValueTuple<int, string> ErpMaterialError = (80007, "获取Erp相关物料数据失败,请稍候再试!");
|
public static ValueTuple<int, string> ErpMaterialError = (80007, "获取Erp相关物料数据失败,请稍候再试!");
|
||||||
public static ValueTuple<int, string> BoxHaveError = (80008, "该箱信息已被记录,请重新选择箱号!");
|
public static ValueTuple<int, string> BoxHaveError = (80008, "箱号已收货");
|
||||||
public static ValueTuple<int, string> AdjustError = (80009, "与金蝶校准发生错误,请稍候再试!");
|
public static ValueTuple<int, string> AdjustError = (80009, "与金蝶校准发生错误,请稍候再试!");
|
||||||
public static ValueTuple<int, string> InventoryNoSourceError = (800010, "来源数据不存在,请稍候再试!");
|
public static ValueTuple<int, string> InventoryNoSourceError = (800010, "来源数据不存在,请稍候再试!");
|
||||||
public static ValueTuple<int, string> BoxInventoryNoDataError = (800011, "箱库存数据不存在,请稍候再试!");
|
public static ValueTuple<int, string> BoxInventoryNoDataError = (800011, "箱库存数据不存在,请稍候再试!");
|
||||||
|
|||||||
Reference in New Issue
Block a user