|
@@ -59,6 +59,8 @@ public class CompanyController {
|
|
|
UserMapper userMapper;
|
|
|
@Resource
|
|
|
ReportMapper reportMapper;
|
|
|
+ @Resource
|
|
|
+ FeishuInfoMapper feishuInfoMapper;
|
|
|
|
|
|
public static LocalDateTime lastSyncDDTime;
|
|
|
|
|
@@ -106,6 +108,7 @@ public class CompanyController {
|
|
|
List<Integer> collect = records.stream().map(Company::getId).collect(Collectors.toList());
|
|
|
if (collect.size() > 0) {
|
|
|
List<WxCorpInfo> wxComps = wxCorpInfoMapper.selectList(new QueryWrapper<WxCorpInfo>().in("company_id", collect));
|
|
|
+ List<FeishuInfo> infoList = feishuInfoMapper.selectList(new QueryWrapper<FeishuInfo>().in("company_id", collect));
|
|
|
List<CompanyDingding> dingdingList = companyDingdingMapper.selectList(new QueryWrapper<CompanyDingding>().in("company_id", collect));
|
|
|
records.forEach(r->{
|
|
|
Optional<WxCorpInfo> first = wxComps.stream().filter(wx -> wx.getCompanyId().intValue() == r.getId()).findFirst();
|
|
@@ -116,6 +119,10 @@ public class CompanyController {
|
|
|
if (first1.isPresent()) {
|
|
|
r.setDingdingCorpid(first1.get().getCorpid());
|
|
|
}
|
|
|
+ Optional<FeishuInfo> first2 = infoList.stream().filter(i -> i.getCompanyId().intValue() == r.getId()).findFirst();
|
|
|
+ if(first2.isPresent()){
|
|
|
+ r.setFeishuInfoid(first2.get().getCorpid());
|
|
|
+ }
|
|
|
});
|
|
|
//获取实际活跃人数
|
|
|
List<User> userCountList = userMapper.selectList(new QueryWrapper<User>().select("company_id, count(1) as department_id").in("company_id", collect).eq("is_active", 1).groupBy("company_id"));
|