问题原因: |
打上最新的HOTFIX和DBHOTFIX后经测试在999演示帐套上,没有发现该现象。也可能跟您的数据库有关系。经跟踪发现查询完工产品成本汇总表时程序会执行如下脚本(假设当前期间为11月): select 11 as iPeriod,Department.cDepName,Ca_Inventory.cInvName,t1.* from (select cppid,cbatch, max(iFinQua) as iFinTotalQua , sum(case camotype when 0 then (iFinPdtUnitAmo*iFinqua) else 0 end) as iFinMatTotalAmo, Sum(case camotype when 1 then (iFinPdtUnitAmo*iFinqua) else 0 end) as iFinPayTotalAmo, Sum(case camotype when 2 then (iFinPdtUnitAmo*iFinqua) else 0 end) as iFinAuxTotalAmo, Sum(case camotype when 3 then (iFinPdtUnitAmo*iFinqua) else 0 end) as iFinManTotalAmo, Sum(case camotype when 4 then (iFinPdtUnitAmo*iFinqua) else 0 end) as iFinOthTotalAmo, case max(ifinqua) when 0 then 0 else Sum(itotalAmo-ionptotalamo)/max(ifinqua) end as iFinUnitAmo, sum(iFinPdtUnitAmo*iFinqua) As iFinTotalAmo From CA_AmoCt Where iPeriod =11 group by cppid,cbatch) as t1 inner Join productstructureEx inner JOIN Department ON productstructureEx.cDepCode = Department.cDepCode ON t1.cPPID = productstructureEx.cPSPCode inner JOIN Ca_Inventory ON t1.cPPID = Ca_Inventory.cInvCode |