diff --git a/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs b/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs index f905df1d..70ede4a4 100644 --- a/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs @@ -27,6 +27,7 @@ using Result = Tnb.WarehouseMgr.Entities.Dto.Outputs.Result; using Tnb.BasicData; using Tnb.EquipMgr.Entities; using Tnb.WarehouseMgr; +using Tnb.WarehouseMgr.Entities; namespace Tnb.ProductionMgr { @@ -262,6 +263,21 @@ namespace Tnb.ProductionMgr Log.Error($"{eqpDaq.equip_code}状态不正常"); continue; } + if (string.IsNullOrEmpty(equipment.upmat_location_id)) + { + Log.Error($"{equipment.name}未配置上料库位"); + continue; + } + + if (await _db.Queryable().AnyAsync(x => + x.endlocation_id == equipment.upmat_location_id && + x.biz_type == WmsWareHouseConst.BIZTYPE_WMSDELIVERY_ID && + x.status == WmsWareHouseConst.PRETASK_BILL_STATUS_DXF_ID)) + { + Log.Error($"{equipment.name}存在待下发的任务"); + continue; + } + bool? value = await _redisData.TryGetValueByKeyField(eqpDaq.equip_code, eqpDaq.label_name); bool valueFlag = _redisData.Get($"{eqpDaq.equip_code}_{eqpDaq.label_name}_flag");