修改假期,节假日定时器
This commit is contained in:
parent
7fb6106716
commit
2d9fe0e148
|
|
@ -1090,8 +1090,8 @@ public class AttTasks {
|
|||
|
||||
if ("1".equals(attType)) { // 上班打卡
|
||||
// 计算时间差
|
||||
// 减 1 原因:返回的是整数,如果是10.9,返回也是10,所以为了判断准确,减掉1
|
||||
long difference = (date2.getTime() - date1.getTime()) / 60000 - 1;
|
||||
// 减 1 原因:30上班,30:59不算迟到,类似于默认可以迟到一分钟
|
||||
double difference = (date2.getTime() - date1.getTime()) / 60000.0 - 1;
|
||||
if (difference > 0) {
|
||||
if (difference > absenteeismThreshold) {
|
||||
status = 3; // 旷工
|
||||
|
|
@ -1101,7 +1101,7 @@ public class AttTasks {
|
|||
}
|
||||
} else if ("2".equals(attType)) { // 下班打卡
|
||||
// 计算时间差
|
||||
long difference = (date2.getTime() - date1.getTime()) / 60000;
|
||||
double difference = (date2.getTime() - date1.getTime()) / 60000.0;
|
||||
if (difference < 0) {
|
||||
if (Math.abs(difference) > lateThreshold) {
|
||||
status = 4; // 早退
|
||||
|
|
|
|||
Loading…
Reference in New Issue