|
@@ -1305,6 +1305,9 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
headCell.setCellValue("时薪");
|
|
headCell.setCellValue("时薪");
|
|
headCell.setCellStyle(headStyle);
|
|
headCell.setCellStyle(headStyle);
|
|
headCell = headRow.createCell(7);
|
|
headCell = headRow.createCell(7);
|
|
|
|
+ headCell.setCellValue("证书");
|
|
|
|
+ headCell.setCellStyle(headStyle);
|
|
|
|
+ headCell = headRow.createCell(8);
|
|
headCell.setCellValue("状态");
|
|
headCell.setCellValue("状态");
|
|
headCell.setCellStyle(headStyle);
|
|
headCell.setCellStyle(headStyle);
|
|
|
|
|
|
@@ -1320,6 +1323,11 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
}
|
|
}
|
|
List<User> data = userMapper.selectList(queryWrapper);
|
|
List<User> data = userMapper.selectList(queryWrapper);
|
|
List<Department> deptList = departmentMapper.selectList(new QueryWrapper<Department>().eq("company_id", user.getCompanyId()));
|
|
List<Department> deptList = departmentMapper.selectList(new QueryWrapper<Department>().eq("company_id", user.getCompanyId()));
|
|
|
|
+ List<String> collect = data.stream().distinct().map(da -> da.getId()).collect(Collectors.toList());
|
|
|
|
+ List<UserCert> userCertList=new ArrayList<>();
|
|
|
|
+ if(collect!=null&&!StringUtils.isEmpty(data)){
|
|
|
|
+ userCertList = userCertMapper.selectList(new QueryWrapper<UserCert>().in("user_id", collect));
|
|
|
|
+ }
|
|
for (User item : data) {
|
|
for (User item : data) {
|
|
if (item.getDepartmentId() != 0) {
|
|
if (item.getDepartmentId() != 0) {
|
|
Optional<Department> first = deptList.stream().filter(d -> d.getDepartmentId().equals(item.getDepartmentId())).findFirst();
|
|
Optional<Department> first = deptList.stream().filter(d -> d.getDepartmentId().equals(item.getDepartmentId())).findFirst();
|
|
@@ -1336,8 +1344,21 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
row.createCell(4).setCellValue(item.getDepartmentName());
|
|
row.createCell(4).setCellValue(item.getDepartmentName());
|
|
row.createCell(5).setCellValue(item.getMonthCost()==null? 0 : item.getMonthCost().intValue());
|
|
row.createCell(5).setCellValue(item.getMonthCost()==null? 0 : item.getMonthCost().intValue());
|
|
row.createCell(6).setCellValue(item.getCost() == null?0.0 : item.getCost().doubleValue());
|
|
row.createCell(6).setCellValue(item.getCost() == null?0.0 : item.getCost().doubleValue());
|
|
- row.createCell(7).setCellValue(item.getIsActive()==1?"正常":"已停用");
|
|
|
|
-
|
|
|
|
|
|
+ List<UserCert> certList = userCertList.stream().distinct().filter(uc -> uc.getUserId().equals(item.getId())).collect(Collectors.toList());
|
|
|
|
+ if(certList.size()>0){
|
|
|
|
+ String s="";
|
|
|
|
+ for (int i = 0; i < certList.size(); i++) {
|
|
|
|
+ if(i<certList.size()-1){
|
|
|
|
+ s+=certList.get(i).getCertName()+" "+certList.get(i).getCertDate()+",";
|
|
|
|
+ }else {
|
|
|
|
+ s+=certList.get(i).getCertName()+" "+certList.get(i).getCertDate();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ row.createCell(7).setCellValue(s);
|
|
|
|
+ }else {
|
|
|
|
+ row.createCell(7).setCellValue("");
|
|
|
|
+ }
|
|
|
|
+ row.createCell(8).setCellValue(item.getIsActive()==1?"正常":"已停用");
|
|
rowNum++;
|
|
rowNum++;
|
|
}
|
|
}
|
|
//生成Excel文件
|
|
//生成Excel文件
|