IEME4Service.CreateAndUpdateQuotes

// Id da Tarefa: #224530
using Datainfo.Supplier.Services.Infrastructure.Services;

var eME4Service = Activate<IEME4Service>();
await eME4Service.CreateAndUpdateQuotes(
    FromJson<UserDTO>("{\"Id\":1,\"FirstName\":\"Admin\",\"LastName\":\"Admin\",\"Login\":\"@Admin\",\"Email\":\"admin@admin.admin\",\"LastAccess\":\"2025-01-20T14:41:34.9979871-03:00\",\"UserRoles\":{\"$type\":\"Common.DTO.AuthDTO.UserRolesDto[], Common.DTO\",\"$values\":[{\"UserId\":1,\"RoleId\":1,\"Role\":{\"Name\":\"admin\"}}]},\"UserActivitys\":{\"$type\":\"Common.DTO.UserActivityDTO[], Common.DTO\",\"$values\":[]},\"Settings\":{}}"));

Parameters

CurrentCulture
"pt-BR"
CurrentUICulture
"pt-BR"
RecurringJobId
"IEME4Service.CreateAndUpdateQuotes"
RetryCount
3
Time
1737480367

Estado

21/01/2025 17:29:36 (+18ms) Succeeded

Latency:
3m 29.081s
Duration:
2ms
Result:
{"$type":"Datainfo.Supplier.Entities.ResponseHangfireDTO, Datainfo.Supplier.Entities","Cache":[]}

+12ms Processing

Server:
8820725a725d:default:1
Worker:
42cadcb9

+1m 58.630s Enqueued

Triggered by DelayedJobScheduler

Queue:
default

+2ms Scheduled

Retry attempt 3 of 10: An error occurred while updating the entries. See…

Enqueue at:
21/01/2025 17:29:36

+1.548s Failed

An exception occurred during performance of the job.

Microsoft.EntityFrameworkCore.DbUpdateException

