From 4fcad8a63eb3c86f3fc7b12b20370739c95527c0 Mon Sep 17 00:00:00 2001 From: "qianhao.xu" Date: Fri, 8 Nov 2024 11:32:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DOAN.ServiceCore/DoanBackgroundService.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/DOAN.ServiceCore/DoanBackgroundService.cs b/DOAN.ServiceCore/DoanBackgroundService.cs index 562bd4b..6334b1f 100644 --- a/DOAN.ServiceCore/DoanBackgroundService.cs +++ b/DOAN.ServiceCore/DoanBackgroundService.cs @@ -68,6 +68,8 @@ namespace DOAN.ServiceCore inventorylog.CreatedBy = "PLC"; inventorylog.CreatedTime = DateTime.Now.ToLocalTime(); await DbScoped.SugarScope.CopyNew().Updateable(storagelocation).ExecuteCommandAsync(); + await DbScoped.SugarScope.CopyNew().Insertable(inventorylog).ExecuteCommandAsync(); + } else { @@ -80,6 +82,7 @@ namespace DOAN.ServiceCore inventorylog.CreatedBy = "PLC"; inventorylog.CreatedTime = DateTime.Now.ToLocalTime(); await DbScoped.SugarScope.CopyNew().Updateable(storagelocation).ExecuteCommandAsync(); + await DbScoped.SugarScope.CopyNew().Insertable(inventorylog).ExecuteCommandAsync(); } }