Commit 95dc2b0b authored by caotao's avatar caotao

场站新增邮箱字段对原有逻辑进行调整

parent dd8b45e3
......@@ -56,11 +56,11 @@ public class HouseholdTestController {
@ApiOperation(httpMethod = "POST", value = "锦浪云", notes = "锦浪云")
public void golangnew() throws IOException {
// goLangDataAcquisitionService.stationList();
goLangDataAcquisitionService.stationDetail();
// goLangDataAcquisitionService.stationDetail();
// goLangDataAcquisitionService.collectorList();
//// goLangDataAcquisitionService.inverterList();
// goLangDataAcquisitionService.collectorDetail();
// goLangDataAcquisitionService.inverterDetail();
goLangDataAcquisitionService.collectorDetail();
goLangDataAcquisitionService.inverterDetail();
// goLangDataAcquisitionService.inverAlramInfo();
}
}
......@@ -215,5 +215,6 @@ public class JpStation implements Serializable {
private Double monthPowerPse; // 月用电量
@TableField("year_power_use")
private Double yearPowerUse; // 年用电量
@TableField("email")
private String email; // 电子邮箱
}
......@@ -146,7 +146,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
jpStation.setLatitude(golangStationDetail.getLatitude());
jpStation.setUserName(golangStationDetail.getUsername());
jpStation.setUserPhone(String.valueOf(golangStationDetail.getUsermobile()));
jpStation.setStationContact(StrUtil.nullToDefault(String.valueOf(golangStationDetail.getMobile()), ""));
jpStation.setStationContact(String.valueOf(golangStationDetail.getMobile()).toLowerCase().replace("null",""));
jpStation.setModuleCount(Math.toIntExact(golangStationDetail.getModule()));
//并网类型
jpStation.setOnGridType(GoLangConstant.stationStaus.get(String.valueOf(golangStationDetail.getState())));
......@@ -162,6 +162,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
jpStation.setYearIncome(golangStationDetail.getYearincome());
jpStation.setCumulativeIncome(golangStationDetail.getAllincome());
jpStation.setArea(golangStationDetail.getRegionstr());
jpStation.setEmail(golangStationDetail.getUseremail());
if (!ObjectUtils.isEmpty(jpStation.getSequenceNbr())) {
jpStationMapper.updateById(jpStation);
} else {
......@@ -327,15 +328,15 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
@Scheduled(cron = dataRequstScheduled)
@Override
public void inverterDetail() {
List<Long> inverterIds = golangInverterListMapper.getInverterIds();
for (int i = 0; i < inverterIds.size(); i++) {
List<String> inverterSns = golangInverterListMapper.getInverterSns();
for (int i = 0; i < inverterSns.size(); i++) {
try {
TimeUnit.SECONDS.sleep(1);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
HashMap<String, Object> requestInfo = new HashMap<>();
requestInfo.put("id", Long.valueOf(inverterIds.get(i)));
requestInfo.put("sn", inverterSns.get(i));
String requestParaminfo = JSON.toJSONString(requestInfo);
List<InverterDetailDto> result = golangRequestUtil.getResPonse(GoLangConstant.inverterDetailUrl,
GoLangConstant.requestPost,
......@@ -432,7 +433,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
hygfjpInverterElecHistory.setWAcCurrent(inverterDetailDto.getIAc3());
hygfjpInverterElecHistory.setUAcVoltage(inverterDetailDto.getUAc1());
hygfjpInverterElecHistory.setVAcVoltage(inverterDetailDto.getUAc2());
hygfjpInverterElecHistory.setUAcVoltage(inverterDetailDto.getUAc3());
hygfjpInverterElecHistory.setWAcVoltage(inverterDetailDto.getUAc3());
hygfjpInverterElecHistory.setThirdCode(PVProducerInfoEnum.JLY.getCode());
hygfjpInverterElecHistory.setTime(System.currentTimeMillis());
hygfjpInverterElecHistoryMapper.insert(hygfjpInverterElecHistory);
......
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