|
@@ -32,6 +32,7 @@ import java.text.DecimalFormat;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
+import java.util.stream.Stream;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -70,6 +71,8 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
|
|
|
private ExcelExportService excelExportService;
|
|
|
@Resource
|
|
|
private WxCorpInfoService wxCorpInfoService;
|
|
|
+ @Resource
|
|
|
+ private UserWorkTypeMapper userWorkTypeMapper;
|
|
|
|
|
|
@Value("${corpId}")
|
|
|
private String corpId;
|
|
@@ -1531,9 +1534,19 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
|
|
|
List<User> groupList = userMapper.selectList(new LambdaQueryWrapper<User>()
|
|
|
.eq(user.getCompanyId() != null, User::getCompanyId, user.getCompanyId())
|
|
|
.eq(user.getDepartmentId() != null, User::getDepartmentId, user.getDepartmentId())
|
|
|
- .select(User::getId, User::getName,User::getJobNumber)
|
|
|
-
|
|
|
+ .select(User::getId, User::getName,User::getJobNumber,User::getWorkTypeId)
|
|
|
);
|
|
|
+
|
|
|
+ List<UserWorkType> userWorkTypeList = userWorkTypeMapper.selectList(null);
|
|
|
+
|
|
|
+ groupList.stream().forEach(member->{
|
|
|
+ List<UserWorkType> workTypeList = userWorkTypeList.stream().filter(userWorkType -> userWorkType.getId() == member.getWorkTypeId()).collect(Collectors.toList());
|
|
|
+ if(workTypeList!=null&&workTypeList.size()>0){
|
|
|
+ member.setWorkType(workTypeList.get(0).getName());
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
msg.setData(groupList);
|
|
|
|
|
|
return msg;
|