An error occurred while updating the entries. See the inner exception for details.

Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details.
 ---> Npgsql.PostgresException (0x80004005): 23502: null value in column "CodPayment" of relation "PaymentConditions" violates not-null constraint
   at Npgsql.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|194_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
   at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
   at Npgsql.EntityFrameworkCore.PostgreSQL.Update.Internal.NpgsqlModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
  Exception data:
    Severity: ERROR
    SqlState: 23502
    MessageText: null value in column "CodPayment" of relation "PaymentConditions" violates not-null constraint
    Detail: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information.
    SchemaName: PFD
    TableName: PaymentConditions
    ColumnName: CodPayment
    File: execMain.c
    Line: 2003
    Routine: ExecConstraints
   --- End of inner exception stack trace ---
   at Npgsql.EntityFrameworkCore.PostgreSQL.Update.Internal.NpgsqlModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(DbContext _, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Common.DataAccess.EFCore.BaseRepository`2.Edit(TType obj, ContextSession session) in /src/Common/Common.DataAccess.EFCore/Repositories/BaseRepository.cs:line 70
   at Datainfo.Supplier.Services.EME4Service.LogActivity(UserDTO userDTO, String method, String description, String typeRegister, String codRegister) in /src/Business/Datainfo.Supplier.Services/EME4/EME4Service.cs:line 214
   at Datainfo.Supplier.Services.EME4Service.CreateQuotes(UserDTO user) in /src/Business/Datainfo.Supplier.Services/EME4/EME4ServiceImport.cs:line 104
   at Datainfo.Supplier.Services.EME4Service.ExecuteHangfireJob(UserDTO user, EME4Function[] functions, HangfireManager manager) in /src/Business/Datainfo.Supplier.Services/EME4/EME4Service.cs:line 154
   at Datainfo.Supplier.Services.EME4Service.CreateAndUpdateQuotes(UserDTO user) in /src/Business/Datainfo.Supplier.Services/EME4/EME4Service.cs:line 126
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()

+13ms Processing

Server:
8820725a725d:default:1
Worker:
42cadcb9

+58.888s Enqueued

Triggered by DelayedJobScheduler

Queue:
default

+2ms Scheduled

Retry attempt 2 of 10: An error occurred while updating the entries. See…

Enqueue at:
21/01/2025 17:27:33

+1.250s Failed

An exception occurred during performance of the job.

Microsoft.EntityFrameworkCore.DbUpdateException

An error occurred while updating the entries. See the inner exception for details.

Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details.
 ---> Npgsql.PostgresException (0x80004005): 23502: null value in column "CodPayment" of relation "PaymentConditions" violates not-null constraint
   at Npgsql.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|194_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
   at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
   at Npgsql.EntityFrameworkCore.PostgreSQL.Update.Internal.NpgsqlModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
  Exception data:
    Severity: ERROR
    SqlState: 23502
    MessageText: null value in column "CodPayment" of relation "PaymentConditions" violates not-null constraint
    Detail: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information.
    SchemaName: PFD
    TableName: PaymentConditions
    ColumnName: CodPayment
    File: execMain.c
    Line: 2003
    Routine: ExecConstraints
   --- End of inner exception stack trace ---
   at Npgsql.EntityFrameworkCore.PostgreSQL.Update.Internal.NpgsqlModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(DbContext _, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Common.DataAccess.EFCore.BaseRepository`2.Edit(TType obj, ContextSession session) in /src/Common/Common.DataAccess.EFCore/Repositories/BaseRepository.cs:line 70
   at Datainfo.Supplier.Services.EME4Service.LogActivity(UserDTO userDTO, String method, String description, String typeRegister, String codRegister) in /src/Business/Datainfo.Supplier.Services/EME4/EME4Service.cs:line 214
   at Datainfo.Supplier.Services.EME4Service.CreateQuotes(UserDTO user) in /src/Business/Datainfo.Supplier.Services/EME4/EME4ServiceImport.cs:line 104
   at Datainfo.Supplier.Services.EME4Service.ExecuteHangfireJob(UserDTO user, EME4Function[] functions, HangfireManager manager) in /src/Business/Datainfo.Supplier.Services/EME4/EME4Service.cs:line 154
   at Datainfo.Supplier.Services.EME4Service.CreateAndUpdateQuotes(UserDTO user) in /src/Business/Datainfo.Supplier.Services/EME4/EME4Service.cs:line 126
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()

+12ms Processing

Server:
8820725a725d:default:1
Worker:
42cadcb9

+27.437s Enqueued

Triggered by DelayedJobScheduler

Queue:
default

+2ms Scheduled

Retry attempt 1 of 10: An error occurred while updating the entries. See…

Enqueue at:
21/01/2025 17:26:33

+1.224s Failed

An exception occurred during performance of the job.

Microsoft.EntityFrameworkCore.DbUpdateException

An error occurred while updating the entries. See the inner exception for details.

Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details.
 ---> Npgsql.PostgresException (0x80004005): 23502: null value in column "CodPayment" of relation "PaymentConditions" violates not-null constraint
   at Npgsql.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|194_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
   at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
   at Npgsql.EntityFrameworkCore.PostgreSQL.Update.Internal.NpgsqlModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
  Exception data:
    Severity: ERROR
    SqlState: 23502
    MessageText: null value in column "CodPayment" of relation "PaymentConditions" violates not-null constraint
    Detail: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information.
    SchemaName: PFD
    TableName: PaymentConditions
    ColumnName: CodPayment
    File: execMain.c
    Line: 2003
    Routine: ExecConstraints
   --- End of inner exception stack trace ---
   at Npgsql.EntityFrameworkCore.PostgreSQL.Update.Internal.NpgsqlModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(DbContext _, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Common.DataAccess.EFCore.BaseRepository`2.Edit(TType obj, ContextSession session) in /src/Common/Common.DataAccess.EFCore/Repositories/BaseRepository.cs:line 70
   at Datainfo.Supplier.Services.EME4Service.LogActivity(UserDTO userDTO, String method, String description, String typeRegister, String codRegister) in /src/Business/Datainfo.Supplier.Services/EME4/EME4Service.cs:line 214
   at Datainfo.Supplier.Services.EME4Service.CreateQuotes(UserDTO user) in /src/Business/Datainfo.Supplier.Services/EME4/EME4ServiceImport.cs:line 104
   at Datainfo.Supplier.Services.EME4Service.ExecuteHangfireJob(UserDTO user, EME4Function[] functions, HangfireManager manager) in /src/Business/Datainfo.Supplier.Services/EME4/EME4Service.cs:line 154
   at Datainfo.Supplier.Services.EME4Service.CreateAndUpdateQuotes(UserDTO user) in /src/Business/Datainfo.Supplier.Services/EME4/EME4Service.cs:line 126
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()

+16ms Processing

Server:
8820725a725d:default:1
Worker:
b8c2f546

+27ms Enqueued

Triggered by recurring job scheduler

Queue:
default

21/01/2025 17:26:07 Created