Commit eae01586 authored by H2T's avatar H2T

接口bug修改

parent f4632c5a
...@@ -549,19 +549,24 @@ public class RouteServiceImpl extends ServiceImpl<RouteMapper, Route> implement ...@@ -549,19 +549,24 @@ public class RouteServiceImpl extends ServiceImpl<RouteMapper, Route> implement
if (oldRoutePointList != null && oldRoutePointList.size() > 0) { if (oldRoutePointList != null && oldRoutePointList.size() > 0) {
RoutePoint RoutePoint = oldRoutePointList.get(0); RoutePoint RoutePoint = oldRoutePointList.get(0);
List<Long> split = Arrays.asList(RoutePoint.getExcludeItems().split(",")).stream().map(Long::parseLong).collect(Collectors.toList()); if (!"".equals(RoutePoint.getExcludeItems()) && !RoutePoint.getExcludeItems().isEmpty()){
List<Long> split = Arrays.asList(RoutePoint.getExcludeItems().split(",")).stream().map(Long::parseLong).collect(Collectors.toList());
Set<Long> allPointInputItemIdSet = iPointInputItemDao.getPointInputItemByPointIdAndClassifyId(pointId, classifyId)
.stream().map(PointInputItem::getId) Set<Long> allPointInputItemIdSet = iPointInputItemDao.getPointInputItemByPointIdAndClassifyId(pointId, classifyId)
.collect(Collectors.toSet()); .stream().map(PointInputItem::getId)
List<Long> otherClassify = new ArrayList<>(); .collect(Collectors.toSet());
split.forEach(x -> { List<Long> otherClassify = new ArrayList<>();
if (!allPointInputItemIdSet.contains(x)) { split.forEach(x -> {
otherClassify.add(x); if (!allPointInputItemIdSet.contains(x)) {
} otherClassify.add(x);
}); }
List<Long> lastList = Stream.concat(otherClassify.stream(), inputItemIds.stream()).distinct().collect(Collectors.toList()); });
RoutePoint.setExcludeItems(StringUtils.join(lastList.toArray(), ",")); List<Long> lastList = Stream.concat(otherClassify.stream(), inputItemIds.stream()).distinct().collect(Collectors.toList());
RoutePoint.setExcludeItems(StringUtils.join(lastList.toArray(), ","));
}else {
RoutePoint.setExcludeItems(StringUtils.join(inputItemIds.toArray(),","));
}
iRoutePointDao.saveAndFlush(RoutePoint); iRoutePointDao.saveAndFlush(RoutePoint);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment