| | |
| | | } |
| | | |
| | | |
| | | |
| | | empBaseInfo.setDelFlag(2); |
| | | // 入职类型 |
| | | dicItem = dicItems.parallelStream().filter(j -> StrUtil.equalsIgnoreCase(j.getDicCode(), "lztype") && StrUtil.equals(j.getDicItemName(), list.get(31).toString())).findFirst().orElse(null); |
| | |
| | | if (null != dicItem) { |
| | | empBaseInfo.setArchivesStatus(dicItem.getDicItemCode()); |
| | | } |
| | | //身份证有效期 |
| | | empBaseInfo.setCertificateValidity(DateUtil.parse(list.get(33).toString())); |
| | | empBaseInfo.setEmpStatus("0"); |
| | | boolean saveResult = this.save(empBaseInfo); |
| | | // 新入职员工需要增加一条入职记录 |
| | |
| | | private List<EmpBaseInfo> findInsuranceAlertList(EmpBaseInfo empBaseInfo, QueryRequest request) { |
| | | // 1. 计算时间范围 |
| | | LocalDate[] dateRange = calculateDateRange(empBaseInfo.getTimeRange()); |
| | | LocalDate startDate = dateRange[0]; |
| | | LocalDate endDate = dateRange[1]; |
| | | |
| | | // 2. 获取提醒年龄配置 |
| | |
| | | } |
| | | |
| | | int alertAge = "1".equals(emp.getSex()) ? alertManAge : alertWomanAge; |
| | | int maxAge = "1".equals(emp.getSex()) ? 50 : 40; |
| | | LocalDate birthDate = emp.getBirthdate().toInstant() |
| | | .atZone(ZoneId.systemDefault()) |
| | | .toLocalDate(); |
| | | LocalDate alertDate = birthDate.plusYears(alertAge); |
| | | LocalDate maxDate = birthDate.plusYears(maxAge); |
| | | |
| | | return !alertDate.isAfter(endDate); |
| | | return !alertDate.isAfter(endDate) && endDate.isBefore(maxDate); |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |