Commit 6fa53090 authored by hongguangwu's avatar hongguangwu

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

parent 97980dae
......@@ -311,7 +311,7 @@
if(a.IS_COMPLETE=0,'是','否') field1
,DATE_FORMAT(p.create_time,'%Y-%m-%d') field2,e.EMP_CODE field3,emp_natrue.label field4,e.emp_name field5,e.emp_idcard field6
,if(e.EMP_SEX='2','女',if(e.EMP_SEX='1','男','-')) field7
,if(e.VALIDITY_END is null,'-',if(e.VALIDITY_END > '2999-12-30 00:00:00','长期','固定')) field8 ,e.VALIDITY_END field9
,if(e.VALIDITY_END is null,'-',if(e.VALIDITY_END > '2999-12-30','长期','固定')) field8 ,e.VALIDITY_END field9
,e.VALIDITY_END field10,e.EMP_BIRTHDAY field11,e.EMP_AGE field12 ,emp_married.label field13,nation.label field14
,politicalStatus.label field15,e.EMP_PHONE field16,e.EMP_EMAIL field17
,concat(ifnull(pi.AREA_NAME,''),ifnull(ci.AREA_NAME,''),ifnull(ti.AREA_NAME,'')) field18 ,registype.label field19
......
......@@ -287,7 +287,7 @@
case a.STATUS when '0' then '草稿' when '1' then '待完善' when '2' then '待审核' when '3' then '审核不通过' when '4' then '审核通过' else '-' end field1
,DATE_FORMAT(a.create_time,'%Y-%m-%d') field2,e.EMP_CODE field3,emp_natrue.label field4,a.emp_name field5,a.emp_idcard field6
,if(e.EMP_SEX='2','女',if(e.EMP_SEX='1','男','-')) field7
,if(e.VALIDITY_END is null,'-',if(e.VALIDITY_END > '2999-12-30 00:00:00','长期','固定')) field8 ,e.VALIDITY_END field9
,if(e.VALIDITY_END is null,'-',if(e.VALIDITY_END > '2999-12-30','长期','固定')) field8 ,e.VALIDITY_END field9
,e.VALIDITY_END field10,e.EMP_BIRTHDAY field11,e.EMP_AGE field12 ,emp_married.label field13,nation.label field14
,politicalStatus.label field15,e.EMP_PHONE field16,e.EMP_EMAIL field17
,concat(ifnull(pi.AREA_NAME,''),ifnull(ci.AREA_NAME,''),ifnull(ti.AREA_NAME,'')) field18 ,registype.label field19
......@@ -336,7 +336,7 @@
,SUBSTRING_INDEX(GROUP_CONCAT(ee.END_DATE ORDER BY ee.create_time desc),',',1) END_DATE
from t_pre_emp_work_recording ee
GROUP BY ee.PRE_MAIN_ID
) ew on e.id=ew.PRE_MAIN_ID
) ew on a.id=ew.PRE_MAIN_ID
left join (
select
SUBSTRING_INDEX(GROUP_CONCAT(ee.PRE_MAIN_ID ORDER BY ee.create_time desc),',',1) PRE_MAIN_ID
......@@ -345,7 +345,7 @@
,SUBSTRING_INDEX(GROUP_CONCAT(ee.CONTRACT_TEL ORDER BY ee.create_time desc),',',1) CONTRACT_TEL
from t_pre_emp_family ee
GROUP BY ee.PRE_MAIN_ID
) ef on e.id=ef.PRE_MAIN_ID
) ef on a.id=ef.PRE_MAIN_ID
left join (
select
SUBSTRING_INDEX(GROUP_CONCAT(ee.PRE_MAIN_ID ORDER BY ee.create_time desc),',',1) PRE_MAIN_ID
......@@ -353,7 +353,7 @@
,SUBSTRING_INDEX(GROUP_CONCAT(ee.QUALIFICATION_TYPE ORDER BY ee.create_time desc),',',1) QUALIFICATION_TYPE
from t_pre_emp_professional_qualification ee
GROUP BY ee.PRE_MAIN_ID
) ep on e.id=ep.PRE_MAIN_ID
) ep on a.id=ep.PRE_MAIN_ID
left join view_sys_dict_item qualification_type on qualification_type.value=ep.QUALIFICATION_TYPE and qualification_type.type='qualification_type'
left join t_pre_emp_disability_info ed on a.id=ed.PRE_MAIN_ID
......@@ -381,7 +381,7 @@
count(1)
FROM t_pre_emp_main a
left join t_pre_employee_info e on a.id=e.PRE_MAIN_ID
left join t_pre_emp_work_recording ew on e.id=ew.EMP_ID
left join t_pre_emp_work_recording ew on a.id=ew.EMP_ID
<where>
a.STATUS != '5' and ew.id is not null and EXISTS (
select 1 from (select a.emp_id from t_pre_emp_work_recording a GROUP BY a.EMP_ID HAVING count(1)>1) ea where ea.emp_id=ew.emp_id
......@@ -397,7 +397,7 @@
,if(e.FIRST_WORK_FLAG is null,'',if(e.FIRST_WORK_FLAG=0,'是','否')) field43,ew.WORK_UNIT field44,ew.WORK_JOB field45,ew.START_DATE field46,ew.END_DATE field47
FROM t_pre_emp_main a
left join t_pre_employee_info e on a.id=e.PRE_MAIN_ID
left join t_pre_emp_work_recording ew on e.id=ew.EMP_ID
left join t_pre_emp_work_recording ew on a.id=ew.EMP_ID
<where>
a.STATUS != '5' and ew.id is not null and EXISTS (
select 1 from (select a.emp_id from t_pre_emp_work_recording a GROUP BY a.EMP_ID HAVING count(1)>1) ea where ea.emp_id=ew.emp_id
......@@ -417,7 +417,7 @@
count(1)
FROM t_pre_emp_main a
left join t_pre_employee_info e on a.id=e.PRE_MAIN_ID
left join t_pre_emp_family ef on e.id=ef.EMP_ID
left join t_pre_emp_family ef on a.id=ef.EMP_ID
<where>
a.STATUS != '5' and ef.id is not null and EXISTS (
select 1 from (select a.emp_id from t_pre_emp_family a GROUP BY a.EMP_ID HAVING count(1)>1) ea where ea.emp_id=ef.emp_id
......@@ -432,7 +432,7 @@
,ef.FAMILY_NAME field48,ef.RELATIONSHIP_SELF field49,ef.CONTRACT_TEL field50
FROM t_pre_emp_main a
left join t_pre_employee_info e on a.id=e.PRE_MAIN_ID
left join t_pre_emp_family ef on e.id=ef.EMP_ID
left join t_pre_emp_family ef on a.id=ef.EMP_ID
<where>
a.STATUS != '5' and ef.id is not null and EXISTS (
select 1 from (select a.emp_id from t_pre_emp_family a GROUP BY a.EMP_ID HAVING count(1)>1) ea where ea.emp_id=ef.emp_id
......@@ -452,7 +452,7 @@
count(1)
FROM t_pre_emp_main a
left join t_pre_employee_info e on a.id=e.PRE_MAIN_ID
left join t_pre_emp_professional_qualification ep on e.id=ep.EMP_ID
left join t_pre_emp_professional_qualification ep on a.id=ep.EMP_ID
<where>
a.STATUS != '5' and ep.id is not null and EXISTS (
select 1 from (select a.emp_id from t_pre_emp_professional_qualification a GROUP BY a.EMP_ID HAVING count(1)>1) ea where ea.emp_id=ep.emp_id
......@@ -467,7 +467,7 @@
,if(e.HAVE_QUALIFICATION is null,'',if(e.HAVE_QUALIFICATION=0,'是','否')) field51,ep.DECLARE_YEAR field52,qualification_type.label field53
FROM t_pre_emp_main a
left join t_pre_employee_info e on a.id=e.PRE_MAIN_ID
left join t_pre_emp_professional_qualification ep on e.id=ep.EMP_ID
left join t_pre_emp_professional_qualification ep on a.id=ep.EMP_ID
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 (
......
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