物料收发汇总表查询报错
金蝶云社区-静新辉
静新辉
2人赞赏了该文章 835次浏览 未经作者许可,禁止转载编辑于2017年10月31日 10:29:31

有的用户查询物料收发汇总表报错,同样条件其他用户可以正常查询。

报错日志:

INSERT /*+ APPEND */ INTO TMP9A57338DBDE011E7940390E2BA4
(FGUID,FMATERIALID,
FORDERBY,FSTOCKIO,FIOPRICE,FIOAMOUNT,FSTOCKORGID,FOWNERTYPEID,FOWNERID,FKEEPERTYPEID,FKEEPERID,FPRODUCEDATE,
FEXPIRYDATE,FBOMID,FAUXPROPID,FDATE,FCREATEDATE,FLOTNO,FSTOCKID,FDEPARTMENTID,FSTOCKSTATUSID,FSTOCKLOCID,
FFORMID,FBILLNAME,FBILLID,FBILLSEQID,FBILLNO,FBILLTYPE,FENTRYTABLE,FBILLENTRYID,FBASEQCQTY,FBASEQCPRICE,FSECQCQTY,
FBASEINQTY,FBASEINPRICE,FSECINQTY,FBASEOUTQTY,FBASEOUTPRICE,FSECOUTQTY,
FSTOCKORGNUMBER,FSTOCKORGNAME,
FSTOREURNUM,FSTOREURNOM,
FMATERIALNO,
FBASEUNITPRE,FSTOCKUNITPRE,FSECUNITPRE,
FMATERIALNUMBER,FMATERIALNAME,
FMATERIALMODEL,FERPCLSID,FMATERIALGROUP,
FMATERIALTYPENAME,FMATERIALTYPEID,
FSTOCKNUMBER,FSTOCKNAME,FSTOCKLOC,FSTOCKPOSNUMBER,
FSTOCKSTATUSNUMBER,FSTOCKSTATUSNAME,
FOWNERTYPENAME,FOWNERNUMBER,FOWNERNAME,
FKEEPERTYPENAME,FKEEPERNUMBER,FKEEPERNAME,
FBOMNO,FMTONO,
FBASEUNITID,FBASEUNITNAME,
FSTOCKUNITID,FSTOCKUNITNAME,
FSECUNITID,FSECUNITNAME)
SELECT NEWID() AS FGUID,T0.FMATERIALID,
FORDERBY,FSTOCKIO,FIOPRICE,FIOAMOUNT,FSTOCKORGID,FOWNERTYPEID,FOWNERID,FKEEPERTYPEID,FKEEPERID,FPRODUCEDATE,
FEXPIRYDATE,FBOMID,FAUXPROPID,FDATE,T0.FCREATEDATE,FLOTNO,T0.FSTOCKID,T0.FDEPARTMENTID,T0.FSTOCKSTATUSID,T0.FSTOCKLOCID,
T0.FFORMID,FBILLNAME,FBILLID,FBILLSEQID,FBILLNO,T0.FBILLTYPE,FENTRYTABLE,FBILLENTRYID,FBASEQCQTY,FBASEQCPRICE,FSECQCQTY,
FBASEINQTY,FBASEINPRICE,FSECINQTY,FBASEOUTQTY,FBASEOUTPRICE,FSECOUTQTY,
TORG.FNUMBER AS FSTOCKORGNUMBER,TORGL.FNAME AS FSTOCKORGNAME,
TMS.FSTOREURNUM AS FSTOREURNUM,TMS.FSTOREURNOM AS FSTOREURNOM,
TM.FNUMBER AS FMATERIALNO,
ISNULL(TUB.FPRECISION,0) AS FBASEUNITPRE, ISNULL(TUS.FPRECISION,0) AS FSTOCKUNITPRE, ISNULL(TUA.FPRECISION,0) AS FSECUNITPRE,
TM.FNUMBER AS FMATERIALNUMBER,TML.FNAME AS FMATERIALNAME,
TML.FSPECIFICATION AS FMATERIALMODEL, TMB.FERPCLSID AS FERPCLSID,TMGL.FNAME AS FMATERIALGROUP,
ISNULL(TMTL.FNAME,'') AS FMATERIALTYPENAME,ISNULL(TMT.FCATEGORYID,0) AS FMATERIALTYPEID,
TBS.FNUMBER AS FSTOCKNUMBER,TBSL.FNAME AS FSTOCKNAME,
CONVERT(NVARCHAR(1500), '') AS FSTOCKLOC,CONVERT(NVARCHAR(1500), '') AS FSTOCKPOSNUMBER,
TBSS.FNUMBER AS FSTOCKSTATUSNUMBER,TBSSL.FNAME AS FSTOCKSTATUSNAME,
CASE T0.FOWNERTYPEID WHEN 'BD_Supplier' THEN '供应商' WHEN 'BD_Customer' THEN '客户' ELSE '业务组织' END AS FOWNERTYPENAME,TKW.FNumber AS FOWNERNumber,TKWL.FNAME AS FOWNERNAME,
CASE T0.FKEEPERTYPEID WHEN 'BD_Supplier' THEN '供应商' WHEN 'BD_Customer' THEN '客户' ELSE '业务组织' END AS FKEEPERTYPENAME,TKP.FNumber AS FKEEPERNumber,TKPL.FNAME AS FKEEPERNAME,
TBM.FNUMBER AS FBOMNO,T0.FMTONO,
TMB.FBASEUNITID AS FBASEUNITID,TULB.FNAME AS FBASEUNITNAME,
TMS.FSTOREUNITID AS FSTOCKUNITID,TULS.FNAME AS FSTOCKUNITNAME,
TMS.FAUXUNITID AS FSECUNITID,TULA.FNAME AS FSECUNITNAME
FROM TMP9407ABCABDE011E7940390E2BA4 T0
INNER JOIN T_BD_MATERIAL TM ON T0.FMATERIALID=TM.FMATERIALID
LEFT JOIN T_BD_STOCK TBS ON T0.FSTOCKID=TBS.FSTOCKID
INNER JOIN T_BD_MATERIALBASE TMB ON T0.FMATERIALID=TMB.FMATERIALID
LEFT JOIN T_ORG_ORGANIZATIONS TORG ON T0.FSTOCKORGID=TORG.FORGID
LEFT JOIN T_ORG_ORGANIZATIONS_L TORGL ON TORG.FORGID=TORGL.FORGID AND TORGL.FLOCALEID=@LocaleId
LEFT JOIN T_BD_MATERIAL_L TML ON T0.FMATERIALID=TML.FMATERIALID AND TML.FLOCALEID= @LocaleId
LEFT JOIN T_BD_MATERIALGROUP TMG ON TM.FMATERIALGROUP=TMG.FID
LEFT JOIN T_BD_MATERIALGROUP_L TMGL ON TMG.FID=TMGL.FID AND TMGL.FLOCALEID= @LocaleId
INNER JOIN T_BD_MATERIALSTOCK TMS ON T0.FMATERIALID=TMS.FMATERIALID
LEFT JOIN T_BD_MATERIALCATEGORY TMT ON TMB.FCATEGORYID=TMT.FCATEGORYID
LEFT JOIN T_BD_MATERIALCATEGORY_L TMTL ON TMT.FCATEGORYID=TMTL.FCATEGORYID AND TMTL.FLOCALEID= @LocaleId
LEFT JOIN V_ITEMCLASS_KEEPER TKP ON T0.FKEEPERID=TKP.FITEMID
LEFT JOIN V_ITEMCLASS_KEEPER_L TKPL ON T0.FKEEPERID=TKPL.FITEMID AND TKPL.FLOCALEID= @LocaleId
LEFT JOIN V_ITEMCLASS_OWNER TKW ON T0.FOWNERID=TKW.FITEMID
LEFT JOIN V_ITEMCLASS_OWNER_L TKWL ON T0.FOWNERID=TKWL.FITEMID AND TKWL.FLOCALEID= @LocaleId
LEFT JOIN T_BD_STOCK_L TBSL ON T0.FSTOCKID=TBSL.FSTOCKID AND TBSL.FLOCALEID= @LocaleId
LEFT JOIN T_BD_STOCKSTATUS TBSS ON T0.FSTOCKSTATUSID=TBSS.FSTOCKSTATUSID
LEFT JOIN T_BD_STOCKSTATUS_L TBSSL ON TBSS.FSTOCKSTATUSID=TBSSL.FSTOCKSTATUSID AND TBSSL.FLOCALEID= @LocaleId
INNER JOIN T_BD_UNIT TUB ON TMB.FBASEUNITID=TUB.FUNITID
INNER JOIN T_BD_UNIT TUS ON TMS.FSTOREUNITID=TUS.FUNITID
LEFT JOIN T_BD_UNIT TUA ON TMS.FAUXUNITID=TUA.FUNITID
LEFT JOIN T_BD_UNIT_L TULB ON TMB.FBASEUNITID=TULB.FUNITID AND TULB.FLOCALEID= @LocaleId
LEFT JOIN T_BD_UNIT_L TULS ON TMS.FSTOREUNITID=TULS.FUNITID AND TULS.FLOCALEID= @LocaleId
LEFT JOIN T_BD_UNIT_L TULA ON TMS.FAUXUNITID=TULA.FUNITID AND TULA.FLOCALEID= @LocaleId
LEFT JOIN T_ENG_BOM TBM ON T0.FBOMID=TBM.FID
LEFT JOIN T_BAS_FLEXVALUESDETAIL FVD ON T0.FSTOCKLOCID = FVD.FID

