| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public void updateById(YwPatrolLine ywPatrolLine) { |
| | | if(Objects.isNull(ywPatrolLine) |
| | | || StringUtils.isBlank(ywPatrolLine.getName()) |
| | |
| | | //循环处理 子集数据 |
| | | List<YwLinePoint> ywLinePointList = ywPatrolLine.getLinePointList(); |
| | | //是否存在相同数据 |
| | | Set<Integer> setIds = new HashSet<Integer>(ywLinePointList.stream().map(i->i.getLineId()).collect(Collectors.toList())); |
| | | Set<Integer> setIds = new HashSet<Integer>(ywLinePointList.stream().map(i->i.getPointId()).collect(Collectors.toList())); |
| | | if(setIds.size()!=ywLinePointList.size()){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"存在相同巡检点!"); |
| | | } |