From a27442f652a1446350ec753822917c14d8444259 Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Fri, 7 Jun 2024 14:23:28 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E6=8F=90=E6=8A=A5=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E4=B8=8B=E6=96=99=E5=BA=93=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tnb.ProductionMgr/PrdMoTaskService.cs | 16 ++++++++-------- .../Tnb.ProductionMgr/TimeWorkService.cs | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs index 2fb096ae..01c44be1 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs @@ -1612,10 +1612,10 @@ namespace Tnb.ProductionMgr throw Oops.Bah("载具不能为空"); } - if (string.IsNullOrEmpty((input.location_code))) - { - throw Oops.Bah("入库库位不能为空"); - } + // if (string.IsNullOrEmpty((input.location_code))) + // { + // throw Oops.Bah("入库库位不能为空"); + // } if (input.reported_qty<=0) { @@ -1649,16 +1649,16 @@ namespace Tnb.ProductionMgr else { report.warehouse_id = equip.instock_warehouse_id; - if (equip.as_location_id == null || equip.as_location_id.IsEmpty()) + if (equip.downmat_location_id == null || equip.downmat_location_id.IsEmpty()) { - throw Oops.Bah("设备未绑定入库库位"); + throw Oops.Bah("设备未绑定下料库位"); } - location = await db.Queryable().SingleAsync(x=>x.id==equip.as_location_id); + location = await db.Queryable().SingleAsync(x=>x.id==equip.downmat_location_id); report.location_code = location.location_code; } - report.location_code = input.location_code; + // report.location_code = input.location_code; report.create_id = _userManager.UserId; report.create_time = DateTime.Now; // report.batch = input.mo_task_code + DateTimeOffset.Now.ToUnixTimeSeconds().ToString(); diff --git a/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs b/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs index 808089ca..42562444 100644 --- a/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs @@ -228,7 +228,7 @@ namespace Tnb.ProductionMgr BasFactoryConfig config = await _db.Queryable().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.DOMAIN); foreach (var equipment in equipments) { - EqpDaq eqpDaq = eqpDaqs.First(x => x.equip_id == equipment.id); + EqpDaq eqpDaq = eqpDaqs.FirstOrDefault(x => x.equip_id==equipment.id); if (eqpDaq == null) { Log.Error($"{equipment.name}没配置允许入空箱");