From d957ffdde2ab8ba8a434a0fa986a8f402c9de8e5 Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Fri, 13 Sep 2024 15:39:22 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=96=B7=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs index c8b6aecb..fa1adb3a 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs @@ -4029,7 +4029,7 @@ namespace Tnb.ProductionMgr batch = $"{organizeEntity.EnCode.Substring(organizeEntity.EnCode.Length - 2, 2)}{DateTime.Now.ToString("yyMMdd")}"; } - string code = $"(01){basMaterial.di ?? ""}*(11){DateTime.Now.ToString("yyMMdd")}*(17){DateTime.Now.AddMonths(basMaterial.quality_guarantee_period ?? 0).ToString("yyMMdd")}*(10){batch}#{basMaterial.material_specification}*{batch}*{DateTime.Now.ToString("yyyyMMdd")}*{DateTime.Now.AddMonths(basMaterial.quality_guarantee_period ?? 0).ToString("yyyyMMdd")}*{basMaterial.container_no}"; + string code = $"(01){basMaterial.di ?? ""}*(11){DateTime.Now.ToString("yyMMdd")}*(17){DateTime.Now.AddMonths(basMaterial.quality_guarantee_period ?? 0).ToString("yyMMdd")}*(10){batch}#{basMaterial.material_specification}*{batch}*{DateTime.Now.ToString("yyyyMMdd")}*{DateTime.Now.AddMonths(basMaterial.quality_guarantee_period ?? 0).ToString("yyyyMMdd")}*{basMaterial.material_standard}"; return code; } } From 0066b7166bd1904726b69b2d14fbec4a108e0c58 Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Fri, 13 Sep 2024 15:40:05 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E7=AD=BE=E6=94=B6bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tnb.ProductionMgr/PrdMaterialReceiptService.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs index cedcd0e0..05be114d 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs @@ -526,7 +526,16 @@ namespace Tnb.ProductionMgr Log.Information($"签收载具信息{JsonConvert.SerializeObject(carryCodes)}"); foreach (var item in carryCodes) { - + PrdMaterialReceiptD existD = await db.Queryable() + .LeftJoin((x, y) => x.material_receipt_id == y.id) + .Where((x, y) => x.carry_id == carry.id && y.mo_task_id == moTask.id && x.is_all_feeding == 0) + .Select((x,y)=>x) + .FirstAsync(); + if (existD != null) + { + throw new Exception($"{moTask.mo_task_code}任务单存在未投完的签收物料,物料签收子表id{existD.id}"); + } + insertDList.Add(new PrdMaterialReceiptD { material_receipt_id = prdMaterialReceiptH.id, From e960d5be8ccad068caa587c92bf0639fdb493d7a Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Fri, 13 Sep 2024 16:17:49 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E7=A7=B0=E9=87=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tnb.ProductionMgr/RedisDataService.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ProductionMgr/Tnb.ProductionMgr/RedisDataService.cs b/ProductionMgr/Tnb.ProductionMgr/RedisDataService.cs index e9f95742..2300da77 100644 --- a/ProductionMgr/Tnb.ProductionMgr/RedisDataService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/RedisDataService.cs @@ -125,6 +125,24 @@ namespace Tnb.ProductionMgr // Log.Information($"{device},{eqpDaq3.label_name}称重完成返回结果:{responseresult}"); // } // } + string equipStatus = await _redisData.GetHash(device, "1 启动2停止 3手动4急停"); + Log.Information($"换箱机状态:{equipStatus}"); + if (equipStatus != "1") + { + if (equipStatus.Trim() == "2") + { + throw Oops.Bah("换箱机状态为停止"); + } + if (equipStatus.Trim() == "3") + { + throw Oops.Bah("换箱机状态为手动"); + } + if (equipStatus.Trim() == "4") + { + throw Oops.Bah("换箱机状态为急停"); + } + } + return result; }