| | |
| | | } |
| | | queryWrapper.in("c.dept_Id", remoteDeptService.userRightDepts().split(StringConstant.COMMA)); |
| | | Page<EmpContractInfo> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | SortUtil.handlePageSort(request, page, "createTime", FebsConstant.ORDER_DESC, true); |
| | | SortUtil.handlePageSort(request, page, "beginDate", FebsConstant.ORDER_ASC, true); |
| | | IPage<EmpContractInfo> iPage = empContractinfoMapper.selectPageVo(page, queryWrapper); |
| | | List<EmpContractInfo> list = iPage.getRecords(); |
| | | //设置字典数据 |
| | |
| | | contractInfo.setContractId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | contractInfo.setEmpNumb(list.get(0).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | if(null == depts){ |
| | | depts =remoteDeptService.setDeptRedis(); |
| | | } |
| | | if(null == depts){ |
| | | depts =remoteDeptService.setDeptRedis(); |
| | | } |
| | | Dept dept = depts.stream().filter(d -> d.getDeptName().equals(list.get(1).toString())).findFirst().orElse(null); |
| | | if (null == dept) { |
| | | returnList.add(StrUtil.format("导入员工合同信息异常: 出现位置第{}行, 原因:{}部门不存在",listObject.indexOf(list)+1,list.get(1).toString())); |
| | |
| | | returnList.add(StrUtil.format("导入员工合同信息异常: 出现位置第{}行, 原因:{}员工编号不存在",listObject.indexOf(list)+1,list.get(0).toString())); |
| | | continue; |
| | | } |
| | | contractInfo.setDelFlag(2); |
| | | contractInfo.setDelFlag(0); |
| | | contractInfo.setEmpId(empId); |
| | | contractInfo.setDeptName(list.get(1).toString()); |
| | | contractInfo.setDeptId(dept.getDeptId()); |
| | |
| | | contractInfo.setEndDate(DateUtil.parseDate(list.get(7).toString())); |
| | | } |
| | | if (StringUtils.isNotBlank(list.get(8).toString())) { |
| | | contractInfo.setContractPeriod(Integer.valueOf(list.get(8).toString())); |
| | | contractInfo.setContractPeriod(Float.valueOf(list.get(8).toString())); |
| | | } |
| | | //合同 |
| | | DicItem dicItem =dicItems.parallelStream().filter(j->StrUtil.equalsIgnoreCase(j.getDicCode(),"contractStatus")&&StrUtil.equals(j.getDicItemName(),list.get(9).toString())).findFirst().orElse(null); |