WHERE T0.FSTOCKORGID=104366
AND ((T0.FORDERBY=-200 AND T0.FFORMID is null AND T0.FDATE>={ts '2017-10-01 00:00:00'} AND T0.FDATE<{ts '2017-10-31 00:00:00'}) OR (T0.FORDERBY=-200 AND T0.FFORMID='STKINV' AND T0.FDATE={ts '2017-10-01 00:00:00'}) OR T0.FORDERBY=0)
; AND T0.FSTOCKID IN (SELECT FStockId FROM V928f09990c919c6e098a9587723bd)

Server stack trace:
在 Kingdee.BOS.App.Data.AbstractDatabase.ExecuteNonQuery(DbCommand command, IEnumerable`1 listParam)
在 Kingdee.BOS.App.Data.DBUtils.Execute(Context ctx, String strSQL, IEnumerable`1 paramList, Boolean needTranslate)
在 Kingdee.BOS.App.Data.DBUtils.Execute(Context ctx, String strSQL, IEnumerable`1 paramList)
在 Kingdee.K3.SCM.App.Stock.Report.StockSummaryRpt.BuilderReportSqlAndTempTable(IRptParams filter, String tableName)
在 Kingdee.BOS.Core.Report.PlugIn.AbstractSysReportServicePlugIn.CreateTempTable(IRptParams filter, String tablename)
在 Kingdee.BOS.Core.Report.PlugIn.AbstractSysReportServicePlugIn.GetDataForVirtual(IRptParams filter)
在 Kingdee.BOS.Core.Report.PlugIn.AbstractSysReportServicePlugIn.GetListAndReportData(IRptParams filter)
在 Kingdee.BOS.App.Core.PlugInProxy.SysReportServicePlugInProxy.GetListAndReportData(MoveReportServiceParameter parameter)
在 Kingdee.BOS.App.Core.SysReportService.GetListAndReportData(MoveReportServiceParameter parameter)

Exception rethrown at [0]:
在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
在 Kingdee.BOS.Contracts.ISysReportService.GetListAndReportData(MoveReportServiceParameter parameter)
在 Kingdee.BOS.ServiceHelper.SysReportServiceHelper.GetListAndReportData(MoveReportServiceParameter parameter)
在 Kingdee.BOS.Model.Report.MoveReportModel.GetData(Int32 start, Int32 rows)
在 Kingdee.BOS.Web.Report.SysReportView.GetListData()
在 Kingdee.BOS.Web.Report.SysReportView.<>c__DisplayClass43.b__3f()