Commit 0b07d01f authored by fangxinjiang's avatar fangxinjiang

日志优化

parent 32154f1b
......@@ -248,10 +248,7 @@
a.GRADUTION_DATE,
a.REMARK,
a.FILE_SOURCE,
if(count(b.id)>1,'是','否') IS_PROJECTS,
a.PROJECT_NUM,
GROUP_CONCAT(DISTINCT b.DEPT_NAME) DEPT_NAME,
GROUP_CONCAT(DISTINCT b.DEPT_NO) DEPT_NO,
a.CONTRACT_STATUS,
a.INSURANCE_STATUS,
a.SOCIAL_STATUS,
......@@ -491,14 +488,20 @@
select
<include refid="baseParam"/>
from t_employee_info a
<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.contains('b.DEPT_ID') ">
<!--<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.contains('b.DEPT_ID') ">
left join t_employee_project b on a.id=b.EMP_ID and b.DELETE_FLAG = '0'
</if>
</if>-->
where a.DELETE_FLAG = '0'
<include refid="employeeInfo_where"/>
<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''">
and b.DELETE_FLAG = '0'
and
a.emp_id in (
select b.emp_id from t_employee_project b
where
b.DELETE_FLAG = '0'
${tEmployeeInfo.authSql}
)
</if>
order by a.CREATE_TIME desc
</select>
......@@ -747,38 +750,71 @@
select
<include refid="Base_Export_List"/>
from t_employee_info a
left join t_employee_project b on a.id = b.EMP_ID and b.DELETE_FLAG = '0'
<!--left join (
select
b.EMP_ID,
GROUP_CONCAT(DISTINCT b.DEPT_NAME) DEPT_NAME,
GROUP_CONCAT(DISTINCT b.DEPT_NO) DEPT_NO
from t_employee_project b where
1=1 and b.DELETE_FLAG = '0'
<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''">
${tEmployeeInfo.authSql}
</if>-->
) b on a.id = b.EMP_ID
<where>
a.DELETE_FLAG = '0'
<include refid="employeeInfo_where"/>
<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''">
and
a.emp_id in (
select b.emp_id from t_employee_project b
where
b.DELETE_FLAG = '0'
${tEmployeeInfo.authSql}
)
</if>
</where>
GROUP BY a.id order by a.CREATE_TIME desc
order by a.CREATE_TIME desc
</select>
<!--tEmployeeInfo离职档案导出查询-->
<select id="getTEmployeeLeaveExportList" resultMap="tEmployeeExportMap">
select * from (
SELECT
<include refid="Base_Export_List"/>,GROUP_CONCAT(DISTINCT b.unit_name) UNIT_NAME
,
GROUP_CONCAT(DISTINCT b.unit_no) UNIT_NO
<include refid="Base_Export_List"/>
,a.LEAVE_TIME
,a.LEAVE_USER
,a.LEAVE_USER_NAME
,a.LEAVE_REASON
from t_employee_info a
left join t_employee_project b on a.id = b.EMP_ID and b.DELETE_FLAG = '0'
<!--left join (
select
b.EMP_ID,
GROUP_CONCAT(DISTINCT b.DEPT_NAME) DEPT_NAME,
GROUP_CONCAT(DISTINCT b.DEPT_NO) DEPT_NO,
GROUP_CONCAT(DISTINCT b.unit_name) UNIT_NAME,
GROUP_CONCAT(DISTINCT b.unit_no) UNIT_NO
from t_employee_project b where
1=1 and b.DELETE_FLAG = '0'
<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''">
${tEmployeeInfo.authSql}
</if>
) b on a.id = b.EMP_ID-->
<where>
a.DELETE_FLAG = '0'
<include refid="employeeInfo_where"/>
<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''">
and
a.emp_id in (
select b.emp_id from t_employee_project b
where
b.DELETE_FLAG = '0'
${tEmployeeInfo.authSql}
)
</if>
</where>
GROUP BY a.id order by a.CREATE_TIME desc
order by a.CREATE_TIME desc
) b
where 1=1
<if test="tEmployeeInfo.unitName != null and tEmployeeInfo.unitName.trim() != ''">
......
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