Commit 0bd4732c authored by zhangkuo's avatar zhangkuo

修复 18305 【web端-设备列表】逆变器列表,所属电站取值不对的问题,

修复 18339 【web端-数据概览】整体发电情况看不到数据(固德威)的问题
parent 5e8bb0dd
......@@ -3,10 +3,12 @@ package com.yeejoin.amos.api.householdapi.face.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.google.common.collect.Lists;
import com.qiniu.util.Json;
import com.yeejoin.amos.api.householdapi.Utils.GoodWeRequestUtil;
......@@ -388,6 +390,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
requestInfo.put("page_index", 1);
requestInfo.put("page_size", 100);
requestInfo.put("pw_id", stationId);
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().eq("third_station_id", stationId).orderByDesc("create_time"));
String requstParam = JSON.toJSONString(requestInfo);
List<GoodWeINverterDetailDto> inverterDetailDtoList = goodWeRequestUtil.getResPonse(GoodWeConstant.queryInventerUrl
, GoodWeConstant.requestPost, requstParam, GoodWeConstant.resovleRule_data_list, GoodWeINverterDetailDto.class);
......@@ -407,7 +410,9 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
jpInverter.setCapacity(goodWeINverterDetailDto.getIt_capacity());
jpInverter.setThirdStationId(goodWeINverterDetailDto.getPw_id());
jpInverter.setThirdCode(PVProducerInfoEnum.GDW.getCode());
jpInverter.setStationName(goodWeINverterDetailDto.getIt_name());
if(ObjectUtil.isNotEmpty(jpStation) && StringUtils.isNotEmpty(jpStation.getName())){
jpInverter.setStationName(jpStation.getName());
}
jpInverter.setRecDate(new Date());
if (!org.springframework.util.ObjectUtils.isEmpty(jpInverter.getSequenceNbr())) {
jpInverterMapper.updateById(jpInverter);
......
......@@ -475,7 +475,7 @@ public class JpStationController extends BaseController {
JpStationDto jpStation = jpStationMapper.getCountJpStationdata(reviewDto);
List<Map<String, Object>> powerRatio = new ArrayList<>();
Map<String, Object> map = new HashMap<>();
if (jpStation != null && jpStation.getRealTimePower() != null && jpStation.getRatedPower() != null && jpStation.getRatedPower() > 0) {
if (jpStation != null && jpStation.getRealTimePower() != null && jpStation.getCapacity() != null && jpStation.getCapacity() > 0) {
map.put("value", String.format("%.4f", jpStation.getRealTimePower() / (jpStation.getCapacity() * FDXSS)));
} else {
jpStation = new JpStationDto();
......
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