Commit 008562e3 authored by zhangsen's avatar zhangsen

bug修改

parent 94c86e6c
...@@ -12,10 +12,10 @@ public enum ElectricQuantity { ...@@ -12,10 +12,10 @@ public enum ElectricQuantity {
FXYGZ("反向总有功","fxzyg"), FXYGZ("反向总有功","fxzyg"),
ZXWGZ("正向总无功","zxzwg"), ZXWGZ("正向总无功","zxzwg"),
FXWGZ("反向总无功","fxzwg"), FXWGZ("反向总无功","fxzwg"),
ZGXWG("总感性无功","zgxwg"), ZGXWG("总感性无功电度","zgxwg"),
ZZXYG("总正向有功","zzxwg"), ZZXYG("总正向有功电度","zzxwg"),
ZRXWG("总容性无功","zrxwg"), ZRXWG("总容性无功电度","zrxwg"),
ZFXYG("总反向有功","zfxyg"); ZFXYG("总反向有功电度","zfxyg");
......
...@@ -19,7 +19,9 @@ import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.SjglZsjZsbtzMapper; ...@@ -19,7 +19,9 @@ import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.SjglZsjZsbtzMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.repository.ESEquipmentsRepository; import com.yeejoin.amos.boot.module.jxiop.biz.repository.ESEquipmentsRepository;
import com.yeejoin.amos.component.influxdb.InfluxdbUtil; import com.yeejoin.amos.component.influxdb.InfluxdbUtil;
import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.MatchPhraseQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.index.query.WildcardQueryBuilder;
import org.elasticsearch.search.aggregations.Aggregation; import org.elasticsearch.search.aggregations.Aggregation;
import org.elasticsearch.search.aggregations.AggregationBuilders; import org.elasticsearch.search.aggregations.AggregationBuilders;
import org.elasticsearch.search.aggregations.Aggregations; import org.elasticsearch.search.aggregations.Aggregations;
...@@ -455,7 +457,8 @@ public class CommonServiceImpl { ...@@ -455,7 +457,8 @@ public class CommonServiceImpl {
} }
if (!ObjectUtils.isEmpty(shouldQuerCondtion)) { if (!ObjectUtils.isEmpty(shouldQuerCondtion)) {
for (String key : shouldQuerCondtion.keySet()) { for (String key : shouldQuerCondtion.keySet()) {
queryBuilder.should(QueryBuilders.wildcardQuery(key, shouldQuerCondtion.get(key))); // queryBuilder.should(QueryBuilders.wildcardQuery(key, shouldQuerCondtion.get(key)));
queryBuilder.must(QueryBuilders.matchQuery(key,shouldQuerCondtion.get(key)));
} }
} }
......
...@@ -990,9 +990,10 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -990,9 +990,10 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
public ResultsData getElectricQuantityList(int current, int size, String gatewayId, String stationType) { public ResultsData getElectricQuantityList(int current, int size, String gatewayId, String stationType) {
Map<String, List<String>> queryCondtion = new HashMap<>(); Map<String, List<String>> queryCondtion = new HashMap<>();
queryCondtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(gatewayId)); queryCondtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(gatewayId));
queryCondtion.put(CommonConstans.QueryStringFrontMoudle, Arrays.asList("电量表计")); // queryCondtion.put(CommonConstans.QueryStringFrontMoudle, Arrays.asList("电量表计"));
Map<String, List<String>> notMustQueryCondtion = new HashMap<>(); Map<String, String> shouldCondition = new HashMap<>();
List<ESEquipments> esEquipmentsList = commonServiceImpl.getListDataByCondtions(queryCondtion, null, ESEquipments.class); shouldCondition.put( null != stationType ? "frontModule" : CommonConstans.QueryStringFrontMoudle, "电量表计");
List<ESEquipments> esEquipmentsList = commonServiceImpl.getListDataByCondtions(queryCondtion, shouldCondition, ESEquipments.class);
List<ESEquipments> windSqlList = esEquipmentsList.stream().filter(esEquipments -> !esEquipments.getDisplayName().equals("") && !esEquipments.getDisplayName().equals("检修状态")).collect(Collectors.toList()); List<ESEquipments> windSqlList = esEquipmentsList.stream().filter(esEquipments -> !esEquipments.getDisplayName().equals("") && !esEquipments.getDisplayName().equals("检修状态")).collect(Collectors.toList());
Map<String, List<ESEquipments>> maps = windSqlList.stream().collect(Collectors.groupingBy(ESEquipments::getSystemType)); Map<String, List<ESEquipments>> maps = windSqlList.stream().collect(Collectors.groupingBy(ESEquipments::getSystemType));
ArrayList<Map<String, String>> resultList = new ArrayList<>(); ArrayList<Map<String, String>> resultList = new ArrayList<>();
...@@ -1024,10 +1025,10 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -1024,10 +1025,10 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
ColModel colModelEventTime = new ColModel("fxzwg", "fxzwg", "反向总无功", "反向总无功", "dataGrid", "fxzwg"); ColModel colModelEventTime = new ColModel("fxzwg", "fxzwg", "反向总无功", "反向总无功", "dataGrid", "fxzwg");
if (null != stationType) { if (null != stationType) {
colModelEventMovement = new ColModel("name", "name", "测量点", "测量点", "dataGrid", "name"); colModelEventMovement = new ColModel("name", "name", "测量点", "测量点", "dataGrid", "name");
colModelStationName = new ColModel("zgxwg", "zgxwg", "总感性无功", "总感性无功", "dataGrid", "zgxwg"); colModelStationName = new ColModel("zgxwg", "zgxwg", "正向无功总", "正向无功总", "dataGrid", "zgxwg");
colModelEventDesc = new ColModel("zzxwg", "zzxwg", "总正向有功", "总正向有功", "dataGrid", "zzxwg"); colModelEventDesc = new ColModel("zzxwg", "zzxwg", "正向有功总", "正向有功总", "dataGrid", "zzxwg");
colModelAlarmGroupName = new ColModel("zrxwg", "zrxwg", "总容性无功", "总容性无功", "dataGrid", "zrxwg"); colModelAlarmGroupName = new ColModel("zrxwg", "zrxwg", "反向无功总", "反向无功总", "dataGrid", "zrxwg");
colModelEventTime = new ColModel("zfxyg", "zfxyg", "总反向有功", "总反向有功", "dataGrid", "zfxyg"); colModelEventTime = new ColModel("zfxyg", "zfxyg", "反向有功总", "反向有功总", "dataGrid", "zfxyg");
} }
List<ColModel> listColModel = Arrays.asList(colModelEventMovement, colModelStationName, colModelEventDesc, colModelAlarmGroupName, colModelEventTime); List<ColModel> listColModel = Arrays.asList(colModelEventMovement, colModelStationName, colModelEventDesc, colModelAlarmGroupName, colModelEventTime);
ResultsData resultsData = new ResultsData(DataGridMock, listColModel); ResultsData resultsData = new ResultsData(DataGridMock, listColModel);
......
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