Commit abcf561c by 刘鑫

Merge branch 'develop-16542' into 'develop'

feat(容量对外接口): 更改工作队、分站匹配工作

See merge request !359
2 parents 9639f664 77c69174
......@@ -47,6 +47,7 @@ import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Set;
......@@ -107,13 +108,16 @@ public class CapacityQueryServiceImpl implements CapacityQueryService {
//2:根据查询出区划匹配分站信息
List<String> blockIds = blockInfoList.stream().map(SaasUtils.BlockInfo::getBlockId).distinct().collect(Collectors.toList());
List<MapBlockInfoEntity> mapBlockInfoEntities = mapBlockInfoDao.findByAreaIdsIn(blockIds);
if (CollectionUtils.isEmpty(mapBlockInfoEntities)) {
return Result.failed(StatusCodeEnum.FENDAN_TEAM_UNMATCHED);
Set<MapBlockInfoEntity> mapBlockInBlockIdsList = new HashSet<>();
//区划所在范围所有工作队
for (String blockId : blockIds) {
List<MapBlockInfoEntity> mapBlockInfoEntities = mapBlockInfoDao.findByAreaIdsLike("%" + blockId + "%");
mapBlockInBlockIdsList.addAll(mapBlockInfoEntities);
}
//分站、网点ID
List<String> groupIdList = mapBlockInfoEntities.stream().map(MapBlockInfoEntity::getGroupId).distinct()
List<String> groupIdList = mapBlockInBlockIdsList.stream().map(MapBlockInfoEntity::getGroupId).distinct()
.collect(Collectors.toList());
final String groupId = groupIdList.get(0);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!