全勤问题处理

This commit is contained in:
方亮 2026-02-04 16:08:31 +08:00
parent daef609649
commit de9c6aab0d
3 changed files with 29 additions and 1 deletions

View File

@ -142,7 +142,7 @@ public class AttJobTask {
log.info("--------月报表--是否全勤定时器开启------");
String today = "";
if(StringUtils.isEmpty(month)){
today = DateUtil.today();
month = StringUtils.substring(DateUtil.today(),0,7);
}
service.getMonthReportFullAtt(month, today, SecurityConstants.INNER);
log.info("--------月报表--是否全勤定时器完毕------");

View File

@ -315,6 +315,14 @@ public class AttCalServiceImpl implements AttCalService {
List<AttMonthReportBean> monthReportList = attSourceDataDao.selectAttMonthReport(pushDate);
//月报表修改
if(!monthReportList.isEmpty()){
monthReportList.forEach(c -> {
//有迟到早退旷工或存在不带薪假期
if((c.getLateNum()+c.getEarlyNum()+c.getSkippingNum()) > 0.0 || (c.getLeaveUnpaidNum() != null && Double.parseDouble(c.getLeaveUnpaidNum()) > 0.0)){
c.setIsFullAtt(0);
}else{
c.setIsFullAtt(1);
}
});
attSourceDataDao.updateAttMonthReport(monthReportList);
}
}

View File

@ -158,6 +158,9 @@
<if test='v.orgName != null'>
org_name = #{v.orgName},
</if>
<if test='v.isFullAtt != null'>
is_full_att = #{v.isFullAtt},
</if>
normal_num = #{v.normalNum},
late_num = #{v.lateNum},
early_num = #{v.earlyNum},
@ -658,6 +661,23 @@
<if test="month != ''">
AND #{month} between left(leave_start_date,7) and left(leave_end_date,7)
</if>
UNION
SELECT DISTINCT
user_id
FROM
leave_apply
WHERE
is_active = 1
AND leave_type = '临时外出'
AND is_business != 1
<if test="today != ''">
AND #{today} between leave_start_date and leave_end_date
</if>
<if test="month != ''">
AND #{month} between left(leave_start_date,7) and left(leave_end_date,7)
</if>
</select>
<update id="updateMonthReportFullAtt">