diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs index 01c44be1..0b4a0a1d 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs @@ -1885,6 +1885,8 @@ namespace Tnb.ProductionMgr }; BasFactoryConfig config = await _repository.AsSugarClient().Queryable().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.DOMAIN); WmsCarryH wmsCarryH = await db.Queryable().SingleAsync((x => x.carry_code == materialBoxCode)); + if (wmsCarryH == null) + throw Oops.Bah($"未找到{materialBoxCode}载具"); BindCarryCodeInput bindCarryCodeInput = new BindCarryCodeInput(); bindCarryCodeInput.carry_id = wmsCarryH.id;