Commit ad6c3cfa authored by tangwei's avatar tangwei

拉取代码

parents 4b796e0f e240e2be
......@@ -332,6 +332,22 @@ public class MonitorFanIdxController extends BaseController {
@ApiOperation(value = "模拟量接口Api")
@GetMapping("/getAnalogQuantity")
public ResponseModel<IPage<Map<String, Object>>> getAnalogQuantity(@RequestParam(value = "stationId")String stationId,String frontModule) {
StationBasic stationBasic = stationBasicMapper.selectById(stationId);
String gatewayId = stationBasic.getBoosterGatewayId();
List<Map<String, Object>> statusMonitoring = monitorFanIndicator.getAnalogQuantity(gatewayId ,frontModule);
IPage<Map<String,Object>> result = new Page<>();
result.setRecords(statusMonitoring);
result.setCurrent(1);
result.setTotal(statusMonitoring.size());
return ResponseHelper.buildResponse(result);
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "集电线路图左侧 集电线列表")
@GetMapping("/jdTree")
......@@ -506,4 +522,15 @@ public class MonitorFanIdxController extends BaseController {
}
return CommonResponseUtil.success();
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "1#主变油温")
@GetMapping("/zbyw")
public ResponseModel<Map<String,Object>> getYwData(@RequestParam(value = "stationId") String stationId) {
StationBasic stationBasic = stationBasicMapper.selectById(stationId);
String gatewayId = stationBasic.getBoosterGatewayId();
Map<String,Object> resultsData = monitorFanIndicatorImpl.getyw( gatewayId);
return ResponseHelper.buildResponse(resultsData);
}
}
......@@ -680,6 +680,21 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
public List<Map<String,Object>> getAnalogQuantity (String gatewayId,String frontModule){
String sql = " SELECT displayName , value as state FROM indicators_"+gatewayId+" WHERE frontModule =~/"+frontModule+"/ and systemType = '模拟量'";
List<IndicatorsDto> listData = influxDButils.getListData(sql, IndicatorsDto.class);
List<Map<String,Object>> statusMaps = new ArrayList<>();
for (IndicatorsDto listDatum : listData) {
Map<String, Object> statusMap = new HashMap<>();
statusMap.put("title1",listDatum.getValue()+" "+listDatum.getUnit());
statusMap.put("title",listDatum.getDisplayName());
statusMaps.add(statusMap);
}
return statusMaps;
}
public void getStatusJDX(String gatewayId, String dataName, String werks,String stationId){
String sql = " SELECT * FROM indicators_"+gatewayId+" WHERE frontModule =~/集电线路/ and systemType = '光字牌'";
......@@ -1125,5 +1140,31 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
return photoUrls;
}
public HashMap<String, Object> getyw(String gatewayId){
HashMap<String, Object> resultMap = new HashMap<>();
String zb1Sql = String.format("SELECT * FROM \"indicators_%s\" WHERE frontModule = '1主变' and systemType = '模拟量' and (displayName = '档位' or displayName = '油面温1' or displayName = '油面温2' or displayName = '绕组温度' ) ", gatewayId);
List<IndicatorsDto> zb1SqlData = influxDButils.getListData(zb1Sql, IndicatorsDto.class);
// TODO: 2023/7/14 数据未整理 ---> 油面温1 油面温2 绕组温度
resultMap.put("value1", "0.0");
resultMap.put("value2", "0.0");
resultMap.put("value3", "0.0");
resultMap.put("value4", "0.0");
zb1SqlData.forEach(item -> {
if ("档位".equals(item.getDisplayName())) {
resultMap.put("value4", item.getValue());
} else if ("油面温1".equals(item.getDisplayName())) {
resultMap.put("value1", item.getValue());
} else if ("油面温2".equals(item.getDisplayName())) {
resultMap.put("value2", item.getValue());
} else if ("绕组温度".equals(item.getDisplayName())) {
resultMap.put("value3", item.getValue());
}
});
return resultMap;
}
}
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