Commit ba107156 authored by chenzhao's avatar chenzhao

修改代码

parent 6dde8a18
...@@ -621,7 +621,7 @@ public class MonitorFanIdxController extends BaseController { ...@@ -621,7 +621,7 @@ public class MonitorFanIdxController extends BaseController {
for (String column : columnList) { for (String column : columnList) {
Double result = commonServiceImpl.getTotalByIndicatior(gatewayId, column); Double result = commonServiceImpl.getTotalByIndicatior(gatewayId, column);
columnMap.put(column, String.format("%.2f",result)); columnMap.put(column, String.format("%.4f",result * CommonConstans.pvGenPoweActor));
} }
for (String column : syLists) { for (String column : syLists) {
Double result = commonServiceImpl.getNumByIndicatior(boosterGatewayId, column); Double result = commonServiceImpl.getNumByIndicatior(boosterGatewayId, column);
...@@ -991,10 +991,9 @@ public class MonitorFanIdxController extends BaseController { ...@@ -991,10 +991,9 @@ public class MonitorFanIdxController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "设备发电量 ") @ApiOperation(value = "设备发电量 ")
@GetMapping("/equipGeneratingCapacity") @GetMapping("/equipGeneratingCapacity")
public IPage<Map<String,Object>> equipGeneratingCapacity(@RequestParam(value = "current") int current, public ResponseModel<IPage<Map<String,Object>>> equipGeneratingCapacity(@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size, @RequestParam(value = "size") int size,
@RequestParam(value = "stationId") String stationId) { @RequestParam(value = "stationId") String stationId) {
Page<ESEquipments> result = new Page<ESEquipments>(current, size);
StationBasic stationBasic = stationBasicMapper.selectById(stationId); StationBasic stationBasic = stationBasicMapper.selectById(stationId);
String gatewayId = stationBasic.getFanGatewayId(); String gatewayId = stationBasic.getFanGatewayId();
...@@ -1069,7 +1068,8 @@ public class MonitorFanIdxController extends BaseController { ...@@ -1069,7 +1068,8 @@ public class MonitorFanIdxController extends BaseController {
page.setSize(999); page.setSize(999);
page.setCurrent(1); page.setCurrent(1);
page.setRecords(esEquipmentsMap); page.setRecords(esEquipmentsMap);
return page;
return ResponseHelper.buildResponse(page);
// //构建平台数据 // //构建平台数据
// DataGridMock DataGridMock = new DataGridMock(current, esEquipmentsMap.size(), false, current, esEquipmentsMap); // DataGridMock DataGridMock = new DataGridMock(current, esEquipmentsMap.size(), false, current, esEquipmentsMap);
// ColModel colModelEquipmentNumber = new ColModel("name", "name", "设备名称", "设备名称", "dataGrid", "name"); // ColModel colModelEquipmentNumber = new ColModel("name", "name", "设备名称", "设备名称", "dataGrid", "name");
...@@ -1157,7 +1157,7 @@ public class MonitorFanIdxController extends BaseController { ...@@ -1157,7 +1157,7 @@ public class MonitorFanIdxController extends BaseController {
} catch (MqttException e) { } catch (MqttException e) {
} }
return ResponseHelper.buildResponse(map); return CommonResponseUtil.success();
} }
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
...@@ -1185,7 +1185,7 @@ public class MonitorFanIdxController extends BaseController { ...@@ -1185,7 +1185,7 @@ public class MonitorFanIdxController extends BaseController {
} }
} }
return ResponseHelper.buildResponse(map); return CommonResponseUtil.success();
} }
......
/*
package com.yeejoin.amos.boot.module.jxiop.biz.service.impl; package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
...@@ -50,9 +51,11 @@ public class MonitoringServiceIMQTTmpl { ...@@ -50,9 +51,11 @@ public class MonitoringServiceIMQTTmpl {
private final String fanCurrentDataCron = "0 0/1 * * * *"; private final String fanCurrentDataCron = "0 0/1 * * * *";
@Value("${fan.statuts.stattuspath}") @Value("${fan.statuts.stattuspath}")
private String fanStatusImagePathPrefix; private String fanStatusImagePathPrefix;
/**
* 场站mapper
*/ */
/**
* 场站mapper
*//*
@Autowired @Autowired
StationBasicMapper stationBasicMapper; StationBasicMapper stationBasicMapper;
...@@ -74,9 +77,11 @@ public class MonitoringServiceIMQTTmpl { ...@@ -74,9 +77,11 @@ public class MonitoringServiceIMQTTmpl {
private MonitorFanIndicatorMapper monitorFanIndicatorregionMapper; private MonitorFanIndicatorMapper monitorFanIndicatorregionMapper;
/**
* 社会贡献定时消息发送 1分钟推送一次
*/ */
/**
* 社会贡献定时消息发送 1分钟推送一次
*//*
@Scheduled(cron = totalSocialContributionCron) @Scheduled(cron = totalSocialContributionCron)
public void getTotalSocialContribution() { public void getTotalSocialContribution() {
Page<SocialContributionDto> socialContributionDtoPage = new Page<SocialContributionDto>(); Page<SocialContributionDto> socialContributionDtoPage = new Page<SocialContributionDto>();
...@@ -97,12 +102,14 @@ public class MonitoringServiceIMQTTmpl { ...@@ -97,12 +102,14 @@ public class MonitoringServiceIMQTTmpl {
SocialContributionDto toner = new SocialContributionDto(); SocialContributionDto toner = new SocialContributionDto();
//二氧化硫贡献度 //二氧化硫贡献度
SocialContributionDto so2 = new SocialContributionDto(); SocialContributionDto so2 = new SocialContributionDto();
/** 社会贡献原始计算公式,后边的数据已经经过处理 */
/** 社会贡献原始计算公式,后边的数据已经经过处理
//二氧化碳计算公式 *10000*832/10000/1000/1000 //二氧化碳计算公式 *10000*832/10000/1000/1000
//标准煤计算公式 *10000*304.9/10000/1000/1000 //标准煤计算公式 *10000*304.9/10000/1000/1000
//碳粉尘计算公式 *10000*0.032/1000/1000 //碳粉尘计算公式 *10000*0.032/1000/1000
//二氧化硫计算公式 =A2*10000*0.16/1000/1000 //二氧化硫计算公式 =A2*10000*0.16/1000/1000
*/ *//*
co2.setUnit("二氧化碳减排量(万t)"); co2.setUnit("二氧化碳减排量(万t)");
co2.setTitle(String.format("%.2f",totalSocialContribution.get() * 0.000832)); co2.setTitle(String.format("%.2f",totalSocialContribution.get() * 0.000832));
socialContributionDtoList.add(co2); socialContributionDtoList.add(co2);
...@@ -126,9 +133,11 @@ public class MonitoringServiceIMQTTmpl { ...@@ -126,9 +133,11 @@ public class MonitoringServiceIMQTTmpl {
} }
} }
/**
* 区域实时数据消息推送-30s一次
*/ */
/**
* 区域实时数据消息推送-30s一次
*//*
// @Scheduled(cron = completionOfPowerIndicatorsByProvinceNameCron) // @Scheduled(cron = completionOfPowerIndicatorsByProvinceNameCron)
public void getCompletionOfPowerIndicatorsByProvinceName() { public void getCompletionOfPowerIndicatorsByProvinceName() {
Page<SocialContributionDto> socialContributionDtoPage = new Page<SocialContributionDto>(); Page<SocialContributionDto> socialContributionDtoPage = new Page<SocialContributionDto>();
...@@ -183,9 +192,11 @@ public class MonitoringServiceIMQTTmpl { ...@@ -183,9 +192,11 @@ public class MonitoringServiceIMQTTmpl {
} }
} }
/**
* 实时推送-风电站风机状态统计数据
*/ */
/**
* 实时推送-风电站风机状态统计数据
*//*
@Scheduled(cron = fanStatusStatisticsCron) @Scheduled(cron = fanStatusStatisticsCron)
public void getFanStatusStatistics() { public void getFanStatusStatistics() {
List<StationBasic> stationBasicList = stationBasicMapper.selectList(new QueryWrapper<StationBasic>().isNotNull("sequence_nbr").eq("station_type", "FDZ")); List<StationBasic> stationBasicList = stationBasicMapper.selectList(new QueryWrapper<StationBasic>().isNotNull("sequence_nbr").eq("station_type", "FDZ"));
...@@ -206,9 +217,11 @@ public class MonitoringServiceIMQTTmpl { ...@@ -206,9 +217,11 @@ public class MonitoringServiceIMQTTmpl {
}); });
} }
/**
* 实时推送-风电站风场总概览
*/ */
/**
* 实时推送-风电站风场总概览
*//*
@Scheduled(cron = fanstationOverviewCron) @Scheduled(cron = fanstationOverviewCron)
public void getFanstationOverview() { public void getFanstationOverview() {
List<StationBasic> stationBasicList = stationBasicMapper.selectList(new QueryWrapper<StationBasic>().isNotNull("sequence_nbr").eq("station_type", "FDZ")); List<StationBasic> stationBasicList = stationBasicMapper.selectList(new QueryWrapper<StationBasic>().isNotNull("sequence_nbr").eq("station_type", "FDZ"));
...@@ -269,9 +282,11 @@ public class MonitoringServiceIMQTTmpl { ...@@ -269,9 +282,11 @@ public class MonitoringServiceIMQTTmpl {
}); });
} }
/**
* 实时推送-场站功率曲线总概览
*/ */
/**
* 实时推送-场站功率曲线总概览
*//*
@Scheduled(cron = fanStationPowerBightCron) @Scheduled(cron = fanStationPowerBightCron)
public void getFanStationPowerBight() { public void getFanStationPowerBight() {
List<StationBasic> stationBasicList = stationBasicMapper.selectList(new QueryWrapper<StationBasic>().isNotNull("sequence_nbr").eq("station_type", "FDZ")); List<StationBasic> stationBasicList = stationBasicMapper.selectList(new QueryWrapper<StationBasic>().isNotNull("sequence_nbr").eq("station_type", "FDZ"));
...@@ -287,9 +302,11 @@ public class MonitoringServiceIMQTTmpl { ...@@ -287,9 +302,11 @@ public class MonitoringServiceIMQTTmpl {
}); });
} }
/**
* 实时同送-获取各场站的风机列表
*/ */
/**
* 实时同送-获取各场站的风机列表
*//*
@Scheduled(cron = fanStatusListCron) @Scheduled(cron = fanStatusListCron)
public void getFanStatusList() { public void getFanStatusList() {
List<StationBasic> stationBasicList = stationBasicMapper.selectList(new QueryWrapper<StationBasic>().isNotNull("sequence_nbr").eq("station_type", "FDZ")); List<StationBasic> stationBasicList = stationBasicMapper.selectList(new QueryWrapper<StationBasic>().isNotNull("sequence_nbr").eq("station_type", "FDZ"));
...@@ -394,11 +411,13 @@ public class MonitoringServiceIMQTTmpl { ...@@ -394,11 +411,13 @@ public class MonitoringServiceIMQTTmpl {
}); });
} }
/** */
/**
* @param collect 根据网关id查询出来的数据 * @param collect 根据网关id查询出来的数据
* @return 加工后风机实时运行状态图列表数据 * @return 加工后风机实时运行状态图列表数据
* @deprecated 根据查询出来的风机状态返回风机的状态图片 * @deprecated 根据查询出来的风机状态返回风机的状态图片
*/ *//*
public IPage<HashMap<String, String>> getFanStatusListImages(List<IndexDto> collect) { public IPage<HashMap<String, String>> getFanStatusListImages(List<IndexDto> collect) {
IPage<HashMap<String, String>> page = new Page<>(); IPage<HashMap<String, String>> page = new Page<>();
HashMap<String, String> hashMap = new HashMap<>(); HashMap<String, String> hashMap = new HashMap<>();
...@@ -460,3 +479,4 @@ public class MonitoringServiceIMQTTmpl { ...@@ -460,3 +479,4 @@ public class MonitoringServiceIMQTTmpl {
} }
} }
} }
*/
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