首页 > 代码库 > and t
and t
<select id="HrProReleaseEvalCDPResult_Select" parameterClass="HashTable" resultClass="System.Data.DataTable">
select t1.factor_id,t2.name||t2.id eval_NameId,t3.Sum_Score,decode(t1.score,null,‘未评分‘,t1.score) score,t3.Factor_Name,t4.Standard_Name
from HR_PRO_RELEASE_EVAL t1
left join hrt_employeebase_info t2 on t1.last_updated_by=t2.id
left join Hr_Pro_Eval_Factor t3 on t1.factor_id=t3.factor_id and t1.resource_id=#resourceid# and t3.culture_no=#cultureno# and t1.enabled=#enabled#
inner join HR_PRO_EVAL_STANDARD t4 on t1.factor_id=t4.factor_id and t3.culture_no=t4.culture_no
and t1.factor_id not in (
select t1.factor_id from HR_PRO_RELEASE_EVAL t1
inner join HR_PRO_RELEASE_EVAL t2
on t1.factor_id=t2.factor_id
and t1.Last_Updated_By!=t2.Last_Updated_By
and t1.resource_id=#resourceid#
)
union
(
SELECT factor_id, SUBSTR(MAX (SYS_CONNECT_BY_PATH (Eval_nameId, ‘|‘)), 2) eval_NameId,Sum_Score,SUBSTR(MAX (SYS_CONNECT_BY_PATH (score, ‘|‘)), 2) score,factor_name,standard_name
FROM (SELECT Factor_id, Eval_nameId,Sum_Score,Score,factor_name,standard_name, rn, LEAD (rn) OVER (PARTITION BY Factor_Id ORDER BY rn) rn1
FROM (SELECT factor_id, Eval_nameId,Sum_Score,score,factor_name,standard_name, ROW_NUMBER () OVER (ORDER BY Eval_nameId) rn
FROM (
select t5.factor_id,t6.name||t6.id eval_NameId,t7.Sum_Score,decode(t5.score,null,‘未评分‘,t5.score) score,Factor_Name,Standard_Name
from HR_PRO_RELEASE_EVAL t5
left join hrt_employeebase_info t6 on t5.last_updated_by=t6.id
left join Hr_Pro_Eval_Factor t7 on t5.factor_id=t7.factor_id and t5.resource_id=#resourceid# and t7.culture_no=#cultureno# and t5.enabled=#enabled#
inner join HR_PRO_EVAL_STANDARD t8 on t5.factor_id=t8.factor_id and t7.culture_no=t8.culture_no
and t5.factor_id in (
select t1.factor_id from HR_PRO_RELEASE_EVAL t1
inner join HR_PRO_RELEASE_EVAL t2
on t1.factor_id=t2.factor_id
and t1.Last_Updated_By!=t2.Last_Updated_By
and t1.resource_id=#resourceid#
)
)
)
)
START WITH rn1 IS NULL
CONNECT BY rn1 = PRIOR rn
GROUP BY factor_id,factor_name,standard_name,Sum_Score
)
union
(
select null factor_id,‘‘ eval_NameId,100 Sum_Score,to_char(Eval_Score_avg ) score,‘总分‘ Factor_Name,‘‘ Standard_Name from hr_pro_resource_plan where resource_id=#resourceid#
)
</select>
and t