日期:2014-05-17 浏览次数:20585 次
SELECT COUNT(*)
FROM vcb_ContractGrid
LEFT JOIN ( SELECT DISTINCT
BusinessGUID
FROM vjd_Work2Business
WHERE Type = '合同'
AND BeginDateJh != ConfirmedBeginDate
) b ON vcb_ContractGrid.ContractGUID = b.BusinessGUID
WHERE vcb_ContractGrid.BUGUID = ( '993dcc44-7297-415f-9f4a-6c87e7f49387' )
AND vcb_ContractGrid.IfDdhs = 1
AND vcb_ContractGrid.IfConfirmFkPlan = 0
AND vcb_ContractGrid.JbrGUID = ( '39957769-229b-442e-b839-7ff710433c17' )
AND ( (( ( 1 = 1
AND ( JbDeptCode = 'zb.c1006'
OR JbDeptCode LIKE 'zb.c1006.%'
)
)
AND ( 1 = '1' )
)
AND ( 88 = 88 ))
)
AND ( ( vcb_ContractGrid.ContractGUID IN (
SELECT cb_ContractProj.ContractGUID
FROM cb_ContractProj
INNER HASH JOIN ( SELECT ContractGUID
FROM cb_Contract2HTType aa