2026/5/3 20:43:32:imei:352194620059811 DataContext: LastCommunication:2026/5/3 20:43:32 ServerUtcDate:2026/5/3 12:43:32 Date: 03/05/2026 20:43:32 App up time: 173.05:42:27.3813996 Exception class: System.Data.SqlClient.SqlException Exception message: 违反了 PRIMARY KEY 约束“PK_LKLocation_1”。不能在对象“dbo.LkLocation”中插入重复键。重复键值为 (352194620059811)。 语句已终止。 Stack Trace: 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) 在 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) 在 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() 在 NPoco.Database.ExecuteNonQueryHelper(DbCommand cmd) 在 NPoco.Database.InsertImp[T](PocoData pocoData, String tableName, String primaryKeyName, Boolean autoIncrement, T poco) 在 NPoco.Database.Insert[T](String tableName, String primaryKeyName, Boolean autoIncrement, T poco) 在 NPoco.Database.Insert[T](T poco) 在 Thinkrace.WebDbAccess.WebLogic.WebLkLocationLogic.UpdateDeviceStatus(LkLocation lk) 位置 F:\NewWork\DX01_Gateway\Thinkrace.WebDbAccess\WebLogic\WebLkLocationLogic.cs:行号 155