|
@@ -3,6 +3,7 @@ package com.persagy.apm.alarmservice.project.alarmrule.controller;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.persagy.apm.alarmservice.group.alarmrule.dao.GroupAlarmRuleMapper;
|
|
|
import com.persagy.apm.alarmservice.group.alarmrule.model.vo.GroupAlarmRuleListItemVO;
|
|
|
+import com.persagy.apm.alarmservice.group.monitorindicator.model.MonitorIndicator;
|
|
|
import com.persagy.apm.alarmservice.project.alarmrule.dao.ProjectAlarmRuleMapper;
|
|
|
import com.persagy.apm.alarmservice.project.alarmrule.service.IProjectAlarmRuleService;
|
|
|
|
|
@@ -24,9 +25,8 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import springfox.documentation.annotations.ApiIgnore;
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.text.Collator;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
@@ -127,7 +127,7 @@ public class ProjectAlarmRuleController {
|
|
|
if (StringUtils.isNotBlank(equipName)) {
|
|
|
for (ProjectAlarmRuleObjRel projectAlarmRuleObjRel : query) {
|
|
|
if (StringUtils.isNotBlank(projectAlarmRuleObjRel.getObjName())
|
|
|
- && projectAlarmRuleObjRel.getObjName().equals(equipName)
|
|
|
+ && projectAlarmRuleObjRel.getObjName().contains(equipName)
|
|
|
&& projectAlarmRuleObjRel.getOpen() == 1) {
|
|
|
projectAlarmRuleListItemVO.setRelListItemList(query);
|
|
|
result.add(projectAlarmRuleListItemVO);
|
|
@@ -138,7 +138,9 @@ public class ProjectAlarmRuleController {
|
|
|
result.add(projectAlarmRuleListItemVO);
|
|
|
}
|
|
|
}
|
|
|
- List<ProjectAlarmRuleListItemVO> resultList = projectAlarmRuleService.pageBySubList(result, size, page);
|
|
|
+ List<ProjectAlarmRuleListItemVO> collect = result.stream().sorted(Comparator.comparing(ProjectAlarmRuleListItemVO::getAlarmItemName,
|
|
|
+ Collator.getInstance(Locale.CHINA))).collect(Collectors.toList());
|
|
|
+ List<ProjectAlarmRuleListItemVO> resultList = projectAlarmRuleService.pageBySubList(collect, size, page);
|
|
|
return ResultHelper.multi(resultList, result.size());
|
|
|
}
|
|
|
}
|