Commit 35e831a1 authored by hongguangwu's avatar hongguangwu

MVP1.6.6-预入职相关_导出优化

parent 528b4990
......@@ -387,7 +387,7 @@
left join t_pre_emp_work_recording ew on a.id=ew.PRE_MAIN_ID
<where>
a.STATUS != '5' and ew.id is not null and EXISTS (
select 1 from (select a.EMP_IDCARD from t_pre_emp_work_recording a GROUP BY a.EMP_IDCARD HAVING count(1)>1) ea where ea.EMP_IDCARD=ew.EMP_IDCARD
select 1 from (select a.EMP_IDCARD from t_pre_emp_work_recording a left join t_pre_emp_main p on a.PRE_MAIN_ID=p.id where p.STATUS != '5' and p.id is not null GROUP BY a.EMP_IDCARD HAVING count(1)>1) ea where ea.EMP_IDCARD=ew.EMP_IDCARD
)
<include refid="tPreEmpMain_where"/>
</where>
......@@ -403,7 +403,7 @@
left join t_pre_emp_work_recording ew on a.id=ew.PRE_MAIN_ID
<where>
a.STATUS != '5' and ew.id is not null and EXISTS (
select 1 from (select a.EMP_IDCARD from t_pre_emp_work_recording a GROUP BY a.EMP_IDCARD HAVING count(1)>1) ea where ea.EMP_IDCARD=ew.EMP_IDCARD
select 1 from (select a.EMP_IDCARD from t_pre_emp_work_recording a left join t_pre_emp_main p on a.PRE_MAIN_ID=p.id where p.STATUS != '5' and p.id is not null GROUP BY a.EMP_IDCARD HAVING count(1)>1) ea where ea.EMP_IDCARD=ew.EMP_IDCARD
)
<include refid="tPreEmpMain_where"/>
</where>
......@@ -424,7 +424,7 @@
left join t_pre_emp_family ef on a.id=ef.PRE_MAIN_ID
<where>
a.STATUS != '5' and ef.id is not null and EXISTS (
select 1 from (select a.EMP_IDCARD from t_pre_emp_family a GROUP BY a.EMP_IDCARD HAVING count(1)>1) ea where ea.EMP_IDCARD=ef.EMP_IDCARD
select 1 from (select a.EMP_IDCARD from t_pre_emp_family a left join t_pre_emp_main p on a.PRE_MAIN_ID=p.id where p.STATUS != '5' and p.id is not null GROUP BY a.EMP_IDCARD HAVING count(1)>1) ea where ea.EMP_IDCARD=ef.EMP_IDCARD
)
<include refid="tPreEmpMain_where"/>
</where>
......@@ -440,7 +440,7 @@
left join view_sys_dict_item family_relation on family_relation.value=ef.RELATIONSHIP_SELF and family_relation.type='family_relation'
<where>
a.STATUS != '5' and ef.id is not null and EXISTS (
select 1 from (select a.EMP_IDCARD from t_pre_emp_family a GROUP BY a.EMP_IDCARD HAVING count(1)>1) ea where ea.EMP_IDCARD=ef.EMP_IDCARD
select 1 from (select a.EMP_IDCARD from t_pre_emp_family a left join t_pre_emp_main p on a.PRE_MAIN_ID=p.id where p.STATUS != '5' and p.id is not null GROUP BY a.EMP_IDCARD HAVING count(1)>1) ea where ea.EMP_IDCARD=ef.EMP_IDCARD
)
<include refid="tPreEmpMain_where"/>
</where>
......@@ -461,7 +461,7 @@
left join t_pre_emp_professional_qualification ep on a.id=ep.PRE_MAIN_ID
<where>
a.STATUS != '5' and ep.id is not null and EXISTS (
select 1 from (select a.EMP_IDCARD from t_pre_emp_professional_qualification a GROUP BY a.EMP_IDCARD HAVING count(1)>1) ea where ea.EMP_IDCARD=ep.EMP_IDCARD
select 1 from (select a.EMP_IDCARD from t_pre_emp_professional_qualification a left join t_pre_emp_main p on a.PRE_MAIN_ID=p.id where p.STATUS != '5' and p.id is not null GROUP BY a.EMP_IDCARD HAVING count(1)>1) ea where ea.EMP_IDCARD=ep.EMP_IDCARD
)
<include refid="tPreEmpMain_where"/>
</where>
......@@ -477,7 +477,7 @@
left join view_sys_dict_item qualification_type on qualification_type.value=ep.QUALIFICATION_TYPE and qualification_type.type='qualification_type'
<where>
a.STATUS != '5' and ep.id is not null and EXISTS (
select 1 from (select a.EMP_IDCARD from t_pre_emp_professional_qualification a GROUP BY a.EMP_IDCARD HAVING count(1)>1) ea where ea.EMP_IDCARD=ep.EMP_IDCARD
select 1 from (select a.EMP_IDCARD from t_pre_emp_professional_qualification a left join t_pre_emp_main p on a.PRE_MAIN_ID=p.id where p.STATUS != '5' and p.id is not null GROUP BY a.EMP_IDCARD HAVING count(1)>1) ea where ea.EMP_IDCARD=ep.EMP_IDCARD
)
<include refid="tPreEmpMain_where"/>
</where>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment