注塑定点配送过滤待下发的

This commit is contained in:
2024-06-19 14:21:07 +08:00
parent 3d217c8adf
commit f4b40f22cc

View File

@@ -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<WmsPretaskH>().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<bool?>(eqpDaq.equip_code, eqpDaq.label_name);
bool valueFlag = _redisData.Get<bool>($"{eqpDaq.equip_code}_{eqpDaq.label_name}_flag");