|
|
@@ -0,0 +1,302 @@
|
|
|
+package com.zksy.base.warning.service.impl;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.zksy.base.alarm.domain.WarningThreshold;
|
|
|
+import com.zksy.base.alarm.mapper.WarningThresholdMapper;
|
|
|
+import com.zksy.base.domain.EquipmentBase;
|
|
|
+import com.zksy.base.domain.EquipmentType;
|
|
|
+import com.zksy.base.enums.EquipmentTypeEnum;
|
|
|
+import com.zksy.base.mapper.EquipmentBaseMapper;
|
|
|
+import com.zksy.base.mapper.EquipmentTypeMapper;
|
|
|
+import com.zksy.base.warning.domain.*;
|
|
|
+import com.zksy.base.warning.mapper.WarningTypeMapper;
|
|
|
+import com.zksy.base.warning.service.WarningThresholdService;
|
|
|
+import com.zksy.common.exception.ServiceException;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
+
|
|
|
+import java.time.LocalDateTime;
|
|
|
+import java.util.*;
|
|
|
+import java.util.function.Function;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+
|
|
|
+@Service
|
|
|
+public class WarningThresholdServiceImpl extends ServiceImpl<WarningThresholdMapper, WarningThreshold>
|
|
|
+ implements WarningThresholdService {
|
|
|
+ private final EquipmentBaseMapper equipmentBaseMapper;
|
|
|
+ private final EquipmentTypeMapper equipmentTypeMapper;
|
|
|
+ private final WarningTypeMapper warningTypeMapper;
|
|
|
+ private final WarningThresholdMapper thresholdMapper;
|
|
|
+
|
|
|
+ public WarningThresholdServiceImpl(EquipmentBaseMapper equipmentBaseMapper,
|
|
|
+ EquipmentTypeMapper equipmentTypeMapper,
|
|
|
+ WarningTypeMapper warningTypeMapper,
|
|
|
+ WarningThresholdMapper thresholdMapper) {
|
|
|
+ this.equipmentBaseMapper = equipmentBaseMapper;
|
|
|
+ this.equipmentTypeMapper = equipmentTypeMapper;
|
|
|
+ this.warningTypeMapper = warningTypeMapper;
|
|
|
+ this.thresholdMapper = thresholdMapper;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<EquipmentType> listTypes(Integer rootTypeId) {
|
|
|
+ Integer root = validRoot(rootTypeId);
|
|
|
+ Set<Integer> configuredTypeIds = warningTypeMapper.selectList(Wrappers.lambdaQuery(WarningType.class))
|
|
|
+ .stream().map(WarningType::getEquipmentTypeId).filter(Objects::nonNull).collect(Collectors.toSet());
|
|
|
+ if (configuredTypeIds.isEmpty()) return Collections.emptyList();
|
|
|
+ LambdaQueryWrapper<EquipmentType> wrapper = Wrappers.lambdaQuery(EquipmentType.class);
|
|
|
+ if (root == 0) {
|
|
|
+ wrapper.in(EquipmentType::getParentId, rootIds());
|
|
|
+ } else {
|
|
|
+ wrapper.eq(EquipmentType::getParentId, root);
|
|
|
+ }
|
|
|
+ wrapper.in(EquipmentType::getId, configuredTypeIds);
|
|
|
+ wrapper.orderByAsc(EquipmentType::getId);
|
|
|
+ return equipmentTypeMapper.selectList(wrapper);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<WarningThresholdView> listDevices(Integer rootTypeId, Integer equipmentTypeId, String deviceCode, Boolean unconfiguredOnly) {
|
|
|
+ return listDevices(rootTypeId, equipmentTypeId, deviceCode, unconfiguredOnly, false);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<WarningThresholdView> listDevices(Integer rootTypeId, Integer equipmentTypeId, String deviceCode,
|
|
|
+ Boolean unconfiguredOnly, Boolean configuredOnly) {
|
|
|
+ Integer root = validRoot(rootTypeId);
|
|
|
+ Set<String> allowedTypeIds = allowedTypeIds(root, equipmentTypeId);
|
|
|
+ LambdaQueryWrapper<EquipmentBase> wrapper = Wrappers.lambdaQuery(EquipmentBase.class);
|
|
|
+ wrapper.in(EquipmentBase::getEquipmentTypeId, allowedTypeIds);
|
|
|
+ if (deviceCode != null && !deviceCode.trim().isEmpty()) {
|
|
|
+ wrapper.like(EquipmentBase::getEquipmentCode, deviceCode.trim());
|
|
|
+ }
|
|
|
+ wrapper.orderByAsc(EquipmentBase::getEquipmentCode);
|
|
|
+ List<EquipmentBase> devices = equipmentBaseMapper.selectList(wrapper);
|
|
|
+ if (devices.isEmpty()) return Collections.emptyList();
|
|
|
+ Set<String> codes = devices.stream().map(EquipmentBase::getEquipmentCode).filter(Objects::nonNull).collect(Collectors.toSet());
|
|
|
+ List<WarningThreshold> configured = thresholdMapper.selectList(Wrappers.lambdaQuery(WarningThreshold.class)
|
|
|
+ .in(WarningThreshold::getDeviceCode, codes)
|
|
|
+ .orderByAsc(WarningThreshold::getDeviceCode)
|
|
|
+ .orderByDesc(WarningThreshold::getCreateTime)
|
|
|
+ .orderByAsc(WarningThreshold::getWarningCode));
|
|
|
+ Set<String> configuredCodes = configured.stream().map(WarningThreshold::getDeviceCode)
|
|
|
+ .filter(Objects::nonNull).collect(Collectors.toSet());
|
|
|
+ if (Boolean.TRUE.equals(unconfiguredOnly)) {
|
|
|
+ devices = devices.stream().filter(device -> !configuredCodes.contains(device.getEquipmentCode())).collect(Collectors.toList());
|
|
|
+ if (devices.isEmpty()) return Collections.emptyList();
|
|
|
+ codes = devices.stream().map(EquipmentBase::getEquipmentCode).filter(Objects::nonNull).collect(Collectors.toSet());
|
|
|
+ configured = Collections.emptyList();
|
|
|
+ } else if (Boolean.TRUE.equals(configuredOnly)) {
|
|
|
+ devices = devices.stream().filter(device -> configuredCodes.contains(device.getEquipmentCode())).collect(Collectors.toList());
|
|
|
+ if (devices.isEmpty()) return Collections.emptyList();
|
|
|
+ }
|
|
|
+ Map<String, WarningThreshold> configuredByKey = configured.stream().collect(Collectors.toMap(
|
|
|
+ t -> t.getDeviceCode() + "\u0000" + t.getWarningCode(), Function.identity(), (a, b) -> a));
|
|
|
+ Map<Integer, EquipmentType> typeMap = equipmentTypeMapper.selectBatchIds(
|
|
|
+ devices.stream().map(d -> Integer.valueOf(d.getEquipmentTypeId())).distinct().collect(Collectors.toList()))
|
|
|
+ .stream().collect(Collectors.toMap(EquipmentType::getId, Function.identity(), (a, b) -> a));
|
|
|
+ Map<Integer, List<WarningType>> metadata = warningTypeMapper.selectList(
|
|
|
+ Wrappers.lambdaQuery(WarningType.class).in(WarningType::getEquipmentTypeId,
|
|
|
+ typeMap.keySet())).stream().collect(Collectors.groupingBy(WarningType::getEquipmentTypeId));
|
|
|
+
|
|
|
+ List<WarningThresholdView> result = new ArrayList<>();
|
|
|
+ for (EquipmentBase device : devices) {
|
|
|
+ WarningThresholdView view = new WarningThresholdView();
|
|
|
+ view.setEquipmentId(device.getEquipmentId()); view.setEquipmentCode(device.getEquipmentCode());
|
|
|
+ view.setEquipmentName(device.getEquipmentName()); view.setEquipmentTypeId(device.getEquipmentTypeId());
|
|
|
+ EquipmentType type = typeMap.get(Integer.valueOf(device.getEquipmentTypeId()));
|
|
|
+ view.setEquipmentTypeName(type == null ? device.getEquipmentTypeName() : type.getTypeName());
|
|
|
+ for (WarningType meta : metadata.getOrDefault(Integer.valueOf(device.getEquipmentTypeId()), Collections.emptyList())) {
|
|
|
+ WarningThresholdItem item = new WarningThresholdItem();
|
|
|
+ item.setId(meta.getId()); item.setEquipmentTypeId(meta.getEquipmentTypeId()); item.setWarningCode(meta.getWarningCode());
|
|
|
+ item.setWarningName(meta.getWarningName()); item.setWarningUnit(meta.getWarningUnit()); item.setDataType(meta.getDataType()); item.setRemark(meta.getRemark());
|
|
|
+ WarningThreshold saved = configuredByKey.get(device.getEquipmentCode() + "\u0000" + meta.getWarningCode());
|
|
|
+ if (Boolean.TRUE.equals(configuredOnly) && saved == null) continue;
|
|
|
+ if (saved != null) {
|
|
|
+ item.setMinValue(saved.getMinValue()); item.setMaxValue(saved.getMaxValue());
|
|
|
+ item.setPeriodStart(saved.getPeriodStart()); item.setPeriodEnd(saved.getPeriodEnd());
|
|
|
+ item.setCreateTime(saved.getCreateTime()); item.setUpdateTime(saved.getUpdateTime());
|
|
|
+ }
|
|
|
+ view.getThresholds().add(item);
|
|
|
+ }
|
|
|
+ view.getThresholds().sort(Comparator
|
|
|
+ .comparing(WarningThresholdItem::getCreateTime, Comparator.nullsLast(Comparator.reverseOrder()))
|
|
|
+ .thenComparing(WarningThresholdItem::getWarningCode, Comparator.nullsLast(String::compareTo)));
|
|
|
+ result.add(view);
|
|
|
+ }
|
|
|
+ result.sort(Comparator.comparing(WarningThresholdView::getEquipmentCode,
|
|
|
+ Comparator.nullsLast(String::compareTo)));
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Page<WarningThresholdListItem> pageDevices(Integer rootTypeId, Integer equipmentTypeId,
|
|
|
+ String deviceCode, String equipmentName, String warningName,
|
|
|
+ Long pageNum, Long pageSize) {
|
|
|
+ long current = pageNum == null || pageNum < 1 ? 1 : pageNum;
|
|
|
+ long size = pageSize == null || pageSize < 1 ? 10 : pageSize;
|
|
|
+ Integer root = validRoot(rootTypeId);
|
|
|
+ Set<String> allowedTypeIds = allowedTypeIds(root, equipmentTypeId);
|
|
|
+ LambdaQueryWrapper<EquipmentBase> deviceWrapper = Wrappers.lambdaQuery(EquipmentBase.class)
|
|
|
+ .in(EquipmentBase::getEquipmentTypeId, allowedTypeIds);
|
|
|
+ if (deviceCode != null && !deviceCode.trim().isEmpty()) {
|
|
|
+ deviceWrapper.like(EquipmentBase::getEquipmentCode, deviceCode.trim());
|
|
|
+ }
|
|
|
+ if (equipmentName != null && !equipmentName.trim().isEmpty()) {
|
|
|
+ deviceWrapper.like(EquipmentBase::getEquipmentName, equipmentName.trim());
|
|
|
+ }
|
|
|
+ deviceWrapper.orderByAsc(EquipmentBase::getEquipmentCode);
|
|
|
+ List<EquipmentBase> devices = equipmentBaseMapper.selectList(deviceWrapper);
|
|
|
+ Page<WarningThresholdListItem> emptyPage = new Page<>(current, size, 0);
|
|
|
+ if (devices.isEmpty()) {
|
|
|
+ emptyPage.setRecords(Collections.emptyList());
|
|
|
+ return emptyPage;
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, EquipmentBase> deviceByCode = devices.stream()
|
|
|
+ .filter(device -> device.getEquipmentCode() != null)
|
|
|
+ .collect(Collectors.toMap(EquipmentBase::getEquipmentCode, Function.identity(), (a, b) -> a));
|
|
|
+ List<Integer> typeIds = devices.stream().map(EquipmentBase::getEquipmentTypeId)
|
|
|
+ .filter(Objects::nonNull).map(Integer::valueOf).distinct().collect(Collectors.toList());
|
|
|
+ Map<Integer, EquipmentType> typeMap = equipmentTypeMapper.selectBatchIds(typeIds).stream()
|
|
|
+ .collect(Collectors.toMap(EquipmentType::getId, Function.identity(), (a, b) -> a));
|
|
|
+ List<WarningType> warningTypes = warningTypeMapper.selectList(
|
|
|
+ Wrappers.lambdaQuery(WarningType.class).in(WarningType::getEquipmentTypeId, typeIds));
|
|
|
+ if (warningName != null && !warningName.trim().isEmpty()) {
|
|
|
+ warningTypes = warningTypes.stream()
|
|
|
+ .filter(type -> containsIgnoreCase(type.getWarningName(), warningName))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ }
|
|
|
+ Set<String> warningCodes = warningTypes.stream().map(WarningType::getWarningCode)
|
|
|
+ .filter(Objects::nonNull).collect(Collectors.toSet());
|
|
|
+ if (warningCodes.isEmpty()) {
|
|
|
+ emptyPage.setRecords(Collections.emptyList());
|
|
|
+ return emptyPage;
|
|
|
+ }
|
|
|
+
|
|
|
+ LambdaQueryWrapper<WarningThreshold> thresholdWrapper = Wrappers.lambdaQuery(WarningThreshold.class)
|
|
|
+ .in(WarningThreshold::getDeviceCode, deviceByCode.keySet())
|
|
|
+ .in(WarningThreshold::getWarningCode, warningCodes)
|
|
|
+ .orderByAsc(WarningThreshold::getDeviceCode)
|
|
|
+ .orderByDesc(WarningThreshold::getCreateTime)
|
|
|
+ .orderByAsc(WarningThreshold::getWarningCode);
|
|
|
+ Page<WarningThreshold> thresholdPage = thresholdMapper.selectPage(new Page<>(current, size), thresholdWrapper);
|
|
|
+ Map<Integer, Map<String, WarningType>> metadata = warningTypes.stream().collect(Collectors.groupingBy(
|
|
|
+ WarningType::getEquipmentTypeId,
|
|
|
+ Collectors.toMap(WarningType::getWarningCode, Function.identity(), (a, b) -> a)));
|
|
|
+ List<WarningThresholdListItem> records = new ArrayList<>();
|
|
|
+ for (WarningThreshold threshold : thresholdPage.getRecords()) {
|
|
|
+ EquipmentBase device = deviceByCode.get(threshold.getDeviceCode());
|
|
|
+ if (device == null || device.getEquipmentTypeId() == null) continue;
|
|
|
+ Integer typeId = Integer.valueOf(device.getEquipmentTypeId());
|
|
|
+ WarningType warningType = metadata.getOrDefault(typeId, Collections.emptyMap()).get(threshold.getWarningCode());
|
|
|
+ if (warningType == null) continue;
|
|
|
+ WarningThresholdListItem row = new WarningThresholdListItem();
|
|
|
+ row.setEquipmentId(device.getEquipmentId());
|
|
|
+ row.setEquipmentCode(device.getEquipmentCode());
|
|
|
+ row.setEquipmentName(device.getEquipmentName());
|
|
|
+ row.setEquipmentTypeId(device.getEquipmentTypeId());
|
|
|
+ EquipmentType type = typeMap.get(typeId);
|
|
|
+ row.setEquipmentTypeName(type == null ? device.getEquipmentTypeName() : type.getTypeName());
|
|
|
+ row.setId(warningType.getId());
|
|
|
+ row.setWarningCode(threshold.getWarningCode());
|
|
|
+ row.setWarningName(warningType.getWarningName());
|
|
|
+ row.setWarningUnit(warningType.getWarningUnit());
|
|
|
+ row.setDataType(warningType.getDataType());
|
|
|
+ row.setMinValue(threshold.getMinValue());
|
|
|
+ row.setMaxValue(threshold.getMaxValue());
|
|
|
+ row.setPeriodStart(threshold.getPeriodStart());
|
|
|
+ row.setPeriodEnd(threshold.getPeriodEnd());
|
|
|
+ row.setCreateTime(threshold.getCreateTime());
|
|
|
+ row.setUpdateTime(threshold.getUpdateTime());
|
|
|
+ records.add(row);
|
|
|
+ }
|
|
|
+ Page<WarningThresholdListItem> page = new Page<>(current, size, thresholdPage.getTotal());
|
|
|
+ page.setRecords(records);
|
|
|
+ return page;
|
|
|
+ }
|
|
|
+
|
|
|
+ private boolean containsIgnoreCase(String value, String keyword) {
|
|
|
+ return keyword == null || keyword.trim().isEmpty()
|
|
|
+ || (value != null && value.toLowerCase(Locale.ROOT).contains(keyword.trim().toLowerCase(Locale.ROOT)));
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ @Transactional
|
|
|
+ public int save(WarningThresholdSaveRequest request) {
|
|
|
+ if (request == null || request.getThresholds() == null || request.getThresholds().isEmpty()) throw new ServiceException("阈值指标不能为空");
|
|
|
+ Integer root = validRoot(request.getRootTypeId());
|
|
|
+ Set<String> allowedTypeIds = allowedTypeIds(root, request.getEquipmentTypeId());
|
|
|
+ List<EquipmentBase> all = equipmentBaseMapper.selectList(Wrappers.lambdaQuery(EquipmentBase.class).in(EquipmentBase::getEquipmentTypeId, allowedTypeIds));
|
|
|
+ Map<String, EquipmentBase> byCode = all.stream().filter(d -> d.getEquipmentCode() != null).collect(Collectors.toMap(EquipmentBase::getEquipmentCode, Function.identity(), (a, b) -> a));
|
|
|
+ List<String> codes = request.getDeviceCodes() == null ? Collections.emptyList() : request.getDeviceCodes().stream().filter(Objects::nonNull).map(String::trim).filter(s -> !s.isEmpty()).distinct().collect(Collectors.toList());
|
|
|
+ if (codes.isEmpty() && request.getEquipmentTypeId() != null) codes = all.stream().filter(d -> request.getEquipmentTypeId().toString().equals(d.getEquipmentTypeId())).map(EquipmentBase::getEquipmentCode).collect(Collectors.toList());
|
|
|
+ if (codes.isEmpty() || !byCode.keySet().containsAll(codes)) throw new ServiceException("存在不属于当前设备范围的设备编码");
|
|
|
+ int count = 0;
|
|
|
+ for (String code : codes) {
|
|
|
+ Integer typeId = Integer.valueOf(byCode.get(code).getEquipmentTypeId());
|
|
|
+ Map<String, WarningType> metadata = warningTypeMapper.selectList(Wrappers.lambdaQuery(WarningType.class).eq(WarningType::getEquipmentTypeId, typeId)).stream().collect(Collectors.toMap(WarningType::getWarningCode, Function.identity(), (a, b) -> a));
|
|
|
+ for (WarningThresholdSaveItem input : request.getThresholds()) {
|
|
|
+ WarningType meta = metadata.get(input.getWarningCode());
|
|
|
+ if (meta == null) throw new ServiceException("指标不属于设备类型:" + input.getWarningCode());
|
|
|
+ if (meta.getDataType() == 0 && input.getMinValue() != null && input.getMaxValue() != null && input.getMinValue() >= input.getMaxValue()) throw new ServiceException(meta.getWarningName() + "最小值必须小于最大值");
|
|
|
+ if (meta.getDataType() == 1) input.setMaxValue(null);
|
|
|
+ if (meta.getDataType() == 2) input.setMinValue(null);
|
|
|
+ WarningThreshold entity = thresholdMapper.selectOne(Wrappers.lambdaQuery(WarningThreshold.class).eq(WarningThreshold::getDeviceCode, code).eq(WarningThreshold::getWarningCode, input.getWarningCode()).last("limit 1"));
|
|
|
+ if (entity == null) { entity = new WarningThreshold(); entity.setDeviceCode(code); entity.setWarningCode(input.getWarningCode()); entity.setCreateTime(LocalDateTime.now()); }
|
|
|
+ entity.setMinValue(input.getMinValue()); entity.setMaxValue(input.getMaxValue()); entity.setUpdateTime(LocalDateTime.now());
|
|
|
+ entity.setPeriodStart(input.getPeriodStart()); entity.setPeriodEnd(input.getPeriodEnd());
|
|
|
+ if (entity.getId() == null) thresholdMapper.insert(entity); else thresholdMapper.updateById(entity);
|
|
|
+ count++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return count;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ @Transactional
|
|
|
+ public int delete(String rootTypeId, String deviceCode, String warningCode) {
|
|
|
+ if (deviceCode == null || deviceCode.trim().isEmpty() || warningCode == null || warningCode.trim().isEmpty()) {
|
|
|
+ throw new ServiceException("设备编码和预警编码不能为空");
|
|
|
+ }
|
|
|
+ Integer root = rootTypeId == null || rootTypeId.trim().isEmpty() ? 0 : validRoot(Integer.valueOf(rootTypeId));
|
|
|
+ Set<String> allowed = allowedTypeIds(root, null);
|
|
|
+ EquipmentBase device = equipmentBaseMapper.selectOne(Wrappers.lambdaQuery(EquipmentBase.class)
|
|
|
+ .eq(EquipmentBase::getEquipmentCode, deviceCode.trim()));
|
|
|
+ if (device == null || !allowed.contains(device.getEquipmentTypeId())) {
|
|
|
+ throw new ServiceException("设备不属于当前管理范围");
|
|
|
+ }
|
|
|
+ return thresholdMapper.delete(Wrappers.lambdaQuery(WarningThreshold.class)
|
|
|
+ .eq(WarningThreshold::getDeviceCode, deviceCode.trim())
|
|
|
+ .eq(WarningThreshold::getWarningCode, warningCode.trim()));
|
|
|
+ }
|
|
|
+
|
|
|
+ private Integer validRoot(Integer rootTypeId) {
|
|
|
+ if (rootTypeId == null || rootTypeId == 0) return 0;
|
|
|
+ for (EquipmentTypeEnum item : EquipmentTypeEnum.values()) if (item.isRoot() && item.getId().equals(rootTypeId)) return rootTypeId;
|
|
|
+ throw new ServiceException("无效的设备根类型");
|
|
|
+ }
|
|
|
+
|
|
|
+ private Set<String> allowedTypeIds(Integer root, Integer selectedType) {
|
|
|
+ LambdaQueryWrapper<EquipmentType> wrapper = Wrappers.lambdaQuery(EquipmentType.class);
|
|
|
+ if (root == 0) wrapper.in(EquipmentType::getParentId, rootIds());
|
|
|
+ else wrapper.eq(EquipmentType::getParentId, root);
|
|
|
+ List<Integer> ids = equipmentTypeMapper.selectList(wrapper).stream().map(EquipmentType::getId).collect(Collectors.toList());
|
|
|
+ Set<Integer> configuredTypeIds = warningTypeMapper.selectList(Wrappers.lambdaQuery(WarningType.class))
|
|
|
+ .stream().map(WarningType::getEquipmentTypeId).filter(Objects::nonNull).collect(Collectors.toSet());
|
|
|
+ ids.retainAll(configuredTypeIds);
|
|
|
+ if (selectedType != null) { if (!ids.contains(selectedType)) throw new ServiceException("设备类型不属于当前子系统"); return Collections.singleton(String.valueOf(selectedType)); }
|
|
|
+ return ids.stream().map(String::valueOf).collect(Collectors.toSet());
|
|
|
+ }
|
|
|
+
|
|
|
+ private List<Integer> rootIds() {
|
|
|
+ return Arrays.asList(
|
|
|
+ EquipmentTypeEnum.ROOT_WATER_SUPPLY_DEVICE.getId(),
|
|
|
+ EquipmentTypeEnum.ROOT_DRAINAGE_DEVICE.getId(),
|
|
|
+ EquipmentTypeEnum.ROOT_GAS_DEVICE.getId(),
|
|
|
+ EquipmentTypeEnum.ROOT_MANHOLE_DEVICE.getId());
|
|
|
+ }
|
|
|
+}
|