盘料入库页面,层号排序后再分配
添加货架库扫码捡货动作 添加异常出库单据清理任务
This commit is contained in:
1 parent
9bfee8930c
commit
caab84071c
5 files changed
+111
-65
No files matched your search
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using HHWMS.Web.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Quartz;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
@@ -28,6 +29,29 @@ namespace HHWMS.Web
|
||||
{
|
||||
_unitwork.BatchDelete<ShipmentHeader>(x => x.FirstStatus == ShipStatusEnum.拣货完成);
|
||||
}
|
||||
// 清理当前之前的状态不正确的出库单
|
||||
var errorShip = _unitwork.Find<ShipmentHeader>(x =>
|
||||
x.FirstStatus < ShipStatusEnum.拣货完成
|
||||
&& x.FirstStatus > ShipStatusEnum.新建
|
||||
&& x.CreateTime < DateTime.Now.AddDays(-1))
|
||||
.Include(u => u.ShipmentDetails)
|
||||
.ToList();
|
||||
foreach (var ship in errorShip)
|
||||
{
|
||||
if (ship.ShipmentDetails.All(x => x.Status != ShipStatusEnum.新建))
|
||||
{
|
||||
var invs = _unitwork.Find<Inventory>(x =>
|
||||
ship.ShipmentDetails.Select(y => y.UniqueCode).ToList()
|
||||
.Contains(x.UniqueCode))
|
||||
.Count();
|
||||
if (invs == 0)
|
||||
{
|
||||
_unitwork.Delete(errorShip);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Wtm.DoLog("清理过期单据", ActionLogTypesEnum.Job, "TestJob");
|
||||
|
||||
#region 更新时间
|
||||
|
||||
Reference in new issue
Block a user