generated from dxfeng/secondev-wugang-dxfeng
67 lines
3.0 KiB
XML
67 lines
3.0 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.weaver.seconddev.portal.mapper.SscPortalMapper">
|
|
|
|
<select id="getExpirationReminderCount" resultType="java.lang.Integer">
|
|
select count(t.id) as value from ${e10_common}.uf_jcl_employee_information t
|
|
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
|
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
|
AND t.department IN
|
|
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
|
#{departmentId}
|
|
</foreach>
|
|
</if>
|
|
and t.htzzrq <![CDATA[ <= ]]> DATE_ADD(CURDATE(), INTERVAL 30 DAY)
|
|
</select>
|
|
|
|
<select id="getIdCardExpirationCount" resultType="java.lang.Integer">
|
|
select count(t.id) as value from ${e10_common}.uf_jcl_employee_information t
|
|
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
|
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
|
AND t.department IN
|
|
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
|
#{departmentId}
|
|
</foreach>
|
|
</if>
|
|
and t.sfzyxjsrq <![CDATA[ <= ]]> DATE_ADD(CURDATE(), INTERVAL 7 DAY)
|
|
</select>
|
|
|
|
<select id="getHealthCertificateExpirationCount" resultType="java.lang.Integer">
|
|
select count(t.id) as value from ${e10_common}.uf_jcl_employee_information t
|
|
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
|
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
|
AND t.department IN
|
|
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
|
#{departmentId}
|
|
</foreach>
|
|
</if>
|
|
and t.jkzdqrq <![CDATA[ <= ]]> DATE_ADD(CURDATE(), INTERVAL 7 DAY)
|
|
</select>
|
|
|
|
<select id="getEmploymentAnniversaryCount" resultType="java.lang.Integer">
|
|
select count(t.id) as value from ${e10_common}.uf_jcl_employee_information t
|
|
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
|
<if test="departmentIdList != null and departmentIdList.size() > 0">
|
|
AND t.department IN
|
|
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
|
|
#{departmentId}
|
|
</foreach>
|
|
</if>
|
|
AND (
|
|
(
|
|
DATE_FORMAT(hiredate, '%m-%d') BETWEEN
|
|
DATE_FORMAT(CURDATE(), '%m-%d') AND DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 7 DAY), '%m-%d')
|
|
)
|
|
OR (
|
|
DATE_FORMAT(CURDATE(), '%m-%d') > DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 7 DAY), '%m-%d')
|
|
AND (
|
|
DATE_FORMAT(hiredate, '%m-%d') >= DATE_FORMAT(CURDATE(), '%m-%d')
|
|
OR DATE_FORMAT(hiredate, '%m-%d') <= DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 7 DAY), '%m-%d')
|
|
)
|
|
)
|
|
)
|
|
</select>
|
|
|
|
|
|
</mapper>
|