|
@@ -340,24 +340,26 @@ public class TBDingStatisticServiceImpl extends ServiceImpl<TBDingStatisticMappe
|
|
BigDecimal workHours = BigDecimal.ZERO;
|
|
BigDecimal workHours = BigDecimal.ZERO;
|
|
BigDecimal var = new BigDecimal(3600000);
|
|
BigDecimal var = new BigDecimal(3600000);
|
|
for (TBDing effectDing : dingList) {
|
|
for (TBDing effectDing : dingList) {
|
|
- // 有效天数
|
|
|
|
- actualDays++;
|
|
|
|
- DingDateTypeEnum dateType = effectDing.getDateType();
|
|
|
|
- switch (dateType) {
|
|
|
|
- case WEEKEND:
|
|
|
|
- weekends++;
|
|
|
|
- break;
|
|
|
|
- case LEGAL_HOLIDAYS:
|
|
|
|
- legalHolidays++;
|
|
|
|
- break;
|
|
|
|
- default:
|
|
|
|
- weekDays++;
|
|
|
|
- break;
|
|
|
|
|
|
+ if (!SystemConstant.isOneNull(effectDing.getSignInTime(), effectDing.getSignOutTime())) {
|
|
|
|
+ // 有效天数
|
|
|
|
+ actualDays++;
|
|
|
|
+ DingDateTypeEnum dateType = effectDing.getDateType();
|
|
|
|
+ switch (dateType) {
|
|
|
|
+ case WEEKEND:
|
|
|
|
+ weekends++;
|
|
|
|
+ break;
|
|
|
|
+ case LEGAL_HOLIDAYS:
|
|
|
|
+ legalHolidays++;
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ weekDays++;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ // 累计工时
|
|
|
|
+ workHours = workHours.add(
|
|
|
|
+ new BigDecimal(effectDing.getSignOutTime() - effectDing.getSignInTime()).divide(var, 1,
|
|
|
|
+ RoundingMode.HALF_UP));
|
|
}
|
|
}
|
|
- // 累计工时
|
|
|
|
- workHours = workHours.add(
|
|
|
|
- new BigDecimal(effectDing.getSignOutTime() - effectDing.getSignInTime()).divide(var, 1,
|
|
|
|
- RoundingMode.HALF_UP));
|
|
|
|
}
|
|
}
|
|
// 违规工时
|
|
// 违规工时
|
|
int violationDays = Math.toIntExact(
|
|
int violationDays = Math.toIntExact(
|
|
@@ -381,8 +383,8 @@ public class TBDingStatisticServiceImpl extends ServiceImpl<TBDingStatisticMappe
|
|
|
|
|
|
// 待处理异常数
|
|
// 待处理异常数
|
|
int exceptionCount = tbDingApplyService.count(
|
|
int exceptionCount = tbDingApplyService.count(
|
|
- new QueryWrapper<TBDingApply>().lambda().eq(TBDingApply::getServiceId, serviceId)
|
|
|
|
- .eq(TBDingApply::getCreateId, userId).isNull(TBDingApply::getApprove));
|
|
|
|
|
|
+ new QueryWrapper<TBDingApply>().lambda().eq(TBDingApply::getServiceId, serviceId).isNull(TBDingApply::getSopNo).eq(TBDingApply::getCreateId, userId)
|
|
|
|
+ .isNull(TBDingApply::getApprove));
|
|
|
|
|
|
TBDingStatistic tbDingStatistic;
|
|
TBDingStatistic tbDingStatistic;
|
|
tbDingStatistic = this.findBySopNoAndUserArchivesId(serviceId, null, userArchivesId);
|
|
tbDingStatistic = this.findBySopNoAndUserArchivesId(serviceId, null, userArchivesId);
|