Commit e7d645ea authored by yangyang's avatar yangyang

首航同步采集器详情/逆变器 打印日志

parent 3da06c2a
...@@ -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);
// 电站报表 // 电站报表
// 户用场站日发电量 // 户用场站日发电量
......
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