generated from dxfeng/secondev-wugang-dxfeng
102 lines
4.5 KiB
XML
102 lines
4.5 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.LeaderCockpitMapper">
|
||
|
|
|
||
|
|
|
||
|
|
<select id="getOnJobNumber" resultType="com.weaver.seconddev.portal.entity.po.PortalPO">
|
||
|
|
select count(a.id) as value ,b.yglxmc as name from e10_common.uf_jcl_employee_information a
|
||
|
|
inner join e10_common.uf_jcl_yglx b on a.yglx = b.id
|
||
|
|
where a.personnel_status in(1,2,3) and a.delete_type = 0 and a.tenant_key = #{tenantKey}
|
||
|
|
<if test="departmentId != null and departmentId !=''">
|
||
|
|
and a.department = #{departmentId}
|
||
|
|
</if>
|
||
|
|
and (a.zhgzr ='' or zhgzr is null or zhgzr < #{endDate})
|
||
|
|
group by b.yglxmc
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="getOnJobCount" 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="departmentId != null and departmentId !=''">
|
||
|
|
and t.department = #{departmentId}
|
||
|
|
</if>
|
||
|
|
and (t.zhgzr ='' or t.zhgzr is null or t.zhgzr < #{endDate})
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="getResignCount" resultType="java.lang.Integer">
|
||
|
|
select count(id) as value from e10_common.uf_jcl_lzxxjl t
|
||
|
|
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||
|
|
<if test="departmentId != null and departmentId !=''">
|
||
|
|
and t.department = #{departmentId}
|
||
|
|
</if>
|
||
|
|
and t.zhgzr >= #{startDate}
|
||
|
|
and t.zhgzr <= #{endDate}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="getKeyResignCount" resultType="java.lang.Integer">
|
||
|
|
select count(id) as value from e10_common.uf_jcl_lzxxjl t
|
||
|
|
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||
|
|
<if test="departmentId != null and departmentId !=''">
|
||
|
|
and t.department = #{departmentId}
|
||
|
|
</if>
|
||
|
|
and t.sfgjrc = 1
|
||
|
|
and t.zhgzr >= #{startDate}
|
||
|
|
and t.zhgzr <= #{endDate}
|
||
|
|
</select>
|
||
|
|
<select id="getEmploymentCount" resultType="java.lang.Integer">
|
||
|
|
select count(id) as value from e10_common.uf_jcl_rzgl t
|
||
|
|
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||
|
|
<if test="departmentId != null and departmentId !=''">
|
||
|
|
and t.department = #{departmentId}
|
||
|
|
</if>
|
||
|
|
and t.hiredate >= #{startDate}
|
||
|
|
and t.hiredate <= #{endDate}
|
||
|
|
</select>
|
||
|
|
<select id="getKeyEmploymentCount" resultType="java.lang.Integer">
|
||
|
|
select count(id) as value from e10_common.uf_jcl_rzgl t
|
||
|
|
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||
|
|
<if test="departmentId != null and departmentId !=''">
|
||
|
|
and t.department = #{departmentId}
|
||
|
|
</if>
|
||
|
|
and t.sfgjrc = 1
|
||
|
|
and t.hiredate >= #{startDate}
|
||
|
|
and t.hiredate <= #{endDate}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="getEmploymentListByPosition" resultType="com.weaver.seconddev.portal.entity.po.PortalPO">
|
||
|
|
select count(id) as name,position as value from e10_common.uf_jcl_rzgl t
|
||
|
|
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||
|
|
<if test="departmentId != null and departmentId !=''">
|
||
|
|
and t.department = #{departmentId}
|
||
|
|
</if>
|
||
|
|
and t.hiredate >= #{startDate}
|
||
|
|
and t.hiredate <= #{endDate}
|
||
|
|
and position !='' and position is not null
|
||
|
|
group by position order by value limit 3
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="getPositionById" resultType="com.weaver.seconddev.portal.entity.po.Position">
|
||
|
|
select p.id as position_id, p.name as position_name,
|
||
|
|
d.id as department_id, d.name as department_name,
|
||
|
|
g.id as grade_id, g.name as grade_name
|
||
|
|
from eteams.position p
|
||
|
|
left join eteams.department d on p.department = d.id
|
||
|
|
left join eteams.grade g on p.grade_id = g.id
|
||
|
|
where p.id = #{positionId} and p.delete_type = 0 and p.tenant_key = #{tenantKey} limit 1
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="getResignListByPosition" resultType="com.weaver.seconddev.portal.entity.po.PortalPO">
|
||
|
|
select count(id) as name,lzqgw as value from e10_common.uf_jcl_lzxxjl t
|
||
|
|
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
||
|
|
<if test="departmentId != null and departmentId !=''">
|
||
|
|
and t.department = #{departmentId}
|
||
|
|
</if>
|
||
|
|
and t.zhgzr >= #{startDate}
|
||
|
|
and t.zhgzr <= #{endDate}
|
||
|
|
and t.lzqgw !='' and t.lzqgw is not null
|
||
|
|
group by t.lzqgw order by value limit 3
|
||
|
|
</select>
|
||
|
|
|
||
|
|
|
||
|
|
</mapper>
|