应收账款账龄分析表查询报错
金蝶云社区-exoplanet_
exoplanet_
0人赞赏了该文章 1,446次浏览 未经作者许可,禁止转载编辑于2016年09月14日 14:53:19

cloud5.1+7月份补丁, orcale数据库
上周都能查询的应收账款账龄分析表,现在查询不到了。报错见截图。网上查说是数据库字段拼写错误,请大神看看!


详情如下
查询出现异常。ORA-00904: "CONTACTTYPE"."FCORRESPONDORGID": invalid identifier

INSERT INTO TMPBBE277147A4611E680F2ADA1DEA (FID, FBillNo, FDate, FEndDate, FFORMID, FContactUnitType, FContactUnit, FSaleDeptName, FCurrencyName, FBillTypeName, FSaleGroupName, FSalerName, FSettleOrgName, FPayOrgName, FSaleOrgName, FNotWrittenOffAmountFor, FNotWrittenOffAmount, FDigitsFor, FDigits, FMasterCurrencyName, FBalanceAmtFor, FBalanceAmt, FOrderBy) SELECT a.FID, a.FBillNo, a.FDate, b.FEndDate, 'AR_receivable' FFORMID, 'BD_Customer' FCONTACTUNITTYPE, FCustomerID.FName FCONTACTUNIT, NVL(FSaleDeptID.FName, ' ') FSALEDEPTNAME, FCurrencyID.fname FCURRENCYNAME, FBillTypeID.Fname FBILLTYPENAME, NVL(FSaleGroupID.FName, ' ') FSALEGROUPNAME, NVL(FSalerID.FName, ' ') FSALERNAME, FSettleOrgID.FName FSETTLEORGNAME, FPayOrgID.FName FPAYORGNAME, NVL(FSaleOrgID.FName, ' ') FSALEORGNAME, ((b.FPayAmountFor - NVL(APmatchRecord.FCURWRITTENOFFAMOUNTFOR, 0)) - NVL(ARmatchRecord.FCURWRITTENOFFAMOUNTFOR, 0)) FNOTWRITTENOFFAMOUNTFOR, ((b.FPayAmount - (NVL(APmatchRecord.FCURWRITTENOFFAMOUNTFOR, 0) * fin.FExchangeRate)) - (NVL(ARmatchRecord.FCURWRITTENOFFAMOUNTFOR, 0) * fin.FExchangeRate)) FNOTWRITTENOFFAMOUNT, NVL(g.FAmountDigits, 2) FDIGITSFOR, NVL(t0.FAmountDigits, 2) FDIGITS, t1.FName FMASTERCURRENCYNAME, ((b.FPayAmountFor - NVL(APmatchRecord.FCURWRITTENOFFAMOUNTFOR, 0)) - NVL(ARmatchRecord.FCURWRITTENOFFAMOUNTFOR, 0)) FBALANCEAMTFOR, ((b.FPayAmount - (NVL(APmatchRecord.FCURWRITTENOFFAMOUNTFOR, 0) * fin.FExchangeRate)) - (NVL(ARmatchRecord.FCURWRITTENOFFAMOUNTFOR, 0) * fin.FExchangeRate)) FBALANCEAMT, 1 FORDERBY FROM T_AR_RECEIVABLE A INNER JOIN T_AR_RECEIVABLEFIN FIN ON a.FID = fin.FID INNER JOIN T_AR_RECEIVABLEPLAN B ON a.FID = b.FID LEFT OUTER JOIN V_FIN_CONTACTTYPE CONTACTTYPE ON (a.FCustomerID = ContactType.fitemid AND ContactType.fformid = 'BD_Customer') LEFT OUTER JOIN V_FIN_CONTACTTYPE_l FCUSTOMERID ON (ContactType.fitemid = FCustomerID.fitemid AND FCustomerID.Flocaleid = 2052) LEFT OUTER JOIN t_Bd_Department E ON a.FSaleDeptID = e.FDeptID LEFT OUTER JOIN t_Bd_Department_l FSALEDEPTID ON (a.FSaleDeptID = FSaleDeptID.FDeptID AND FSaleDeptID.Flocaleid = 2052) LEFT OUTER JOIN t_bd_currency G ON a.FCurrencyID = g.FCurrencyID LEFT OUTER JOIN t_bd_currency_l FCURRENCYID ON (a.FCurrencyID = FCurrencyID.FCurrencyID AND FCurrencyID.Flocaleid = 2052) LEFT OUTER JOIN t_bas_billtype_l FBILLTYPEID ON (a.FBillTypeID = FBillTypeID.Fbilltypeid AND FBillTypeID.FlocaleID = 2052) LEFT OUTER JOIN V_BD_OPERATORGROUP_L FSALEGROUPID ON (a.FSaleGroupID = FSaleGroupID.FEntryID AND FSaleGroupID.Flocaleid = 2052) LEFT OUTER JOIN V_BD_SALESMAN_L FSALERID ON (a.FSaleerID = FSalerID.FID AND FSalerID.Flocaleid = 2052) LEFT OUTER JOIN T_ORG_Organizations FSETTLEORGID_M ON a.FSettleOrgID = FSettleOrgID_M.FOrgID LEFT OUTER JOIN T_ORG_Organizations_l FSETTLEORGID ON (a.FSettleOrgID = FSettleOrgID.FOrgID AND FSettleOrgID.Flocaleid = 2052) LEFT OUTER JOIN T_ORG_Organizations_l FPAYORGID ON (a.FPayOrgID = FPayOrgID.FOrgID AND FPayOrgID.Flocaleid = 2052) LEFT OUTER JOIN T_ORG_Organizations_l FSALEORGID ON (a.FSaleOrgID = FSaleOrgID.FOrgID AND FSaleOrgID.Flocaleid = 2052) LEFT OUTER JOIN t_bd_currency T0 ON fin.FMainBookStdCurrID = t0.FCurrencyID LEFT OUTER JOIN t_bd_currency_l T1 ON (fin.FMainBookStdCurrID = t1.FCurrencyID AND t1.Flocaleid = 2052) LEFT OUTER JOIN (SELECT LogEntry.FSourceFromid, FSrcBillId, FSrcRowId, NVL(sum(LogEntry.FCURWRITTENOFFAMOUNTFOR), 0) FCURWRITTENOFFAMOUNTFOR FROM T_AR_RECMacthLog PAYLOG INNER JOIN T_AR_RECMacthLogENTRY LOGENTRY ON PayLog.Fid = LogEntry.Fid WHERE (((PayLog.FReportDate <= TO_DATE('2016-09-14 23:59:59', 'YYYY-MM-DD HH24:MI:SS')) AND (LogEntry.FSrcDate <= TO_DATE('2016-09-14 23:59:59', 'YYYY-MM-DD HH24:MI:SS'))) AND LogEntry.FSourceFromid = 'AR_receivable') GROUP BY LogEntry.FSourceFromid, FSrcBillId, FSrcRowId) ARMATCHRECORD ON (a.FId = ARmatchRecord.FSrcBillId AND b.FEntryId = ARmatchRecord.FSrcRowId) LEFT OUTER JOIN (SELECT LogEntry.FSourceFromid, FSrcBillId, FSrcRowId, NVL(sum(LogEntry.FCURWRITTENOFFAMOUNTFOR), 0) FCURWRITTENOFFAMOUNTFOR FROM T_AP_PAYMatchLog PAYLOG INNER JOIN T_AP_PAYMatchLogEntry LOGENTRY ON PayLog.Fid = LogEntry.Fid WHERE (((PayLog.FReportDate <= TO_DATE('2016-09-14 23:59:59', 'YYYY-MM-DD HH24:MI:SS')) AND (LogEntry.FSrcDate <= TO_DATE('2016-09-14 23:59:59', 'YYYY-MM-DD HH24:MI:SS'))) AND LogEntry.FSourceFromid = 'AR_receivable') GROUP BY LogEntry.FSourceFromid, FSrcBillId, FSrcRowId) APMATCHRECORD ON (a.FId = APmatchRecord.FSrcBillId AND b.FEntryId = APmatchRecord.FSrcRowId) WHERE (a.fcancelstatus = 'A' AND (((FSettleOrgID_M.FOrgID IN (100010)) AND (1 = 1 AND ContactType.FCorrespondOrgId = 0)) AND a.FDocumentStatus = 'C'))

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)
在 Kingdee.K3.FIN.AR.App.Report.AgingAnalysisService.GetReceivableDataSql(String tmpTableName, IRptParams filter)
在 Kingdee.K3.FIN.AR.App.Report.AgingAnalysisService.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.GetData(IRptParams filter)
在 Kingdee.BOS.App.Core.PlugInProxy.SysReportServicePlugInProxy.GetReportData(ReportServiceParameter parameter)
在 Kingdee.BOS.App.Core.SysReportService.GetReportData(ReportServiceParameter 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.GetReportData(ReportServiceParameter parameter)
在 Kingdee.BOS.ServiceHelper.SysReportServiceHelper.GetReportData(ReportServiceParameter parameter)
在 Kingdee.BOS.Model.Report.SysReportModel.GetData(Int32 start, Int32 rows)
在 Kingdee.BOS.Web.Report.SysReportView.GetListData()
在 Kingdee.BOS.Web.Report.SysReportView.<>c__DisplayClass3d.b__39()