Sql server锁表

来自ling
跳转至: 导航搜索
--锁表进程
select   request_session_id   spid,OBJECT_NAME(resource_associated_entity_id) tableName
   from   sys.dm_tran_locks t where resource_type='OBJECT';
--锁表语句
dbcc inputbuffer(119)
--锁表进程
 select   request_session_id   spid,OBJECT_NAME(resource_associated_entity_id) tableName
    from   sys.dm_tran_locks t where resource_type='OBJECT' order by spid asc;
--锁表语句
dbcc inputbuffer(86) ;--(@P0 bigint)select projectite0_.id as id2_84_0_, projectite0_.aic as aic3_84_0_, projectite0_.applydate as applydat4_84_0_, projectite0_.auditAIC as auditAIC5_84_0_, projectite0_.auditCobber as auditCob6_84_0_, projectite0_.auditcostcenter as auditcos7_84_0_, projectite0_.auditManager as auditMan8_84_0_, projectite0_.auditStatus as auditSta9_84_0_, projectite0_.auditTaskCode as auditTa10_84_0_, projectite0_.backReason as backRea11_84_0_, projectite0_.bark as bark12_84_0_, projectite0_.begDate as begDate13_84_0_, projectite0_.businessType as busines14_84_0_, projectite0_.cTSNo as cTSNo15_84_0_, projectite0_.clientCode as clientC16_84_0_, projectite0_.clientName as clientN17_84_0_, projectite0_.code as code18_84_0_, projectite0_.codestatus as codesta19_84_0_, projectite0_.company as company20_84_0_, projectite0_.ctaCode as ctaCode21_84_0_, projectite0_.endDate as endDate22_84_0_, projectite0_.estimatedBegDate as estimat23_84_0_, projectite0_.estimatedEndDate as estimat24_84_0_, projectite0_.feeApplyStatus as feeAppl25_84_0_, projectite0_.FIRSTINSERT as FIRSTIN26_84_0_, projectite0_.groupCode as groupCo27_84_0_, projectite0_.hasManuscript as hasManu28_84_0_, projectite0_.INSERTMAN as INSERTM29_84_0_, projectite0_.isDelete as isDelet30_84_0_, projectite0_.isGroup as isGroup31_84_0_, projectite0_.isRecord as isRecor32_84_0_, projectite0_.itemstatus as itemsta33_84_0_, projectite0_.LASTMODIFIED as LASTMOD34_84_0_, projectite0_.mic as mic35_84_0_, projectite0_.name as name36_84_0_, projectite0_.pic as pic37_84_0_, projectite0_.ppic as ppic38_84_0_, projectite0_.remark as remark39_84_0_, projectite0_.remarkTwo as remarkT40_84_0_, projectite0_.rrRate as rrRate41_84_0_, projectite0_.serviceID as service42_84_0_, projectite0_.serviceoffering as service43_84_0_, projectite0_.serviceofferingdescription as service44_84_0_, projectite0_.staff as staff45_84_0_, projectite0_.taxCobber as taxCobb46_84_0_, projectite0_.taxDirector as taxDire47_84_0_, projectite0_.taxManager as taxMana48_84_0_, projectite0_.taxSecondCobber as taxSeco49_84_0_, projectite0_.tempcode as tempcod50_84_0_, projectite0_.UPDATEMAN as UPDATEM51_84_0_, projectite0_.workload as workloa52_84_0_, projectite0_.year as year53_84_0_, projectite0_.engProjectDesc as engProj54_84_0_, projectite0_.fisY as fisY55_84_0_, projectite0_.isUserOpen as isUserO56_84_0_, projectite0_.oppSrvID as oppSrvI57_84_0_, projectite0_.sapKey as sapKey58_84_0_ from TR_ProjectItem projectite0_ where projectite0_.id=@P0 and projectite0_.istemplate=0        
dbcc inputbuffer(97) ;--(@P0 bigint)select projectite0_.id as id2_84_0_, projectite0_.aic as aic3_84_0_, projectite0_.applydate as applydat4_84_0_, projectite0_.auditAIC as auditAIC5_84_0_, projectite0_.auditCobber as auditCob6_84_0_, projectite0_.auditcostcenter as auditcos7_84_0_, projectite0_.auditManager as auditMan8_84_0_, projectite0_.auditStatus as auditSta9_84_0_, projectite0_.auditTaskCode as auditTa10_84_0_, projectite0_.backReason as backRea11_84_0_, projectite0_.bark as bark12_84_0_, projectite0_.begDate as begDate13_84_0_, projectite0_.businessType as busines14_84_0_, projectite0_.cTSNo as cTSNo15_84_0_, projectite0_.clientCode as clientC16_84_0_, projectite0_.clientName as clientN17_84_0_, projectite0_.code as code18_84_0_, projectite0_.codestatus as codesta19_84_0_, projectite0_.company as company20_84_0_, projectite0_.ctaCode as ctaCode21_84_0_, projectite0_.endDate as endDate22_84_0_, projectite0_.estimatedBegDate as estimat23_84_0_, projectite0_.estimatedEndDate as estimat24_84_0_, projectite0_.feeApplyStatus as feeAppl25_84_0_, projectite0_.FIRSTINSERT as FIRSTIN26_84_0_, projectite0_.groupCode as groupCo27_84_0_, projectite0_.hasManuscript as hasManu28_84_0_, projectite0_.INSERTMAN as INSERTM29_84_0_, projectite0_.isDelete as isDelet30_84_0_, projectite0_.isGroup as isGroup31_84_0_, projectite0_.isRecord as isRecor32_84_0_, projectite0_.itemstatus as itemsta33_84_0_, projectite0_.LASTMODIFIED as LASTMOD34_84_0_, projectite0_.mic as mic35_84_0_, projectite0_.name as name36_84_0_, projectite0_.pic as pic37_84_0_, projectite0_.ppic as ppic38_84_0_, projectite0_.remark as remark39_84_0_, projectite0_.remarkTwo as remarkT40_84_0_, projectite0_.rrRate as rrRate41_84_0_, projectite0_.serviceID as service42_84_0_, projectite0_.serviceoffering as service43_84_0_, projectite0_.serviceofferingdescription as service44_84_0_, projectite0_.staff as staff45_84_0_, projectite0_.taxCobber as taxCobb46_84_0_, projectite0_.taxDirector as taxDire47_84_0_, projectite0_.taxManager as taxMana48_84_0_, projectite0_.taxSecondCobber as taxSeco49_84_0_, projectite0_.tempcode as tempcod50_84_0_, projectite0_.UPDATEMAN as UPDATEM51_84_0_, projectite0_.workload as workloa52_84_0_, projectite0_.year as year53_84_0_, projectite0_.engProjectDesc as engProj54_84_0_, projectite0_.fisY as fisY55_84_0_, projectite0_.isUserOpen as isUserO56_84_0_, projectite0_.oppSrvID as oppSrvI57_84_0_, projectite0_.sapKey as sapKey58_84_0_ from TR_ProjectItem projectite0_ where projectite0_.id=@P0 and projectite0_.istemplate=0        
dbcc inputbuffer(98) ;--(@P0 bigint)select projectite0_.id as id2_84_0_, projectite0_.aic as aic3_84_0_, projectite0_.applydate as applydat4_84_0_, projectite0_.auditAIC as auditAIC5_84_0_, projectite0_.auditCobber as auditCob6_84_0_, projectite0_.auditcostcenter as auditcos7_84_0_, projectite0_.auditManager as auditMan8_84_0_, projectite0_.auditStatus as auditSta9_84_0_, projectite0_.auditTaskCode as auditTa10_84_0_, projectite0_.backReason as backRea11_84_0_, projectite0_.bark as bark12_84_0_, projectite0_.begDate as begDate13_84_0_, projectite0_.businessType as busines14_84_0_, projectite0_.cTSNo as cTSNo15_84_0_, projectite0_.clientCode as clientC16_84_0_, projectite0_.clientName as clientN17_84_0_, projectite0_.code as code18_84_0_, projectite0_.codestatus as codesta19_84_0_, projectite0_.company as company20_84_0_, projectite0_.ctaCode as ctaCode21_84_0_, projectite0_.endDate as endDate22_84_0_, projectite0_.estimatedBegDate as estimat23_84_0_, projectite0_.estimatedEndDate as estimat24_84_0_, projectite0_.feeApplyStatus as feeAppl25_84_0_, projectite0_.FIRSTINSERT as FIRSTIN26_84_0_, projectite0_.groupCode as groupCo27_84_0_, projectite0_.hasManuscript as hasManu28_84_0_, projectite0_.INSERTMAN as INSERTM29_84_0_, projectite0_.isDelete as isDelet30_84_0_, projectite0_.isGroup as isGroup31_84_0_, projectite0_.isRecord as isRecor32_84_0_, projectite0_.itemstatus as itemsta33_84_0_, projectite0_.LASTMODIFIED as LASTMOD34_84_0_, projectite0_.mic as mic35_84_0_, projectite0_.name as name36_84_0_, projectite0_.pic as pic37_84_0_, projectite0_.ppic as ppic38_84_0_, projectite0_.remark as remark39_84_0_, projectite0_.remarkTwo as remarkT40_84_0_, projectite0_.rrRate as rrRate41_84_0_, projectite0_.serviceID as service42_84_0_, projectite0_.serviceoffering as service43_84_0_, projectite0_.serviceofferingdescription as service44_84_0_, projectite0_.staff as staff45_84_0_, projectite0_.taxCobber as taxCobb46_84_0_, projectite0_.taxDirector as taxDire47_84_0_, projectite0_.taxManager as taxMana48_84_0_, projectite0_.taxSecondCobber as taxSeco49_84_0_, projectite0_.tempcode as tempcod50_84_0_, projectite0_.UPDATEMAN as UPDATEM51_84_0_, projectite0_.workload as workloa52_84_0_, projectite0_.year as year53_84_0_, projectite0_.engProjectDesc as engProj54_84_0_, projectite0_.fisY as fisY55_84_0_, projectite0_.isUserOpen as isUserO56_84_0_, projectite0_.oppSrvID as oppSrvI57_84_0_, projectite0_.sapKey as sapKey58_84_0_ from TR_ProjectItem projectite0_ where projectite0_.id=@P0 and projectite0_.istemplate=0        
dbcc inputbuffer(99) ;--(@P0 bigint,@P1 bigint)select checklistm0_.id as id1_61_, checklistm0_.attachmentId as attachme2_61_, checklistm0_.checklistId as checklis3_61_, checklistm0_.commentsId as comments4_61_, checklistm0_.inserData as inserDat5_61_, checklistm0_.moudleId as moudleId6_61_, checklistm0_.moudleStatus as moudleSt7_61_, checklistm0_.moudleType as moudleTy8_61_, checklistm0_.operateUser as operateU9_61_, checklistm0_.tipsText as tipsTex10_61_, checklistm0_.updateData as updateD11_61_ from TR_ChecklistMoudle checklistm0_ where checklistm0_.checklistId=@P0 and checklistm0_.moudleId=@P1                
dbcc inputbuffer(102) ;--(@P0 bigint)select checklistm0_.id as id1_61_0_, checklistm0_.attachmentId as attachme2_61_0_, checklistm0_.checklistId as checklis3_61_0_, checklistm0_.commentsId as comments4_61_0_, checklistm0_.inserData as inserDat5_61_0_, checklistm0_.moudleId as moudleId6_61_0_, checklistm0_.moudleStatus as moudleSt7_61_0_, checklistm0_.moudleType as moudleTy8_61_0_, checklistm0_.operateUser as operateU9_61_0_, checklistm0_.tipsText as tipsTex10_61_0_, checklistm0_.updateData as updateD11_61_0_ from TR_ChecklistMoudle checklistm0_ where checklistm0_.id=@P0        
dbcc inputbuffer(105) ;--(@P0 bigint)select projectite0_.id as id2_84_0_, projectite0_.aic as aic3_84_0_, projectite0_.applydate as applydat4_84_0_, projectite0_.auditAIC as auditAIC5_84_0_, projectite0_.auditCobber as auditCob6_84_0_, projectite0_.auditcostcenter as auditcos7_84_0_, projectite0_.auditManager as auditMan8_84_0_, projectite0_.auditStatus as auditSta9_84_0_, projectite0_.auditTaskCode as auditTa10_84_0_, projectite0_.backReason as backRea11_84_0_, projectite0_.bark as bark12_84_0_, projectite0_.begDate as begDate13_84_0_, projectite0_.businessType as busines14_84_0_, projectite0_.cTSNo as cTSNo15_84_0_, projectite0_.clientCode as clientC16_84_0_, projectite0_.clientName as clientN17_84_0_, projectite0_.code as code18_84_0_, projectite0_.codestatus as codesta19_84_0_, projectite0_.company as company20_84_0_, projectite0_.ctaCode as ctaCode21_84_0_, projectite0_.endDate as endDate22_84_0_, projectite0_.estimatedBegDate as estimat23_84_0_, projectite0_.estimatedEndDate as estimat24_84_0_, projectite0_.feeApplyStatus as feeAppl25_84_0_, projectite0_.FIRSTINSERT as FIRSTIN26_84_0_, projectite0_.groupCode as groupCo27_84_0_, projectite0_.hasManuscript as hasManu28_84_0_, projectite0_.INSERTMAN as INSERTM29_84_0_, projectite0_.isDelete as isDelet30_84_0_, projectite0_.isGroup as isGroup31_84_0_, projectite0_.isRecord as isRecor32_84_0_, projectite0_.itemstatus as itemsta33_84_0_, projectite0_.LASTMODIFIED as LASTMOD34_84_0_, projectite0_.mic as mic35_84_0_, projectite0_.name as name36_84_0_, projectite0_.pic as pic37_84_0_, projectite0_.ppic as ppic38_84_0_, projectite0_.remark as remark39_84_0_, projectite0_.remarkTwo as remarkT40_84_0_, projectite0_.rrRate as rrRate41_84_0_, projectite0_.serviceID as service42_84_0_, projectite0_.serviceoffering as service43_84_0_, projectite0_.serviceofferingdescription as service44_84_0_, projectite0_.staff as staff45_84_0_, projectite0_.taxCobber as taxCobb46_84_0_, projectite0_.taxDirector as taxDire47_84_0_, projectite0_.taxManager as taxMana48_84_0_, projectite0_.taxSecondCobber as taxSeco49_84_0_, projectite0_.tempcode as tempcod50_84_0_, projectite0_.UPDATEMAN as UPDATEM51_84_0_, projectite0_.workload as workloa52_84_0_, projectite0_.year as year53_84_0_, projectite0_.engProjectDesc as engProj54_84_0_, projectite0_.fisY as fisY55_84_0_, projectite0_.isUserOpen as isUserO56_84_0_, projectite0_.oppSrvID as oppSrvI57_84_0_, projectite0_.sapKey as sapKey58_84_0_ from TR_ProjectItem projectite0_ where projectite0_.id=@P0 and projectite0_.istemplate=0        
dbcc inputbuffer(106) ;--(@P0 bigint)select projectite0_.id as id2_84_0_, projectite0_.aic as aic3_84_0_, projectite0_.applydate as applydat4_84_0_, projectite0_.auditAIC as auditAIC5_84_0_, projectite0_.auditCobber as auditCob6_84_0_, projectite0_.auditcostcenter as auditcos7_84_0_, projectite0_.auditManager as auditMan8_84_0_, projectite0_.auditStatus as auditSta9_84_0_, projectite0_.auditTaskCode as auditTa10_84_0_, projectite0_.backReason as backRea11_84_0_, projectite0_.bark as bark12_84_0_, projectite0_.begDate as begDate13_84_0_, projectite0_.businessType as busines14_84_0_, projectite0_.cTSNo as cTSNo15_84_0_, projectite0_.clientCode as clientC16_84_0_, projectite0_.clientName as clientN17_84_0_, projectite0_.code as code18_84_0_, projectite0_.codestatus as codesta19_84_0_, projectite0_.company as company20_84_0_, projectite0_.ctaCode as ctaCode21_84_0_, projectite0_.endDate as endDate22_84_0_, projectite0_.estimatedBegDate as estimat23_84_0_, projectite0_.estimatedEndDate as estimat24_84_0_, projectite0_.feeApplyStatus as feeAppl25_84_0_, projectite0_.FIRSTINSERT as FIRSTIN26_84_0_, projectite0_.groupCode as groupCo27_84_0_, projectite0_.hasManuscript as hasManu28_84_0_, projectite0_.INSERTMAN as INSERTM29_84_0_, projectite0_.isDelete as isDelet30_84_0_, projectite0_.isGroup as isGroup31_84_0_, projectite0_.isRecord as isRecor32_84_0_, projectite0_.itemstatus as itemsta33_84_0_, projectite0_.LASTMODIFIED as LASTMOD34_84_0_, projectite0_.mic as mic35_84_0_, projectite0_.name as name36_84_0_, projectite0_.pic as pic37_84_0_, projectite0_.ppic as ppic38_84_0_, projectite0_.remark as remark39_84_0_, projectite0_.remarkTwo as remarkT40_84_0_, projectite0_.rrRate as rrRate41_84_0_, projectite0_.serviceID as service42_84_0_, projectite0_.serviceoffering as service43_84_0_, projectite0_.serviceofferingdescription as service44_84_0_, projectite0_.staff as staff45_84_0_, projectite0_.taxCobber as taxCobb46_84_0_, projectite0_.taxDirector as taxDire47_84_0_, projectite0_.taxManager as taxMana48_84_0_, projectite0_.taxSecondCobber as taxSeco49_84_0_, projectite0_.tempcode as tempcod50_84_0_, projectite0_.UPDATEMAN as UPDATEM51_84_0_, projectite0_.workload as workloa52_84_0_, projectite0_.year as year53_84_0_, projectite0_.engProjectDesc as engProj54_84_0_, projectite0_.fisY as fisY55_84_0_, projectite0_.isUserOpen as isUserO56_84_0_, projectite0_.oppSrvID as oppSrvI57_84_0_, projectite0_.sapKey as sapKey58_84_0_ from TR_ProjectItem projectite0_ where projectite0_.id=@P0 and projectite0_.istemplate=0        
dbcc inputbuffer(113) ;--(@P0 bigint)select projectite0_.id as id2_84_0_, projectite0_.aic as aic3_84_0_, projectite0_.applydate as applydat4_84_0_, projectite0_.auditAIC as auditAIC5_84_0_, projectite0_.auditCobber as auditCob6_84_0_, projectite0_.auditcostcenter as auditcos7_84_0_, projectite0_.auditManager as auditMan8_84_0_, projectite0_.auditStatus as auditSta9_84_0_, projectite0_.auditTaskCode as auditTa10_84_0_, projectite0_.backReason as backRea11_84_0_, projectite0_.bark as bark12_84_0_, projectite0_.begDate as begDate13_84_0_, projectite0_.businessType as busines14_84_0_, projectite0_.cTSNo as cTSNo15_84_0_, projectite0_.clientCode as clientC16_84_0_, projectite0_.clientName as clientN17_84_0_, projectite0_.code as code18_84_0_, projectite0_.codestatus as codesta19_84_0_, projectite0_.company as company20_84_0_, projectite0_.ctaCode as ctaCode21_84_0_, projectite0_.endDate as endDate22_84_0_, projectite0_.estimatedBegDate as estimat23_84_0_, projectite0_.estimatedEndDate as estimat24_84_0_, projectite0_.feeApplyStatus as feeAppl25_84_0_, projectite0_.FIRSTINSERT as FIRSTIN26_84_0_, projectite0_.groupCode as groupCo27_84_0_, projectite0_.hasManuscript as hasManu28_84_0_, projectite0_.INSERTMAN as INSERTM29_84_0_, projectite0_.isDelete as isDelet30_84_0_, projectite0_.isGroup as isGroup31_84_0_, projectite0_.isRecord as isRecor32_84_0_, projectite0_.itemstatus as itemsta33_84_0_, projectite0_.LASTMODIFIED as LASTMOD34_84_0_, projectite0_.mic as mic35_84_0_, projectite0_.name as name36_84_0_, projectite0_.pic as pic37_84_0_, projectite0_.ppic as ppic38_84_0_, projectite0_.remark as remark39_84_0_, projectite0_.remarkTwo as remarkT40_84_0_, projectite0_.rrRate as rrRate41_84_0_, projectite0_.serviceID as service42_84_0_, projectite0_.serviceoffering as service43_84_0_, projectite0_.serviceofferingdescription as service44_84_0_, projectite0_.staff as staff45_84_0_, projectite0_.taxCobber as taxCobb46_84_0_, projectite0_.taxDirector as taxDire47_84_0_, projectite0_.taxManager as taxMana48_84_0_, projectite0_.taxSecondCobber as taxSeco49_84_0_, projectite0_.tempcode as tempcod50_84_0_, projectite0_.UPDATEMAN as UPDATEM51_84_0_, projectite0_.workload as workloa52_84_0_, projectite0_.year as year53_84_0_, projectite0_.engProjectDesc as engProj54_84_0_, projectite0_.fisY as fisY55_84_0_, projectite0_.isUserOpen as isUserO56_84_0_, projectite0_.oppSrvID as oppSrvI57_84_0_, projectite0_.sapKey as sapKey58_84_0_ from TR_ProjectItem projectite0_ where projectite0_.id=@P0 and projectite0_.istemplate=0        
dbcc inputbuffer(114) ;--(@P0 nvarchar(4000),@P1 nvarchar(4000),@P2 nvarchar(4000),@P3 nvarchar(4000))select this_.id as id1_54_0_, this_.auditAIC as auditAIC2_54_0_, this_.auditMIC as auditMIC3_54_0_, this_.auditPIC as auditPIC4_54_0_, this_.customerCode as customer5_54_0_, this_.customerName as customer6_54_0_, this_.eMSAvailableDate as eMSAvail7_54_0_, this_.entityId as entityId8_54_0_, this_.issueSummaryDate as issueSum9_54_0_, this_.projectItemId as project10_54_0_, this_.taxMemoDraftDate as taxMemo11_54_0_, this_.taxMemoFinalDate as taxMemo12_54_0_ from TR_AuditInformationEntity this_ where  EXISTS (SELECT 1 FROM TR_PROJECTITEM PI,TR_ITEMENTITY IE WHERE PI.ID=this_.PROJECTITEMID AND IE.ID=this_.ENTITYID AND PI.ID=IE.PROJECTITEMID AND (PI.ISRECORD=0 OR PI.ISRECORD IS NULL) and pi.isdelete=0 AND (PI.PIC=@P0 OR PI.MIC=@P1 OR IE.AIC=@P2 OR IE.STAFF=@P3))                                
dbcc inputbuffer(115) ;--(@P0 bigint)select checklistm0_.id as id1_61_0_, checklistm0_.attachmentId as attachme2_61_0_, checklistm0_.checklistId as checklis3_61_0_, checklistm0_.commentsId as comments4_61_0_, checklistm0_.inserData as inserDat5_61_0_, checklistm0_.moudleId as moudleId6_61_0_, checklistm0_.moudleStatus as moudleSt7_61_0_, checklistm0_.moudleType as moudleTy8_61_0_, checklistm0_.operateUser as operateU9_61_0_, checklistm0_.tipsText as tipsTex10_61_0_, checklistm0_.updateData as updateD11_61_0_ from TR_ChecklistMoudle checklistm0_ where checklistm0_.id=@P0        
dbcc inputbuffer(116) ;--(@P0 bigint)select projectite0_.id as id2_84_0_, projectite0_.aic as aic3_84_0_, projectite0_.applydate as applydat4_84_0_, projectite0_.auditAIC as auditAIC5_84_0_, projectite0_.auditCobber as auditCob6_84_0_, projectite0_.auditcostcenter as auditcos7_84_0_, projectite0_.auditManager as auditMan8_84_0_, projectite0_.auditStatus as auditSta9_84_0_, projectite0_.auditTaskCode as auditTa10_84_0_, projectite0_.backReason as backRea11_84_0_, projectite0_.bark as bark12_84_0_, projectite0_.begDate as begDate13_84_0_, projectite0_.businessType as busines14_84_0_, projectite0_.cTSNo as cTSNo15_84_0_, projectite0_.clientCode as clientC16_84_0_, projectite0_.clientName as clientN17_84_0_, projectite0_.code as code18_84_0_, projectite0_.codestatus as codesta19_84_0_, projectite0_.company as company20_84_0_, projectite0_.ctaCode as ctaCode21_84_0_, projectite0_.endDate as endDate22_84_0_, projectite0_.estimatedBegDate as estimat23_84_0_, projectite0_.estimatedEndDate as estimat24_84_0_, projectite0_.feeApplyStatus as feeAppl25_84_0_, projectite0_.FIRSTINSERT as FIRSTIN26_84_0_, projectite0_.groupCode as groupCo27_84_0_, projectite0_.hasManuscript as hasManu28_84_0_, projectite0_.INSERTMAN as INSERTM29_84_0_, projectite0_.isDelete as isDelet30_84_0_, projectite0_.isGroup as isGroup31_84_0_, projectite0_.isRecord as isRecor32_84_0_, projectite0_.itemstatus as itemsta33_84_0_, projectite0_.LASTMODIFIED as LASTMOD34_84_0_, projectite0_.mic as mic35_84_0_, projectite0_.name as name36_84_0_, projectite0_.pic as pic37_84_0_, projectite0_.ppic as ppic38_84_0_, projectite0_.remark as remark39_84_0_, projectite0_.remarkTwo as remarkT40_84_0_, projectite0_.rrRate as rrRate41_84_0_, projectite0_.serviceID as service42_84_0_, projectite0_.serviceoffering as service43_84_0_, projectite0_.serviceofferingdescription as service44_84_0_, projectite0_.staff as staff45_84_0_, projectite0_.taxCobber as taxCobb46_84_0_, projectite0_.taxDirector as taxDire47_84_0_, projectite0_.taxManager as taxMana48_84_0_, projectite0_.taxSecondCobber as taxSeco49_84_0_, projectite0_.tempcode as tempcod50_84_0_, projectite0_.UPDATEMAN as UPDATEM51_84_0_, projectite0_.workload as workloa52_84_0_, projectite0_.year as year53_84_0_, projectite0_.engProjectDesc as engProj54_84_0_, projectite0_.fisY as fisY55_84_0_, projectite0_.isUserOpen as isUserO56_84_0_, projectite0_.oppSrvID as oppSrvI57_84_0_, projectite0_.sapKey as sapKey58_84_0_ from TR_ProjectItem projectite0_ where projectite0_.id=@P0 and projectite0_.istemplate=0        
dbcc inputbuffer(117) ;--(@P0 bigint)select projectite0_.id as id2_84_0_, projectite0_.aic as aic3_84_0_, projectite0_.applydate as applydat4_84_0_, projectite0_.auditAIC as auditAIC5_84_0_, projectite0_.auditCobber as auditCob6_84_0_, projectite0_.auditcostcenter as auditcos7_84_0_, projectite0_.auditManager as auditMan8_84_0_, projectite0_.auditStatus as auditSta9_84_0_, projectite0_.auditTaskCode as auditTa10_84_0_, projectite0_.backReason as backRea11_84_0_, projectite0_.bark as bark12_84_0_, projectite0_.begDate as begDate13_84_0_, projectite0_.businessType as busines14_84_0_, projectite0_.cTSNo as cTSNo15_84_0_, projectite0_.clientCode as clientC16_84_0_, projectite0_.clientName as clientN17_84_0_, projectite0_.code as code18_84_0_, projectite0_.codestatus as codesta19_84_0_, projectite0_.company as company20_84_0_, projectite0_.ctaCode as ctaCode21_84_0_, projectite0_.endDate as endDate22_84_0_, projectite0_.estimatedBegDate as estimat23_84_0_, projectite0_.estimatedEndDate as estimat24_84_0_, projectite0_.feeApplyStatus as feeAppl25_84_0_, projectite0_.FIRSTINSERT as FIRSTIN26_84_0_, projectite0_.groupCode as groupCo27_84_0_, projectite0_.hasManuscript as hasManu28_84_0_, projectite0_.INSERTMAN as INSERTM29_84_0_, projectite0_.isDelete as isDelet30_84_0_, projectite0_.isGroup as isGroup31_84_0_, projectite0_.isRecord as isRecor32_84_0_, projectite0_.itemstatus as itemsta33_84_0_, projectite0_.LASTMODIFIED as LASTMOD34_84_0_, projectite0_.mic as mic35_84_0_, projectite0_.name as name36_84_0_, projectite0_.pic as pic37_84_0_, projectite0_.ppic as ppic38_84_0_, projectite0_.remark as remark39_84_0_, projectite0_.remarkTwo as remarkT40_84_0_, projectite0_.rrRate as rrRate41_84_0_, projectite0_.serviceID as service42_84_0_, projectite0_.serviceoffering as service43_84_0_, projectite0_.serviceofferingdescription as service44_84_0_, projectite0_.staff as staff45_84_0_, projectite0_.taxCobber as taxCobb46_84_0_, projectite0_.taxDirector as taxDire47_84_0_, projectite0_.taxManager as taxMana48_84_0_, projectite0_.taxSecondCobber as taxSeco49_84_0_, projectite0_.tempcode as tempcod50_84_0_, projectite0_.UPDATEMAN as UPDATEM51_84_0_, projectite0_.workload as workloa52_84_0_, projectite0_.year as year53_84_0_, projectite0_.engProjectDesc as engProj54_84_0_, projectite0_.fisY as fisY55_84_0_, projectite0_.isUserOpen as isUserO56_84_0_, projectite0_.oppSrvID as oppSrvI57_84_0_, projectite0_.sapKey as sapKey58_84_0_ from TR_ProjectItem projectite0_ where projectite0_.id=@P0 and projectite0_.istemplate=0        
dbcc inputbuffer(118) ; --(@P0 bigint)select projectite0_.id as id2_84_0_, projectite0_.aic as aic3_84_0_, projectite0_.applydate as applydat4_84_0_, projectite0_.auditAIC as auditAIC5_84_0_, projectite0_.auditCobber as auditCob6_84_0_, projectite0_.auditcostcenter as auditcos7_84_0_, projectite0_.auditManager as auditMan8_84_0_, projectite0_.auditStatus as auditSta9_84_0_, projectite0_.auditTaskCode as auditTa10_84_0_, projectite0_.backReason as backRea11_84_0_, projectite0_.bark as bark12_84_0_, projectite0_.begDate as begDate13_84_0_, projectite0_.businessType as busines14_84_0_, projectite0_.cTSNo as cTSNo15_84_0_, projectite0_.clientCode as clientC16_84_0_, projectite0_.clientName as clientN17_84_0_, projectite0_.code as code18_84_0_, projectite0_.codestatus as codesta19_84_0_, projectite0_.company as company20_84_0_, projectite0_.ctaCode as ctaCode21_84_0_, projectite0_.endDate as endDate22_84_0_, projectite0_.estimatedBegDate as estimat23_84_0_, projectite0_.estimatedEndDate as estimat24_84_0_, projectite0_.feeApplyStatus as feeAppl25_84_0_, projectite0_.FIRSTINSERT as FIRSTIN26_84_0_, projectite0_.groupCode as groupCo27_84_0_, projectite0_.hasManuscript as hasManu28_84_0_, projectite0_.INSERTMAN as INSERTM29_84_0_, projectite0_.isDelete as isDelet30_84_0_, projectite0_.isGroup as isGroup31_84_0_, projectite0_.isRecord as isRecor32_84_0_, projectite0_.itemstatus as itemsta33_84_0_, projectite0_.LASTMODIFIED as LASTMOD34_84_0_, projectite0_.mic as mic35_84_0_, projectite0_.name as name36_84_0_, projectite0_.pic as pic37_84_0_, projectite0_.ppic as ppic38_84_0_, projectite0_.remark as remark39_84_0_, projectite0_.remarkTwo as remarkT40_84_0_, projectite0_.rrRate as rrRate41_84_0_, projectite0_.serviceID as service42_84_0_, projectite0_.serviceoffering as service43_84_0_, projectite0_.serviceofferingdescription as service44_84_0_, projectite0_.staff as staff45_84_0_, projectite0_.taxCobber as taxCobb46_84_0_, projectite0_.taxDirector as taxDire47_84_0_, projectite0_.taxManager as taxMana48_84_0_, projectite0_.taxSecondCobber as taxSeco49_84_0_, projectite0_.tempcode as tempcod50_84_0_, projectite0_.UPDATEMAN as UPDATEM51_84_0_, projectite0_.workload as workloa52_84_0_, projectite0_.year as year53_84_0_, projectite0_.engProjectDesc as engProj54_84_0_, projectite0_.fisY as fisY55_84_0_, projectite0_.isUserOpen as isUserO56_84_0_, projectite0_.oppSrvID as oppSrvI57_84_0_, projectite0_.sapKey as sapKey58_84_0_ from TR_ProjectItem projectite0_ where projectite0_.id=@P0 and projectite0_.istemplate=0        
dbcc inputbuffer(119) ;--(@P0 int,@P1 int,@P2 bit,@P3 nvarchar(4000),@P4 nvarchar(4000),@P5 nvarchar(4000),@P6 nvarchar(4000),@P7 nvarchar(4000),@P8 nvarchar(4000),@P9 nvarchar(4000),@P10 nvarchar(4000),@P11 nvarchar(4000),@P12 nvarchar(4000),@P13 nvarchar(4000))select count(*) from TR_ProjectItem tp  LEFT JOIN TR_AuditInformation t on tp.id=t.projectItemId where 1=1  and tp.fisY >= @P0 and tp.fisY <= @P1 and tp.isDelete = @P2 and (tp.auditCobber in(@P3) or tp.auditManager in(@P4) or tp.pic in(@P5) or tp.mic in(@P6) or tp.aic in(@P7) or tp.staff in(@P8) or tp.taxCobber in(@P9) or tp.taxManager in(@P10) or tp.id in (select i.projectItemId from tr_itemEntity i where i.aic=@P11 or i.staff=@P12) ) and tp.isRecord =@P13