Commit f28d21ee authored by tangwei's avatar tangwei

修改逆变器容量

parent e32752ed
...@@ -167,7 +167,7 @@ public class JpInverter implements Serializable { ...@@ -167,7 +167,7 @@ public class JpInverter implements Serializable {
* 装机容量 * 装机容量
*/ */
@TableField("capacity") @TableField("capacity")
private Integer capacity; private Double capacity;
/** /**
* 累计发电量 * 累计发电量
......
...@@ -380,7 +380,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -380,7 +380,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
jpInverter.setVersion(inverterDetailDto.getVersion()); jpInverter.setVersion(inverterDetailDto.getVersion());
jpInverter.setGenerationHours(String.valueOf(inverterDetailDto.getFullHour())); jpInverter.setGenerationHours(String.valueOf(inverterDetailDto.getFullHour()));
jpInverter.setId(String.valueOf(inverterDetailDto.getId())); jpInverter.setId(String.valueOf(inverterDetailDto.getId()));
jpInverter.setCapacity(inverterDetailDto.getPower().intValue()); jpInverter.setCapacity(inverterDetailDto.getPower());
jpInverter.setThirdStationId(String.valueOf(inverterDetailDto.getStationId())); jpInverter.setThirdStationId(String.valueOf(inverterDetailDto.getStationId()));
jpInverter.setThirdCode(PVProducerInfoEnum.JLY.getCode()); jpInverter.setThirdCode(PVProducerInfoEnum.JLY.getCode());
jpInverter.setStationName(inverterDetailDto.getStationName()); jpInverter.setStationName(inverterDetailDto.getStationName());
......
...@@ -24,6 +24,7 @@ import com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.*; ...@@ -24,6 +24,7 @@ import com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.*;
import com.yeejoin.amos.api.householdapi.face.service.KSolarDataAcquisitionService; import com.yeejoin.amos.api.householdapi.face.service.KSolarDataAcquisitionService;
import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum; import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum;
import fastjson.JSON; import fastjson.JSON;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
...@@ -416,6 +417,11 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -416,6 +417,11 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
@Scheduled(cron = "${dataRequstScheduled.keshida}") @Scheduled(cron = "${dataRequstScheduled.keshida}")
@Override @Override
public void collectorDetail() { public void collectorDetail() {
List<JpCollector> jpCollectorlist = jpCollectorMapper.selectList(new QueryWrapper<JpCollector>().
eq("third_code", PVProducerInfoEnum.KSOLAR.getCode()));
List<String> collectIds = ksolarStationCollectListMapper.getCollectIds(); List<String> collectIds = ksolarStationCollectListMapper.getCollectIds();
if (!CollectionUtils.isEmpty(collectIds)) { if (!CollectionUtils.isEmpty(collectIds)) {
collectIds.forEach(collectId -> { collectIds.forEach(collectId -> {
...@@ -459,7 +465,15 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -459,7 +465,15 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
// jpInverter.setGenerationHours(String.valueOf(inverterDetailDto.getFullHour())); // jpInverter.setGenerationHours(String.valueOf(inverterDetailDto.getFullHour()));
// 装机容量 // 装机容量
// jpInverter.setCapacity(); // jpInverter.setCapacity();
if(jpCollectorlist!=null&&jpCollectorlist.size()>0){
for (JpCollector jpCollector : jpCollectorlist) {
if(jpCollector.getSnCode().equals(ksolarStationCollectList.getCollectId())){
jpInverter.setCapacity( KSolarConstant.Capacity.get(StringUtils.lowerCase(jpCollector.getName())));
}
}
}
jpInverter.setSnCode(ksolarStationCollectData.getInverterId()); jpInverter.setSnCode(ksolarStationCollectData.getInverterId());
jpInverter.setId(ksolarStationCollectData.getInverterId()); jpInverter.setId(ksolarStationCollectData.getInverterId());
......
...@@ -87,7 +87,7 @@ public class JpInverterDto extends BaseDto { ...@@ -87,7 +87,7 @@ public class JpInverterDto extends BaseDto {
private String thirdStationId; private String thirdStationId;
@ApiModelProperty(value = "装机容量") @ApiModelProperty(value = "装机容量")
private Integer capacity; private Double capacity;
@ApiModelProperty(value = "累计发电量") @ApiModelProperty(value = "累计发电量")
private Double totalPowerGeneration; private Double totalPowerGeneration;
......
...@@ -152,7 +152,7 @@ public class JpInverter extends BaseEntity { ...@@ -152,7 +152,7 @@ public class JpInverter extends BaseEntity {
* 装机容量 * 装机容量
*/ */
@TableField("capacity") @TableField("capacity")
private Integer capacity; private Double capacity;
/** /**
* 累计发电量 * 累计发电量
......
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