2025-07-09 19:00:32 +08:00
|
|
|
<?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.ManagerPortalMapper">
|
|
|
|
|
|
|
|
|
|
<select id="getOnJobNum" resultType="java.lang.Integer">
|
|
|
|
|
SELECT COUNT(t.id) AS value
|
2025-07-11 16:43:48 +08:00
|
|
|
FROM ${e10_common}.uf_jcl_employee_information t
|
2025-07-09 19:00:32 +08:00
|
|
|
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.hiredate <= #{endDate}
|
|
|
|
|
AND (t.zhgzr >= #{startDate}
|
|
|
|
|
OR t.zhgzr IS NULL
|
|
|
|
|
OR t.zhgzr = '')
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getResignNumber" resultType="java.lang.Integer">
|
2025-07-11 16:43:48 +08:00
|
|
|
select count(id) as value from ${e10_common}.uf_jcl_lzxxjl t
|
2025-07-09 19:00:32 +08:00
|
|
|
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
2025-07-10 13:36:32 +08:00
|
|
|
and t.lzzt = 1
|
2025-07-09 19:00:32 +08:00
|
|
|
<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.zhgzr >= #{startDate}
|
|
|
|
|
and t.zhgzr <= #{endDate}
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getResigningNumber" resultType="java.lang.Integer">
|
2025-07-11 16:43:48 +08:00
|
|
|
select count(t.id) from ${e10_common}.uf_jcl_lzsq t
|
2025-07-09 19:00:32 +08:00
|
|
|
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
|
|
|
|
<!--审批中-->
|
|
|
|
|
and t.flow_status in (0,1,2)
|
|
|
|
|
<!--申请日期-->
|
|
|
|
|
and t.sqrq >= #{startDate}
|
|
|
|
|
and t.sqrq <= #{endDate}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getEntryingNumber" resultType="java.lang.Integer">
|
2025-07-11 16:43:48 +08:00
|
|
|
select count(t.id) from ${e10_common}.uf_jcl_rzsq t
|
2025-07-09 19:00:32 +08:00
|
|
|
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
|
|
|
|
<!--审批中-->
|
|
|
|
|
and t.flow_status in (0,1,2)
|
|
|
|
|
<!--申请日期-->
|
|
|
|
|
and t.sqsj >= #{startDate}
|
|
|
|
|
and t.sqsj <= #{endDate}
|
|
|
|
|
</select>
|
2025-07-10 13:36:32 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="getEntryNumber" resultType="java.lang.Integer">
|
2025-07-11 16:43:48 +08:00
|
|
|
select count(id) as value from ${e10_common}.uf_jcl_rzgl t
|
2025-07-10 13:36:32 +08:00
|
|
|
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
2025-07-10 14:03:15 +08:00
|
|
|
and t.rzzt = 1
|
2025-07-10 13:36:32 +08:00
|
|
|
<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.hiredate >= #{startDate}
|
|
|
|
|
and t.hiredate <= #{endDate}
|
|
|
|
|
</select>
|
|
|
|
|
|
2025-07-09 19:00:32 +08:00
|
|
|
<select id="getManageDeptIds" resultType="java.lang.Long">
|
|
|
|
|
select t.id
|
2025-07-11 16:43:48 +08:00
|
|
|
from ${param.eteams}.department t
|
|
|
|
|
inner join ${param.eteams}.${param.table_dept_cus} t2 on t.formdata = t2.id
|
2025-07-09 19:00:32 +08:00
|
|
|
where t.type = 'department'
|
|
|
|
|
and t.delete_type = 0
|
|
|
|
|
and t.status = 1
|
2025-07-11 16:43:48 +08:00
|
|
|
and t.tenant_key = #{param.tenantKey}
|
|
|
|
|
and t2.tenant_key = #{param.tenantKey}
|
2025-07-09 19:00:32 +08:00
|
|
|
and t2.delete_type = 0
|
|
|
|
|
and t2.bmfzr = #{empId}
|
|
|
|
|
</select>
|
|
|
|
|
|
2025-07-10 13:36:32 +08:00
|
|
|
<select id="getBirthdayNum" resultType="java.lang.Integer">
|
|
|
|
|
SELECT COUNT(t.id) AS value
|
2025-07-11 16:43:48 +08:00
|
|
|
FROM ${e10_common}.uf_jcl_employee_information t
|
2025-07-10 13:36:32 +08:00
|
|
|
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(birthday, '%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(birthday, '%m-%d') >= DATE_FORMAT(CURDATE(), '%m-%d')
|
|
|
|
|
OR DATE_FORMAT(birthday, '%m-%d') <= DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 7 DAY), '%m-%d')
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getRegularEmployeeNum" resultType="java.lang.Integer">
|
|
|
|
|
SELECT COUNT(t.id) AS value
|
2025-07-11 16:43:48 +08:00
|
|
|
FROM ${e10_common}.uf_jcl_employee_information t
|
2025-07-10 13:36:32 +08:00
|
|
|
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 yjsyjsrq IS NOT NULL
|
|
|
|
|
AND (
|
|
|
|
|
STR_TO_DATE(CONCAT(YEAR(CURDATE()), '-', DATE_FORMAT(yjsyjsrq, '%m-%d')), '%Y-%m-%d') BETWEEN
|
|
|
|
|
CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 60 DAY)
|
|
|
|
|
OR STR_TO_DATE(CONCAT(YEAR(CURDATE()) + 1, '-', DATE_FORMAT(yjsyjsrq, '%m-%d')), '%Y-%m-%d') BETWEEN
|
|
|
|
|
CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 60 DAY)
|
|
|
|
|
)
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getEmploymentAnniversary" resultType="java.lang.Integer">
|
|
|
|
|
SELECT COUNT(t.id) AS value
|
2025-07-11 16:43:48 +08:00
|
|
|
FROM ${e10_common}.uf_jcl_employee_information t
|
2025-07-10 13:36:32 +08:00
|
|
|
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>
|
|
|
|
|
|
|
|
|
|
<select id="getEducationInfo" resultType="com.weaver.seconddev.portal.entity.po.PortalPO">
|
|
|
|
|
select count(t.id) as value , t.education as id
|
2025-07-11 16:43:48 +08:00
|
|
|
from ${e10_common}.uf_jcl_employee_information t
|
2025-07-10 13:36:32 +08:00
|
|
|
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>
|
|
|
|
|
group by t.education
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getPieTypeConfig" resultType="com.weaver.seconddev.portal.entity.po.PieChartConfig">
|
|
|
|
|
select t.lx as type,t.flmc as name,t.xlfl as educationIds,
|
|
|
|
|
t.qsw as startIndex,t.jzw as endIndex,t.zj as gradeIds,t.zssx as orderNum
|
2025-07-11 16:43:48 +08:00
|
|
|
from ${e10_common}.uf_xlfb t
|
2025-07-10 13:36:32 +08:00
|
|
|
where t.delete_type = 0 and t.tenant_key = #{tenantKey}
|
|
|
|
|
and t.lx = #{pieType} order by t.zssx
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getAgeCount" resultType="java.lang.Integer">
|
2025-07-11 16:43:48 +08:00
|
|
|
select count(t.id) as value from ${param.e10_common}.uf_jcl_employee_information t
|
|
|
|
|
where t.delete_type = 0 and t.tenant_key = #{param.tenantKey}
|
2025-07-10 13:36:32 +08:00
|
|
|
<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.age > #{startIndex}
|
|
|
|
|
and t.age <= #{endIndex}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getComapnyCount" resultType="java.lang.Integer">
|
2025-07-11 16:43:48 +08:00
|
|
|
select count(t.id) as value from ${param.e10_common}.uf_jcl_employee_information t
|
|
|
|
|
where t.delete_type = 0 and t.tenant_key = #{param.tenantKey}
|
2025-07-10 13:36:32 +08:00
|
|
|
<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.sl > #{startIndex}
|
|
|
|
|
and t.sl <= #{endIndex}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
2025-07-09 19:00:32 +08:00
|
|
|
</mapper>
|