From 21ef67b69affa7c3e2d891ad3ad0b6ac612bda3a Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Fri, 27 Sep 2024 10:34:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E6=88=90=E5=93=81=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E8=B0=83=E7=94=A8=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WarehouseMgr/Tnb.WarehouseMgr/WmsPrdInstockHService.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPrdInstockHService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPrdInstockHService.cs index 085d40b5..1500fc20 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPrdInstockHService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPrdInstockHService.cs @@ -367,6 +367,13 @@ namespace Tnb.WarehouseMgr { return; } + + if (await _db.Queryable().AnyAsync(x => x.remark.Contains(prdReport.id) && x.name == "产成品入库")) + { + Logger.LogInformation($"【WmsPrdInstockHService ModifyAsync】重复调用入库"); + return; + } + List allInstockDetails = await _db.Queryable().Where(it => it.prd_instockD_id == wmsPrdInstockD.id).ToListAsync(); @@ -466,7 +473,7 @@ namespace Tnb.WarehouseMgr thirdWebapiRecord.url = WmsWareHouseConst.BIP_DOMAIN + "uapws/rest/productin/save"; thirdWebapiRecord.request_data = JsonConvert.SerializeObject(requestData); thirdWebapiRecord.create_time = DateTime.Now; - thirdWebapiRecord.remark = $"载具编号:{prdReport?.material_box_code ?? ""}"; + thirdWebapiRecord.remark = $"载具编号:{prdReport?.material_box_code ?? ""},提报id:{prdReport?.id}"; await _db.Insertable(thirdWebapiRecord).ExecuteCommandAsync(); BasFactoryConfig callErp = await _db.Queryable().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.CALLERP);