请选择 进入手机版 | 继续访问电脑版

Zhangjqy 活字格认证

金牌服务用户

94

主题

303

帖子

819

积分

金牌服务用户

积分
819

活字格认证

[已处理] 活字格V11.0

Zhangjqy 活字格认证
金牌服务用户   /  发表于:2025-12-26 10:29  /   查看:73  /  回复:3
1金币
查询列表点击查询一直卡主,检查报错如下,请问是什么原因?
附件: 您需要 登录 才可以下载或查看,没有帐号?立即注册

最佳答案

查看完整内容

感谢各位大佬的支持~ 正如楼上大佬所述,TPO-25120392是一个文本类型的,但是程序里用了一个整数型的去匹配,可以看一下,是不是查询的条件中,查询用的字段选错了呢?

3 个回复

最佳答案
最佳答案
Lay.Li悬赏达人认证 活字格认证
超级版主   /  发表于:2025-12-26 10:29:25
来自 4#
感谢各位大佬的支持~
正如楼上大佬所述,TPO-25120392是一个文本类型的,但是程序里用了一个整数型的去匹配,可以看一下,是不是查询的条件中,查询用的字段选错了呢?
回复 使用道具 举报
Zhangjqy活字格认证
金牌服务用户   /  发表于:2025-12-26 10:29:58
2#
/Forguncy/Home/GetTableDataWithOffset
Internal Server Error
Request Exception Happened-------------------------------
Path/Home/GetTableDataWithOffset
UserName:Administrator
Sql Statement:
[
  {
    "Sql": "select Top 50  a.[ID] as C0,a.[POID] as C1,a1.[cCloser] as C2,a.[cPOID] as C3,a1.[cState] as C4,CASE WHEN  (((a.[iQuantity])-(a.[freceivedqty]))=(0))   THEN   N'完全入货'   ELSE   CASE WHEN  ((a.[freceivedqty])=(0))   THEN   N'未入货'   ELSE   CASE WHEN  ((a.[freceivedqty])>(a.[iQuantity]))   THEN   N'超订单入库'   ELSE   N'部分入货' end  end  end  as C5,a1.[cVenCode] as C6,a1.[dPODate] as C7,a2.[cDepCode] as C8,a.[dArriveDate] as C9,a2.[cPersonCode] as C10,a.[cbMemo] as C11,a.[cInvCode] as C12,a3.[cInvName] as C13,a3.[cInvStd] as C14,a3.[UnitName] as C15,a.[iQuantity] as C16,a.[iTaxPrice] as C17,a.[iSum] as C18,a.[freceivedqty] as C19,a.[销售订单] as C20,a4.[cMemo] as C21,a.[dUfts] as C22 from [dbo].[PO_Podetails] as a  left join [dbo].[PO_Pomain] as a1 on a.[POID] = a1.[POID] left join [dbo].[PO_Pomain] as a2 on a.[cPOID] = a2.[POID] left join [dbo].[V_HZG_Inventory] as a3 on a.[cInvCode] = a3.[cInvCode] left join [dbo].[PO_Pomain] as a4 on a.[cPOID] = a4.[cPOID] Where a.[ACCTID] = \"天津供应链\" AND a1.[ACCTID] = \"天津供应链\" AND a3.[cAcctID] = \"天津供应链\" AND (a1.[cCloser] <> \"1\" OR a1.[cCloser]  is null )  ORDER BY a1.[dPODate] DESC,a.[POID] DESC,a.[ID] ASC ",
    "OriginalSql": "select Top 50  a.[ID] as C0,a.[POID] as C1,a1.[cCloser] as C2,a.[cPOID] as C3,a1.[cState] as C4,CASE WHEN  (((a.[iQuantity])-(a.[freceivedqty]))=(0))   THEN   N'完全入货'   ELSE   CASE WHEN  ((a.[freceivedqty])=(0))   THEN   N'未入货'   ELSE   CASE WHEN  ((a.[freceivedqty])>(a.[iQuantity]))   THEN   N'超订单入库'   ELSE   N'部分入货' end  end  end  as C5,a1.[cVenCode] as C6,a1.[dPODate] as C7,a2.[cDepCode] as C8,a.[dArriveDate] as C9,a2.[cPersonCode] as C10,a.[cbMemo] as C11,a.[cInvCode] as C12,a3.[cInvName] as C13,a3.[cInvStd] as C14,a3.[UnitName] as C15,a.[iQuantity] as C16,a.[iTaxPrice] as C17,a.[iSum] as C18,a.[freceivedqty] as C19,a.[销售订单] as C20,a4.[cMemo] as C21,a.[dUfts] as C22 from [dbo].[PO_Podetails] as a  left join [dbo].[PO_Pomain] as a1 on a.[POID] = a1.[POID] left join [dbo].[PO_Pomain] as a2 on a.[cPOID] = a2.[POID] left join [dbo].[V_HZG_Inventory] as a3 on a.[cInvCode] = a3.[cInvCode] left join [dbo].[PO_Pomain] as a4 on a.[cPOID] = a4.[cPOID] Where a.[ACCTID] = @p0 AND a1.[ACCTID] = @p0 AND a3.[cAcctID] = @p1 AND (a1.[cCloser] <> @p2 OR a1.[cCloser]  is null )  ORDER BY a1.[dPODate] DESC,a.[POID] DESC,a.[ID] ASC",
    "SqlParams": [
      {
        "Name": "@p0",
        "Value": "天津供应链"
      },
      {
        "Name": "@p1",
        "Value": "天津供应链"
      },
      {
        "Name": "@p2",
        "Value": "1"
      }
    ],
    "SqlParam": null,
    "Duration": "71.2135ms"
  }
]
{
  "IsTransient": false,
  "SqlState": null,
  "BatchCommand": null,
  "ErrorCode": -2147467259,
  "Message": "在将 nvarchar 值 'TPO-25120392' 转换成数据类型 int 时失败。
select Top 50  a.[ID] as C0,a.[POID] as C1,a1.[cCloser] as C2,a.[cPOID] as C3,a1.[cState] as C4,CASE WHEN  (((a.[iQuantity])-(a.[freceivedqty]))=(0))   THEN   N'完全入货'   ELSE   CASE WHEN  ((a.[freceivedqty])=(0))   THEN   N'未入货'   ELSE   CASE WHEN  ((a.[freceivedqty])>(a.[iQuantity]))   THEN   N'超订单入库'   ELSE   N'部分入货' end  end  end  as C5,a1.[cVenCode] as C6,a1.[dPODate] as C7,a2.[cDepCode] as C8,a.[dArriveDate] as C9,a2.[cPersonCode] as C10,a.[cbMemo] as C11,a.[cInvCode] as C12,a3.[cInvName] as C13,a3.[cInvStd] as C14,a3.[UnitName] as C15,a.[iQuantity] as C16,a.[iTaxPrice] as C17,a.[iSum] as C18,a.[freceivedqty] as C19,a.[销售订单] as C20,a4.[cMemo] as C21,a.[dUfts] as C22 from [dbo].[PO_Podetails] as a  left join [dbo].[PO_Pomain] as a1 on a.[POID] = a1.[POID] left join [dbo].[PO_Pomain] as a2 on a.[cPOID] = a2.[POID] left join [dbo].[V_HZG_Inventory] as a3 on a.[cInvCode] = a3.[cInvCode] left join [dbo].[PO_Pomain] as a4 on a.[cPOID] = a4.[cPOID] Where a.[ACCTID] = @p0 AND a1.[ACCTID] = @p0 AND a3.[cAcctID] = @p1 AND (a1.[cCloser] <> @p2 OR a1.[cCloser]  is null )  ORDER BY a1.[dPODate] DESC,a.[POID] DESC,a.[ID] ASC",
  "Data": {
    "$type": "System.Collections.ListDictionaryInternal, System.Private.CoreLib"
  },
  "InnerException": null,
  "HelpLink": null,
  "Source": "GrapeCity.Forguncy.DataBaseApi",
  "HResult": -2147467259,
  "StackTrace": "   at GrapeCity.Forguncy.DataBaseApi.DataWrapperBase.FillTableAsync(String commandText, IEnumerable`1 parameters)
   at GrapeCity.Forguncy.DataBaseApi.DataWrapperBase.FillTableAsync(String commandText, IEnumerable`1 parameters)
   at Forguncy.DataSourceBase.FillTableAsync(String commandText, IEnumerable`1 parameters)
   at ForguncyDataAccess.DataAccess.SelectFromDatabaseAsync(String connectionString, String selectString, String databaseType, DbParameter[] parameters, ISqlSettings sqlSettings)
   at ForguncyDataAccess.DataAccess.SelectAsync(ISqlSettings sqlSettings, List`1 columnBindingInfos, ISqlCondition selectCondition, TopSqlConditionBase topCondition, String tableName, OrderBySqlCondition orderByCondition, OffsetSqlCondition offsetCondition, Boolean useGroupBy)
   at Forguncy.Server2.ForguncyServerDataAccess.SelectAsync(ISqlSettings sqlSettings, List`1 columnBindingInfos, ISqlCondition selectCondition, TopSqlConditionBase topCondition, String tableName, OrderBySqlCondition orderByCondition, OffsetSqlCondition offsetCondition, Boolean useGroupBy)
   at ForguncyDataAccess.DataAccess.GetDetailDataTableWithSqlSettingsAsync(ISqlSettings sqlSettings, List`1 columnBindingInfos, ISqlCondition sqlCondition, TopSqlConditionBase topCondition, OrderBySqlCondition orderByCondition, List`1 primaryKeys, OffsetSqlCondition offsetCondition, Boolean distinct, Boolean ensureOrderBy)
   at ForguncyDataAccess.DataAccess.GetDetailDataTableAsync(List`1 columnBindingInfos, ISqlCondition sqlCondition, TopSqlConditionBase topCondition, OrderBySqlCondition orderByCondition, List`1 primaryKeys, OffsetSqlCondition offsetCondition, Boolean distinct, Boolean ensureOrderBy)
   at ForguncyDataAccess.DataAccess.GetDataTableAsync(List`1 columnBindingInfos, ISqlCondition sqlCondition, TopSqlConditionBase topCondition, List`1 primaryKeys, OrderBySqlCondition orderByCondition, OffsetSqlCondition offsetCondition, Boolean distinct, Boolean ensureOrderBy)
   at Forguncy.Server2.ForguncyServerDataAccess.GetDataTableAsync(List`1 columnBindingInfos, ISqlCondition sqlCondition, TopSqlConditionBase topCondition, List`1 primaryKeys, OrderBySqlCondition orderByCondition, OffsetSqlCondition offsetCondition, Boolean distinct, Boolean ensureOrderBy)
   at Forguncy.Server2.Controllers.HomeController.QueryDataByDataAccessAsync(List`1 infos, Int32 demandRowCount, OffsetSqlCondition offsetCondition, Boolean distinct, ISqlCondition queryConditionObj, TopSqlConditionBase topConditionObj, OrderBySqlCondition orderByConditionObj, List`1 primaryKeys, IDataAccess dataAccess)
   at Forguncy.Server2.Controllers.HomeController.GetListviewDataAsync(List`1 infos, CurrentRowInfo currentRowInfo, Int32 demandRowCount, Int32 currentDataLength, Boolean needRowVersion, QueryCommandInfo queryCommandInfo, List`1 currentOrderByInfo, RuntimeQueryConditionData runtimeQueryConditionData, String sortCommandID, OffsetSqlCondition offsetCondition, Boolean needWriteDataAccessLog, ColumnFilterQuery[] columnFilterQueries, Boolean distinct, List`1 totalRowBindingInfos, Boolean allowLoadOnDemaid, Boolean addQueryConditionStatisticColumnToBindingInfoList, String dataSourceGUID)
   at Forguncy.Server2.Controllers.HomeController.GetListviewDataAsync(List`1 infos, CurrentRowInfo currentRowInfo, Int32 demandRowCount, Int32 currentDataLength, Boolean needRowVersion, QueryCommandInfo queryCommandInfo, List`1 currentOrderByInfo, RuntimeQueryConditionData runtimeQueryConditionData, String sortCommandID, OffsetSqlCondition offsetCondition, Boolean needWriteDataAccessLog, ColumnFilterQuery[] columnFilterQueries, Boolean distinct, List`1 totalRowBindingInfos, Boolean allowLoadOnDemaid, Boolean addQueryConditionStatisticColumnToBindingInfoList, String dataSourceGUID)
   at Forguncy.Server2.Controllers.HomeController.<>c__DisplayClass35_0.<<GetTableDataWithOffsetAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Forguncy.Server2.Controllers.HomeController.GetTableDataWithCacheAsync[T](CacheSetting cacheSetting, String tableName, Object paramObj, Func`1 action)
   at Forguncy.Server2.Controllers.HomeController.GetTableDataWithOffsetAsync(GetTableDataWithOffsetParam data)
   at lambda_method1520(Closure, Object)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, 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>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_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.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at ServerDesignerCommon.CodeEditor.CodeEditorMiddleware.DoInvokeAsync(HttpContext context)
   at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
   at Forguncy.Server2.KatanaMiddleware.JavaAdapterReflectMiddleWare.DoInvokeAsync(HttpContext context)
   at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
   at Forguncy.Server2.KatanaMiddleware.ProcessEngineMiddleware.DoInvokeAsync(HttpContext context)
   at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
   at Forguncy.Server2.KatanaMiddleware.ReportsMiddleware.DoInvokeAsync(HttpContext context, ICacheService cacheService, IReportServerService reportServerService)
   at Forguncy.Log.Logger.Component.LoggingMiddlewareBase`2.InvokeAsync(HttpContext context, TService1 service1, TService2 service2)
   at Forguncy.KatanaMiddleware.ServerCommandMiddleware.DoInvokeAsync(HttpContext context)
   at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
   at Forguncy.Server2.KatanaMiddleware.AppServiceMiddleware.DoInvokeAsync(HttpContext context)
   at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
   at ak.DoInvokeAsync(HttpContext a)
   at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
   at aj.DoInvokeAsync(HttpContext a)
   at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
   at Forguncy.Server2.KatanaMiddleware.StartPageMiddleware.DoInvokeAsync(HttpContext context)
   at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
   at Forguncy.Server2.KatanaMiddleware.ResourceMiddleware.DoInvokeAsync(HttpContext context)
   at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
   at ForguncyServerCommon.HttpHeaderMiddlewareBase.DoInvokeAsync(HttpContext context)
   at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at ForguncyServerCommon.HttpResponseHeaderMiddlewareBase.DoInvokeAsync(HttpContext context)
   at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
   at Forguncy.Server2.KatanaMiddleware.IpRestrictionMiddleware.DoInvokeAsync(HttpContext httpContext)
   at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
   at Forguncy.Server2.KatanaMiddleware.RecordProxyHeaderInfoMiddleware.DoInvokeAsync(HttpContext httpContext)
   at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
   at ar.DoInvokeAsync(HttpContext a)"
}
回复 使用道具 举报
春风十里
金牌服务用户   /  发表于:2025-12-26 10:45:59
3#
TPO-25120392 这个值应该是单据编号吧 还是什么 这个是文本型,你在查询的时候 参数 还是哪里给的int型了 检查一下 或者提个工程文件看一下
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部