Commit d5c9dad1 authored by caotao's avatar caotao

光伏总概览相关信息显示错误修改

parent a8f0c56f
...@@ -77,7 +77,7 @@ public class MonitorFanIdxController extends BaseController { ...@@ -77,7 +77,7 @@ public class MonitorFanIdxController extends BaseController {
MonitorFanIndicatorMapper monitorFanIndicatorMapper; MonitorFanIndicatorMapper monitorFanIndicatorMapper;
@Autowired @Autowired
EmqKeeper emqKeeper; EmqKeeper emqKeeper;
// @Autowired // @Autowired
// InfluxdbUtil influxdbUtil; // InfluxdbUtil influxdbUtil;
@Value("${fan.statuts.stattuspath}") @Value("${fan.statuts.stattuspath}")
private String fanStatusImagePathPrefix; private String fanStatusImagePathPrefix;
...@@ -523,14 +523,12 @@ public class MonitorFanIdxController extends BaseController { ...@@ -523,14 +523,12 @@ public class MonitorFanIdxController extends BaseController {
} else if (type.equals("1")) { } else if (type.equals("1")) {
StationBasic stationBasic = stationBasicMapper.selectById(stationId); StationBasic stationBasic = stationBasicMapper.selectById(stationId);
String fanGatewayId = stationBasic.getFanGatewayId(); String fanGatewayId = stationBasic.getFanGatewayId();
if("FDZ".equals(stationBasic.getStationType())) if ("FDZ".equals(stationBasic.getStationType())) {
{ resultsData = monitorFanIndicatorImpl.getNationWideInfo(current, size, fanGatewayId, null);
resultsData = monitorFanIndicatorImpl.getNationWideInfo(current, size, fanGatewayId, null); } else {
}else resultsData = equipAlarmEventServiceImpl.getEventByEquipIndex(fanGatewayId, current, size, null, null);
{
resultsData = equipAlarmEventServiceImpl.getEventByEquipIndex(fanGatewayId, current, size, null, null);
} }
} }
return ResponseHelper.buildResponse(resultsData); return ResponseHelper.buildResponse(resultsData);
} }
...@@ -637,8 +635,7 @@ public class MonitorFanIdxController extends BaseController { ...@@ -637,8 +635,7 @@ public class MonitorFanIdxController extends BaseController {
queryCondtion.put(CommonConstans.QueryStringEquipmentIndexName, Arrays.asList("南瑞光差保护_313P", "WTX-801_25_WTX-801_总辐射累计", "WTX-801_25_WTX-801_总辐射", "313光差保护_总反向有功电度")); queryCondtion.put(CommonConstans.QueryStringEquipmentIndexName, Arrays.asList("南瑞光差保护_313P", "WTX-801_25_WTX-801_总辐射累计", "WTX-801_25_WTX-801_总辐射", "313光差保护_总反向有功电度"));
queryCondtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(stationBasic.getBoosterGatewayId())); queryCondtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(stationBasic.getBoosterGatewayId()));
List<ESEquipments> result1 = commonService.getListDataByCondtions(queryCondtion, null, ESEquipments.class); List<ESEquipments> result1 = commonService.getListDataByCondtions(queryCondtion, null, ESEquipments.class);
columnMap.put("有功功率", String.format("%.2f", commonService.getSumByEquipmentIndxName(result1, "南瑞光差保护_313P") * CommonConstans.kwToMv * 10)); columnMap.put("有功功率", String.format("%.2f", commonService.getSumByEquipmentIndxName(result1, "南瑞光差保护_313P") * CommonConstans.kwToMv));
String num = monitorFanIndicator.getEquipCount(gatewayId, "GF"); String num = monitorFanIndicator.getEquipCount(gatewayId, "GF");
columnMap.put("风机台数", num); columnMap.put("风机台数", num);
Double capacityl = commonService.getStationCapactityByStationWerks(stationBasic.getStationNumber()); Double capacityl = commonService.getStationCapactityByStationWerks(stationBasic.getStationNumber());
...@@ -676,10 +673,10 @@ public class MonitorFanIdxController extends BaseController { ...@@ -676,10 +673,10 @@ public class MonitorFanIdxController extends BaseController {
//综合效率 = 发电量/理论发电量 //综合效率 = 发电量/理论发电量
//理论发电量 = 峰值日照数 * 总装机容量 //理论发电量 = 峰值日照数 * 总装机容量
//峰值日照数 = 累计辐照度/3.6 //峰值日照数 = 累计辐照度/3.6
Double powerAll = indicatorDataMapper.selectLastDataOfPower("313光差保护_总反向有功电度", boosterGatewayId).getValueF() * CommonConstans.kwToMv * 0.028; Double todayPower = Double.valueOf(columnMap.get(CommonConstans.taiHeGenIndicatorDay).toString());
Double total = commonService.getSumByEquipmentIndxName(result1, "WTX-801_25_WTX-801_总辐射累计"); Double total = commonService.getSumByEquipmentIndxName(result1, "WTX-801_25_WTX-801_总辐射累计");
if (powerAll > 0 && total > 0) { if (todayPower > 0 && total > 0) {
Double overallEfficiency = powerAll / ((total / 3.6) * capacityl); Double overallEfficiency = todayPower*CommonConstans.wkwhToMv / ((total / 3.6) * capacityl);
data9.put("title", String.format("%.2f", overallEfficiency * 100) + "%");//综合效率 data9.put("title", String.format("%.2f", overallEfficiency * 100) + "%");//综合效率
} else { } else {
data9.put("title", "0.00%");//综合效率 data9.put("title", "0.00%");//综合效率
...@@ -690,7 +687,6 @@ public class MonitorFanIdxController extends BaseController { ...@@ -690,7 +687,6 @@ public class MonitorFanIdxController extends BaseController {
result.setCurrent(1); result.setCurrent(1);
result.setTotal(objects.size()); result.setTotal(objects.size());
return ResponseHelper.buildResponse(result); return ResponseHelper.buildResponse(result);
} }
...@@ -863,8 +859,8 @@ public class MonitorFanIdxController extends BaseController { ...@@ -863,8 +859,8 @@ public class MonitorFanIdxController extends BaseController {
public ResponseModel<ResultsData> getEventByEquipIndex(@RequestParam(value = "current") int current, public ResponseModel<ResultsData> getEventByEquipIndex(@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,
@RequestParam(value = "equipIndex",required = false) String equipIndex, @RequestParam(value = "equipIndex", required = false) String equipIndex,
@RequestParam(value = "frontModule",required = false) String frontModule) { @RequestParam(value = "frontModule", required = false) String frontModule) {
StationBasic stationBasic = stationBasicMapper.selectById(stationId); StationBasic stationBasic = stationBasicMapper.selectById(stationId);
String gatewayId = stationBasic.getFanGatewayId(); String gatewayId = stationBasic.getFanGatewayId();
ResultsData resultsData = equipAlarmEventService.getEventByEquipIndex(gatewayId, current, size, equipIndex, frontModule); ResultsData resultsData = equipAlarmEventService.getEventByEquipIndex(gatewayId, current, size, equipIndex, frontModule);
......
...@@ -11,17 +11,17 @@ import java.util.List; ...@@ -11,17 +11,17 @@ import java.util.List;
@Repository @Repository
public interface IndicatorDataMapper extends BaseMapper<IndicatorData> { public interface IndicatorDataMapper extends BaseMapper<IndicatorData> {
@Select("select `value`, created_time, `value_f` as valueF from iot_data.indicator_data where equipment_index_name =#{equipmentIndexName} and equipment_number = #{equipmentNumber} and ts >= #{startTime} and ts <= #{endTime} and gateway_id =#{gatewayId}") @Select("select `value`, created_time, `value_f` as valueF from iot_data.indicator_data where equipment_index_name =#{equipmentIndexName} and equipment_number = #{equipmentNumber} and created_time >= #{startTime} and created_time <= #{endTime} and gateway_id =#{gatewayId}")
List<IndicatorData> selectDataByequipmentIndexNameAndtimeAndEquipmentNumber(@Param("equipmentIndexName") String equipmentIndexName, @Param("equipmentNumber") String equipmentNumber, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("gatewayId") String gatewayId); List<IndicatorData> selectDataByequipmentIndexNameAndtimeAndEquipmentNumber(@Param("equipmentIndexName") String equipmentIndexName, @Param("equipmentNumber") String equipmentNumber, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("gatewayId") String gatewayId);
@Select("select `value`, created_time, `value_f` as valueF, equipment_index_name from iot_data.indicator_data where equipment_index_name like '%路电流%' and equipment_number = #{equipmentNumber} and ts >= #{startTime} and ts <= #{endTime} and gateway_id =#{gatewayId}") @Select("select `value`, created_time, `value_f` as valueF, equipment_index_name from iot_data.indicator_data where equipment_index_name like '%路电流%' and equipment_number = #{equipmentNumber} and created_time >= #{startTime} and created_time <= #{endTime} and gateway_id =#{gatewayId}")
List<IndicatorData> selectDataByequipmentIndexNameAndtimeAndEquipmentNumberPv(@Param("equipmentNumber") String equipmentNumber, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("gatewayId") String gatewayId); List<IndicatorData> selectDataByequipmentIndexNameAndtimeAndEquipmentNumberPv(@Param("equipmentNumber") String equipmentNumber, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("gatewayId") String gatewayId);
@Select("select last(`value_f`) as `value_f`,created_time from iot_data.indicator_data where equipment_index_name =#{equipmentIndexName} and gateway_id=#{gatewayId} ") @Select("select last(`value_f`) as `value_f`,created_time from iot_data.indicator_data where equipment_index_name =#{equipmentIndexName} and gateway_id=#{gatewayId} ")
IndicatorData selectLastDataOfPower(@Param("equipmentIndexName") String equipmentIndexName, @Param("gatewayId") String gatewayId); IndicatorData selectLastDataOfPower(@Param("equipmentIndexName") String equipmentIndexName, @Param("gatewayId") String gatewayId);
@Select("select last(`value_f`) as `value_f`,created_time from iot_data.indicator_data where equipment_index_name =#{equipmentIndexName} and gateway_id=#{gatewayId} and created_time <= #{endTime} ")
@Select("select `value`, created_time, `value_f` as valueF from iot_data.indicator_data where equipment_index_name =#{equipmentIndexName} and ts >= #{startTime} and ts <= #{endTime} and gateway_id =#{gatewayId}") IndicatorData selectLastDataOfPower(@Param("equipmentIndexName") String equipmentIndexName, @Param("gatewayId") String gatewayId,@Param("endTime") String endTime);
@Select("select `value`, created_time, `value_f` as valueF from iot_data.indicator_data where equipment_index_name =#{equipmentIndexName} and created_time >= #{startTime} and created_time <= #{endTime} and gateway_id =#{gatewayId}")
List<IndicatorData> selectDataByequipmentIndexNameAndtime(@Param("equipmentIndexName") String equipmentIndexName, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("gatewayId") String gatewayId); List<IndicatorData> selectDataByequipmentIndexNameAndtime(@Param("equipmentIndexName") String equipmentIndexName, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("gatewayId") String gatewayId);
} }
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