Commit ad9df436 authored by hongguangwu's avatar hongguangwu

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

parent 07295d0d
......@@ -325,7 +325,7 @@
,educationEmp.label field40 ,ee.ENTRY_DATE field41,ee.GRADUTION_DATE field42
,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
,ef.FAMILY_NAME field48,ef.RELATIONSHIP_SELF field49,ef.CONTRACT_TEL field50
,ef.FAMILY_NAME field48,family_relation.label field49,ef.CONTRACT_TEL field50
,if(e.HAVE_QUALIFICATION is null,'',if(e.HAVE_QUALIFICATION=0,'是','否')) field51,ep.DECLARE_YEAR field52,qualification_type.label field53
,if(ed.INJURY_IDENTIFICATION=0,'是','否') field54,if(ed.OCCUPATIONAL_DISEASE_FLAG=0,'是','否') field55 ,ed.OCCUPATIONAL_DISEASE field56
......@@ -382,6 +382,7 @@
from t_emp_family ee
GROUP BY ee.EMP_ID
) ef on e.id=ef.EMP_ID
left join view_sys_dict_item family_relation on family_relation.value=ef.RELATIONSHIP_SELF and family_relation.type='family_relation'
left join (
select
SUBSTRING_INDEX(GROUP_CONCAT(ee.EMP_ID ORDER BY ee.create_time desc),',',1) EMP_ID
......@@ -433,6 +434,7 @@
)
<include refid="tCompleteMonitor_where"/>
</where>
ORDER BY e.emp_idcard DESC
<if test="tCompleteMonitor != null">
<if test="tCompleteMonitor.limitStart != null">
limit #{tCompleteMonitor.limitStart},#{tCompleteMonitor.limitEnd}
......@@ -459,17 +461,19 @@
<select id="getTEmpMainAllListTwoFamily" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.TMainExportAllVO">
SELECT
e.emp_idcard field6
,ef.FAMILY_NAME field48,ef.RELATIONSHIP_SELF field49,ef.CONTRACT_TEL field50
,ef.FAMILY_NAME field48,family_relation.label field49,ef.CONTRACT_TEL field50
FROM t_complete_monitor a
left join t_employee_project p on a.DEPT_NO=p.DEPT_NO
left join t_employee_info e on p.EMP_ID=e.id
left join t_emp_family ef on e.id=ef.EMP_ID
left join view_sys_dict_item family_relation on family_relation.value=ef.RELATIONSHIP_SELF and family_relation.type='family_relation'
<where>
p.DELETE_FLAG = '0' and p.PROJECT_STATUS = 0 and ef.id is not null and ef.DELETE_FLAG = '0' and EXISTS (
select 1 from (select a.emp_id from t_emp_family a GROUP BY a.EMP_ID HAVING count(1)>1) ea where ea.emp_id=ef.emp_id
)
<include refid="tCompleteMonitor_where"/>
</where>
ORDER BY e.emp_idcard DESC
<if test="tCompleteMonitor != null">
<if test="tCompleteMonitor.limitStart != null">
limit #{tCompleteMonitor.limitStart},#{tCompleteMonitor.limitEnd}
......@@ -508,6 +512,7 @@
)
<include refid="tCompleteMonitor_where"/>
</where>
ORDER BY e.emp_idcard DESC
<if test="tCompleteMonitor != null">
<if test="tCompleteMonitor.limitStart != null">
limit #{tCompleteMonitor.limitStart},#{tCompleteMonitor.limitEnd}
......
......@@ -301,7 +301,7 @@
,educationEmp.label field40 ,ee.ENTRY_DATE field41,ee.GRADUTION_DATE field42
,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
,ef.FAMILY_NAME field48,ef.RELATIONSHIP_SELF field49,ef.CONTRACT_TEL field50
,ef.FAMILY_NAME field48,family_relation.label field49,ef.CONTRACT_TEL field50
,if(e.HAVE_QUALIFICATION is null,'',if(e.HAVE_QUALIFICATION=0,'是','否')) field51,ep.DECLARE_YEAR field52,qualification_type.label field53
,if(ed.INJURY_IDENTIFICATION=0,'是','否') field54,if(ed.OCCUPATIONAL_DISEASE_FLAG=0,'是','否') field55 ,ed.OCCUPATIONAL_DISEASE field56
......@@ -346,6 +346,7 @@
from t_pre_emp_family ee
GROUP BY ee.PRE_MAIN_ID
) ef on a.id=ef.PRE_MAIN_ID
left join view_sys_dict_item family_relation on family_relation.value=ef.RELATIONSHIP_SELF and family_relation.type='family_relation'
left join (
select
SUBSTRING_INDEX(GROUP_CONCAT(ee.PRE_MAIN_ID ORDER BY ee.create_time desc),',',1) PRE_MAIN_ID
......@@ -404,6 +405,7 @@
)
<include refid="tPreEmpMain_where"/>
</where>
ORDER BY a.emp_idcard DESC
<if test="tPreEmpMain != null">
<if test="tPreEmpMain.limitStart != null">
limit #{tPreEmpMain.limitStart},#{tPreEmpMain.limitEnd}
......@@ -429,16 +431,18 @@
<select id="getTEmpMainAllListTwoFamily" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.TPreMainExportAllVO">
SELECT
e.emp_idcard field6
,ef.FAMILY_NAME field48,ef.RELATIONSHIP_SELF field49,ef.CONTRACT_TEL field50
,ef.FAMILY_NAME field48,family_relation.label 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 a.id=ef.EMP_ID
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_id from t_pre_emp_family a GROUP BY a.EMP_ID HAVING count(1)>1) ea where ea.emp_id=ef.emp_id
)
<include refid="tPreEmpMain_where"/>
</where>
ORDER BY a.emp_idcard DESC
<if test="tPreEmpMain != null">
<if test="tPreEmpMain.limitStart != null">
limit #{tPreEmpMain.limitStart},#{tPreEmpMain.limitEnd}
......@@ -475,6 +479,7 @@
)
<include refid="tPreEmpMain_where"/>
</where>
ORDER BY a.emp_idcard DESC
<if test="tPreEmpMain != null">
<if test="tPreEmpMain.limitStart != null">
limit #{tPreEmpMain.limitStart},#{tPreEmpMain.limitEnd}
......
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