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(); } }