mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-11 03:46:50 +08:00
提交人员查询
This commit is contained in:
@@ -28,10 +28,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@@ -79,7 +76,7 @@ public class CasesRecommendPushRecordServiceImpl implements ICasesRecommendPushR
|
||||
List<String> caseIdList = importDataList.stream().filter(casesRecommendLaunchImportData -> casesRecommendLaunchImportData.getStatus() == 1).map(CasesRecommendLaunchImportData::getCaseId).collect(Collectors.toList());
|
||||
caseIds.addAll(caseIdList);
|
||||
}
|
||||
List<String> userIds = new ArrayList<>();
|
||||
Set<String> userIds = new HashSet<>();
|
||||
if (CollectionUtil.isNotEmpty(casesRecommendLaunch.getPushUserIdList())) {
|
||||
userIds.addAll(casesRecommendLaunch.getPushUserIdList());
|
||||
}
|
||||
@@ -87,21 +84,29 @@ public class CasesRecommendPushRecordServiceImpl implements ICasesRecommendPushR
|
||||
if (CollectionUtil.isNotEmpty(casesRecommendLaunch.getDeptIds())) {
|
||||
long tt = System.currentTimeMillis();
|
||||
for (String orgId : casesRecommendLaunch.getDeptIds()) {
|
||||
long ts = System.currentTimeMillis();
|
||||
List<OrgRootBean.ResultData> orgChildTree = thirdApi.getOrgChildTree(orgId, token);
|
||||
log.info("查询组织数据耗时 {}秒", (System.currentTimeMillis() - tt) / 1000);
|
||||
if (CollectionUtil.isNotEmpty(orgChildTree)) {
|
||||
for (OrgRootBean.ResultData result : orgChildTree) {
|
||||
UserListParam build = UserListParam.builder().departId(result.getId()).pageSize(100).build();
|
||||
UserListParam build = UserListParam.builder().departId(orgId).pageSize(100).build();
|
||||
List<UserInfoList> allUserList = thirdApi.getAllUserList(build, token);
|
||||
if (CollectionUtil.isNotEmpty(allUserList)) {
|
||||
for (UserInfoList userInfo : allUserList) {
|
||||
userIds.add(String.valueOf(userInfo.getId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
log.info("{} 机构查询耗时 {}秒", orgId, (System.currentTimeMillis() - ts) / 1000);
|
||||
|
||||
// long ts = System.currentTimeMillis();
|
||||
// List<OrgRootBean.ResultData> orgChildTree = thirdApi.getOrgChildTree(orgId, token);
|
||||
// log.info("查询组织数据耗时 {}秒", (System.currentTimeMillis() - tt) / 1000);
|
||||
// if (CollectionUtil.isNotEmpty(orgChildTree)) {
|
||||
// for (OrgRootBean.ResultData result : orgChildTree) {
|
||||
// UserListParam build = UserListParam.builder().departId(result.getId()).pageSize(100).build();
|
||||
// List<UserInfoList> allUserList = thirdApi.getAllUserList(build, token);
|
||||
// if (CollectionUtil.isNotEmpty(allUserList)) {
|
||||
// for (UserInfoList userInfo : allUserList) {
|
||||
// userIds.add(String.valueOf(userInfo.getId()));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// log.info("{} 机构查询耗时 {}秒", orgId, (System.currentTimeMillis() - ts) / 1000);
|
||||
}
|
||||
log.info("组织查询耗时 {}秒", (System.currentTimeMillis() - tt) / 1000);
|
||||
}
|
||||
@@ -155,7 +160,6 @@ public class CasesRecommendPushRecordServiceImpl implements ICasesRecommendPushR
|
||||
casesRecommendPushRecordDao.saveList(pushRecords);
|
||||
}
|
||||
try {
|
||||
|
||||
//发送推送案例消息
|
||||
asyncSendCasesRecommendService.sendCasesRecommend(casesRecommend);
|
||||
log.info("执行完成耗时 {} 秒 ", (System.currentTimeMillis() - t1) / 1000);
|
||||
|
||||
Reference in New Issue
Block a user