secondev-chapanda-portal/src/main/resources/mapper/HrbpPortalMapper.xml

179 lines
7.8 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.HrbpPortalMapper">
<select id="getToEntryCount" resultType="java.lang.Integer">
select count(t.id) from ${e10_common}.uf_jcl_rzgl t
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
and t.rzzt = 0
<if test="departmentIdList != null and departmentIdList.size() > 0">
AND t.department IN
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
#{departmentId}
</foreach>
</if>
</select>
<select id="getToRegularCount" resultType="java.lang.Integer">
select count(t.id) from ${e10_common}.uf_jcl_employee_information t
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
and t.personnel_status in(1,3)
<if test="departmentIdList != null and departmentIdList.size() > 0">
AND t.department IN
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
#{departmentId}
</foreach>
</if>
</select>
<select id="getToLeaveCount" resultType="java.lang.Integer">
select count(t.id) from ${e10_common}.uf_jcl_lzsq t
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
<if test="departmentIdList != null and departmentIdList.size() > 0">
AND t.lzqbm IN
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
#{departmentId}
</foreach>
</if>
and t.flow_status in (1, 2, 3)
and (t.zhgzr is null or t.zhgzr = '' or zhgzr >current_date())
</select>
<select id="getToSignCount" resultType="java.lang.Integer">
select count(t.id) from ${e10_common}.uf_jcl_rshtgl t
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
<if test="departmentIdList != null and departmentIdList.size() > 0">
AND t.ssbm IN
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
#{departmentId}
</foreach>
</if>
and t.htzt = 1
</select>
<select id="getToProxyCount" resultType="java.lang.Integer">
select count(t.id) from ${e10_common}.uf_dlqgl t
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
<if test="departmentIdList != null and departmentIdList.size() > 0">
AND t.ssbm IN
<foreach collection="departmentIdList" item="departmentId" open="(" close=")" separator=",">
#{departmentId}
</foreach>
</if>
and t.dlqzt = 2
</select>
<select id="getAllEmployeeCount" resultType="java.lang.Integer">
select count(t.id) 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.personnel_status not in (5,6)
</select>
<select id="getFormalEmployeeCount" resultType="java.lang.Integer">
select count(t.id) 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.personnel_status not in (5,6)
and t.yglx=1109770887364624394
</select>
<select id="getInternEmployeeCount" resultType="java.lang.Integer">
select count(t.id) 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.personnel_status not in (5,6)
and t.yglx=1109772927499255817
</select>
<select id="getOutsourcingCount" resultType="java.lang.Integer">
select count(t.id) 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.personnel_status not in (5,6)
and t.yglx=1109775968260603906
</select>
<select id="getLaborCount" resultType="java.lang.Integer">
select count(t.id) 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.personnel_status not in (5,6)
and t.yglx=1109776092848209920
</select>
<select id="getProbationCount" resultType="java.lang.Integer">
select count(t.id) 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.personnel_status = 1
</select>
<select id="getFormalCount" resultType="java.lang.Integer">
select count(t.id) 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.personnel_status = 2
</select>
<select id="getInternCount" resultType="java.lang.Integer">
select count(t.id) 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.personnel_status = 4
</select>
<select id="getLeaveCount" resultType="java.lang.Integer">
select count(t.id) 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.personnel_status = 5
</select>
</mapper>