Commit 738bd27c authored by yangyang's avatar yangyang

碳银数据对接

parent a49f604e
...@@ -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;
......
...@@ -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);
} }
} }
......
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