打了PT101527补丁,红字外购入库提示,数据读取错误
金蝶云社区-MoShiqi
MoShiqi
0人赞赏了该文章 825次浏览 未经作者许可,禁止转载编辑于2016年11月04日 10:10:48

打了PT101527补丁,红字外购入库提示,数据读取错误。蓝字没有问题。

经跟踪SQL,极大可能是系统的BUG ,请版主帮助。
版本:WISE 14.2
SQL 如下(报错位置就在第二行,附图):
select * from SELECT DISTINCT u1.FItemID;
EXEC up_UpdateBatchNum @@ROWCOUNT AS ,
CASE WHEN FQty=0 THEN 0 ELSE CAST(u1.FAmount*v1.FExchangeRate AS FLOAT)*((CASE WHEN isnull(u1.FCommitQty, 0)=0 THEN U1.FQty WHEN (u1.FQty - isnull(u1.FCommitQty, 0))<0 THEN U1.FQty ELSE isnull(u1.FCommitQty, 0) END))/(FQty) END AS FAmount,
CAST(t4.FPlanPrice AS FLOAT) * CAST(t7.FCoefficient AS FLOAT) AS FAuxPlanPrice,
CAST(U1.FAuxPrice AS FLOAT)*(1 - CAST(U1.FTaxRate AS FLOAT)/100) * CAST(V1.FExchangeRate AS FLOAT) AS FAuxPrice,
t4.FUnitGroupID as FItemUnitGroupID,sign(t4.FAuxClassID)-sign(u1.fauxpropid) AS FAuxPropCls,
u1.FAuxPropID,t105.FName AS FAuxPropName,t105.FNumber AS FAuxPropNum,u1.FAuxCommitQty AS FAuxQty,
u1.FAuxCommitQty AS FAuxQtyMust,t10.FName AS FBaseUnitName,CASE WHEN ISNULL(t4.FBatchManager, 0) = 0 THEN '' ELSE dbo.GetBatchNum(ROW_NUMBER() OVER(ORDER BY v1.FInterID, u1.FEntryID)) END AS FBatchNo,
v1.FBillNO,v1.FBillNo AS FBillNo0,v1.FBillNo AS FBillNo1,v1.FBillNo AS FBillNo2,
1058 AS FChkPassItem,(SELECT FName FROM t_SubMessage WHERE FTypeID = 244 AND FInterID = 1058) AS FChkPassItemName,
(SELECT FID FROM t_SubMessage WHERE FTypeID = 244 AND FInterID = 1058) AS FChkPassItemNumber,
u1.FContractBillNo,u1.FContractEntryID,u1.FContractInterID,v1.FCurrencyID,CASE WHEN t5.FTypeID = 504 THEN 0 ELSE t510.FSPID END AS FDCSPID,
CASE WHEN t5.FTypeID = 504 THEN 0 ELSE t5.FItemID END AS FDCStockID,CASE WHEN t5.FTypeID = 504 THEN '' ELSE t5.FName END AS FDCStockName,
CASE WHEN t5.FTypeID = 504 THEN '' ELSE t5.FNumber END AS FDCStockNumber,v1.FDeptID,
t2.FName AS FDeptIDName,t2.FNumber AS FDeptIDNumber,u1.FTaxRate AS FDiscountRate,
v1.FEmpID,t3Emp.FName AS FEmpIDName,t3Emp.FNumber AS FEmpIDNumber,u1.FEntryID,v1.FExplanation AS FExplanationID,
v1.FExplanation AS FExplanationName,v1.FExplanation AS FExplanationNumber,v1.FInterID,
u1.FItemID,GetDate() AS FKFDate,t4.FKFPeriod,v1.FManageType,t621.FName AS FManageTypeName,
t621.FNumber AS FManageTypeNumber,u1.FMapName,u1.FMapNumber,t4.FName AS FMatName,
t4.FNumber as FMatNumber ,t4.fModel,u1.FMTONo,u1.FNote,v1.FBillNo AS FOrderBillNo,
u1.FEntryID AS FOrderEntryID,u1.FInterID AS FOrderInterID,u1.FPlanMode,tPlanMode.FName AS FPlanModeName,
tPlanMode.FID AS FPlanModeNumber,v1.FPoStyle,t11.FName AS FPoStyleName,t11.FID AS FPoStyleNumber,
t4.FPriceDecimal,CASE when EXISTS(select * from t_SystemProfile where FCategory ='IC' AND FKey='POOrderTaxInPrice' and FValue =1) then u1.FTaxPrice else u1.FPrice end AS FPurchasePrice,
u1.FCommitQty AS FQty,t4.FQtyDecimal,u1.FCommitQty AS FQtyMust,v1.FRelateBrID,
t_10.FName AS FRelateBrIDName,t_10.FNumber AS FRelateBrIDNumber,CASE ISNULL(u1.FSecCommitQty,0) WHEN 0 THEN 0 ELSE u1.FCommitQty/u1.FSecCommitQty END AS FSecCoefficient,
u1.FSecCommitQty AS FSecQty,t501.FName AS FSecUnitName,v1.FTranType AS FSelTranTypeID,
(SELECT FName FROM v_ICTransType WHERE FID=v1.FTranType) AS FSelTranTypeName,(SELECT FName FROM v_ICTransType WHERE FID=v1.FTranType) AS FSelTranTypeNumber,
v1.FBillNo AS FSourceBillNo,u1.FEntryID AS FSourceEntryID,v1.FInterId AS FSourceInterID,
v1.FTranType AS FSourceTranType,CASE WHEN t5.FTypeID = 504 THEN '' ELSE t510.FName END AS FSPName,
CASE WHEN t5.FTypeID = 504 THEN '' ELSE t510.FNumber END AS FSPNumber,v1.FSupplyID,
t8.FName AS FSupplyName,t8.FNumber AS FSupplyNumber,t4.FTrack,u1.FUnitID,t7.FName AS FUnitName,
t7.FNumber AS FUnitNumber,u1.HP_FManagedType,t109.FName AS HP_FManagedTypeName,
t109.FID AS HP_FManagedTypeNumber
FROM POOrder v1
INNER JOIN POOrderEntry u1 ON v1.FInterID=u1.FInterID
LEFT OUTER JOIN t_Supplier t8 ON v1.FSupplyID=t8.FItemID
LEFT OUTER JOIN t_SonCompany t_10 ON v1.FRelateBrID=t_10.FItemID
INNER JOIN t_Submessage t11 ON v1.FPOStyle=t11.FInterID
LEFT JOIN t_Department t2 ON v1.FDeptID = t2.FItemID
LEFT JOIN t_Emp t3emp ON v1.FEmpID = t3emp.FItemID
LEFT OUTER JOIN t_BaseBondedManageTypeEntry t621 ON v1.FManageType=t621.FID
INNER JOIN t_ICItem t4 ON u1.FItemID=t4.FItemID
INNER JOIN t_MeasureUnit t7 ON u1.FUnitID=t7.FItemID
LEFT JOIN t_SubMessage t109 ON u1.HP_FManagedType=t109.FInterID
LEFT JOIN t_AuxItem t105 ON u1.FAuxPropID=t105.FItemID
LEFT OUTER JOIN t_SubMessage tplanmode ON u1.FPlanMode=tplanmode.FInterID
INNER JOIN t_MeasureUnit t10 ON t4.FUnitID=t10.FItemID
LEFT OUTER JOIN t_MeasureUnit t501 ON t4.FSecUnitID=t501.FItemID
LEFT JOIN t_Stock t5 ON t4.FDefaultLoc=t5.FItemID AND t5.FTypeID Not IN (501,502,503)
LEFT JOIN t_StockPlace t510 ON t5.FSPGroupID=t510.FSPGroupID AND t510.FSPID = t4.FSPID
WHERE ((v1.FInterID=4693 AND u1.FEntryID=1))
ORDER BY v1.FInterID, u1.FEntryID, u1.FItemID; EXEC up_UpdateBatchNum @@ROWCOUNT