Commit ba9877fc authored by wujiang's avatar wujiang

修改采集统一

parent 4bdfe47e
...@@ -8,8 +8,12 @@ import java.io.Serializable; ...@@ -8,8 +8,12 @@ import java.io.Serializable;
@Data @Data
@TableName(value = "td_hygf_station_power_day",autoResultMap = true) @TableName(value = "td_hygf_station_power_day",autoResultMap = true)
public class HYGFJPDayPower implements Serializable { public class HYGFJPDayPower implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private Long createdTime; private Long createdTime;
private String tationId; private String thirdStationId;
private String hour; private String hour;
private String yearMonthDay; private String yearMonthDay;
private Double power; private Double power;
......
...@@ -44,7 +44,7 @@ public class HYGFJPDayPowerImpl implements AscriptionService { ...@@ -44,7 +44,7 @@ public class HYGFJPDayPowerImpl implements AscriptionService {
if(hygfjpDayPower!=null&&!hygfjpDayPower.isEmpty()){ if(hygfjpDayPower!=null&&!hygfjpDayPower.isEmpty()){
for (HYGFJPDayPower dayPower : hygfjpDayPower) { for (HYGFJPDayPower dayPower : hygfjpDayPower) {
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>(). JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_station_id", dayPower.getTationId())); eq("third_station_id", dayPower.getThirdStationId()));
if(jpStation!=null) { if(jpStation!=null) {
dayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode()); dayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode());
dayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); dayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
......
...@@ -260,11 +260,11 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -260,11 +260,11 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
hygfjpStationPowerHistoryMapper.insert(hygfjpStationPowerHistory); hygfjpStationPowerHistoryMapper.insert(hygfjpStationPowerHistory);
HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper.selectOne(new QueryWrapper<HYGFJPDayPower>() HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper.selectOne(new QueryWrapper<HYGFJPDayPower>()
.eq("tation_id", stationIds.get(i)).eq("year_month_day", today).eq("hour", hour)); .eq("third_station_id", stationIds.get(i)).eq("year_month_day", today).eq("hour", hour));
if (ObjectUtils.isEmpty(hygfjpDayPower)) { if (ObjectUtils.isEmpty(hygfjpDayPower)) {
hygfjpDayPower = new HYGFJPDayPower(); hygfjpDayPower = new HYGFJPDayPower();
} }
hygfjpDayPower.setTationId(stationIds.get(i)); hygfjpDayPower.setThirdStationId(stationIds.get(i));
hygfjpDayPower.setHour(hour); hygfjpDayPower.setHour(hour);
hygfjpDayPower.setYearMonthDay(today); hygfjpDayPower.setYearMonthDay(today);
hygfjpDayPower.setPower(golangStationDetail.getPower()); hygfjpDayPower.setPower(golangStationDetail.getPower());
......
...@@ -205,11 +205,11 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -205,11 +205,11 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
hygfjpStationPowerHistoryMapper.insert(hygfjpStationPowerHistory); hygfjpStationPowerHistoryMapper.insert(hygfjpStationPowerHistory);
HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper.selectOne(new QueryWrapper<HYGFJPDayPower>() HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper.selectOne(new QueryWrapper<HYGFJPDayPower>()
.eq("tation_id", jpStation.getThirdStationId()).eq("year_month_day", today).eq("hour", hour)); .eq("third_station_id", jpStation.getThirdStationId()).eq("year_month_day", today).eq("hour", hour));
if (org.springframework.util.ObjectUtils.isEmpty(hygfjpDayPower)) { if (org.springframework.util.ObjectUtils.isEmpty(hygfjpDayPower)) {
hygfjpDayPower = new HYGFJPDayPower(); hygfjpDayPower = new HYGFJPDayPower();
} }
hygfjpDayPower.setTationId(goodWeStationList.getPowerstation_id()); hygfjpDayPower.setThirdStationId(goodWeStationList.getPowerstation_id());
hygfjpDayPower.setHour(hour); hygfjpDayPower.setHour(hour);
hygfjpDayPower.setYearMonthDay(today); hygfjpDayPower.setYearMonthDay(today);
hygfjpDayPower.setPower(jpStation.getRealTimePower()); hygfjpDayPower.setPower(jpStation.getRealTimePower());
......
...@@ -366,14 +366,14 @@ public class ImasterDataServiceImpl implements ImasterDataService { ...@@ -366,14 +366,14 @@ public class ImasterDataServiceImpl implements ImasterDataService {
hygfjpStationPowerHistoryMapper.insert(hygfjpStationPowerHistory); hygfjpStationPowerHistoryMapper.insert(hygfjpStationPowerHistory);
HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper.selectOne( HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper.selectOne(
new QueryWrapper<HYGFJPDayPower>(). new QueryWrapper<HYGFJPDayPower>().
eq("tation_id", imasterStationList.getPlantCode()). eq("third_station_id", imasterStationList.getPlantCode()).
eq("year_month_day", today). eq("year_month_day", today).
eq("hour", hour) eq("hour", hour)
); );
if (ObjectUtils.isEmpty(hygfjpDayPower)) { if (ObjectUtils.isEmpty(hygfjpDayPower)) {
hygfjpDayPower = new HYGFJPDayPower(); hygfjpDayPower = new HYGFJPDayPower();
} }
hygfjpDayPower.setTationId(imasterStationList.getPlantCode()); hygfjpDayPower.setThirdStationId(imasterStationList.getPlantCode());
hygfjpDayPower.setHour(hour); hygfjpDayPower.setHour(hour);
hygfjpDayPower.setYearMonthDay(today); hygfjpDayPower.setYearMonthDay(today);
hygfjpDayPower.setPower(active_power); hygfjpDayPower.setPower(active_power);
......
...@@ -286,12 +286,12 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -286,12 +286,12 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
hygfjpStationPowerHistoryMapper.insert(hygfjpStationPowerHistory); hygfjpStationPowerHistoryMapper.insert(hygfjpStationPowerHistory);
HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper
.selectOne(new QueryWrapper<HYGFJPDayPower>().eq("tation_id", ksolarStation.getStationId()) .selectOne(new QueryWrapper<HYGFJPDayPower>().eq("third_station_id", ksolarStation.getStationId())
.eq("year_month_day", today).eq("hour", hour)); .eq("year_month_day", today).eq("hour", hour));
if (ObjectUtils.isEmpty(hygfjpDayPower)) { if (ObjectUtils.isEmpty(hygfjpDayPower)) {
hygfjpDayPower = new HYGFJPDayPower(); hygfjpDayPower = new HYGFJPDayPower();
} }
hygfjpDayPower.setTationId(ksolarStation.getStationId()); hygfjpDayPower.setThirdStationId(ksolarStation.getStationId());
hygfjpDayPower.setHour(hour); hygfjpDayPower.setHour(hour);
hygfjpDayPower.setYearMonthDay(today); hygfjpDayPower.setYearMonthDay(today);
hygfjpDayPower.setPower(ksolarStation.getPowerInter()); hygfjpDayPower.setPower(ksolarStation.getPowerInter());
......
...@@ -442,12 +442,12 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ ...@@ -442,12 +442,12 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
String today = DateUtil.today(); String today = DateUtil.today();
String hour = new Date().getHours() + ":00"; String hour = new Date().getHours() + ":00";
HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper.selectOne( HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper.selectOne(
new QueryWrapper<HYGFJPDayPower>().eq("tation_id", sunlightDto.getId().toString()) new QueryWrapper<HYGFJPDayPower>().eq("third_station_id", sunlightDto.getId().toString())
.eq("year_month_day", today).eq("hour", hour)); .eq("year_month_day", today).eq("hour", hour));
if (ObjectUtils.isEmpty(hygfjpDayPower)) { if (ObjectUtils.isEmpty(hygfjpDayPower)) {
hygfjpDayPower = new HYGFJPDayPower(); hygfjpDayPower = new HYGFJPDayPower();
} }
hygfjpDayPower.setTationId(sunlightDto.getId().toString()); hygfjpDayPower.setThirdStationId(sunlightDto.getId().toString());
hygfjpDayPower.setHour(hour); hygfjpDayPower.setHour(hour);
hygfjpDayPower.setYearMonthDay(today); hygfjpDayPower.setYearMonthDay(today);
hygfjpDayPower.setPower(jpStation.getRealTimePower()); hygfjpDayPower.setPower(jpStation.getRealTimePower());
......
...@@ -348,12 +348,12 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -348,12 +348,12 @@ public class SunlightServiceImpl implements SunlightService {
String today = DateUtil.today(); String today = DateUtil.today();
String hour = new Date().getHours() + ":00"; String hour = new Date().getHours() + ":00";
HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper
.selectOne(new QueryWrapper<HYGFJPDayPower>().eq("tation_id", sunlightDto.getPs_id().toString()) .selectOne(new QueryWrapper<HYGFJPDayPower>().eq("third_station_id", sunlightDto.getPs_id().toString())
.eq("year_month_day", today).eq("hour", hour)); .eq("year_month_day", today).eq("hour", hour));
if (ObjectUtils.isEmpty(hygfjpDayPower)) { if (ObjectUtils.isEmpty(hygfjpDayPower)) {
hygfjpDayPower = new HYGFJPDayPower(); hygfjpDayPower = new HYGFJPDayPower();
} }
hygfjpDayPower.setTationId(sunlightDto.getPs_id().toString()); hygfjpDayPower.setThirdStationId(sunlightDto.getPs_id().toString());
hygfjpDayPower.setHour(hour); hygfjpDayPower.setHour(hour);
hygfjpDayPower.setYearMonthDay(today); hygfjpDayPower.setYearMonthDay(today);
hygfjpDayPower.setPower(jpStation.getRealTimePower()); hygfjpDayPower.setPower(jpStation.getRealTimePower());
......
...@@ -17,7 +17,7 @@ import java.time.format.DateTimeFormatter; ...@@ -17,7 +17,7 @@ import java.time.format.DateTimeFormatter;
*/ */
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
@TableName("td_hygf_all_power") @TableName("td_hygf_station_power_all")
public class AllPower { public class AllPower {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -26,7 +26,7 @@ public class AllPower { ...@@ -26,7 +26,7 @@ public class AllPower {
/** /**
* 第三方电站id * 第三方电站id
*/ */
@TableField("tation_id") @TableField("third_station_id")
private String thirdStationId; private String thirdStationId;
/** /**
......
...@@ -13,7 +13,7 @@ import org.springframework.data.annotation.Id; ...@@ -13,7 +13,7 @@ import org.springframework.data.annotation.Id;
*/ */
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
@TableName("td_hygf_station_day_generate") @TableName("td_hygf_station_generate_month")
public class DayGenerate { public class DayGenerate {
@Id @Id
private Long createdTime; private Long createdTime;
......
...@@ -14,7 +14,7 @@ import lombok.experimental.Accessors; ...@@ -14,7 +14,7 @@ import lombok.experimental.Accessors;
*/ */
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
@TableName("td_hygf_day_power") @TableName("td_hygf_station_power_day")
public class DayPower { public class DayPower {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -24,7 +24,7 @@ public class DayPower { ...@@ -24,7 +24,7 @@ public class DayPower {
/** /**
* 第三方电站id * 第三方电站id
*/ */
@TableField("tation_id") @TableField("third_station_id")
private String thirdStationId; private String thirdStationId;
/** /**
......
...@@ -13,7 +13,7 @@ import org.springframework.data.annotation.Id; ...@@ -13,7 +13,7 @@ import org.springframework.data.annotation.Id;
*/ */
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
@TableName("td_hygf_station_month_generate") @TableName("td_hygf_station_generate_year")
public class MonthGenerate { public class MonthGenerate {
@Id @Id
private Long createdTime; private Long createdTime;
......
...@@ -17,7 +17,7 @@ import java.time.format.DateTimeFormatter; ...@@ -17,7 +17,7 @@ import java.time.format.DateTimeFormatter;
*/ */
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
@TableName("td_hygf_month_power") @TableName("td_hygf_station_power_month")
public class MonthPower { public class MonthPower {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -32,7 +32,7 @@ public class MonthPower { ...@@ -32,7 +32,7 @@ public class MonthPower {
/** /**
* 第三方电站id * 第三方电站id
*/ */
@TableField("tation_id") @TableField("third_station_id")
private String thirdStationId; private String thirdStationId;
/** /**
......
...@@ -13,7 +13,7 @@ import org.springframework.data.annotation.Id; ...@@ -13,7 +13,7 @@ import org.springframework.data.annotation.Id;
*/ */
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
@TableName("td_hygf_station_year_generate") @TableName("td_hygf_station_generate_all")
public class YearGenerate { public class YearGenerate {
@Id @Id
private Long createdTime; private Long createdTime;
......
...@@ -17,7 +17,7 @@ import java.time.format.DateTimeFormatter; ...@@ -17,7 +17,7 @@ import java.time.format.DateTimeFormatter;
*/ */
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
@TableName("td_hygf_year_power") @TableName("td_hygf_station_power_year")
public class YearPower { public class YearPower {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -26,7 +26,7 @@ public class YearPower { ...@@ -26,7 +26,7 @@ public class YearPower {
/** /**
* 第三方电站id * 第三方电站id
*/ */
@TableField("tation_id") @TableField("third_station_id")
private String thirdStationId; private String thirdStationId;
/** /**
......
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