Commit 0b07d01f authored by fangxinjiang's avatar fangxinjiang

日志优化

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