Commit 886f2158 authored by lilongyang's avatar lilongyang

Merge branch 'developer' of http://36.40.66.175:5000/moa/jxdj_zx/amos-boot-zx-biz into developer

parents e5c2a2ae 919ce2c8
...@@ -21,6 +21,10 @@ import lombok.NoArgsConstructor; ...@@ -21,6 +21,10 @@ import lombok.NoArgsConstructor;
@TableName (value = "tanyin_alram_info", autoResultMap = true) @TableName (value = "tanyin_alram_info", autoResultMap = true)
public class TanYinAlramInfo { public class TanYinAlramInfo {
@ApiModelProperty ("唯一序号")
@TableField ("id")
private String id;
@ApiModelProperty ("项目编号") @ApiModelProperty ("项目编号")
@TableField ("project_no") @TableField ("project_no")
private String projectNo; private String projectNo;
......
...@@ -821,6 +821,8 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -821,6 +821,8 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
} else { } else {
if (StringUtils.isNotEmpty(jpInverter.getSnCode().trim())) { if (StringUtils.isNotEmpty(jpInverter.getSnCode().trim())) {
jpInverterMapper.insert(jpInverter); jpInverterMapper.insert(jpInverter);
} else {
logger.warn("-------科士达同步采集器详情/逆变器 snCode 为空!------- jpInverter => " + JSON.toJSONString(jpInverter));
} }
} }
......
...@@ -14,6 +14,7 @@ import java.util.stream.Stream; ...@@ -14,6 +14,7 @@ import java.util.stream.Stream;
import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
...@@ -69,6 +70,7 @@ import cn.hutool.core.date.DateUtil; ...@@ -69,6 +70,7 @@ import cn.hutool.core.date.DateUtil;
import fastjson.JSON; import fastjson.JSON;
@Service @Service
@Slf4j
public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionService { public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionService {
@Autowired @Autowired
private SofarRequestUtil requestUtil; private SofarRequestUtil requestUtil;
...@@ -497,15 +499,15 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ ...@@ -497,15 +499,15 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
// tdJpStation.setCreatedTime(System.currentTimeMillis()); // tdJpStation.setCreatedTime(System.currentTimeMillis());
// tdJpStationMapper.insert(tdJpStation); // tdJpStationMapper.insert(tdJpStation);
// } // }
Map<String, Object> requestInfo3 = new HashMap<>(); // Map<String, Object> requestInfo3 = new HashMap<>();
requestInfo3.put("stationId", sunlightDto.getId()); // requestInfo3.put("stationId", sunlightDto.getId());
requestInfo3.put("deviceType", "COLLECTOR"); // requestInfo3.put("deviceType", "COLLECTOR");
String param3 = JSON.toJSONString(requestInfo3); // String param3 = JSON.toJSONString(requestInfo3);
List<SofarInverter> jsonObject3 = requestUtil.getResPonse(SoFarConstant.nbqlist, // List<SofarInverter> jsonObject3 = requestUtil.getResPonse(SoFarConstant.nbqlist,
SoFarConstant.requestPost, param3, SoFarConstant.deviceListItems, SofarInverter.class); // SoFarConstant.requestPost, param3, SoFarConstant.deviceListItems, SofarInverter.class);
// 逆变器信信息 // 逆变器信信息
this.inverterList(jsonObject2, jpStation, maps); this.inverterList(jsonObject2, jpStation, maps);
this.collectorDetail(jsonObject3, jpStation); // this.collectorDetail(jsonObject3, jpStation);
// 报警列表无法获取ruleId了 首航更新接口了 // 报警列表无法获取ruleId了 首航更新接口了
this.inverAlramInfo(jpStation); this.inverAlramInfo(jpStation);
} }
...@@ -516,6 +518,15 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ ...@@ -516,6 +518,15 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
jpStationMapper.insert(jpStation); jpStationMapper.insert(jpStation);
} }
} }
// 获取采集器信息
Map<String, Object> requestInfo3 = new HashMap<>();
requestInfo3.put("stationId", sunlightDto.getId());
requestInfo3.put("deviceType", "COLLECTOR");
String param3 = JSON.toJSONString(requestInfo3);
List<SofarInverter> jsonObject3 = requestUtil.getResPonse(SoFarConstant.nbqlist,
SoFarConstant.requestPost, param3, SoFarConstant.deviceListItems, SofarInverter.class);
// 逆变器信信息
this.collectorDetail(jsonObject3, jpStation);
// 电站报表 // 电站报表
// 户用场站日发电量 // 户用场站日发电量
......
...@@ -178,7 +178,7 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe ...@@ -178,7 +178,7 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
@Override @Override
public void customerInfoList() { public void customerInfoList() {
try { try {
String startDate = LocalDate.now().minusMonths(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); String startDate = LocalDate.now().minusDays(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
String endDate = LocalDate.now().plusDays(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); String endDate = LocalDate.now().plusDays(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
log.info("-------碳银同步项目信息开始: {} ------- ", sdf.format(new Date())); log.info("-------碳银同步项目信息开始: {} ------- ", sdf.format(new Date()));
Map<String, Object> params = MapBuilder.<String, Object>create() Map<String, Object> params = MapBuilder.<String, Object>create()
...@@ -465,7 +465,7 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe ...@@ -465,7 +465,7 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
if (jpInverter == null || StringUtils.isEmpty(jpInverter.getSnCode())) { if (jpInverter == null || StringUtils.isEmpty(jpInverter.getSnCode())) {
return; return;
} }
String startDate = LocalDate.now().minusYears(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); String startDate = LocalDate.now().minusWeeks(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
String endDate = LocalDate.now().plusDays(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); String endDate = LocalDate.now().plusDays(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
Map<String, Object> params = MapBuilder.<String, Object>create() Map<String, Object> params = MapBuilder.<String, Object>create()
.put("sn", jpInverter.getSnCode()) .put("sn", jpInverter.getSnCode())
...@@ -483,13 +483,19 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe ...@@ -483,13 +483,19 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
tanYinAlramInfo.setCreateTime(System.currentTimeMillis()); tanYinAlramInfo.setCreateTime(System.currentTimeMillis());
tanYinAlramInfoMapper.insert(tanYinAlramInfo); tanYinAlramInfoMapper.insert(tanYinAlramInfo);
HYGFJPInverterWarn hygfjpInverterWarn = new HYGFJPInverterWarn(); HYGFJPInverterWarn hygfjpInverterWarn = hygfjpInverterWarnMapper
.selectOne(new QueryWrapper<HYGFJPInverterWarn>().eq("sn_code", tanYinAlramInfo.getSn())
.eq("warn_id", tanYinAlramInfo.getId())
.eq("third_station_id", String.valueOf(tanYinAlramInfo.getProjectNo())));
if (com.baomidou.mybatisplus.core.toolkit.ObjectUtils.isEmpty(hygfjpInverterWarn)) {
hygfjpInverterWarn = new HYGFJPInverterWarn();
}
// 做查询 // 做查询
hygfjpInverterWarn.setTime(System.currentTimeMillis()); hygfjpInverterWarn.setTime(System.currentTimeMillis());
hygfjpInverterWarn.setSnCode(tanYinAlramInfo.getSn()); hygfjpInverterWarn.setSnCode(tanYinAlramInfo.getSn());
hygfjpInverterWarn.setThirdStationId(jpStation.getThirdStationId()); hygfjpInverterWarn.setThirdStationId(jpStation.getThirdStationId());
hygfjpInverterWarn.setLevel(tanYinAlramInfo.getLevel()); hygfjpInverterWarn.setLevel(tanYinAlramInfo.getLevel());
hygfjpInverterWarn.setWarnId(tanYinAlramInfo.getCode()); hygfjpInverterWarn.setWarnId(tanYinAlramInfo.getId());
hygfjpInverterWarn.setAmosCompanyCode(jpStation.getAmosCompanyCode()); hygfjpInverterWarn.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpInverterWarn.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); hygfjpInverterWarn.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpInverterWarn.setStationName(jpStation.getName()); hygfjpInverterWarn.setStationName(jpStation.getName());
...@@ -827,7 +833,6 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe ...@@ -827,7 +833,6 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
tdHYGFInverterTotalGenerateMapper.insert(tdHYGFInverterTotalGenerate); tdHYGFInverterTotalGenerateMapper.insert(tdHYGFInverterTotalGenerate);
} }
inverAlramInfo(jpInverter, jpStation);
} }
} }
......
...@@ -102,6 +102,7 @@ public class GFDZJCServiceImpl implements IJXDZService { ...@@ -102,6 +102,7 @@ public class GFDZJCServiceImpl implements IJXDZService {
pvStationDataVO.setOnGridEnergyMonth(data.getDouble("on_grid_energy_month")); pvStationDataVO.setOnGridEnergyMonth(data.getDouble("on_grid_energy_month"));
pvStationDataVO.setOnGridEnergyYear(data.getDouble("on_grid_energy_year")/10000); pvStationDataVO.setOnGridEnergyYear(data.getDouble("on_grid_energy_year")/10000);
pvStationDataVO.setOnGridEnergyGross(data.getDouble("on_grid_energy")/10000); pvStationDataVO.setOnGridEnergyGross(data.getDouble("on_grid_energy")/10000);
pvStationDataVO.setGenerationGross(data.getDouble("generating_capacity")/10000);
} }
} }
} }
...@@ -148,9 +149,6 @@ public class GFDZJCServiceImpl implements IJXDZService { ...@@ -148,9 +149,6 @@ public class GFDZJCServiceImpl implements IJXDZService {
if ("年发电量".equals(pointName)) { if ("年发电量".equals(pointName)) {
pvStationDataVO.setGenerationYear(jsonObject.getDouble("value")); pvStationDataVO.setGenerationYear(jsonObject.getDouble("value"));
} }
if ("累计发电量".equals(pointName)) {
pvStationDataVO.setGenerationGross(jsonObject.getDouble("value"));
}
if ("利用小时数".equals(pointName)) { if ("利用小时数".equals(pointName)) {
pvStationDataVO.setUtilizeHours(jsonObject.getDouble("value")); pvStationDataVO.setUtilizeHours(jsonObject.getDouble("value"));
} }
......
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