优化接口
This commit is contained in:
@@ -1792,6 +1792,11 @@
|
|||||||
仓库编码
|
仓库编码
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStockTask.ContrastMaterialsRequest.MaterialNumber">
|
||||||
|
<summary>
|
||||||
|
所选物料
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:WMS.Web.Core.Dto.InStockTask.ContrastMaterialsRequest.BoxBillNos">
|
<member name="P:WMS.Web.Core.Dto.InStockTask.ContrastMaterialsRequest.BoxBillNos">
|
||||||
<summary>
|
<summary>
|
||||||
箱号集合
|
箱号集合
|
||||||
|
|||||||
@@ -23,6 +23,11 @@ namespace WMS.Web.Core.Dto.InStockTask
|
|||||||
[Required(ErrorMessage = "仓库不能为空")]
|
[Required(ErrorMessage = "仓库不能为空")]
|
||||||
public string StockCode { get; set; }
|
public string StockCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 所选物料
|
||||||
|
/// </summary>
|
||||||
|
public string MaterialNumber { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 箱号集合
|
/// 箱号集合
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -653,6 +653,14 @@ namespace WMS.Web.Domain.Services
|
|||||||
if (boxs == null || boxs.Count == 0)
|
if (boxs == null || boxs.Count == 0)
|
||||||
return Result<ContrastMaterialsResponse>.ReFailure(ResultCodes.BoxNoData);
|
return Result<ContrastMaterialsResponse>.ReFailure(ResultCodes.BoxNoData);
|
||||||
|
|
||||||
|
//判断箱不存在所选的物料
|
||||||
|
foreach (var item in boxs)
|
||||||
|
{
|
||||||
|
var isAnyHave= item.Details.Any(x => x.MaterialNumber == dto.MaterialNumber);
|
||||||
|
if(!isAnyHave)
|
||||||
|
return Result<ContrastMaterialsResponse>.ReFailure(item.BoxBillNo+ResultCodes.BoxNoMaterialError.Item2, ResultCodes.BoxNoMaterialError.Item1);
|
||||||
|
}
|
||||||
|
|
||||||
//3.判断箱里面对应的物料是否存在;不存在就报错
|
//3.判断箱里面对应的物料是否存在;不存在就报错
|
||||||
foreach (var item in boxs)
|
foreach (var item in boxs)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ namespace WMS.Web.Domain.Values
|
|||||||
public static ValueTuple<int, string> BoxNoData = (80000, "系统找不到该箱号");
|
public static ValueTuple<int, string> BoxNoData = (80000, "系统找不到该箱号");
|
||||||
public static ValueTuple<int, string> InStockTaskBoxIsHaveData = (80000, "该箱已收货");
|
public static ValueTuple<int, string> InStockTaskBoxIsHaveData = (80000, "该箱已收货");
|
||||||
public static ValueTuple<int, string> BoxBillNoError = (80000, "请扫描箱码作为箱号");
|
public static ValueTuple<int, string> BoxBillNoError = (80000, "请扫描箱码作为箱号");
|
||||||
|
public static ValueTuple<int, string> BoxNoMaterialError = (80000, "该箱不存在对应所需的物料");
|
||||||
public static ValueTuple<int, string> BoxMateriaNoData = (800010, "箱对应物料信息不存在");
|
public static ValueTuple<int, string> BoxMateriaNoData = (800010, "箱对应物料信息不存在");
|
||||||
public static ValueTuple<int, string> MateriaNoData = (800011, "产品信息不存在");
|
public static ValueTuple<int, string> MateriaNoData = (800011, "产品信息不存在");
|
||||||
public static ValueTuple<int, string> BoxInventorySerialNumbersNoData = (800012, "序列号不存在于箱库存数据中");
|
public static ValueTuple<int, string> BoxInventorySerialNumbersNoData = (800012, "序列号不存在于箱库存数据中");
|
||||||
|
|||||||
Reference in New Issue
Block a user