Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
e5084d556a
|
|
@ -413,24 +413,23 @@
|
||||||
|
|
||||||
<select id="getAttDayList" resultType="com.bonus.system.att.entity.AttDataDetailsBean">
|
<select id="getAttDayList" resultType="com.bonus.system.att.entity.AttDataDetailsBean">
|
||||||
SELECT
|
SELECT
|
||||||
su.user_name, so.org_name, a.*
|
su.user_name,
|
||||||
|
so.org_name,
|
||||||
|
v.*
|
||||||
FROM
|
FROM
|
||||||
sys_user su
|
(select * FROM att_setting_history WHERE current_day = #{attCurrentDay}) ash
|
||||||
LEFT JOIN v_att_update_data a ON a.user_id = su.user_id
|
LEFT JOIN sys_user su ON ash.user_id = su.user_id
|
||||||
LEFT JOIN att_group_person_relation agpr ON agpr.user_id = su.user_id
|
LEFT JOIN ( SELECT * FROM v_att_update_data WHERE att_current_day = #{attCurrentDay} ) v on su.user_id = v.user_id
|
||||||
LEFT JOIN sys_user_org org ON org.user_id = su.user_id
|
LEFT JOIN sys_user_org org ON org.user_id = su.user_id
|
||||||
left join sys_organization so on so.id = org.org_id
|
LEFT JOIN sys_organization so ON so.id = org.org_id
|
||||||
WHERE su.is_active = 1 AND agpr.is_active = 1
|
<where>
|
||||||
<if test="attCurrentDay != null and attCurrentDay != ''">
|
<if test="attendType == 1 || attendType == '1'">
|
||||||
AND att_current_day = #{attCurrentDay}
|
<if test='attStatus == "1"'>
|
||||||
</if>
|
and ( toWorkAttStatus = #{attStatus} OR offWorkAttStatus = #{attStatus} )
|
||||||
<if test="attendType == 1 || attendType == '1'">
|
</if>
|
||||||
<if test='attStatus == "1"'>
|
|
||||||
and ( toWorkAttStatus = #{attStatus} OR offWorkAttStatus = #{attStatus} )
|
|
||||||
</if>
|
</if>
|
||||||
</if>
|
<if test="attendType == 2 || attendType == '2'">
|
||||||
<if test="attendType == 2 || attendType == '2'">
|
AND su.user_id not in (
|
||||||
AND su.user_id not in (
|
|
||||||
SELECT su.user_id FROM sys_user su
|
SELECT su.user_id FROM sys_user su
|
||||||
LEFT JOIN v_att_update_data a ON a.user_id = su.user_id
|
LEFT JOIN v_att_update_data a ON a.user_id = su.user_id
|
||||||
LEFT JOIN att_group_person_relation agpr ON agpr.user_id = su.user_id
|
LEFT JOIN att_group_person_relation agpr ON agpr.user_id = su.user_id
|
||||||
|
|
@ -439,15 +438,18 @@
|
||||||
WHERE su.is_active = 1 AND agpr.is_active = 1
|
WHERE su.is_active = 1 AND agpr.is_active = 1
|
||||||
AND att_current_day = #{attCurrentDay}
|
AND att_current_day = #{attCurrentDay}
|
||||||
and ( toWorkAttStatus = #{attStatus} OR offWorkAttStatus = #{attStatus} )
|
and ( toWorkAttStatus = #{attStatus} OR offWorkAttStatus = #{attStatus} )
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="attStatusToday != null and attStatusToday != ''">
|
<if test="attStatusToday != null and attStatusToday != ''">
|
||||||
and ( toWorkAttStatus = #{attStatusToday} or offWorkAttStatus = #{attStatusToday} )
|
and ( toWorkAttStatus = #{attStatusToday} or offWorkAttStatus = #{attStatusToday} )
|
||||||
</if>
|
</if>
|
||||||
<if test="userName != null and userName != ''">
|
<if test="userName != null and userName != ''">
|
||||||
AND su.user_name like concat('%', #{userName}, '%')
|
AND su.user_name like concat('%', #{userName}, '%')
|
||||||
</if>
|
</if>
|
||||||
GROUP BY agpr.user_id
|
</where>
|
||||||
|
|
||||||
|
GROUP BY
|
||||||
|
ash.user_id
|
||||||
</select>
|
</select>
|
||||||
<select id="getAttDayReportDetailsListData" resultType="com.bonus.system.att.entity.AttDataDetailsBean">
|
<select id="getAttDayReportDetailsListData" resultType="com.bonus.system.att.entity.AttDataDetailsBean">
|
||||||
select su.user_name, so.org_name, v.* from v_att_update_data v
|
select su.user_name, so.org_name, v.* from v_att_update_data v
|
||||||
|
|
|
||||||
|
|
@ -5,16 +5,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<mapper namespace="com.bonus.system.index.dao.HomePageDao">
|
<mapper namespace="com.bonus.system.index.dao.HomePageDao">
|
||||||
|
|
||||||
<select id="getTodayAttData" resultType="com.bonus.system.index.entity.IndexTodayAttBean">
|
<select id="getTodayAttData" resultType="com.bonus.system.index.entity.IndexTodayAttBean">
|
||||||
select a.shouldAttNum, a.actualAttNum,(a.shouldAttNum - a.actualAttNum) as noActualAttNum, TRUNCATE(a.actualAttNum /
|
SELECT a.shouldAttNum, a.actualAttNum,( a.shouldAttNum - a.actualAttNum ) AS noActualAttNum,
|
||||||
a.shouldAttNum * 100, 0) as attRate from (
|
TRUNCATE ( a.actualAttNum / a.shouldAttNum * 100, 0 ) AS attRate
|
||||||
select count(agpr.user_id ) as shouldAttNum, count(a.user_id) as actualAttNum
|
FROM
|
||||||
from sys_user su left join (
|
(
|
||||||
select * from v_att_update_data where att_current_day = #{date}
|
SELECT
|
||||||
and (toWorkAttStatus = 1 or offWorkAttStatus = 1)
|
count( ash.user_id ) AS shouldAttNum,
|
||||||
) a on a.user_id = su.user_id
|
count( v.user_id ) AS actualAttNum
|
||||||
LEFT JOIN att_group_person_relation agpr on agpr.user_id = su.user_id and agpr.is_active = 1
|
FROM
|
||||||
where su.is_active = 1
|
( SELECT * FROM att_setting_history WHERE current_day = #{date} ) ash
|
||||||
) a
|
LEFT JOIN sys_user su ON ash.user_id = su.user_id
|
||||||
|
LEFT JOIN ( SELECT * FROM v_att_update_data WHERE att_current_day = #{date} AND ( toWorkAttStatus = 1 OR offWorkAttStatus = 1 ) ) v ON su.user_id = v.user_id
|
||||||
|
) a
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getTodayAbnormalData" resultType="com.bonus.system.index.entity.IndexAbnormalBean">
|
<select id="getTodayAbnormalData" resultType="com.bonus.system.index.entity.IndexAbnormalBean">
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,4 @@
|
||||||
2.AttSourceDataMapper.xml 中 gz_cloud_test -> gz_cloud
|
2.AttSourceDataMapper.xml 中 gz_cloud_test -> gz_cloud
|
||||||
3.WechatPushMapper.xml 中 gz_cloud_test -> gz_cloud
|
3.WechatPushMapper.xml 中 gz_cloud_test -> gz_cloud
|
||||||
4.com.bonus.system.att.utils.IpAndPathConfig 修改对应环境
|
4.com.bonus.system.att.utils.IpAndPathConfig 修改对应环境
|
||||||
5.com.bonus.system.att.tasks AttTasks 与 WechatTasks 定时器开启
|
5.com.bonus.system.att.tasks NewAttTask 与 WechatTasks 定时器开启
|
||||||
Loading…
Reference in New Issue