From c0bb859f5648c5782338328b0cbd42fbe90fa453 Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Fri, 21 Jun 2024 14:08:28 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E6=8F=90=E6=8A=A5?= =?UTF-8?q?=E5=88=A4=E5=AE=9A=E8=BD=BD=E5=85=B7=E6=98=AF=E5=90=A6=E7=BB=91?= =?UTF-8?q?=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs index d64615d7..5c1f10ec 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs @@ -46,6 +46,7 @@ using Tnb.WarehouseMgr.Entities.Dto; using Tnb.WarehouseMgr.Entities.Dto.Inputs; using Tnb.WarehouseMgr.Interfaces; using Tnb.WarehouseMgr; +using Tnb.WarehouseMgr.Entities.Enums; // using Tnb.PerMgr.Entities; @@ -1958,6 +1959,10 @@ namespace Tnb.ProductionMgr WmsCarryH wmsCarryH = await db.Queryable().SingleAsync((x => x.carry_code == materialBoxCode)); if (wmsCarryH == null) throw Oops.Bah($"未找到{materialBoxCode}载具"); + if (wmsCarryH.carry_status == ((int)EnumCarryStatus.占用).ToString()) + { + throw Oops.Bah($"提报失败,载具已绑定"); + } BindCarryCodeInput bindCarryCodeInput = new BindCarryCodeInput(); bindCarryCodeInput.carry_id = wmsCarryH.id; From b522a27ee9b46708dccbb64353e3331f8d0b44a0 Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Fri, 21 Jun 2024 14:52:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=96=B7=E7=A0=81=E8=B4=B4=E6=A0=87?= =?UTF-8?q?=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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs index 5c1f10ec..f40d69df 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs @@ -1436,20 +1436,21 @@ namespace Tnb.ProductionMgr BasMbom basMbom = await _db.Queryable().SingleAsync(x => x.id == item.bom_id); //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.container_no}"; + string code1 = $"(01){basMaterial.di ?? ""}*(11){DateTime.Now.ToString("yyMMdd")}*(17){DateTime.Now.AddMonths(basMaterial.quality_guarantee_period ?? 0).ToString("yyMMdd")}*(10){batch}"; + string code2 = $"{basMaterial.material_specification}*{batch}*{DateTime.Now.ToString("yyyyMMdd")}*{DateTime.Now.AddMonths(basMaterial.quality_guarantee_period ?? 0).ToString("yyyyMMdd")}*{basMaterial.container_no}"; Dictionary dicCommand1 = new(StringComparer.OrdinalIgnoreCase) { ["DevName"] = "外包装箱码垛线", ["token"] = _eleCtlCfg.token, ["TagName"] = "WBZX_tb_cs", - ["Value"] = code, + ["Value"] = code1, }; Dictionary dicCommand2 = new(StringComparer.OrdinalIgnoreCase) { ["DevName"] = "外包装箱码垛线", ["token"] = _eleCtlCfg.token, ["TagName"] = "WBZX_pm_cs", - ["Value"] = code, + ["Value"] = code2, }; Dictionary workLineDic = new Dictionary() {