| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AttendanceLeaveDto create(AttendanceLeave resources) throws Exception { |
| | | SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | DateTimeFormatter sdf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | // DateTimeFormatter sdf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | String LeaStartTime = df.format(resources.getLeaveStartTime()); |
| | | String LeaEndTime = df.format(resources.getLeaveEndTime()); |
| | | // 如果按天为单位请假拼接请假时间的时分秒,取上下班基准时间 |
| | |
| | | for (SysUserLevelOther sysUserLevelOther : sysUserLevelOtherList) { |
| | | // 获取今年 |
| | | int year = Calendar.getInstance().get(Calendar.YEAR); |
| | | String df = sysUserLevelOther.getYearMonth().substring(0,4); |
| | | if (sysUserLevelOther.getYearMonth().substring(0,4).equals(String.valueOf(year))) { |
| | | if (!sysUserLevelOther.getYearMonth().isEmpty() && sysUserLevelOther.getYearMonth().substring(0,4).equals(String.valueOf(year))) { |
| | | //年假总时长 |
| | | Double yearTime = Double.valueOf(sysUserLevelOther.getAnnualLeaveDays() == null ? 0 : sysUserLevelOther.getAnnualLeaveDays() * 8); |
| | | |