| | |
| | | Integer timeSeconds = attendanceService.calculateTimes(calculate, SecurityUtils.getCurrentUserId(), resources.getLeaveType().equals(Constant.LEAVE_TYPE_LACTATION_LEAVE) ? 1 : null);
|
| | | result = Double.valueOf(new BigDecimal((float) timeSeconds / 3600).setScale(2, BigDecimal.ROUND_HALF_UP).toString());
|
| | | attendanceLeaveDto.setLeaveDurationUnit(Constant.LEAVE_TIME_TYPE_HOUR);
|
| | | if (result < 1) {
|
| | | throw new BadRequestException("请假时间不可低于1小时");
|
| | | }
|
| | | } else {
|
| | | // 以天为单位计算
|
| | | Integer days = attendanceService.calculateDays(calculate);
|