|
@@ -280,7 +280,6 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
|
|
|
}
|
|
|
String url = null;
|
|
|
try {
|
|
|
-
|
|
|
startDateTime = startDateTime.withHour(0).withMinute(0).withSecond(0).withNano(0);
|
|
|
long startTime = startDateTime.toEpochSecond(ZoneOffset.of("+8"));
|
|
|
endDateTime = endDateTime.withHour(0).withMinute(0).withSecond(0).withNano(0);
|
|
@@ -511,6 +510,7 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
|
|
|
//超过下午上班的开始时间,需要减去午休的时间
|
|
|
if (ct.getEndTime().compareTo(baseAfternoonStart) >= 0) {
|
|
|
//重新计算打卡工时时,需要减去中间午休时间
|
|
|
+
|
|
|
timeDelta -= restTime;
|
|
|
}
|
|
|
} else {
|
|
@@ -570,8 +570,11 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
|
|
|
//检查请假时间段是否在打卡的时间范围内
|
|
|
if ("上午".equals(leaveEnd) || "下午".equals(leaveEnd)) {
|
|
|
//半天或者全天请假, 上面已经处理过结束时间为请假之前的时间了,此处不需要再处理了
|
|
|
- if (showLog)System.out.println("====半天或者全天请假 =转化为8小时制下的时间="+(ct.getAskLeaveTime()/24*8.0));
|
|
|
- ct.setAskLeaveTime(ct.getAskLeaveTime()/24*8.0);//转换成一天8小时工作制
|
|
|
+ if (ct.getAskLeaveTime() >= 12) {
|
|
|
+ if (showLog)System.out.println("====半天或者全天请假 =转化为8小时制下的时间="+(ct.getAskLeaveTime()/24*8.0));
|
|
|
+ //12小时以上的,是请假半天或者全天的。 防止1天有2次上下午分开的请假,导致计算两次的错误
|
|
|
+ ct.setAskLeaveTime(ct.getAskLeaveTime()/24*8.0);//转换成一天8小时工作制
|
|
|
+ }
|
|
|
} else if (ct.getStartTime().compareTo(leaveStart) <= 0 && ct.getEndTime().compareTo(leaveEnd) >= 0) {
|
|
|
String hourLeaveTime = leaveText.replaceAll("请假", "").replaceAll("小时", "");
|
|
|
if (showLog)System.out.println("请假时长=" + hourLeaveTime);
|