数据看板

Signed-off-by: lSun <15893999301@qq.com>
This commit is contained in:
lSun 2024-12-18 21:31:00 +08:00
parent 588098c00a
commit e7a4871b18
2 changed files with 240 additions and 241 deletions

View File

@ -107,6 +107,9 @@ public class AttDetailBean {
*/ */
private String endDate; private String endDate;
//所属月份
private String attCurrentMonth;
public void setParams(Map<String, Object> params) public void setParams(Map<String, Object> params)
{ {
this.params = params; this.params = params;

View File

@ -1,12 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.system.att.dao.AttDetailByMonthDao"> <mapper namespace="com.bonus.system.att.dao.AttDetailByMonthDao">
<select id="getAllParentId" resultType="com.bonus.system.att.entity.AttDetailByMonthBean"> <select id="getAllParentId" resultType="com.bonus.system.att.entity.AttDetailByMonthBean">
select select id as orgId
id as orgId
from sys_organization so from sys_organization so
where so.is_active = 1 where so.is_active = 1
and so.parent_id is null and so.parent_id is null
@ -47,10 +46,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectAttAllList" resultType="com.bonus.system.att.entity.AttDetailByMonthBean"> <select id="selectAttAllList" resultType="com.bonus.system.att.entity.AttDetailByMonthBean">
select select
user_id as userId, amr.user_id as userId,
name as name, name as name,
org_id as orgId, amr.org_id as orgId,
org_name as orgName, amr.org_name as orgName,
att_current_month as attCurrentMonth, att_current_month as attCurrentMonth,
count(awa.user_id) as outCount, count(awa.user_id) as outCount,
coalesce(required_days,0) as requiredDays, coalesce(required_days,0) as requiredDays,
@ -62,7 +61,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
coalesce(address_error_num,0) as addressErrorNum, coalesce(address_error_num,0) as addressErrorNum,
coalesce(ein_error_num,0) as einErrorNum coalesce(ein_error_num,0) as einErrorNum
from att_month_report amr from att_month_report amr
LEFT JOIN att_work_abnormal awa ON LOCATE(amr.att_current_month,awa.att_current_day) and awa.user_id = amr.user_id LEFT JOIN att_work_abnormal awa ON LOCATE(amr.att_current_month,awa.att_current_day) and awa.user_id =
amr.user_id
where amr.is_active = 1 where amr.is_active = 1
and amr.required_days != amr.normal_num and amr.required_days != amr.normal_num
<if test="attCurrentMonth != null and attCurrentMonth != '' "> <if test="attCurrentMonth != null and attCurrentMonth != '' ">
@ -78,8 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="getOrgParentId" resultType="com.bonus.system.basic.domain.SysOrg"> <select id="getOrgParentId" resultType="com.bonus.system.basic.domain.SysOrg">
select select id as id,
id as id,
org_name as orgName, org_name as orgName,
parent_id as parentId parent_id as parentId
from sys_organization so from sys_organization so
@ -180,6 +179,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="orgId != null and orgId != '' "> <if test="orgId != null and orgId != '' ">
and vat.org_id = #{orgId} and vat.org_id = #{orgId}
</if> </if>
<if test="attCurrentMonth != null and attCurrentMonth != '' ">
and LEFT(vat.att_current_day, 7) = #{attCurrentMonth}
</if>
<if test="attCurrent != null and attCurrent != ''"><!-- 结束时间检索 --> <if test="attCurrent != null and attCurrent != ''"><!-- 结束时间检索 -->
and and
(vat.att_current_day &gt;= CONCAT(#{attCurrent}, '-01') AND (vat.att_current_day &gt;= CONCAT(#{attCurrent}, '-01') AND
@ -213,7 +215,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from leave_apply la from leave_apply la
where where
la.is_active = 1 la.is_active = 1
# and (la.leave_type not like '%临时外出%' and la.leave_type not like '%轮休%') # and (la.leave_type not like '%临时外出%' and la.leave_type not like '%轮休%')
<if test="userId != null "> <if test="userId != null ">
and la.user_id = #{userId} and la.user_id = #{userId}
</if> </if>
@ -223,35 +225,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="getDepartmentById" parameterType="java.util.Map" resultType="java.util.Map"> <select id="getDepartmentById" parameterType="java.util.Map" resultType="java.util.Map">
select select so.id as id,
so.id as id,
so.parent_id as parentId, so.parent_id as parentId,
concat(so.org_name,'/',#{orgName}) as orgName concat(so.org_name, '/', #{orgName}) as orgName
from sys_organization so from sys_organization so
where where so.id = #{parentId}
so.id = #{parentId}
and is_active = 1 and is_active = 1
</select> </select>
<select id="getSonsById" parameterType="java.lang.Integer" resultType="java.util.Map"> <select id="getSonsById" parameterType="java.lang.Integer" resultType="java.util.Map">
select select so.id as id,
so.id as id,
so.parent_id as parentId, so.parent_id as parentId,
so.org_name as orgName so.org_name as orgName
from sys_organization so from sys_organization so
where where so.parent_id = #{orgId}
so.parent_id = #{orgId}
and is_active = 1 and is_active = 1
</select> </select>
<select id="getSonsFinish" parameterType="java.lang.Integer" resultType="java.util.Map"> <select id="getSonsFinish" parameterType="java.lang.Integer" resultType="java.util.Map">
select select so.id as id,
so.id as id,
so.parent_id as parentId, so.parent_id as parentId,
so.org_name as orgName so.org_name as orgName
from sys_organization so from sys_organization so
where where so.id = #{orgId}
so.id = #{orgId}
and is_active = 1 and is_active = 1
</select> </select>
</mapper> </mapper>