Commit ba9877fc authored by wujiang's avatar wujiang

修改采集统一

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