diff --git a/DOAN.ServiceCore/BackgroundService.cs b/DOAN.ServiceCore/BackgroundService.cs index 3eff600..8ec115b 100644 --- a/DOAN.ServiceCore/BackgroundService.cs +++ b/DOAN.ServiceCore/BackgroundService.cs @@ -63,7 +63,7 @@ namespace DOAN.ServiceCore inventorylog.PackageNum = 2; inventorylog.CreatedBy = "PLC"; inventorylog.CreatedTime = DateTime.Now.ToLocalTime(); - await DbScoped.SugarScope.CopyNew().Insertable(storagelocation).ExecuteCommandAsync(); + await DbScoped.SugarScope.CopyNew().Updateable(storagelocation).ExecuteCommandAsync(); } else { @@ -75,7 +75,7 @@ namespace DOAN.ServiceCore inventorylog.PackageNum = 4; inventorylog.CreatedBy = "PLC"; inventorylog.CreatedTime = DateTime.Now.ToLocalTime(); - await DbScoped.SugarScope.CopyNew().Insertable(storagelocation).ExecuteCommandAsync(); + await DbScoped.SugarScope.CopyNew().Updateable(storagelocation).ExecuteCommandAsync(); } }