The given key ‘_saveSql’ was not present in the dictionary.[]

The given key ‘userId’ was not present in the dictionary.[]

RG3.BO.DB\Services\DbExecuteService$Insert.cs:line 235

{success: false, title: null,…}
error: {httpTraceId: "0HMAF0QHTLI9D:00000013", httpMethod: "POST", httpStatusCode: 200, errorCode: 99999,…}
errorCode: 99999
errorText: "The given key '_saveSql' was not present in the dictionary.[]"
help: "{error.ErrorCode}"
httpMethod: "POST"
httpStatusCode: 200
httpTraceId: "0HMAF0QHTLI9D:00000013"
message: "Exception of type 'RG3.PF.Abstractions.Exceptions.BizException' was thrown."
stack: "   at RG3.BO.DB.Services.DbExecuteService.StarAdd(PFGlobalParameter pf, BCDbConnection dbConnection, IDbTransaction dbTransaction, SqlConfig sqlConfig, JObject jObject, Dictionary`2 dictionaryUrl, String securityMethod, RequestModuleType fromRmt) in C:\\0_RG\\Code\\rg3-pf\\RG3.BO.DB\\Services\\DbExecuteService$Insert.cs:line 235
↵   at RG3.BO.DB.Services.DbExecuteService.StarAdd(PFGlobalParameter pf, SqlConfig sqlConfig, JObject jObject, Dictionary`2 dictionaryUrl, String securityMethod) in C:\\0_RG\\Code\\rg3-pf\\RG3.BO.DB\\Services\\DbExecuteService$Insert.cs:line 47
↵   at RG3.BO.Op.Services.AddService.Add(PFGlobalParameter pf, String mkey, String resField, Dictionary`2 dictionaryUrl, SqlConfig& sqlConfig, JObject jObject) in C:\\0_RG\\Code\\rg3-pf\\RG3.BO.Op\\Services\\AddService.cs:line 105
↵   at RG3.PF.Op.Controller.AddController.Add(JObject jobject, String mkey, String resField) in C:\\0_RG\\Code\\rg3-pf\\RG3.BO.Op\\Controller\\AddController.cs:line 71
↵   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
↵   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
↵   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
↵   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
↵   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
↵   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
↵--- End of stack trace from previous location where exception was thrown ---
↵   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
↵   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
↵   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
↵   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
↵   at RG3.PF.Abstractions.Middlewares.GlobalExceptionMiddleware.Invoke(HttpContext context) in C:\\0_RG\\Code\\rg3-pf\\RG3.PF.Abstractions\\Middlewares\\GlobalExceptionMiddleware.cs:line 46"
success: false
title: null

问题排查,批量保存时候,”batO”:”d”情况,必须有主键传递给接口

[{"batO":"d","policyItemId":null,
"policyId":null,"bdYear":null,"bzPrice":30000,"xfYear":"","bzJfMethod":{"name":null,"value":2},"mqPrice":null,"policyItemName":"","status":{"name":null,"value":1},"description":"{\\"bdYear\\":\\"\\"}","primaryChangeState":"bt010265f25c4-29b5-4b1c-ad9d-d003c41","sortId":99999999}]

问题解决,传递时候过滤掉删除的信息

dataT.checklist=(that.$refs["refCompSave"].getChecklistA()||[]).filter(
                temp=>!(temp.batO==='d'&&temp.policyItemId===null)
);
文档更新时间: 2022-10-24 13:49   作者:admin