成本计算勾选计算产品成本还原系数报错,合法性报告报错
1,917次浏览
编辑于2017年02月18日 22:54:20
1.成本计算勾选计算产品成本还原系数,合法性检查报错。不勾选不报错。
Message:尝试在数据库 2 中提取逻辑页(1:39264) 失败。该逻辑页属于分配单元 576475904515244032,而非 7782235558819397632。;StackTrace: atKingdee.BOS.App.Data.AbstractDatabase.ExecuteNonQuery(DbCommand command,IEnumerable`1 listParam) atKingdee.BOS.App.Data.DBUtils.ExecuteBatchWithTime(Context ctx, List`1lstSqlObj, Int32 commandTimeout) atKingdee.K3.FIN.CB.App.Core.CostCal.Cal.ProductCostRestore.CostRestore() atKingdee.K3.FIN.CB.App.Core.CostCal.Cal.ProductCostAcctgService.AfterExecutionOnlyCalService[T](Contextctx, T acctgParameters) atKingdee.K3.FIN.App.Core.OutAcctg.AcctgStencil.AcctgAfter[T,K](Context ctx, TacctgParameters, Dictionary`2 services, CostCalType calType) atKingdee.K3.FIN.App.Core.OutAcctg.AcctgStencil.EndCostCal(CostCalParametersacctgParameters, Context bosctx, Dictionary`2 calservice) atKingdee.K3.FIN.App.Core.OutAcctg.AcctgStencil.CostCal(ComputeContext ctx,CostCalGlobalContext costCalGlobalContext) atKingdee.K3.FIN.App.Core.OutAcctg.AcctgStencilService.CostAcctg(ComputeContextctx, OutStockAcctgParameters acctgParameters)2.产品成本还原对比分析表打开报错,另外请问此表该如何使用,请举例说明。
INSERT INTO #TM_CB_PRORESTORECOSTDIFF (FPRODUCTID, FBASICUNITID, FCOSTITEMID, FMATERIALID, FEXPENSEITEMID, FCURRUSEDHOUR, FCURRPRICE, FCURRCOSTAMOUNT, FCURRAMOUNT, FDIFFUSEDHOUR, FDIFFPRICE, FDIFFCOSTAMOUNT, FDIFFAMOUNT, FQUANTITYDIFF, FPRICEDIFF, FTOTALDIFFAMOUNT, FQTYDIGITS, FPRICEDIGITS, FAMOUNTDIGITS, FEXPTYPE, FLINEDATATYPE, FIDENTITYID, FSELECTTYPE) SELECT TMP.FPRODUCTID, baseunit.FBaseUnitId, TMP.FCOSTITEMID, TMP.FMATERIALID, TMP.FEXPENSEITEMID, 0 fcurrusedhour, 0 fcurrprice, SUM(TMP.FCURRCOSTAMOUNT) fcurrcostamount, SUM(TMP.FCURRCOSTAMOUNT) fcurramount, 0 fdiffusedhour, 0 fdiffprice, SUM(TMP.FDIFFCOSTAMOUNT) fdiffcostamount, SUM(TMP.FDIFFCOSTAMOUNT) fdiffamount, 0 fquantitydiff, 0 fpricediff, (SUM(TMP.FCURRCOSTAMOUNT) - SUM(TMP.FDIFFCOSTAMOUNT)) ftotaldiffamount, CURR.FPRICEDIGITS fqtydigits, CURR.FPRICEDIGITS, 10 famountdigits, TMP.FEXPTYPE, 10 flinedatatype, ROW_NUMBER() OVER( ORDER BY FPRODUCTID ASC) fidentityid, 0 fselecttype FROM (SELECT productDime.FPRODUCTID fproductid, COSTM.FMATERIALID, COSTM.FEXPTYPE, 0 fcostitemid, COSTMD.FEXPENSESITEMID fexpenseitemid, (SUM(COSTMD.FQUALIFIEDINAMOUNT) + SUM(COSTMD.FDYSINAMOUNT) + SUM(COSTMD.FWASTEINAMOUNT)) fcurrcostamount, 0 fdiffcostamount FROM T_CB_PROORDERINFO product INNER JOIN T_CB_PROORDERDIME productDime ON product.FProductDimeId = productDime.FProductDimeId INNER JOIN T_HS_OUTACCTG acctg ON product.FACCTGID = acctg.FId INNER JOIN T_CB_CostMatterial COSTM ON product.FID = COSTM.FID INNER JOIN T_CB_CostMatterialDetail COSTMD ON COSTM.FENTRYID = COSTMD.FENTRYID INNER JOIN T_BD_MATERIAL MAT ON MAT.FMATERIALID = productDime.FPRODUCTID LEFT OUTER JOIN T_CB_COSTCENTER CC ON CC.FCOSTCENTERID = productDime.FCOSTCENTERID WHERE (((product.FENDINITKEY = '1' AND acctg.FDIMENSIONID = @FDIMEID) AND (product.FACCTGID >= @FSTARTACCTGID)) AND (product.FACCTGID <= @FENDACCTGID)) GROUP BY productDime.FPRODUCTID, COSTM.FMATERIALID, COSTM.FEXPTYPE, COSTMD.FEXPENSESITEMID UNION ALL SELECT productDime.FPRODUCTID fproductid, COSTM.FMATERIALID, COSTM.FEXPTYPE, 0 fcostitemid, COSTMD.FEXPENSESITEMID fexpenseitemid, 0 fcurrcostamount, (SUM(COSTMD.FQUALIFIEDINAMOUNT) + SUM(COSTMD.FDYSINAMOUNT) + SUM(COSTMD.FWASTEINAMOUNT)) fdiffcostamount FROM T_CB_PROORDERINFO product INNER JOIN T_CB_PROORDERDIME productDime ON product.FProductDimeId = productDime.FProductDimeId INNER JOIN T_HS_OUTACCTG acctg ON product.FACCTGID = acctg.FId INNER JOIN T_CB_CostMatterial COSTM ON product.FID = COSTM.FID INNER JOIN T_CB_CostMatterialDetail COSTMD ON COSTM.FENTRYID = COSTMD.FENTRYID INNER JOIN T_BD_MATERIAL MAT ON MAT.FMATERIALID = productDime.FPRODUCTID LEFT OUTER JOIN T_CB_COSTCENTER CC ON CC.FCOSTCENTERID = productDime.FCOSTCENTERID WHERE (((product.FENDINITKEY = '1' AND acctg.FDIMENSIONID = @FDIMEID1) AND (product.FACCTGID >= @FSTARTACCTGID1)) AND (product.FACCTGID <= @FENDACCTGID1)) GROUP BY productDime.FPRODUCTID, COSTM.FMATERIALID, COSTM.FEXPTYPE, COSTMD.FEXPENSESITEMID) tmp INNER JOIN T_BD_MATERIALBASE baseunit ON baseunit.FMaterialId = TMP.FPRODUCTID INNER JOIN T_BD_CURRENCY CURR ON CURR.FCURRENCYID = 1 WHERE (((TMP.FCURRCOSTAMOUNT <> 0) OR (TMP.FDIFFCOSTAMOUNT <> 0)) AND NOT EXISTS (SELECT 1 FROM #TM_CB_PRORESTORECOSTDIFF df WHERE (df.FNeedRestore = 1 AND df.FMATERIALID = TMP.FMATERIALID))) GROUP BY TMP.FPRODUCTID, baseunit.FBaseUnitId, TMP.FMATERIALID, TMP.FEXPTYPE, TMP.FCOSTITEMID, TMP.FEXPENSEITEMID, CURR.FPRICEDIGITS
Server stack trace: at Kingdee.BOS.App.Data.AbstractDatabase.ExecuteNonQuery(DbCommand command, IEnumerable`1 listParam) at Kingdee.BOS.App.Data.DBUtils.ExecuteBatchWithTime(Context ctx, List`1 lstSqlObj, Int32 commandTimeout) at Kingdee.K3.FIN.CB.App.Report.ProductRestoreCostDiffRpt.BuilderReportSqlAndTempTable(IRptParams filter, String tableName) at Kingdee.BOS.Core.Report.PlugIn.AbstractSysReportServicePlugIn.CreateTempTable(IRptParams filter, String tablename) at Kingdee.BOS.Core.Report.PlugIn.AbstractSysReportServicePlugIn.GetDataForVirtual(IRptParams filter) at Kingdee.BOS.Core.Report.PlugIn.AbstractSysReportServicePlugIn.GetData(IRptParams filter) at Kingdee.BOS.App.Core.PlugInProxy.SysReportServicePlugInProxy.GetReportData(ReportServiceParameter parameter) at Kingdee.BOS.App.Core.SysReportService.GetReportData(ReportServiceParameter parameter)
Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at Kingdee.BOS.Contracts.ISysReportService.GetReportData(ReportServiceParameter parameter) at Kingdee.BOS.ServiceHelper.SysReportServiceHelper.GetReportData(ReportServiceParameter parameter) at Kingdee.BOS.Model.Report.SysReportModel.GetData(Int32 start, Int32 rows) at Kingdee.BOS.Web.Report.SysReportView.GetListData() at Kingdee.BOS.Web.Report.SysReportView.<>c__DisplayClass4d.b__49() 版本6.1,1月23号的补丁
Message:尝试在数据库 2 中提取逻辑页(1:39264) 失败。该逻辑页属于分配单元 576475904515244032,而非 7782235558819397632。;StackTrace: atKingdee.BOS.App.Data.AbstractDatabase.ExecuteNonQuery(DbCommand command,IEnumerable`1 listParam) atKingdee.BOS.App.Data.DBUtils.ExecuteBatchWithTime(Context ctx, List`1lstSqlObj, Int32 commandTimeout) atKingdee.K3.FIN.CB.App.Core.CostCal.Cal.ProductCostRestore.CostRestore() atKingdee.K3.FIN.CB.App.Core.CostCal.Cal.ProductCostAcctgService.AfterExecutionOnlyCalService[T](Contextctx, T acctgParameters) atKingdee.K3.FIN.App.Core.OutAcctg.AcctgStencil.AcctgAfter[T,K](Context ctx, TacctgParameters, Dictionary`2 services, CostCalType calType) atKingdee.K3.FIN.App.Core.OutAcctg.AcctgStencil.EndCostCal(CostCalParametersacctgParameters, Context bosctx, Dictionary`2 calservice) atKingdee.K3.FIN.App.Core.OutAcctg.AcctgStencil.CostCal(ComputeContext ctx,CostCalGlobalContext costCalGlobalContext) atKingdee.K3.FIN.App.Core.OutAcctg.AcctgStencilService.CostAcctg(ComputeContextctx, OutStockAcctgParameters acctgParameters)2.产品成本还原对比分析表打开报错,另外请问此表该如何使用,请举例说明。
INSERT INTO #TM_CB_PRORESTORECOSTDIFF (FPRODUCTID, FBASICUNITID, FCOSTITEMID, FMATERIALID, FEXPENSEITEMID, FCURRUSEDHOUR, FCURRPRICE, FCURRCOSTAMOUNT, FCURRAMOUNT, FDIFFUSEDHOUR, FDIFFPRICE, FDIFFCOSTAMOUNT, FDIFFAMOUNT, FQUANTITYDIFF, FPRICEDIFF, FTOTALDIFFAMOUNT, FQTYDIGITS, FPRICEDIGITS, FAMOUNTDIGITS, FEXPTYPE, FLINEDATATYPE, FIDENTITYID, FSELECTTYPE) SELECT TMP.FPRODUCTID, baseunit.FBaseUnitId, TMP.FCOSTITEMID, TMP.FMATERIALID, TMP.FEXPENSEITEMID, 0 fcurrusedhour, 0 fcurrprice, SUM(TMP.FCURRCOSTAMOUNT) fcurrcostamount, SUM(TMP.FCURRCOSTAMOUNT) fcurramount, 0 fdiffusedhour, 0 fdiffprice, SUM(TMP.FDIFFCOSTAMOUNT) fdiffcostamount, SUM(TMP.FDIFFCOSTAMOUNT) fdiffamount, 0 fquantitydiff, 0 fpricediff, (SUM(TMP.FCURRCOSTAMOUNT) - SUM(TMP.FDIFFCOSTAMOUNT)) ftotaldiffamount, CURR.FPRICEDIGITS fqtydigits, CURR.FPRICEDIGITS, 10 famountdigits, TMP.FEXPTYPE, 10 flinedatatype, ROW_NUMBER() OVER( ORDER BY FPRODUCTID ASC) fidentityid, 0 fselecttype FROM (SELECT productDime.FPRODUCTID fproductid, COSTM.FMATERIALID, COSTM.FEXPTYPE, 0 fcostitemid, COSTMD.FEXPENSESITEMID fexpenseitemid, (SUM(COSTMD.FQUALIFIEDINAMOUNT) + SUM(COSTMD.FDYSINAMOUNT) + SUM(COSTMD.FWASTEINAMOUNT)) fcurrcostamount, 0 fdiffcostamount FROM T_CB_PROORDERINFO product INNER JOIN T_CB_PROORDERDIME productDime ON product.FProductDimeId = productDime.FProductDimeId INNER JOIN T_HS_OUTACCTG acctg ON product.FACCTGID = acctg.FId INNER JOIN T_CB_CostMatterial COSTM ON product.FID = COSTM.FID INNER JOIN T_CB_CostMatterialDetail COSTMD ON COSTM.FENTRYID = COSTMD.FENTRYID INNER JOIN T_BD_MATERIAL MAT ON MAT.FMATERIALID = productDime.FPRODUCTID LEFT OUTER JOIN T_CB_COSTCENTER CC ON CC.FCOSTCENTERID = productDime.FCOSTCENTERID WHERE (((product.FENDINITKEY = '1' AND acctg.FDIMENSIONID = @FDIMEID) AND (product.FACCTGID >= @FSTARTACCTGID)) AND (product.FACCTGID <= @FENDACCTGID)) GROUP BY productDime.FPRODUCTID, COSTM.FMATERIALID, COSTM.FEXPTYPE, COSTMD.FEXPENSESITEMID UNION ALL SELECT productDime.FPRODUCTID fproductid, COSTM.FMATERIALID, COSTM.FEXPTYPE, 0 fcostitemid, COSTMD.FEXPENSESITEMID fexpenseitemid, 0 fcurrcostamount, (SUM(COSTMD.FQUALIFIEDINAMOUNT) + SUM(COSTMD.FDYSINAMOUNT) + SUM(COSTMD.FWASTEINAMOUNT)) fdiffcostamount FROM T_CB_PROORDERINFO product INNER JOIN T_CB_PROORDERDIME productDime ON product.FProductDimeId = productDime.FProductDimeId INNER JOIN T_HS_OUTACCTG acctg ON product.FACCTGID = acctg.FId INNER JOIN T_CB_CostMatterial COSTM ON product.FID = COSTM.FID INNER JOIN T_CB_CostMatterialDetail COSTMD ON COSTM.FENTRYID = COSTMD.FENTRYID INNER JOIN T_BD_MATERIAL MAT ON MAT.FMATERIALID = productDime.FPRODUCTID LEFT OUTER JOIN T_CB_COSTCENTER CC ON CC.FCOSTCENTERID = productDime.FCOSTCENTERID WHERE (((product.FENDINITKEY = '1' AND acctg.FDIMENSIONID = @FDIMEID1) AND (product.FACCTGID >= @FSTARTACCTGID1)) AND (product.FACCTGID <= @FENDACCTGID1)) GROUP BY productDime.FPRODUCTID, COSTM.FMATERIALID, COSTM.FEXPTYPE, COSTMD.FEXPENSESITEMID) tmp INNER JOIN T_BD_MATERIALBASE baseunit ON baseunit.FMaterialId = TMP.FPRODUCTID INNER JOIN T_BD_CURRENCY CURR ON CURR.FCURRENCYID = 1 WHERE (((TMP.FCURRCOSTAMOUNT <> 0) OR (TMP.FDIFFCOSTAMOUNT <> 0)) AND NOT EXISTS (SELECT 1 FROM #TM_CB_PRORESTORECOSTDIFF df WHERE (df.FNeedRestore = 1 AND df.FMATERIALID = TMP.FMATERIALID))) GROUP BY TMP.FPRODUCTID, baseunit.FBaseUnitId, TMP.FMATERIALID, TMP.FEXPTYPE, TMP.FCOSTITEMID, TMP.FEXPENSEITEMID, CURR.FPRICEDIGITS
Server stack trace: at Kingdee.BOS.App.Data.AbstractDatabase.ExecuteNonQuery(DbCommand command, IEnumerable`1 listParam) at Kingdee.BOS.App.Data.DBUtils.ExecuteBatchWithTime(Context ctx, List`1 lstSqlObj, Int32 commandTimeout) at Kingdee.K3.FIN.CB.App.Report.ProductRestoreCostDiffRpt.BuilderReportSqlAndTempTable(IRptParams filter, String tableName) at Kingdee.BOS.Core.Report.PlugIn.AbstractSysReportServicePlugIn.CreateTempTable(IRptParams filter, String tablename) at Kingdee.BOS.Core.Report.PlugIn.AbstractSysReportServicePlugIn.GetDataForVirtual(IRptParams filter) at Kingdee.BOS.Core.Report.PlugIn.AbstractSysReportServicePlugIn.GetData(IRptParams filter) at Kingdee.BOS.App.Core.PlugInProxy.SysReportServicePlugInProxy.GetReportData(ReportServiceParameter parameter) at Kingdee.BOS.App.Core.SysReportService.GetReportData(ReportServiceParameter parameter)
Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at Kingdee.BOS.Contracts.ISysReportService.GetReportData(ReportServiceParameter parameter) at Kingdee.BOS.ServiceHelper.SysReportServiceHelper.GetReportData(ReportServiceParameter parameter) at Kingdee.BOS.Model.Report.SysReportModel.GetData(Int32 start, Int32 rows) at Kingdee.BOS.Web.Report.SysReportView.GetListData() at Kingdee.BOS.Web.Report.SysReportView.<>c__DisplayClass4d.
推荐阅读