Commit 4da056ab authored by chenzhao's avatar chenzhao

Merge branch 'developer' of http://39.98.45.134:8090/moa/amos-boot-biz into developer

parents bff77d38 d827a2f9
...@@ -15,7 +15,6 @@ import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvPointProcessVariableCl ...@@ -15,7 +15,6 @@ import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvPointProcessVariableCl
import com.yeejoin.amos.boot.module.jxiop.biz.entity.*; import com.yeejoin.amos.boot.module.jxiop.biz.entity.*;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.*; import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.*;
import com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper; import com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper;
import com.yeejoin.amos.component.influxdb.InfluxdbUtil;
import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.query.QueryBuilders;
...@@ -109,8 +108,7 @@ public class CommonServiceImpl { ...@@ -109,8 +108,7 @@ public class CommonServiceImpl {
private IdxBizFanPointVarCorrelationMapper idxBizFanPointVarCorrelationMapper; private IdxBizFanPointVarCorrelationMapper idxBizFanPointVarCorrelationMapper;
@Autowired @Autowired
private IdxBizPvPointVarCorrelationMapper idxBizPvPointVarCorrelationMapper; private IdxBizPvPointVarCorrelationMapper idxBizPvPointVarCorrelationMapper;
@Autowired
private InfluxdbUtil influxdbUtil;
@Autowired @Autowired
private IndicatorDataMapper indicatorDataMapper; private IndicatorDataMapper indicatorDataMapper;
@Autowired @Autowired
......
...@@ -727,6 +727,7 @@ ...@@ -727,6 +727,7 @@
SUBARRAY SUBARRAY
) )
) a ) a
where equipmentName is not null and equipmentName != ''
GROUP BY GROUP BY
a.equipmentName a.equipmentName
</select> </select>
...@@ -763,6 +764,7 @@ ...@@ -763,6 +764,7 @@
EQUIPMENT_NAME EQUIPMENT_NAME
) )
) a ) a
where subSystem is not null and subSystem != ''
GROUP BY GROUP BY
a.subSystem a.subSystem
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
AND a.recDate >= concat(#{startDate}, ' 00:00:00') AND a.recDate >= concat(#{startDate}, ' 00:00:00')
</if> </if>
<if test="endDate != '' and endDate != null"> <if test="endDate != '' and endDate != null">
AND concat(#{startDate}, ' 59:59:59') >= a.recDate AND concat(#{startDate}, ' 23:59:59') >= a.recDate
</if> </if>
</where> </where>
order by warningName DESC, recDate DESC order by warningName DESC, recDate DESC
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
AND a.recDate >= concat(#{startDate}, ' 00:00:00') AND a.recDate >= concat(#{startDate}, ' 00:00:00')
</if> </if>
<if test="endDate != '' and endDate != null"> <if test="endDate != '' and endDate != null">
AND concat(#{startDate}, ' 59:59:59') >= a.recDate AND concat(#{startDate}, ' 23:59:59') >= a.recDate
</if> </if>
</where>) b </where>) b
</select> </select>
......
...@@ -68,13 +68,14 @@ public class DeviceController extends BaseController { ...@@ -68,13 +68,14 @@ public class DeviceController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "箱变开关数据") @ApiOperation(value = "箱变开关数据")
@GetMapping("/xbdata") @GetMapping("/xbdata")
public ResponseModel<Map<String,Object>> xbdata( public ResponseModel< Page< Map<String,Object>> > xbdata(
@RequestParam(value = "frontModule") String frontModule, @RequestParam(value = "frontModule") String frontModule,
@RequestParam(value = "stationBasicId") String stationBasicId, @RequestParam(value = "stationBasicId") String stationBasicId,
@RequestParam(value = "equipmentNumber" , required = false ) String equipmentNumber) { @RequestParam(value = "equipmentNumber" , required = false ) String equipmentNumber,
long current, long size) {
StationBasic stationBasic = stationBasicMapper.selectById(stationBasicId); StationBasic stationBasic = stationBasicMapper.selectById(stationBasicId);
String fanGatewayId = stationBasic.getFanGatewayId(); String fanGatewayId = stationBasic.getFanGatewayId();
Map<String,Object> resultsData=monitorFanIndicatorImpl.getxbdata( frontModule, fanGatewayId, equipmentNumber); Page< Map<String,Object>> resultsData=monitorFanIndicatorImpl.getxbdata( frontModule, fanGatewayId, equipmentNumber,current,size);
return ResponseHelper.buildResponse(resultsData); return ResponseHelper.buildResponse(resultsData);
} }
......
...@@ -569,8 +569,8 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -569,8 +569,8 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
List<String> axisData = new ArrayList<>(); List<String> axisData = new ArrayList<>();
Integer size = indicatorDataListWindSpeed.size() > indicatorDataListActivePower.size() ? indicatorDataListActivePower.size() : indicatorDataListWindSpeed.size(); Integer size = indicatorDataListWindSpeed.size() > indicatorDataListActivePower.size() ? indicatorDataListActivePower.size() : indicatorDataListWindSpeed.size();
for (int i = 0; i < size; i++) { for (int i = 0; i < size; i++) {
windSpeeds.add(indicatorDataListWindSpeed.get(i).getValue()); windSpeeds.add(String.format(CommonConstans.Twodecimalplaces,Double.valueOf(indicatorDataListWindSpeed.get(i).getValue())));
activePowers.add(indicatorDataListActivePower.get(i).getValue()); activePowers.add(String.format(CommonConstans.Twodecimalplaces,Double.valueOf(indicatorDataListActivePower.get(i).getValue())));
axisData.add(DateUtil.format(indicatorDataListWindSpeed.get(i).getCreatedTime(), "HH:mm")); axisData.add(DateUtil.format(indicatorDataListWindSpeed.get(i).getCreatedTime(), "HH:mm"));
} }
List<Map<String, Object>> seriesData = new ArrayList<>(); List<Map<String, Object>> seriesData = new ArrayList<>();
...@@ -1015,7 +1015,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -1015,7 +1015,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
result.setTotal(statusMaps.size()); result.setTotal(statusMaps.size());
i += 1; i += 1;
try { try {
emqKeeper.getMqttClient().publish(stationId + "/fj/group" + i, JSON.toJSONString(result).getBytes(), 0, false); emqKeeper.getMqttClient().publish(stationId + "/fj/group" + i, JSON.toJSONString(result).getBytes(), 1, true);
} catch (MqttException e) { } catch (MqttException e) {
log.info("消息发送失败"); log.info("消息发送失败");
e.printStackTrace(); e.printStackTrace();
...@@ -1598,7 +1598,8 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -1598,7 +1598,8 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
queryCondtion.put(CommonConstans.QueryStringValueKeyword, Arrays.asList("true")); queryCondtion.put(CommonConstans.QueryStringValueKeyword, Arrays.asList("true"));
List<ESEquipments> list1 = commonServiceImpl.getListDataByCondtions(queryCondtion, null, ESEquipments.class); List<ESEquipments> list1 = commonServiceImpl.getListDataByCondtions(queryCondtion, null, ESEquipments.class);
resultMap.put("status", AlarmDesc.getCode(list1.get(0).getEquipmentIndexName())); resultMap.put("status", AlarmDesc.getCode(list1.get(0).getEquipmentIndexName()));
queryEquipNum = "#" + Integer.parseInt(equipNames[0]); // queryEquipNum = "#" + Integer.parseInt(equipNames[0]);
queryEquipNum = equipNames[0] + equipNames[1]+1;
} }
} else { } else {
queryEquipNum = "#" + Integer.parseInt(equipmentNumber) + ""; queryEquipNum = "#" + Integer.parseInt(equipmentNumber) + "";
...@@ -2145,7 +2146,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -2145,7 +2146,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
} }
public Map<String,Object> getxbdata(String frontModule, String fanGatewayId, String equipmentNumber) { public Page< Map<String,Object>> getxbdata(String frontModule, String fanGatewayId, String equipmentNumber,long current, long size) {
Map<String, List<String>> queryCodntion = new HashMap<>(); Map<String, List<String>> queryCodntion = new HashMap<>();
queryCodntion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(fanGatewayId)); queryCodntion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(fanGatewayId));
queryCodntion.put(CommonConstans.QueryStringEquipmentIndexName, Arrays.asList("高压开关合闸", "QF1低压断路器合闸", "QF2低压断路器合闸")); queryCodntion.put(CommonConstans.QueryStringEquipmentIndexName, Arrays.asList("高压开关合闸", "QF1低压断路器合闸", "QF2低压断路器合闸"));
...@@ -2161,7 +2162,12 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -2161,7 +2162,12 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
map.put("2_dy","true".equals(alldatum.getValue())?true:false); map.put("2_dy","true".equals(alldatum.getValue())?true:false);
} }
} }
return map; Page< Map<String,Object>> page = new Page<>(current, size);
List<Map<String,Object>> collect=new ArrayList();
collect.add(map);
page.setTotal(1);
page.setRecords(collect);
return page;
} }
......
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