|
@@ -982,13 +982,20 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
|
|
userCorpwxTime.setWeekDay(date.getDayOfWeek().getValue());
|
|
userCorpwxTime.setWeekDay(date.getDayOfWeek().getValue());
|
|
userCorpwxTime.setWeekDayTxt(DateTimeUtil.getWeekDayTxt(userCorpwxTime.getWeekDay()));
|
|
userCorpwxTime.setWeekDayTxt(DateTimeUtil.getWeekDayTxt(userCorpwxTime.getWeekDay()));
|
|
BigDecimal bigDecimal=new BigDecimal(Duration.between(LocalTime.parse(minTime,df).plusHours(8),LocalTime.parse(maxTime,df).plusHours(8)).toMinutes());
|
|
BigDecimal bigDecimal=new BigDecimal(Duration.between(LocalTime.parse(minTime,df).plusHours(8),LocalTime.parse(maxTime,df).plusHours(8)).toMinutes());
|
|
|
|
+
|
|
if (LocalTime.parse(maxTime,df).plusHours(8).compareTo(LocalTime.parse(baseAfternoonStart,df)) >= 0) {
|
|
if (LocalTime.parse(maxTime,df).plusHours(8).compareTo(LocalTime.parse(baseAfternoonStart,df)) >= 0) {
|
|
//重新计算打卡工时时,需要减去中间午休时间
|
|
//重新计算打卡工时时,需要减去中间午休时间
|
|
- bigDecimal=bigDecimal.divide(BigDecimal.valueOf(60),1,BigDecimal.ROUND_HALF_UP).subtract(new BigDecimal(restTime));
|
|
|
|
|
|
+ bigDecimal = bigDecimal.divide(BigDecimal.valueOf(60),1,BigDecimal.ROUND_HALF_UP).subtract(new BigDecimal(restTime));
|
|
|
|
+ } else {
|
|
|
|
+ bigDecimal = bigDecimal.divide(BigDecimal.valueOf(60),1,BigDecimal.ROUND_HALF_UP);
|
|
}
|
|
}
|
|
- double time = bigDecimal.divide(BigDecimal.valueOf(60),1,BigDecimal.ROUND_HALF_UP).doubleValue();
|
|
|
|
|
|
+ double time = bigDecimal.doubleValue();
|
|
if (time < 0) {
|
|
if (time < 0) {
|
|
time = 0;
|
|
time = 0;
|
|
|
|
+ } else {
|
|
|
|
+ if (corpInfo.getCompanyId() == 481) {
|
|
|
|
+ time = DateTimeUtil.getHalfHoursFromDouble(time);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
userCorpwxTime.setWorkHours(time);
|
|
userCorpwxTime.setWorkHours(time);
|
|
synchronized (userLock){
|
|
synchronized (userLock){
|
|
@@ -1489,7 +1496,14 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
|
|
ct.setEndTime(baseAfternoonEnd);
|
|
ct.setEndTime(baseAfternoonEnd);
|
|
}
|
|
}
|
|
if (showLog) System.out.println("工作时长==" + workHours);
|
|
if (showLog) System.out.println("工作时长==" + workHours);
|
|
- ct.setWorkHours(DateTimeUtil.getHoursFromDouble(workHours));
|
|
|
|
|
|
+
|
|
|
|
+ if (corpInfo.getCompanyId() == 481) {
|
|
|
|
+ //给盛立安元0.5单位进位
|
|
|
|
+ ct.setWorkHours(DateTimeUtil.getHalfHoursFromDouble(workHours));
|
|
|
|
+ } else {
|
|
|
|
+ ct.setWorkHours(DateTimeUtil.getHoursFromDouble(workHours));
|
|
|
|
+ }
|
|
|
|
+
|
|
// if (regular_work_sec < standard_work_sec) {
|
|
// if (regular_work_sec < standard_work_sec) {
|
|
// ct.setWorkHours(DateTimeUtil.getHoursFromDouble(ct.getCardTime() + ct.getOutdoorTime()));
|
|
// ct.setWorkHours(DateTimeUtil.getHoursFromDouble(ct.getCardTime() + ct.getOutdoorTime()));
|
|
// } else {
|
|
// } else {
|
|
@@ -1512,7 +1526,12 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
|
|
if (calTime < 8.0 && ct.getOutdoorTime() > 0) {
|
|
if (calTime < 8.0 && ct.getOutdoorTime() > 0) {
|
|
calTime += ct.getOutdoorTime();
|
|
calTime += ct.getOutdoorTime();
|
|
}
|
|
}
|
|
- ct.setWorkHours(calTime);
|
|
|
|
|
|
+ if (corpInfo.getCompanyId() == 481) {
|
|
|
|
+ //给盛立安元0.5单位进位
|
|
|
|
+ ct.setWorkHours(DateTimeUtil.getHalfHoursFromDouble(calTime));
|
|
|
|
+ } else {
|
|
|
|
+ ct.setWorkHours(calTime);
|
|
|
|
+ }
|
|
if (showLog) System.out.println("workTime="+workTime+", 二次校正后workHours="+ct.getWorkHours());
|
|
if (showLog) System.out.println("workTime="+workTime+", 二次校正后workHours="+ct.getWorkHours());
|
|
}
|
|
}
|
|
}
|
|
}
|