齐套分拣和齐套入库的bug,注释了质检定时相关部分

This commit is contained in:
FanLian
2023-07-14 18:14:03 +08:00
parent 9031b1235a
commit 22cbcd83cd
3 changed files with 8 additions and 3 deletions

View File

@@ -216,7 +216,7 @@ namespace Tnb.WarehouseMgr
if (kittingOut != null)
{
var locaion = await _db.Queryable<BasLocation>().SingleAsync(it => it.id == kittingOut.location_id);
if (locaion?.is_type.ToEnum<EnumLocationType>() != EnumLocationType.)
if (locaion !=null && locaion.is_type.ToEnum<EnumLocationType>() != EnumLocationType.)
{
kittingOut.status = WmsWareHouseConst.BILLSTATUS_TOBESHIPPED_ID;

View File

@@ -949,6 +949,11 @@ public static class StringExtensions
return (T)System.Enum.Parse(typeof(T), value, true);
}
public static T ToEnumWithNull<T>(this string? value)
{
return (T)System.Enum.Parse(typeof(T), value, true);
}
#endregion
#region ,Abp

View File

@@ -22,11 +22,11 @@ namespace Tnb.TaskScheduler.Listener
/// <summary>
/// 生成质检任务
/// </summary>
public class QcTaskTimeWorker : ISpareTimeWorker
public class QcTaskTimeWorker //: ISpareTimeWorker
{
private ISqlSugarClient repository => App.GetService<ISqlSugarClient>();
[SpareTime("0 0 0 * * ?", "生成质检任务", ExecuteType = SpareTimeExecuteTypes.Serial, StartNow = false)]
//[SpareTime("0 0 0 * * ?", "生成质检任务", ExecuteType = SpareTimeExecuteTypes.Serial, StartNow = false)]
public async void CreateTask(SpareTimer timer, long count)
{
var timeTaskEntity = await repository.Queryable<TimeTaskEntity>().Where(p => p.Id == timer.WorkerName && p.EnabledMark == 1).FirstAsync();