新增明细 加判断条件
计数页面修改 散料入新增条件 出库单据接口 修改判断条件
This commit is contained in:
1 parent
4334683c6f
commit
1365920fee
15 files changed
+66
-32
No files matched your search
@@ -167,10 +167,22 @@ namespace HHWMS.Web.Controllers
|
||||
{
|
||||
return FFResult().Alert("新增明细中,存在重复的唯一码!");
|
||||
}
|
||||
// 判断唯一码是否已在库内
|
||||
var invList = _unitwork.Find<Inventory>(x => 1 == 1)
|
||||
.Select(x => x.UniqueCode)
|
||||
.ToList();
|
||||
if(invList.Intersect(detailList.Select(x => x.UniqueCode)).Count() > 0)
|
||||
{
|
||||
return FFResult().Alert("新增明细中,存在已在库内的唯一码!");
|
||||
}
|
||||
// 补充物料明细
|
||||
foreach(var item in detailList)
|
||||
foreach (var item in detailList)
|
||||
{
|
||||
var materialqr = _unitwork.FindSingle<MaterialQr>(x => x.UniqueCode.Equals(item.UniqueCode));
|
||||
if(materialqr == null)
|
||||
{
|
||||
return FFResult().Alert("新增明细中,存在不是WMS生成的唯一码!");
|
||||
}
|
||||
var material = _unitwork.FindSingle<Material>(x => x.QRCode.Equals(materialqr.QRCode));
|
||||
item.MaterialCode = material.MaterialCode;
|
||||
item.MaterialName = material.MaterialName;
|
||||
|
||||
@@ -46,8 +46,10 @@ public class ReceiptSLInController : BaseController
|
||||
&& x.Status != LocationStatus.任务锁
|
||||
&& x.Status != LocationStatus.满货
|
||||
&& x.Status != LocationStatus.空仓位
|
||||
&& x.IsStop == false
|
||||
&& x.Row == stations.First().Row)
|
||||
.OrderBy(x => x.Layer)
|
||||
.OrderBy(x => x.Status)
|
||||
.ThenBy(x => x.Layer)
|
||||
.ThenByDescending(x => x.Line)
|
||||
.FirstOrDefault();
|
||||
if (box == null && stations.Count == 2)
|
||||
@@ -55,8 +57,10 @@ public class ReceiptSLInController : BaseController
|
||||
&& x.Status != LocationStatus.任务锁
|
||||
&& x.Status != LocationStatus.满货
|
||||
&& x.Status != LocationStatus.空仓位
|
||||
&& x.IsStop == false
|
||||
&& x.Row == stations.Last().Row)
|
||||
.OrderBy(x => x.Layer)
|
||||
.OrderBy(x => x.Status)
|
||||
.ThenBy(x => x.Layer)
|
||||
.ThenByDescending(x => x.Line)
|
||||
.FirstOrDefault();
|
||||
|
||||
@@ -104,9 +108,9 @@ public class ReceiptSLInController : BaseController
|
||||
|
||||
if (box != null)
|
||||
{
|
||||
if (box.Type != LocationTypeEnum.散料库站台)
|
||||
if (string.IsNullOrEmpty(box.ContainerCode))
|
||||
{
|
||||
return JsonMore(null, 500, $"{boxCode}不在站台,无法入库!");
|
||||
return JsonMore(null, 500, $"{boxCode}站台没有料箱,无法入库!");
|
||||
}
|
||||
return JsonMore(null);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user