全勤问题处理
This commit is contained in:
parent
daef609649
commit
de9c6aab0d
|
|
@ -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("--------月报表--是否全勤定时器完毕------");
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Reference in New Issue