1.调整导出逻辑

2.增加导出导入日志管理页面
3.增加配置表
This commit is contained in:
2026-07-14 17:19:05 +08:00
parent e83c92ec66
commit d27cf48571
131 changed files with 5056 additions and 6428 deletions

View File

@@ -0,0 +1,10 @@
package com.njcn.relational.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.relational.pojo.po.SGConPlantB;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface SGConPlantBMapper extends BaseMapper<SGConPlantB> {
}

View File

@@ -0,0 +1,10 @@
package com.njcn.relational.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.relational.pojo.po.SGConSubstationB;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface SGConSubstationBMapper extends BaseMapper<SGConSubstationB> {
}

View File

@@ -0,0 +1,11 @@
package com.njcn.relational.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.relational.pojo.po.SGConSubstationBind;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface SGConSubstationCMapper extends BaseMapper<SGConSubstationBind> {
}

View File

@@ -0,0 +1,9 @@
package com.njcn.relational.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.relational.pojo.po.SyncTableLogs;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface SyncTableLogsMapper extends BaseMapper<SyncTableLogs> {
}

View File

@@ -49,4 +49,37 @@ public class DcloudSyncQuery {
query.setPropertyList("D5000_ID,D5000_NAME,DCLOUD_ID,DCLOUD_NAME,DCLOUD_VOLTAGELEVEL,OWNER,STATUS,UPDATE_TIME");
return query;
}
public static DcloudSyncQuery buildPlantChangZhan(String filter, String orderStr, Integer pageIndex, Integer pageSize) {
DcloudSyncQuery query = new DcloudSyncQuery();
query.setTableName("SG_CON_PLANT_B");
query.setFilter(filter);
query.setOrderStr(orderStr);
query.setPageIndex(pageIndex);
query.setPageSize(pageSize);
query.setPropertyList("ID,ADDRESS,ALTITUDE,ASSETS_OWNERSHIP,ASSETS_OWNERSHIP_COM_ID,CHECK_CODE,COMM_TAG,COMPANY_ID,CONNECTIVE_PG_ID,DCC_ID,EXPIRY_DATE,FAX_NO,GENCOMPANY_ID,LANDFORM,LATITUDE,LONGITUDE,MAX_VOLTAGE_TYPE,NAME,NAME_ABBREVIATION,OPERATE_DATE,OPERATE_STATE,OWNER,PHONE_NO,PLANT_DETAIL_TYPE,PLANT_TYPE,POSTCODE,REGION,REGISTER_NAME,REMARKS,SCS_TAG,STAMP,STATE_CODE,SYS_FLAG,TAG");
return query;
}
public static DcloudSyncQuery buildPlantBdB(String filter, String orderStr, Integer pageIndex, Integer pageSize) {
DcloudSyncQuery query = new DcloudSyncQuery();
query.setTableName("SG_CON_SUBSTATION_B");
query.setFilter(filter);
query.setOrderStr(orderStr);
query.setPageIndex(pageIndex);
query.setPageSize(pageSize);
query.setPropertyList("ALTITUDE,ASSETS_OWNERSHIP,ASSETS_OWNERSHIP_COM_ID,CHECK_CODE,COMM_TAG,DCC_ID,DC_VOLTAGE_TYPE,EXPIRY_DATE,ID,LATITUDE,LONGITUDE,MANAGE_DEPT_ID,NAME,OPERATE_DATE,OPERATE_STATE,OWNER,PG_ID,REGION,SCS_TAG,STATE_CODE,SYS_FLAG,TOP_AC_VOLTAGE_TYPE,TYPE,VIDEOSCENEID");
return query;
}
public static DcloudSyncQuery buildPlantBdC(String filter, String orderStr, Integer pageIndex, Integer pageSize) {
DcloudSyncQuery query = new DcloudSyncQuery();
query.setTableName("SG_CON_SUBSTATION_C");
query.setFilter(filter);
query.setOrderStr(orderStr);
query.setPageIndex(pageIndex);
query.setPageSize(pageSize);
query.setPropertyList("D5000_ID,D5000_NAME,DCC_ID,DCLOUD_ID,DCLOUD_NAME,DCLOUD_VOLTAGELEVEL,OMS_ID,OMS_NAME,OWNER,PMS_ID,PSDB_DEV_TYPE,PSDB_ID,PSDB_NAME,SETTING_ID,SETTING_NAME,STATUS");
return query;
}
}

View File

@@ -1,47 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.time.LocalDate;
/**
* @Description: 监测点暂态指标超标明细日表
* @Author: wr
* @Date: 2025/3/14 13:47
*/
@Data
@TableName(value = "r_mp_event_detail_d")
public class RMpEventDetailD {
/**
* 监测点ID
*/
@MppMultiId(value = "measurement_point_id")
private String measurementPointId;
/**
* 时间
*/
@MppMultiId(value = "data_date")
private LocalDate dataDate;
/**
* 电压暂升发生次数
*/
@TableField(value = "swell_times")
private Integer swellTimes;
/**
* 电压暂降发生次数
*/
@TableField(value = "sag_times")
private Integer sagTimes;
/**
* 短时中断发生次数
*/
@TableField(value = "interrupt_times")
private Integer interruptTimes;
}

View File

@@ -1,47 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.time.LocalDate;
/**
* @Description: 监测点暂态指标超标明细月表
* @Author: wr
* @Date: 2025/3/14 13:47
*/
@Data
@TableName(value = "r_mp_event_detail_m")
public class RMpEventDetailM {
/**
* 监测点ID
*/
@MppMultiId(value = "measurement_point_id")
private String measurementPointId;
/**
* 时间
*/
@MppMultiId(value = "data_date")
private LocalDate dataDate;
/**
* 电压暂升发生次数
*/
@TableField(value = "swell_times")
private Integer swellTimes;
/**
* 电压暂降发生次数
*/
@TableField(value = "sag_times")
private Integer sagTimes;
/**
* 短时中断发生次数
*/
@TableField(value = "interrupt_times")
private Integer interruptTimes;
}

View File

@@ -1,47 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.time.LocalDate;
/**
* @Description: 监测点暂态指标超标明细季表
* @Author: wr
* @Date: 2025/3/14 13:47
*/
@Data
@TableName(value = "r_mp_event_detail_q")
public class RMpEventDetailQ {
/**
* 监测点ID
*/
@MppMultiId(value = "measurement_point_id")
private String measurementPointId;
/**
* 时间
*/
@MppMultiId(value = "data_date")
private LocalDate dataDate;
/**
* 电压暂升发生次数
*/
@TableField(value = "swell_times")
private Integer swellTimes;
/**
* 电压暂降发生次数
*/
@TableField(value = "sag_times")
private Integer sagTimes;
/**
* 短时中断发生次数
*/
@TableField(value = "interrupt_times")
private Integer interruptTimes;
}

View File

@@ -1,47 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.time.LocalDate;
/**
* @Description: 监测点暂态指标超标明细年表
* @Author: wr
* @Date: 2025/3/14 13:47
*/
@Data
@TableName(value = "r_mp_event_detail_y")
public class RMpEventDetailY {
/**
* 监测点ID
*/
@MppMultiId(value = "measurement_point_id")
private String measurementPointId;
/**
* 时间
*/
@MppMultiId(value = "data_date")
private LocalDate dataDate;
/**
* 电压暂升发生次数
*/
@TableField(value = "swell_times")
private Integer swellTimes;
/**
* 电压暂降发生次数
*/
@TableField(value = "sag_times")
private Integer sagTimes;
/**
* 短时中断发生次数
*/
@TableField(value = "interrupt_times")
private Integer interruptTimes;
}

View File

@@ -1,56 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.time.LocalDate;
/**
* @Description: 单位污区图统计日表
* @Author: wr
* @Date: 2025/3/19 14:13
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "r_mp_pollution_d")
public class RMpPollutionD implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 单位id
*/
@MppMultiId(value = "line_id")
@ApiModelProperty(value = "监测点")
private String lineId;
/**
* 时间
*/
@MppMultiId(value = "data_date")
@ApiModelProperty(value = "时间")
private LocalDate dataDate;
/**
* 污区图统计类型
*/
@MppMultiId(value = "pollution_type")
@ApiModelProperty(value = "污区图统计类型")
private String pollutionType;
/**
* 统计值
*/
@TableField(value = "value")
@ApiModelProperty(value = "统计值")
private Double value;
}

View File

@@ -1,119 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2023/3/27 15:20
*/
@Data
@TableName(value = "r_stat_comasses_d")
public class RStatComassesDPO implements Serializable {
@MppMultiId
@TableField(value = "time_id")
private String time;
@MppMultiId
@TableField(value = "line_id")
private String lineId;
@TableField(value = "freq_dev1")
private Double freqDev1;
@TableField(value = "freq_dev2")
private Double freqDev2;
@TableField(value = "freq_dev3")
private Double freqDev3;
@TableField(value = "freq_dev4")
private Double freqDev4;
@TableField(value = "freq_dev5")
private Double freqDev5;
@TableField(value = "vu_dev1")
private Double vuDev1;
@TableField(value = "vu_dev2")
private Double vuDev2;
@TableField(value = "vu_dev3")
private Double vuDev3;
@TableField(value = "vu_dev4")
private Double vuDev4;
@TableField(value = "vu_dev5")
private Double vuDev5;
@TableField(value = "data_plt1")
private Double dataPst1;
@TableField(value = "data_plt2")
private Double dataPst2;
@TableField(value = "data_plt3")
private Double dataPst3;
@TableField(value = "data_plt4")
private Double dataPst4;
@TableField(value = "data_plt5")
private Double dataPst5;
@TableField(value = "v_unbalance1")
private Double vUnbalance1;
@TableField(value = "v_unbalance2")
private Double vUnbalance2;
@TableField(value = "v_unbalance3")
private Double vUnbalance3;
@TableField(value = "v_unbalance4")
private Double vUnbalance4;
@TableField(value = "v_unbalance5")
private Double vUnbalance5;
@TableField(value = "v_thd1")
private Double vThd1;
@TableField(value = "v_thd2")
private Double vThd2;
@TableField(value = "v_thd3")
private Double vThd3;
@TableField(value = "v_thd4")
private Double vThd4;
@TableField(value = "v_thd5")
private Double vThd5;
@TableField(value = "event1")
private Double event1;
@TableField(value = "event2")
private Double event2;
@TableField(value = "event3")
private Double event3;
@TableField(value = "event4")
private Double event4;
@TableField(value = "event5")
private Double event5;
}

View File

@@ -1,50 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* 类的介绍:
*
* @author xy
* @version 1.0.0
*/
@Data
@TableName(value = "r_stat_data_flicker_d")
public class RStatDataFlickerD implements Serializable {
@MppMultiId
@TableField(value = "time")
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")
private String lineId;
@MppMultiId
@TableField(value = "phasic_type")
private String phasicType;
@MppMultiId
@TableField(value = "value_type")
private String valueType;
@TableField(value = "quality_flag")
private Integer qualityFlag;
@TableField(value = "fluc",updateStrategy = FieldStrategy.IGNORED)
private Double fluc;
@TableField(value = "plt",updateStrategy = FieldStrategy.IGNORED)
private Double plt;
@TableField(value = "pst",updateStrategy = FieldStrategy.IGNORED)
private Double pst;
}

View File

@@ -1,47 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* 类的介绍:
*
* @author xy
* @version 1.0.0
*/
@Data
@TableName(value = "r_stat_data_fluc_d")
public class RStatDataFlucD implements Serializable {
@MppMultiId
@TableField(value = "time")
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")
private String lineId;
@MppMultiId
@TableField(value = "phasic_type")
private String phasicType;
@MppMultiId
@TableField(value = "value_type")
private String valueType;
@TableField(value = "quality_flag")
private Integer qualityFlag;
@TableField(value = "fluc",updateStrategy = FieldStrategy.IGNORED)
private Double fluc;
@TableField(value = "fluccf",updateStrategy = FieldStrategy.IGNORED)
private Double fluccf;
}

View File

@@ -1,191 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* 类的介绍:
*
* @author xy
* @version 1.0.0
*/
@Data
@TableName(value = "R_STAT_DATA_HARMPHASIC_I_D")
public class RStatDataHarmPhasicID implements Serializable {
@MppMultiId
@TableField(value = "time")
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")
private String lineId;
@MppMultiId
@TableField(value = "phasic_type")
private String phasicType;
@MppMultiId
@TableField(value = "value_type")
private String valueType;
@TableField(value = "quality_flag")
private Integer qualityFlag;
@TableField(value = "i_1",updateStrategy = FieldStrategy.IGNORED)
private Double i1;
@TableField(value = "i_2",updateStrategy = FieldStrategy.IGNORED)
private Double i2;
@TableField(value = "i_3",updateStrategy = FieldStrategy.IGNORED)
private Double i3;
@TableField(value = "i_4",updateStrategy = FieldStrategy.IGNORED)
private Double i4;
@TableField(value = "i_5",updateStrategy = FieldStrategy.IGNORED)
private Double i5;
@TableField(value = "i_6",updateStrategy = FieldStrategy.IGNORED)
private Double i6;
@TableField(value = "i_7",updateStrategy = FieldStrategy.IGNORED)
private Double i7;
@TableField(value = "i_8",updateStrategy = FieldStrategy.IGNORED)
private Double i8;
@TableField(value = "i_9",updateStrategy = FieldStrategy.IGNORED)
private Double i9;
@TableField(value = "i_10",updateStrategy = FieldStrategy.IGNORED)
private Double i10;
@TableField(value = "i_11",updateStrategy = FieldStrategy.IGNORED)
private Double i11;
@TableField(value = "i_12",updateStrategy = FieldStrategy.IGNORED)
private Double i12;
@TableField(value = "i_13",updateStrategy = FieldStrategy.IGNORED)
private Double i13;
@TableField(value = "i_14",updateStrategy = FieldStrategy.IGNORED)
private Double i14;
@TableField(value = "i_15",updateStrategy = FieldStrategy.IGNORED)
private Double i15;
@TableField(value = "i_16",updateStrategy = FieldStrategy.IGNORED)
private Double i16;
@TableField(value = "i_17",updateStrategy = FieldStrategy.IGNORED)
private Double i17;
@TableField(value = "i_18",updateStrategy = FieldStrategy.IGNORED)
private Double i18;
@TableField(value = "i_19",updateStrategy = FieldStrategy.IGNORED)
private Double i19;
@TableField(value = "i_20",updateStrategy = FieldStrategy.IGNORED)
private Double i20;
@TableField(value = "i_21",updateStrategy = FieldStrategy.IGNORED)
private Double i21;
@TableField(value = "i_22",updateStrategy = FieldStrategy.IGNORED)
private Double i22;
@TableField(value = "i_23",updateStrategy = FieldStrategy.IGNORED)
private Double i23;
@TableField(value = "i_24",updateStrategy = FieldStrategy.IGNORED)
private Double i24;
@TableField(value = "i_25",updateStrategy = FieldStrategy.IGNORED)
private Double i25;
@TableField(value = "i_26",updateStrategy = FieldStrategy.IGNORED)
private Double i26;
@TableField(value = "i_27",updateStrategy = FieldStrategy.IGNORED)
private Double i27;
@TableField(value = "i_28",updateStrategy = FieldStrategy.IGNORED)
private Double i28;
@TableField(value = "i_29",updateStrategy = FieldStrategy.IGNORED)
private Double i29;
@TableField(value = "i_30",updateStrategy = FieldStrategy.IGNORED)
private Double i30;
@TableField(value = "i_31",updateStrategy = FieldStrategy.IGNORED)
private Double i31;
@TableField(value = "i_32",updateStrategy = FieldStrategy.IGNORED)
private Double i32;
@TableField(value = "i_33",updateStrategy = FieldStrategy.IGNORED)
private Double i33;
@TableField(value = "i_34",updateStrategy = FieldStrategy.IGNORED)
private Double i34;
@TableField(value = "i_35",updateStrategy = FieldStrategy.IGNORED)
private Double i35;
@TableField(value = "i_36",updateStrategy = FieldStrategy.IGNORED)
private Double i36;
@TableField(value = "i_37",updateStrategy = FieldStrategy.IGNORED)
private Double i37;
@TableField(value = "i_38",updateStrategy = FieldStrategy.IGNORED)
private Double i38;
@TableField(value = "i_39",updateStrategy = FieldStrategy.IGNORED)
private Double i39;
@TableField(value = "i_40",updateStrategy = FieldStrategy.IGNORED)
private Double i40;
@TableField(value = "i_41",updateStrategy = FieldStrategy.IGNORED)
private Double i41;
@TableField(value = "i_42",updateStrategy = FieldStrategy.IGNORED)
private Double i42;
@TableField(value = "i_43",updateStrategy = FieldStrategy.IGNORED)
private Double i43;
@TableField(value = "i_44",updateStrategy = FieldStrategy.IGNORED)
private Double i44;
@TableField(value = "i_45",updateStrategy = FieldStrategy.IGNORED)
private Double i45;
@TableField(value = "i_46",updateStrategy = FieldStrategy.IGNORED)
private Double i46;
@TableField(value = "i_47",updateStrategy = FieldStrategy.IGNORED)
private Double i47;
@TableField(value = "i_48",updateStrategy = FieldStrategy.IGNORED)
private Double i48;
@TableField(value = "i_49",updateStrategy = FieldStrategy.IGNORED)
private Double i49;
@TableField(value = "i_50",updateStrategy = FieldStrategy.IGNORED)
private Double i50;
}

View File

@@ -1,191 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* 类的介绍:
*
* @author xy
* @version 1.0.0
*/
@Data
@TableName(value = "R_STAT_DATA_HARMPHASIC_V_D")
public class RStatDataHarmPhasicVD implements Serializable {
@MppMultiId
@TableField(value = "time")
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")
private String lineId;
@MppMultiId
@TableField(value = "phasic_type")
private String phasicType;
@MppMultiId
@TableField(value = "value_type")
private String valueType;
@TableField(value = "quality_flag")
private Integer qualityFlag;
@TableField(value = "v_1",updateStrategy = FieldStrategy.IGNORED)
private Double v1;
@TableField(value = "v_2",updateStrategy = FieldStrategy.IGNORED)
private Double v2;
@TableField(value = "v_3",updateStrategy = FieldStrategy.IGNORED)
private Double v3;
@TableField(value = "v_4",updateStrategy = FieldStrategy.IGNORED)
private Double v4;
@TableField(value = "v_5",updateStrategy = FieldStrategy.IGNORED)
private Double v5;
@TableField(value = "v_6",updateStrategy = FieldStrategy.IGNORED)
private Double v6;
@TableField(value = "v_7",updateStrategy = FieldStrategy.IGNORED)
private Double v7;
@TableField(value = "v_8",updateStrategy = FieldStrategy.IGNORED)
private Double v8;
@TableField(value = "v_9",updateStrategy = FieldStrategy.IGNORED)
private Double v9;
@TableField(value = "v_10",updateStrategy = FieldStrategy.IGNORED)
private Double v10;
@TableField(value = "v_11",updateStrategy = FieldStrategy.IGNORED)
private Double v11;
@TableField(value = "v_12",updateStrategy = FieldStrategy.IGNORED)
private Double v12;
@TableField(value = "v_13",updateStrategy = FieldStrategy.IGNORED)
private Double v13;
@TableField(value = "v_14",updateStrategy = FieldStrategy.IGNORED)
private Double v14;
@TableField(value = "v_15",updateStrategy = FieldStrategy.IGNORED)
private Double v15;
@TableField(value = "v_16",updateStrategy = FieldStrategy.IGNORED)
private Double v16;
@TableField(value = "v_17",updateStrategy = FieldStrategy.IGNORED)
private Double v17;
@TableField(value = "v_18",updateStrategy = FieldStrategy.IGNORED)
private Double v18;
@TableField(value = "v_19",updateStrategy = FieldStrategy.IGNORED)
private Double v19;
@TableField(value = "v_20",updateStrategy = FieldStrategy.IGNORED)
private Double v20;
@TableField(value = "v_21",updateStrategy = FieldStrategy.IGNORED)
private Double v21;
@TableField(value = "v_22",updateStrategy = FieldStrategy.IGNORED)
private Double v22;
@TableField(value = "v_23",updateStrategy = FieldStrategy.IGNORED)
private Double v23;
@TableField(value = "v_24",updateStrategy = FieldStrategy.IGNORED)
private Double v24;
@TableField(value = "v_25",updateStrategy = FieldStrategy.IGNORED)
private Double v25;
@TableField(value = "v_26",updateStrategy = FieldStrategy.IGNORED)
private Double v26;
@TableField(value = "v_27",updateStrategy = FieldStrategy.IGNORED)
private Double v27;
@TableField(value = "v_28",updateStrategy = FieldStrategy.IGNORED)
private Double v28;
@TableField(value = "v_29",updateStrategy = FieldStrategy.IGNORED)
private Double v29;
@TableField(value = "v_30",updateStrategy = FieldStrategy.IGNORED)
private Double v30;
@TableField(value = "v_31",updateStrategy = FieldStrategy.IGNORED)
private Double v31;
@TableField(value = "v_32",updateStrategy = FieldStrategy.IGNORED)
private Double v32;
@TableField(value = "v_33",updateStrategy = FieldStrategy.IGNORED)
private Double v33;
@TableField(value = "v_34",updateStrategy = FieldStrategy.IGNORED)
private Double v34;
@TableField(value = "v_35",updateStrategy = FieldStrategy.IGNORED)
private Double v35;
@TableField(value = "v_36",updateStrategy = FieldStrategy.IGNORED)
private Double v36;
@TableField(value = "v_37",updateStrategy = FieldStrategy.IGNORED)
private Double v37;
@TableField(value = "v_38",updateStrategy = FieldStrategy.IGNORED)
private Double v38;
@TableField(value = "v_39",updateStrategy = FieldStrategy.IGNORED)
private Double v39;
@TableField(value = "v_40",updateStrategy = FieldStrategy.IGNORED)
private Double v40;
@TableField(value = "v_41",updateStrategy = FieldStrategy.IGNORED)
private Double v41;
@TableField(value = "v_42",updateStrategy = FieldStrategy.IGNORED)
private Double v42;
@TableField(value = "v_43",updateStrategy = FieldStrategy.IGNORED)
private Double v43;
@TableField(value = "v_44",updateStrategy = FieldStrategy.IGNORED)
private Double v44;
@TableField(value = "v_45",updateStrategy = FieldStrategy.IGNORED)
private Double v45;
@TableField(value = "v_46",updateStrategy = FieldStrategy.IGNORED)
private Double v46;
@TableField(value = "v_47",updateStrategy = FieldStrategy.IGNORED)
private Double v47;
@TableField(value = "v_48",updateStrategy = FieldStrategy.IGNORED)
private Double v48;
@TableField(value = "v_49",updateStrategy = FieldStrategy.IGNORED)
private Double v49;
@TableField(value = "v_50",updateStrategy = FieldStrategy.IGNORED)
private Double v50;
}

View File

@@ -1,200 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* 类的介绍:
*
* @author xy
* @version 1.0.0
*/
@Data
@TableName(value = "R_STAT_DATA_HARMPOWER_P_D")
public class RStatDataHarmPowerPD implements Serializable {
@MppMultiId
@TableField(value = "time")
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")
private String lineId;
@MppMultiId
@TableField(value = "phasic_type")
private String phasicType;
@MppMultiId
@TableField(value = "value_type")
private String valueType;
@TableField(value = "quality_flag")
private Integer qualityFlag;
@TableField(value = "p",updateStrategy = FieldStrategy.IGNORED)
private Double p;
@TableField(value = "pf",updateStrategy = FieldStrategy.IGNORED)
private Double pf;
@TableField(value = "df",updateStrategy = FieldStrategy.IGNORED)
private Double df;
@TableField(value = "p_1",updateStrategy = FieldStrategy.IGNORED)
private Double p1;
@TableField(value = "p_2",updateStrategy = FieldStrategy.IGNORED)
private Double p2;
@TableField(value = "p_3",updateStrategy = FieldStrategy.IGNORED)
private Double p3;
@TableField(value = "p_4",updateStrategy = FieldStrategy.IGNORED)
private Double p4;
@TableField(value = "p_5",updateStrategy = FieldStrategy.IGNORED)
private Double p5;
@TableField(value = "p_6",updateStrategy = FieldStrategy.IGNORED)
private Double p6;
@TableField(value = "p_7",updateStrategy = FieldStrategy.IGNORED)
private Double p7;
@TableField(value = "p_8",updateStrategy = FieldStrategy.IGNORED)
private Double p8;
@TableField(value = "p_9",updateStrategy = FieldStrategy.IGNORED)
private Double p9;
@TableField(value = "p_10",updateStrategy = FieldStrategy.IGNORED)
private Double p10;
@TableField(value = "p_11",updateStrategy = FieldStrategy.IGNORED)
private Double p11;
@TableField(value = "p_12",updateStrategy = FieldStrategy.IGNORED)
private Double p12;
@TableField(value = "p_13",updateStrategy = FieldStrategy.IGNORED)
private Double p13;
@TableField(value = "p_14",updateStrategy = FieldStrategy.IGNORED)
private Double p14;
@TableField(value = "p_15",updateStrategy = FieldStrategy.IGNORED)
private Double p15;
@TableField(value = "p_16",updateStrategy = FieldStrategy.IGNORED)
private Double p16;
@TableField(value = "p_17",updateStrategy = FieldStrategy.IGNORED)
private Double p17;
@TableField(value = "p_18",updateStrategy = FieldStrategy.IGNORED)
private Double p18;
@TableField(value = "p_19",updateStrategy = FieldStrategy.IGNORED)
private Double p19;
@TableField(value = "p_20",updateStrategy = FieldStrategy.IGNORED)
private Double p20;
@TableField(value = "p_21",updateStrategy = FieldStrategy.IGNORED)
private Double p21;
@TableField(value = "p_22",updateStrategy = FieldStrategy.IGNORED)
private Double p22;
@TableField(value = "p_23",updateStrategy = FieldStrategy.IGNORED)
private Double p23;
@TableField(value = "p_24",updateStrategy = FieldStrategy.IGNORED)
private Double p24;
@TableField(value = "p_25",updateStrategy = FieldStrategy.IGNORED)
private Double p25;
@TableField(value = "p_26",updateStrategy = FieldStrategy.IGNORED)
private Double p26;
@TableField(value = "p_27",updateStrategy = FieldStrategy.IGNORED)
private Double p27;
@TableField(value = "p_28",updateStrategy = FieldStrategy.IGNORED)
private Double p28;
@TableField(value = "p_29",updateStrategy = FieldStrategy.IGNORED)
private Double p29;
@TableField(value = "p_30",updateStrategy = FieldStrategy.IGNORED)
private Double p30;
@TableField(value = "p_31",updateStrategy = FieldStrategy.IGNORED)
private Double p31;
@TableField(value = "p_32",updateStrategy = FieldStrategy.IGNORED)
private Double p32;
@TableField(value = "p_33",updateStrategy = FieldStrategy.IGNORED)
private Double p33;
@TableField(value = "p_34",updateStrategy = FieldStrategy.IGNORED)
private Double p34;
@TableField(value = "p_35",updateStrategy = FieldStrategy.IGNORED)
private Double p35;
@TableField(value = "p_36",updateStrategy = FieldStrategy.IGNORED)
private Double p36;
@TableField(value = "p_37",updateStrategy = FieldStrategy.IGNORED)
private Double p37;
@TableField(value = "p_38",updateStrategy = FieldStrategy.IGNORED)
private Double p38;
@TableField(value = "p_39",updateStrategy = FieldStrategy.IGNORED)
private Double p39;
@TableField(value = "p_40",updateStrategy = FieldStrategy.IGNORED)
private Double p40;
@TableField(value = "p_41",updateStrategy = FieldStrategy.IGNORED)
private Double p41;
@TableField(value = "p_42",updateStrategy = FieldStrategy.IGNORED)
private Double p42;
@TableField(value = "p_43",updateStrategy = FieldStrategy.IGNORED)
private Double p43;
@TableField(value = "p_44",updateStrategy = FieldStrategy.IGNORED)
private Double p44;
@TableField(value = "p_45",updateStrategy = FieldStrategy.IGNORED)
private Double p45;
@TableField(value = "p_46",updateStrategy = FieldStrategy.IGNORED)
private Double p46;
@TableField(value = "p_47",updateStrategy = FieldStrategy.IGNORED)
private Double p47;
@TableField(value = "p_48",updateStrategy = FieldStrategy.IGNORED)
private Double p48;
@TableField(value = "p_49",updateStrategy = FieldStrategy.IGNORED)
private Double p49;
@TableField(value = "p_50",updateStrategy = FieldStrategy.IGNORED)
private Double p50;
}

View File

@@ -1,194 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* 类的介绍:
*
* @author xy
* @version 1.0.0
*/
@Data
@TableName(value = "R_STAT_DATA_HARMPOWER_Q_D")
public class RStatDataHarmPowerQD implements Serializable {
@MppMultiId
@TableField(value = "time")
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")
private String lineId;
@MppMultiId
@TableField(value = "phasic_type")
private String phasicType;
@MppMultiId
@TableField(value = "value_type")
private String valueType;
@TableField(value = "quality_flag")
private Integer qualityFlag;
@TableField(value = "q",updateStrategy = FieldStrategy.IGNORED)
private Double q;
@TableField(value = "q_1",updateStrategy = FieldStrategy.IGNORED)
private Double q1;
@TableField(value = "q_2",updateStrategy = FieldStrategy.IGNORED)
private Double q2;
@TableField(value = "q_3",updateStrategy = FieldStrategy.IGNORED)
private Double q3;
@TableField(value = "q_4",updateStrategy = FieldStrategy.IGNORED)
private Double q4;
@TableField(value = "q_5",updateStrategy = FieldStrategy.IGNORED)
private Double q5;
@TableField(value = "q_6",updateStrategy = FieldStrategy.IGNORED)
private Double q6;
@TableField(value = "q_7",updateStrategy = FieldStrategy.IGNORED)
private Double q7;
@TableField(value = "q_8",updateStrategy = FieldStrategy.IGNORED)
private Double q8;
@TableField(value = "q_9",updateStrategy = FieldStrategy.IGNORED)
private Double q9;
@TableField(value = "q_10",updateStrategy = FieldStrategy.IGNORED)
private Double q10;
@TableField(value = "q_11",updateStrategy = FieldStrategy.IGNORED)
private Double q11;
@TableField(value = "q_12",updateStrategy = FieldStrategy.IGNORED)
private Double q12;
@TableField(value = "q_13",updateStrategy = FieldStrategy.IGNORED)
private Double q13;
@TableField(value = "q_14",updateStrategy = FieldStrategy.IGNORED)
private Double q14;
@TableField(value = "q_15",updateStrategy = FieldStrategy.IGNORED)
private Double q15;
@TableField(value = "q_16",updateStrategy = FieldStrategy.IGNORED)
private Double q16;
@TableField(value = "q_17",updateStrategy = FieldStrategy.IGNORED)
private Double q17;
@TableField(value = "q_18",updateStrategy = FieldStrategy.IGNORED)
private Double q18;
@TableField(value = "q_19",updateStrategy = FieldStrategy.IGNORED)
private Double q19;
@TableField(value = "q_20",updateStrategy = FieldStrategy.IGNORED)
private Double q20;
@TableField(value = "q_21",updateStrategy = FieldStrategy.IGNORED)
private Double q21;
@TableField(value = "q_22",updateStrategy = FieldStrategy.IGNORED)
private Double q22;
@TableField(value = "q_23",updateStrategy = FieldStrategy.IGNORED)
private Double q23;
@TableField(value = "q_24",updateStrategy = FieldStrategy.IGNORED)
private Double q24;
@TableField(value = "q_25",updateStrategy = FieldStrategy.IGNORED)
private Double q25;
@TableField(value = "q_26",updateStrategy = FieldStrategy.IGNORED)
private Double q26;
@TableField(value = "q_27",updateStrategy = FieldStrategy.IGNORED)
private Double q27;
@TableField(value = "q_28",updateStrategy = FieldStrategy.IGNORED)
private Double q28;
@TableField(value = "q_29",updateStrategy = FieldStrategy.IGNORED)
private Double q29;
@TableField(value = "q_30",updateStrategy = FieldStrategy.IGNORED)
private Double q30;
@TableField(value = "q_31",updateStrategy = FieldStrategy.IGNORED)
private Double q31;
@TableField(value = "q_32",updateStrategy = FieldStrategy.IGNORED)
private Double q32;
@TableField(value = "q_33",updateStrategy = FieldStrategy.IGNORED)
private Double q33;
@TableField(value = "q_34",updateStrategy = FieldStrategy.IGNORED)
private Double q34;
@TableField(value = "q_35",updateStrategy = FieldStrategy.IGNORED)
private Double q35;
@TableField(value = "q_36",updateStrategy = FieldStrategy.IGNORED)
private Double q36;
@TableField(value = "q_37",updateStrategy = FieldStrategy.IGNORED)
private Double q37;
@TableField(value = "q_38",updateStrategy = FieldStrategy.IGNORED)
private Double q38;
@TableField(value = "q_39",updateStrategy = FieldStrategy.IGNORED)
private Double q39;
@TableField(value = "q_40",updateStrategy = FieldStrategy.IGNORED)
private Double q40;
@TableField(value = "q_41",updateStrategy = FieldStrategy.IGNORED)
private Double q41;
@TableField(value = "q_42",updateStrategy = FieldStrategy.IGNORED)
private Double q42;
@TableField(value = "q_43",updateStrategy = FieldStrategy.IGNORED)
private Double q43;
@TableField(value = "q_44",updateStrategy = FieldStrategy.IGNORED)
private Double q44;
@TableField(value = "q_45",updateStrategy = FieldStrategy.IGNORED)
private Double q45;
@TableField(value = "q_46",updateStrategy = FieldStrategy.IGNORED)
private Double q46;
@TableField(value = "q_47",updateStrategy = FieldStrategy.IGNORED)
private Double q47;
@TableField(value = "q_48",updateStrategy = FieldStrategy.IGNORED)
private Double q48;
@TableField(value = "q_49",updateStrategy = FieldStrategy.IGNORED)
private Double q49;
@TableField(value = "q_50",updateStrategy = FieldStrategy.IGNORED)
private Double q50;
}

View File

@@ -1,191 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* 类的介绍:
*
* @author xy
* @version 1.0.0
*/
@Data
@TableName(value = "R_STAT_DATA_HARMPOWER_S_D")
public class RStatDataHarmPowerSD implements Serializable {
@MppMultiId
@TableField(value = "time")
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")
private String lineId;
@MppMultiId
@TableField(value = "phasic_type")
private String phasicType;
@MppMultiId
@TableField(value = "value_type")
private String valueType;
@TableField(value = "quality_flag")
private Integer qualityFlag;
@TableField(value = "s_1",updateStrategy = FieldStrategy.IGNORED)
private Double s1;
@TableField(value = "s_2",updateStrategy = FieldStrategy.IGNORED)
private Double s2;
@TableField(value = "s_3",updateStrategy = FieldStrategy.IGNORED)
private Double s3;
@TableField(value = "s_4",updateStrategy = FieldStrategy.IGNORED)
private Double s4;
@TableField(value = "s_5",updateStrategy = FieldStrategy.IGNORED)
private Double s5;
@TableField(value = "s_6",updateStrategy = FieldStrategy.IGNORED)
private Double s6;
@TableField(value = "s_7",updateStrategy = FieldStrategy.IGNORED)
private Double s7;
@TableField(value = "s_8",updateStrategy = FieldStrategy.IGNORED)
private Double s8;
@TableField(value = "s_9",updateStrategy = FieldStrategy.IGNORED)
private Double s9;
@TableField(value = "s_10",updateStrategy = FieldStrategy.IGNORED)
private Double s10;
@TableField(value = "s_11",updateStrategy = FieldStrategy.IGNORED)
private Double s11;
@TableField(value = "s_12",updateStrategy = FieldStrategy.IGNORED)
private Double s12;
@TableField(value = "s_13",updateStrategy = FieldStrategy.IGNORED)
private Double s13;
@TableField(value = "s_14",updateStrategy = FieldStrategy.IGNORED)
private Double s14;
@TableField(value = "s_15",updateStrategy = FieldStrategy.IGNORED)
private Double s15;
@TableField(value = "s_16",updateStrategy = FieldStrategy.IGNORED)
private Double s16;
@TableField(value = "s_17",updateStrategy = FieldStrategy.IGNORED)
private Double s17;
@TableField(value = "s_18",updateStrategy = FieldStrategy.IGNORED)
private Double s18;
@TableField(value = "s_19",updateStrategy = FieldStrategy.IGNORED)
private Double s19;
@TableField(value = "s_20",updateStrategy = FieldStrategy.IGNORED)
private Double s20;
@TableField(value = "s_21",updateStrategy = FieldStrategy.IGNORED)
private Double s21;
@TableField(value = "s_22",updateStrategy = FieldStrategy.IGNORED)
private Double s22;
@TableField(value = "s_23",updateStrategy = FieldStrategy.IGNORED)
private Double s23;
@TableField(value = "s_24",updateStrategy = FieldStrategy.IGNORED)
private Double s24;
@TableField(value = "s_25",updateStrategy = FieldStrategy.IGNORED)
private Double s25;
@TableField(value = "s_26",updateStrategy = FieldStrategy.IGNORED)
private Double s26;
@TableField(value = "s_27",updateStrategy = FieldStrategy.IGNORED)
private Double s27;
@TableField(value = "s_28",updateStrategy = FieldStrategy.IGNORED)
private Double s28;
@TableField(value = "s_29",updateStrategy = FieldStrategy.IGNORED)
private Double s29;
@TableField(value = "s_30",updateStrategy = FieldStrategy.IGNORED)
private Double s30;
@TableField(value = "s_31",updateStrategy = FieldStrategy.IGNORED)
private Double s31;
@TableField(value = "s_32",updateStrategy = FieldStrategy.IGNORED)
private Double s32;
@TableField(value = "s_33",updateStrategy = FieldStrategy.IGNORED)
private Double s33;
@TableField(value = "s_34",updateStrategy = FieldStrategy.IGNORED)
private Double s34;
@TableField(value = "s_35",updateStrategy = FieldStrategy.IGNORED)
private Double s35;
@TableField(value = "s_36",updateStrategy = FieldStrategy.IGNORED)
private Double s36;
@TableField(value = "s_37",updateStrategy = FieldStrategy.IGNORED)
private Double s37;
@TableField(value = "s_38",updateStrategy = FieldStrategy.IGNORED)
private Double s38;
@TableField(value = "s_39",updateStrategy = FieldStrategy.IGNORED)
private Double s39;
@TableField(value = "s_40",updateStrategy = FieldStrategy.IGNORED)
private Double s40;
@TableField(value = "s_41",updateStrategy = FieldStrategy.IGNORED)
private Double s41;
@TableField(value = "s_42",updateStrategy = FieldStrategy.IGNORED)
private Double s42;
@TableField(value = "s_43",updateStrategy = FieldStrategy.IGNORED)
private Double s43;
@TableField(value = "s_44",updateStrategy = FieldStrategy.IGNORED)
private Double s44;
@TableField(value = "s_45",updateStrategy = FieldStrategy.IGNORED)
private Double s45;
@TableField(value = "s_46",updateStrategy = FieldStrategy.IGNORED)
private Double s46;
@TableField(value = "s_47",updateStrategy = FieldStrategy.IGNORED)
private Double s47;
@TableField(value = "s_48",updateStrategy = FieldStrategy.IGNORED)
private Double s48;
@TableField(value = "s_49",updateStrategy = FieldStrategy.IGNORED)
private Double s49;
@TableField(value = "s_50",updateStrategy = FieldStrategy.IGNORED)
private Double s50;
}

View File

@@ -1,191 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* 类的介绍:
*
* @author xy
* @version 1.0.0
*/
@Data
@TableName(value = "R_STAT_DATA_HARMRATE_I_D")
public class RStatDataHarmRateID implements Serializable {
@MppMultiId
@TableField(value = "time")
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")
private String lineId;
@MppMultiId
@TableField(value = "phasic_type")
private String phasicType;
@MppMultiId
@TableField(value = "value_type")
private String valueType;
@TableField(value = "quality_flag")
private Integer qualityFlag;
@TableField(value = "i_1",updateStrategy = FieldStrategy.IGNORED)
private Double i1;
@TableField(value = "i_2",updateStrategy = FieldStrategy.IGNORED)
private Double i2;
@TableField(value = "i_3",updateStrategy = FieldStrategy.IGNORED)
private Double i3;
@TableField(value = "i_4",updateStrategy = FieldStrategy.IGNORED)
private Double i4;
@TableField(value = "i_5",updateStrategy = FieldStrategy.IGNORED)
private Double i5;
@TableField(value = "i_6",updateStrategy = FieldStrategy.IGNORED)
private Double i6;
@TableField(value = "i_7",updateStrategy = FieldStrategy.IGNORED)
private Double i7;
@TableField(value = "i_8",updateStrategy = FieldStrategy.IGNORED)
private Double i8;
@TableField(value = "i_9",updateStrategy = FieldStrategy.IGNORED)
private Double i9;
@TableField(value = "i_10",updateStrategy = FieldStrategy.IGNORED)
private Double i10;
@TableField(value = "i_11",updateStrategy = FieldStrategy.IGNORED)
private Double i11;
@TableField(value = "i_12",updateStrategy = FieldStrategy.IGNORED)
private Double i12;
@TableField(value = "i_13",updateStrategy = FieldStrategy.IGNORED)
private Double i13;
@TableField(value = "i_14",updateStrategy = FieldStrategy.IGNORED)
private Double i14;
@TableField(value = "i_15",updateStrategy = FieldStrategy.IGNORED)
private Double i15;
@TableField(value = "i_16",updateStrategy = FieldStrategy.IGNORED)
private Double i16;
@TableField(value = "i_17",updateStrategy = FieldStrategy.IGNORED)
private Double i17;
@TableField(value = "i_18",updateStrategy = FieldStrategy.IGNORED)
private Double i18;
@TableField(value = "i_19",updateStrategy = FieldStrategy.IGNORED)
private Double i19;
@TableField(value = "i_20",updateStrategy = FieldStrategy.IGNORED)
private Double i20;
@TableField(value = "i_21",updateStrategy = FieldStrategy.IGNORED)
private Double i21;
@TableField(value = "i_22",updateStrategy = FieldStrategy.IGNORED)
private Double i22;
@TableField(value = "i_23",updateStrategy = FieldStrategy.IGNORED)
private Double i23;
@TableField(value = "i_24",updateStrategy = FieldStrategy.IGNORED)
private Double i24;
@TableField(value = "i_25",updateStrategy = FieldStrategy.IGNORED)
private Double i25;
@TableField(value = "i_26",updateStrategy = FieldStrategy.IGNORED)
private Double i26;
@TableField(value = "i_27",updateStrategy = FieldStrategy.IGNORED)
private Double i27;
@TableField(value = "i_28",updateStrategy = FieldStrategy.IGNORED)
private Double i28;
@TableField(value = "i_29",updateStrategy = FieldStrategy.IGNORED)
private Double i29;
@TableField(value = "i_30",updateStrategy = FieldStrategy.IGNORED)
private Double i30;
@TableField(value = "i_31",updateStrategy = FieldStrategy.IGNORED)
private Double i31;
@TableField(value = "i_32",updateStrategy = FieldStrategy.IGNORED)
private Double i32;
@TableField(value = "i_33",updateStrategy = FieldStrategy.IGNORED)
private Double i33;
@TableField(value = "i_34",updateStrategy = FieldStrategy.IGNORED)
private Double i34;
@TableField(value = "i_35",updateStrategy = FieldStrategy.IGNORED)
private Double i35;
@TableField(value = "i_36",updateStrategy = FieldStrategy.IGNORED)
private Double i36;
@TableField(value = "i_37",updateStrategy = FieldStrategy.IGNORED)
private Double i37;
@TableField(value = "i_38",updateStrategy = FieldStrategy.IGNORED)
private Double i38;
@TableField(value = "i_39",updateStrategy = FieldStrategy.IGNORED)
private Double i39;
@TableField(value = "i_40",updateStrategy = FieldStrategy.IGNORED)
private Double i40;
@TableField(value = "i_41",updateStrategy = FieldStrategy.IGNORED)
private Double i41;
@TableField(value = "i_42",updateStrategy = FieldStrategy.IGNORED)
private Double i42;
@TableField(value = "i_43",updateStrategy = FieldStrategy.IGNORED)
private Double i43;
@TableField(value = "i_44",updateStrategy = FieldStrategy.IGNORED)
private Double i44;
@TableField(value = "i_45",updateStrategy = FieldStrategy.IGNORED)
private Double i45;
@TableField(value = "i_46",updateStrategy = FieldStrategy.IGNORED)
private Double i46;
@TableField(value = "i_47",updateStrategy = FieldStrategy.IGNORED)
private Double i47;
@TableField(value = "i_48",updateStrategy = FieldStrategy.IGNORED)
private Double i48;
@TableField(value = "i_49",updateStrategy = FieldStrategy.IGNORED)
private Double i49;
@TableField(value = "i_50",updateStrategy = FieldStrategy.IGNORED)
private Double i50;
}

View File

@@ -1,191 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* 类的介绍:
*
* @author xy
* @version 1.0.0
*/
@Data
@TableName(value = "R_STAT_DATA_HARMRATE_V_D")
public class RStatDataHarmRateVD implements Serializable {
@MppMultiId
@TableField(value = "time")
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")
private String lineId;
@MppMultiId
@TableField(value = "phasic_type")
private String phasicType;
@MppMultiId
@TableField(value = "value_type")
private String valueType;
@TableField(value = "quality_flag")
private Integer qualityFlag;
@TableField(value = "v_1",updateStrategy = FieldStrategy.IGNORED)
private Double v1;
@TableField(value = "v_2",updateStrategy = FieldStrategy.IGNORED)
private Double v2;
@TableField(value = "v_3",updateStrategy = FieldStrategy.IGNORED)
private Double v3;
@TableField(value = "v_4",updateStrategy = FieldStrategy.IGNORED)
private Double v4;
@TableField(value = "v_5",updateStrategy = FieldStrategy.IGNORED)
private Double v5;
@TableField(value = "v_6",updateStrategy = FieldStrategy.IGNORED)
private Double v6;
@TableField(value = "v_7",updateStrategy = FieldStrategy.IGNORED)
private Double v7;
@TableField(value = "v_8",updateStrategy = FieldStrategy.IGNORED)
private Double v8;
@TableField(value = "v_9",updateStrategy = FieldStrategy.IGNORED)
private Double v9;
@TableField(value = "v_10",updateStrategy = FieldStrategy.IGNORED)
private Double v10;
@TableField(value = "v_11",updateStrategy = FieldStrategy.IGNORED)
private Double v11;
@TableField(value = "v_12",updateStrategy = FieldStrategy.IGNORED)
private Double v12;
@TableField(value = "v_13",updateStrategy = FieldStrategy.IGNORED)
private Double v13;
@TableField(value = "v_14",updateStrategy = FieldStrategy.IGNORED)
private Double v14;
@TableField(value = "v_15",updateStrategy = FieldStrategy.IGNORED)
private Double v15;
@TableField(value = "v_16",updateStrategy = FieldStrategy.IGNORED)
private Double v16;
@TableField(value = "v_17",updateStrategy = FieldStrategy.IGNORED)
private Double v17;
@TableField(value = "v_18",updateStrategy = FieldStrategy.IGNORED)
private Double v18;
@TableField(value = "v_19",updateStrategy = FieldStrategy.IGNORED)
private Double v19;
@TableField(value = "v_20",updateStrategy = FieldStrategy.IGNORED)
private Double v20;
@TableField(value = "v_21",updateStrategy = FieldStrategy.IGNORED)
private Double v21;
@TableField(value = "v_22",updateStrategy = FieldStrategy.IGNORED)
private Double v22;
@TableField(value = "v_23",updateStrategy = FieldStrategy.IGNORED)
private Double v23;
@TableField(value = "v_24",updateStrategy = FieldStrategy.IGNORED)
private Double v24;
@TableField(value = "v_25",updateStrategy = FieldStrategy.IGNORED)
private Double v25;
@TableField(value = "v_26",updateStrategy = FieldStrategy.IGNORED)
private Double v26;
@TableField(value = "v_27",updateStrategy = FieldStrategy.IGNORED)
private Double v27;
@TableField(value = "v_28",updateStrategy = FieldStrategy.IGNORED)
private Double v28;
@TableField(value = "v_29",updateStrategy = FieldStrategy.IGNORED)
private Double v29;
@TableField(value = "v_30",updateStrategy = FieldStrategy.IGNORED)
private Double v30;
@TableField(value = "v_31",updateStrategy = FieldStrategy.IGNORED)
private Double v31;
@TableField(value = "v_32",updateStrategy = FieldStrategy.IGNORED)
private Double v32;
@TableField(value = "v_33",updateStrategy = FieldStrategy.IGNORED)
private Double v33;
@TableField(value = "v_34",updateStrategy = FieldStrategy.IGNORED)
private Double v34;
@TableField(value = "v_35",updateStrategy = FieldStrategy.IGNORED)
private Double v35;
@TableField(value = "v_36",updateStrategy = FieldStrategy.IGNORED)
private Double v36;
@TableField(value = "v_37",updateStrategy = FieldStrategy.IGNORED)
private Double v37;
@TableField(value = "v_38",updateStrategy = FieldStrategy.IGNORED)
private Double v38;
@TableField(value = "v_39",updateStrategy = FieldStrategy.IGNORED)
private Double v39;
@TableField(value = "v_40",updateStrategy = FieldStrategy.IGNORED)
private Double v40;
@TableField(value = "v_41",updateStrategy = FieldStrategy.IGNORED)
private Double v41;
@TableField(value = "v_42",updateStrategy = FieldStrategy.IGNORED)
private Double v42;
@TableField(value = "v_43",updateStrategy = FieldStrategy.IGNORED)
private Double v43;
@TableField(value = "v_44",updateStrategy = FieldStrategy.IGNORED)
private Double v44;
@TableField(value = "v_45",updateStrategy = FieldStrategy.IGNORED)
private Double v45;
@TableField(value = "v_46",updateStrategy = FieldStrategy.IGNORED)
private Double v46;
@TableField(value = "v_47",updateStrategy = FieldStrategy.IGNORED)
private Double v47;
@TableField(value = "v_48",updateStrategy = FieldStrategy.IGNORED)
private Double v48;
@TableField(value = "v_49",updateStrategy = FieldStrategy.IGNORED)
private Double v49;
@TableField(value = "v_50",updateStrategy = FieldStrategy.IGNORED)
private Double v50;
}

View File

@@ -1,209 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* 类的介绍:
*
* @author xy
* @version 1.0.0
*/
@Data
@TableName(value = "r_stat_data_i_d")
public class RStatDataID implements Serializable {
@MppMultiId
@TableField(value = "time")
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")
private String lineId;
@MppMultiId
@TableField(value = "phasic_type")
private String phasicType;
@MppMultiId
@TableField(value = "value_type")
private String valueType;
@TableField(value = "quality_flag")
private Integer qualityFlag;
@TableField(value = "i_neg",updateStrategy = FieldStrategy.IGNORED)
private Double iNeg;
@TableField(value = "i_pos",updateStrategy = FieldStrategy.IGNORED)
private Double iPos;
@TableField(value = "i_thd",updateStrategy = FieldStrategy.IGNORED)
private Double iThd;
@TableField(value = "i_unbalance",updateStrategy = FieldStrategy.IGNORED)
private Double iUnbalance;
@TableField(value = "i_zero",updateStrategy = FieldStrategy.IGNORED)
private Double iZero;
@TableField(value = "rms",updateStrategy = FieldStrategy.IGNORED)
private Double rms;
@TableField(value = "i_1",updateStrategy = FieldStrategy.IGNORED)
private Double i1;
@TableField(value = "i_2",updateStrategy = FieldStrategy.IGNORED)
private Double i2;
@TableField(value = "i_3",updateStrategy = FieldStrategy.IGNORED)
private Double i3;
@TableField(value = "i_4",updateStrategy = FieldStrategy.IGNORED)
private Double i4;
@TableField(value = "i_5",updateStrategy = FieldStrategy.IGNORED)
private Double i5;
@TableField(value = "i_6",updateStrategy = FieldStrategy.IGNORED)
private Double i6;
@TableField(value = "i_7",updateStrategy = FieldStrategy.IGNORED)
private Double i7;
@TableField(value = "i_8",updateStrategy = FieldStrategy.IGNORED)
private Double i8;
@TableField(value = "i_9",updateStrategy = FieldStrategy.IGNORED)
private Double i9;
@TableField(value = "i_10",updateStrategy = FieldStrategy.IGNORED)
private Double i10;
@TableField(value = "i_11",updateStrategy = FieldStrategy.IGNORED)
private Double i11;
@TableField(value = "i_12",updateStrategy = FieldStrategy.IGNORED)
private Double i12;
@TableField(value = "i_13",updateStrategy = FieldStrategy.IGNORED)
private Double i13;
@TableField(value = "i_14",updateStrategy = FieldStrategy.IGNORED)
private Double i14;
@TableField(value = "i_15",updateStrategy = FieldStrategy.IGNORED)
private Double i15;
@TableField(value = "i_16",updateStrategy = FieldStrategy.IGNORED)
private Double i16;
@TableField(value = "i_17",updateStrategy = FieldStrategy.IGNORED)
private Double i17;
@TableField(value = "i_18",updateStrategy = FieldStrategy.IGNORED)
private Double i18;
@TableField(value = "i_19",updateStrategy = FieldStrategy.IGNORED)
private Double i19;
@TableField(value = "i_20",updateStrategy = FieldStrategy.IGNORED)
private Double i20;
@TableField(value = "i_21",updateStrategy = FieldStrategy.IGNORED)
private Double i21;
@TableField(value = "i_22",updateStrategy = FieldStrategy.IGNORED)
private Double i22;
@TableField(value = "i_23",updateStrategy = FieldStrategy.IGNORED)
private Double i23;
@TableField(value = "i_24",updateStrategy = FieldStrategy.IGNORED)
private Double i24;
@TableField(value = "i_25",updateStrategy = FieldStrategy.IGNORED)
private Double i25;
@TableField(value = "i_26",updateStrategy = FieldStrategy.IGNORED)
private Double i26;
@TableField(value = "i_27",updateStrategy = FieldStrategy.IGNORED)
private Double i27;
@TableField(value = "i_28",updateStrategy = FieldStrategy.IGNORED)
private Double i28;
@TableField(value = "i_29",updateStrategy = FieldStrategy.IGNORED)
private Double i29;
@TableField(value = "i_30",updateStrategy = FieldStrategy.IGNORED)
private Double i30;
@TableField(value = "i_31",updateStrategy = FieldStrategy.IGNORED)
private Double i31;
@TableField(value = "i_32",updateStrategy = FieldStrategy.IGNORED)
private Double i32;
@TableField(value = "i_33",updateStrategy = FieldStrategy.IGNORED)
private Double i33;
@TableField(value = "i_34",updateStrategy = FieldStrategy.IGNORED)
private Double i34;
@TableField(value = "i_35",updateStrategy = FieldStrategy.IGNORED)
private Double i35;
@TableField(value = "i_36",updateStrategy = FieldStrategy.IGNORED)
private Double i36;
@TableField(value = "i_37",updateStrategy = FieldStrategy.IGNORED)
private Double i37;
@TableField(value = "i_38",updateStrategy = FieldStrategy.IGNORED)
private Double i38;
@TableField(value = "i_39",updateStrategy = FieldStrategy.IGNORED)
private Double i39;
@TableField(value = "i_40",updateStrategy = FieldStrategy.IGNORED)
private Double i40;
@TableField(value = "i_41",updateStrategy = FieldStrategy.IGNORED)
private Double i41;
@TableField(value = "i_42",updateStrategy = FieldStrategy.IGNORED)
private Double i42;
@TableField(value = "i_43",updateStrategy = FieldStrategy.IGNORED)
private Double i43;
@TableField(value = "i_44",updateStrategy = FieldStrategy.IGNORED)
private Double i44;
@TableField(value = "i_45",updateStrategy = FieldStrategy.IGNORED)
private Double i45;
@TableField(value = "i_46",updateStrategy = FieldStrategy.IGNORED)
private Double i46;
@TableField(value = "i_47",updateStrategy = FieldStrategy.IGNORED)
private Double i47;
@TableField(value = "i_48",updateStrategy = FieldStrategy.IGNORED)
private Double i48;
@TableField(value = "i_49",updateStrategy = FieldStrategy.IGNORED)
private Double i49;
@TableField(value = "i_50",updateStrategy = FieldStrategy.IGNORED)
private Double i50;
}

View File

@@ -1,191 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* 类的介绍:
*
* @author xy
* @version 1.0.0
*/
@Data
@TableName(value = "R_STAT_DATA_INHARM_I_D")
public class RStatDataInHarmID implements Serializable {
@MppMultiId
@TableField(value = "time")
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")
private String lineId;
@MppMultiId
@TableField(value = "phasic_type")
private String phasicType;
@MppMultiId
@TableField(value = "value_type")
private String valueType;
@TableField(value = "quality_flag")
private Integer qualityFlag;
@TableField(value = "i_1",updateStrategy = FieldStrategy.IGNORED)
private Double i1;
@TableField(value = "i_2",updateStrategy = FieldStrategy.IGNORED)
private Double i2;
@TableField(value = "i_3",updateStrategy = FieldStrategy.IGNORED)
private Double i3;
@TableField(value = "i_4",updateStrategy = FieldStrategy.IGNORED)
private Double i4;
@TableField(value = "i_5",updateStrategy = FieldStrategy.IGNORED)
private Double i5;
@TableField(value = "i_6",updateStrategy = FieldStrategy.IGNORED)
private Double i6;
@TableField(value = "i_7",updateStrategy = FieldStrategy.IGNORED)
private Double i7;
@TableField(value = "i_8",updateStrategy = FieldStrategy.IGNORED)
private Double i8;
@TableField(value = "i_9",updateStrategy = FieldStrategy.IGNORED)
private Double i9;
@TableField(value = "i_10",updateStrategy = FieldStrategy.IGNORED)
private Double i10;
@TableField(value = "i_11",updateStrategy = FieldStrategy.IGNORED)
private Double i11;
@TableField(value = "i_12",updateStrategy = FieldStrategy.IGNORED)
private Double i12;
@TableField(value = "i_13",updateStrategy = FieldStrategy.IGNORED)
private Double i13;
@TableField(value = "i_14",updateStrategy = FieldStrategy.IGNORED)
private Double i14;
@TableField(value = "i_15",updateStrategy = FieldStrategy.IGNORED)
private Double i15;
@TableField(value = "i_16",updateStrategy = FieldStrategy.IGNORED)
private Double i16;
@TableField(value = "i_17",updateStrategy = FieldStrategy.IGNORED)
private Double i17;
@TableField(value = "i_18",updateStrategy = FieldStrategy.IGNORED)
private Double i18;
@TableField(value = "i_19",updateStrategy = FieldStrategy.IGNORED)
private Double i19;
@TableField(value = "i_20",updateStrategy = FieldStrategy.IGNORED)
private Double i20;
@TableField(value = "i_21",updateStrategy = FieldStrategy.IGNORED)
private Double i21;
@TableField(value = "i_22",updateStrategy = FieldStrategy.IGNORED)
private Double i22;
@TableField(value = "i_23",updateStrategy = FieldStrategy.IGNORED)
private Double i23;
@TableField(value = "i_24",updateStrategy = FieldStrategy.IGNORED)
private Double i24;
@TableField(value = "i_25",updateStrategy = FieldStrategy.IGNORED)
private Double i25;
@TableField(value = "i_26",updateStrategy = FieldStrategy.IGNORED)
private Double i26;
@TableField(value = "i_27",updateStrategy = FieldStrategy.IGNORED)
private Double i27;
@TableField(value = "i_28",updateStrategy = FieldStrategy.IGNORED)
private Double i28;
@TableField(value = "i_29",updateStrategy = FieldStrategy.IGNORED)
private Double i29;
@TableField(value = "i_30",updateStrategy = FieldStrategy.IGNORED)
private Double i30;
@TableField(value = "i_31",updateStrategy = FieldStrategy.IGNORED)
private Double i31;
@TableField(value = "i_32",updateStrategy = FieldStrategy.IGNORED)
private Double i32;
@TableField(value = "i_33",updateStrategy = FieldStrategy.IGNORED)
private Double i33;
@TableField(value = "i_34",updateStrategy = FieldStrategy.IGNORED)
private Double i34;
@TableField(value = "i_35",updateStrategy = FieldStrategy.IGNORED)
private Double i35;
@TableField(value = "i_36",updateStrategy = FieldStrategy.IGNORED)
private Double i36;
@TableField(value = "i_37",updateStrategy = FieldStrategy.IGNORED)
private Double i37;
@TableField(value = "i_38",updateStrategy = FieldStrategy.IGNORED)
private Double i38;
@TableField(value = "i_39",updateStrategy = FieldStrategy.IGNORED)
private Double i39;
@TableField(value = "i_40",updateStrategy = FieldStrategy.IGNORED)
private Double i40;
@TableField(value = "i_41",updateStrategy = FieldStrategy.IGNORED)
private Double i41;
@TableField(value = "i_42",updateStrategy = FieldStrategy.IGNORED)
private Double i42;
@TableField(value = "i_43",updateStrategy = FieldStrategy.IGNORED)
private Double i43;
@TableField(value = "i_44",updateStrategy = FieldStrategy.IGNORED)
private Double i44;
@TableField(value = "i_45",updateStrategy = FieldStrategy.IGNORED)
private Double i45;
@TableField(value = "i_46",updateStrategy = FieldStrategy.IGNORED)
private Double i46;
@TableField(value = "i_47",updateStrategy = FieldStrategy.IGNORED)
private Double i47;
@TableField(value = "i_48",updateStrategy = FieldStrategy.IGNORED)
private Double i48;
@TableField(value = "i_49",updateStrategy = FieldStrategy.IGNORED)
private Double i49;
@TableField(value = "i_50",updateStrategy = FieldStrategy.IGNORED)
private Double i50;
}

View File

@@ -1,191 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* 类的介绍:
*
* @author xy
* @version 1.0.0
*/
@Data
@TableName(value = "R_STAT_DATA_INHARM_V_D")
public class RStatDataInHarmVD implements Serializable {
@MppMultiId
@TableField(value = "time")
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")
private String lineId;
@MppMultiId
@TableField(value = "phasic_type")
private String phasicType;
@MppMultiId
@TableField(value = "value_type")
private String valueType;
@TableField(value = "quality_flag")
private Integer qualityFlag;
@TableField(value = "v_1",updateStrategy = FieldStrategy.IGNORED)
private Double v1;
@TableField(value = "v_2",updateStrategy = FieldStrategy.IGNORED)
private Double v2;
@TableField(value = "v_3",updateStrategy = FieldStrategy.IGNORED)
private Double v3;
@TableField(value = "v_4",updateStrategy = FieldStrategy.IGNORED)
private Double v4;
@TableField(value = "v_5",updateStrategy = FieldStrategy.IGNORED)
private Double v5;
@TableField(value = "v_6",updateStrategy = FieldStrategy.IGNORED)
private Double v6;
@TableField(value = "v_7",updateStrategy = FieldStrategy.IGNORED)
private Double v7;
@TableField(value = "v_8",updateStrategy = FieldStrategy.IGNORED)
private Double v8;
@TableField(value = "v_9",updateStrategy = FieldStrategy.IGNORED)
private Double v9;
@TableField(value = "v_10",updateStrategy = FieldStrategy.IGNORED)
private Double v10;
@TableField(value = "v_11",updateStrategy = FieldStrategy.IGNORED)
private Double v11;
@TableField(value = "v_12",updateStrategy = FieldStrategy.IGNORED)
private Double v12;
@TableField(value = "v_13",updateStrategy = FieldStrategy.IGNORED)
private Double v13;
@TableField(value = "v_14",updateStrategy = FieldStrategy.IGNORED)
private Double v14;
@TableField(value = "v_15",updateStrategy = FieldStrategy.IGNORED)
private Double v15;
@TableField(value = "v_16",updateStrategy = FieldStrategy.IGNORED)
private Double v16;
@TableField(value = "v_17",updateStrategy = FieldStrategy.IGNORED)
private Double v17;
@TableField(value = "v_18",updateStrategy = FieldStrategy.IGNORED)
private Double v18;
@TableField(value = "v_19",updateStrategy = FieldStrategy.IGNORED)
private Double v19;
@TableField(value = "v_20",updateStrategy = FieldStrategy.IGNORED)
private Double v20;
@TableField(value = "v_21",updateStrategy = FieldStrategy.IGNORED)
private Double v21;
@TableField(value = "v_22",updateStrategy = FieldStrategy.IGNORED)
private Double v22;
@TableField(value = "v_23",updateStrategy = FieldStrategy.IGNORED)
private Double v23;
@TableField(value = "v_24",updateStrategy = FieldStrategy.IGNORED)
private Double v24;
@TableField(value = "v_25",updateStrategy = FieldStrategy.IGNORED)
private Double v25;
@TableField(value = "v_26",updateStrategy = FieldStrategy.IGNORED)
private Double v26;
@TableField(value = "v_27",updateStrategy = FieldStrategy.IGNORED)
private Double v27;
@TableField(value = "v_28",updateStrategy = FieldStrategy.IGNORED)
private Double v28;
@TableField(value = "v_29",updateStrategy = FieldStrategy.IGNORED)
private Double v29;
@TableField(value = "v_30",updateStrategy = FieldStrategy.IGNORED)
private Double v30;
@TableField(value = "v_31",updateStrategy = FieldStrategy.IGNORED)
private Double v31;
@TableField(value = "v_32",updateStrategy = FieldStrategy.IGNORED)
private Double v32;
@TableField(value = "v_33",updateStrategy = FieldStrategy.IGNORED)
private Double v33;
@TableField(value = "v_34",updateStrategy = FieldStrategy.IGNORED)
private Double v34;
@TableField(value = "v_35",updateStrategy = FieldStrategy.IGNORED)
private Double v35;
@TableField(value = "v_36",updateStrategy = FieldStrategy.IGNORED)
private Double v36;
@TableField(value = "v_37",updateStrategy = FieldStrategy.IGNORED)
private Double v37;
@TableField(value = "v_38",updateStrategy = FieldStrategy.IGNORED)
private Double v38;
@TableField(value = "v_39",updateStrategy = FieldStrategy.IGNORED)
private Double v39;
@TableField(value = "v_40",updateStrategy = FieldStrategy.IGNORED)
private Double v40;
@TableField(value = "v_41",updateStrategy = FieldStrategy.IGNORED)
private Double v41;
@TableField(value = "v_42",updateStrategy = FieldStrategy.IGNORED)
private Double v42;
@TableField(value = "v_43",updateStrategy = FieldStrategy.IGNORED)
private Double v43;
@TableField(value = "v_44",updateStrategy = FieldStrategy.IGNORED)
private Double v44;
@TableField(value = "v_45",updateStrategy = FieldStrategy.IGNORED)
private Double v45;
@TableField(value = "v_46",updateStrategy = FieldStrategy.IGNORED)
private Double v46;
@TableField(value = "v_47",updateStrategy = FieldStrategy.IGNORED)
private Double v47;
@TableField(value = "v_48",updateStrategy = FieldStrategy.IGNORED)
private Double v48;
@TableField(value = "v_49",updateStrategy = FieldStrategy.IGNORED)
private Double v49;
@TableField(value = "v_50",updateStrategy = FieldStrategy.IGNORED)
private Double v50;
}

View File

@@ -1,44 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* 类的介绍:
*
* @author xy
* @version 1.0.0
*/
@Data
@TableName(value = "R_STAT_DATA_PLT_D")
public class RStatDataPltD implements Serializable {
@MppMultiId
@TableField(value = "time")
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")
private String lineId;
@MppMultiId
@TableField(value = "phasic_type")
private String phasicType;
@MppMultiId
@TableField(value = "value_type")
private String valueType;
@TableField(value = "quality_flag")
private Integer qualityFlag;
@TableField(value = "plt",updateStrategy = FieldStrategy.IGNORED)
private Double plt;
}

View File

@@ -1,224 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* 类的介绍:
*
* @author xy
* @version 1.0.0
*/
@Data
@TableName(value = "r_stat_data_v_d")
public class RStatDataVD implements Serializable {
@MppMultiId
@TableField(value = "time")
private LocalDate time;
@MppMultiId
@TableField(value = "line_id")
private String lineId;
@MppMultiId
@TableField(value = "phasic_type")
private String phasicType;
@MppMultiId
@TableField(value = "value_type")
private String valueType;
@TableField(value = "quality_flag")
private Integer qualityFlag;
@TableField(value = "freq",updateStrategy = FieldStrategy.IGNORED)
private Double freq;
@TableField(value = "freq_dev",updateStrategy = FieldStrategy.IGNORED)
private Double freqDev;
@TableField(value = "rms",updateStrategy = FieldStrategy.IGNORED)
private Double rms;
@TableField(value = "rms_lvr",updateStrategy = FieldStrategy.IGNORED)
private Double rmsLvr;
@TableField(value = "v_neg",updateStrategy = FieldStrategy.IGNORED)
private Double vNeg;
@TableField(value = "v_pos",updateStrategy = FieldStrategy.IGNORED)
private Double vPos;
@TableField(value = "v_thd",updateStrategy = FieldStrategy.IGNORED)
private Double vThd;
@TableField(value = "v_unbalance",updateStrategy = FieldStrategy.IGNORED)
private Double vUnbalance;
@TableField(value = "v_zero",updateStrategy = FieldStrategy.IGNORED)
private Double vZero;
@TableField(value = "vl_dev",updateStrategy = FieldStrategy.IGNORED)
private Double vlDev;
@TableField(value = "vu_dev",updateStrategy = FieldStrategy.IGNORED)
private Double vuDev;
@TableField(value = "v_1",updateStrategy = FieldStrategy.IGNORED)
private Double v1;
@TableField(value = "v_2",updateStrategy = FieldStrategy.IGNORED)
private Double v2;
@TableField(value = "v_3",updateStrategy = FieldStrategy.IGNORED)
private Double v3;
@TableField(value = "v_4",updateStrategy = FieldStrategy.IGNORED)
private Double v4;
@TableField(value = "v_5",updateStrategy = FieldStrategy.IGNORED)
private Double v5;
@TableField(value = "v_6",updateStrategy = FieldStrategy.IGNORED)
private Double v6;
@TableField(value = "v_7",updateStrategy = FieldStrategy.IGNORED)
private Double v7;
@TableField(value = "v_8",updateStrategy = FieldStrategy.IGNORED)
private Double v8;
@TableField(value = "v_9",updateStrategy = FieldStrategy.IGNORED)
private Double v9;
@TableField(value = "v_10",updateStrategy = FieldStrategy.IGNORED)
private Double v10;
@TableField(value = "v_11",updateStrategy = FieldStrategy.IGNORED)
private Double v11;
@TableField(value = "v_12",updateStrategy = FieldStrategy.IGNORED)
private Double v12;
@TableField(value = "v_13",updateStrategy = FieldStrategy.IGNORED)
private Double v13;
@TableField(value = "v_14",updateStrategy = FieldStrategy.IGNORED)
private Double v14;
@TableField(value = "v_15",updateStrategy = FieldStrategy.IGNORED)
private Double v15;
@TableField(value = "v_16",updateStrategy = FieldStrategy.IGNORED)
private Double v16;
@TableField(value = "v_17",updateStrategy = FieldStrategy.IGNORED)
private Double v17;
@TableField(value = "v_18",updateStrategy = FieldStrategy.IGNORED)
private Double v18;
@TableField(value = "v_19",updateStrategy = FieldStrategy.IGNORED)
private Double v19;
@TableField(value = "v_20",updateStrategy = FieldStrategy.IGNORED)
private Double v20;
@TableField(value = "v_21",updateStrategy = FieldStrategy.IGNORED)
private Double v21;
@TableField(value = "v_22",updateStrategy = FieldStrategy.IGNORED)
private Double v22;
@TableField(value = "v_23",updateStrategy = FieldStrategy.IGNORED)
private Double v23;
@TableField(value = "v_24",updateStrategy = FieldStrategy.IGNORED)
private Double v24;
@TableField(value = "v_25",updateStrategy = FieldStrategy.IGNORED)
private Double v25;
@TableField(value = "v_26",updateStrategy = FieldStrategy.IGNORED)
private Double v26;
@TableField(value = "v_27",updateStrategy = FieldStrategy.IGNORED)
private Double v27;
@TableField(value = "v_28",updateStrategy = FieldStrategy.IGNORED)
private Double v28;
@TableField(value = "v_29",updateStrategy = FieldStrategy.IGNORED)
private Double v29;
@TableField(value = "v_30",updateStrategy = FieldStrategy.IGNORED)
private Double v30;
@TableField(value = "v_31",updateStrategy = FieldStrategy.IGNORED)
private Double v31;
@TableField(value = "v_32",updateStrategy = FieldStrategy.IGNORED)
private Double v32;
@TableField(value = "v_33",updateStrategy = FieldStrategy.IGNORED)
private Double v33;
@TableField(value = "v_34",updateStrategy = FieldStrategy.IGNORED)
private Double v34;
@TableField(value = "v_35",updateStrategy = FieldStrategy.IGNORED)
private Double v35;
@TableField(value = "v_36",updateStrategy = FieldStrategy.IGNORED)
private Double v36;
@TableField(value = "v_37",updateStrategy = FieldStrategy.IGNORED)
private Double v37;
@TableField(value = "v_38",updateStrategy = FieldStrategy.IGNORED)
private Double v38;
@TableField(value = "v_39",updateStrategy = FieldStrategy.IGNORED)
private Double v39;
@TableField(value = "v_40",updateStrategy = FieldStrategy.IGNORED)
private Double v40;
@TableField(value = "v_41",updateStrategy = FieldStrategy.IGNORED)
private Double v41;
@TableField(value = "v_42",updateStrategy = FieldStrategy.IGNORED)
private Double v42;
@TableField(value = "v_43",updateStrategy = FieldStrategy.IGNORED)
private Double v43;
@TableField(value = "v_44",updateStrategy = FieldStrategy.IGNORED)
private Double v44;
@TableField(value = "v_45",updateStrategy = FieldStrategy.IGNORED)
private Double v45;
@TableField(value = "v_46",updateStrategy = FieldStrategy.IGNORED)
private Double v46;
@TableField(value = "v_47",updateStrategy = FieldStrategy.IGNORED)
private Double v47;
@TableField(value = "v_48",updateStrategy = FieldStrategy.IGNORED)
private Double v48;
@TableField(value = "v_49",updateStrategy = FieldStrategy.IGNORED)
private Double v49;
@TableField(value = "v_50",updateStrategy = FieldStrategy.IGNORED)
private Double v50;
}

View File

@@ -1,43 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
/**
* <p>
* 数据完整性日表
* </p>
*
* @author hongawen
* @since 2023-03-28
*/
@Data
@TableName("r_stat_integrity_d")
public class RStatIntegrityD {
private static final long serialVersionUID = 1L;
@MppMultiId
@TableField(value = "time_id")
private String timeId;
@MppMultiId
@TableField(value = "line_index")
private String lineIndex;
/**
* 应收数量
*/
@TableField(value = "due_time")
private Integer dueTime;
/**
* 实收数量
*/
@TableField(value = "real_time")
private Integer realTime;
}

View File

@@ -1,450 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
@Data
@TableName(value = "r_stat_limit_qualified_d")
public class RStatLimitQualifiedD implements Serializable {
/**
* 监测点ID合格率的变电站/装置/母线/线路序号
*/
@MppMultiId
@TableField(value = "my_index")
private String lineId;
/**
* 合格率时间
*/
@MppMultiId
@TableField(value = "time_id")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private String time;
/**
* 闪变越限次数
*/
@TableField(value = "flicker_overtime")
private Double flickerOvertime;
/**
* 频率偏差越限次数
*/
@TableField(value = "freq_dev_overtime")
private Double freqDevOvertime;
/**
* 电压偏差越限次数
*/
@TableField(value = "voltage_dev_overtime")
private Double voltageDevOvertime;
/**
* 三相电压不平衡度越限次数
*/
@TableField(value = "ubalance_overtime")
private Double ubalanceOvertime;
/**
* 电压谐波畸变率越限次数
*/
@TableField(value = "uaberrance_overtime")
private Double uaberranceOvertime;
/**
* 负序电流限值次数
*/
@TableField(value = "i_neg_overtime")
private Double iNegOvertime;
/**
* 2次电压谐波含有率越限次数
*/
@TableField(value = "uharm_2_overtime")
private Double uharm2Overtime;
/**
* 3次电压谐波含有率越限次数
*/
@TableField(value = "uharm_3_overtime")
private Double uharm3Overtime;
/**
* 4次电压谐波含有率越限次数
*/
@TableField(value = "uharm_4_overtime")
private Double uharm4Overtime;
/**
* 5次电压谐波含有率越限次数
*/
@TableField(value = "uharm_5_overtime")
private Double uharm5Overtime;
/**
* 6次电压谐波含有率越限次数
*/
@TableField(value = "uharm_6_overtime")
private Double uharm6Overtime;
/**
* 7次电压谐波含有率越限次数
*/
@TableField(value = "uharm_7_overtime")
private Double uharm7Overtime;
/**
* 8次电压谐波含有率越限次数
*/
@TableField(value = "uharm_8_overtime")
private Double uharm8Overtime;
/**
* 9次电压谐波含有率越限次数
*/
@TableField(value = "uharm_9_overtime")
private Double uharm9Overtime;
/**
* 10次电压谐波含有率越限次数
*/
@TableField(value = "uharm_10_overtime")
private Double uharm10Overtime;
/**
* 11次电压谐波含有率越限次数
*/
@TableField(value = "uharm_11_overtime")
private Double uharm11Overtime;
/**
* 12次电压谐波含有率越限次数
*/
@TableField(value = "uharm_12_overtime")
private Double uharm12Overtime;
/**
* 13次电压谐波含有率越限次数
*/
@TableField(value = "uharm_13_overtime")
private Double uharm13Overtime;
/**
* 14次电压谐波含有率越限次数
*/
@TableField(value = "uharm_14_overtime")
private Double uharm14Overtime;
/**
* 15次电压谐波含有率越限次数
*/
@TableField(value = "uharm_15_overtime")
private Double uharm15Overtime;
/**
* 16次电压谐波含有率越限次数
*/
@TableField(value = "uharm_16_overtime")
private Double uharm16Overtime;
/**
* 17次电压谐波含有率越限次数
*/
@TableField(value = "uharm_17_overtime")
private Double uharm17Overtime;
/**
* 18次电压谐波含有率越限次数
*/
@TableField(value = "uharm_18_overtime")
private Double uharm18Overtime;
/**
* 19次电压谐波含有率越限次数
*/
@TableField(value = "uharm_19_overtime")
private Double uharm19Overtime;
/**
* 20次电压谐波含有率越限次数
*/
@TableField(value = "uharm_20_overtime")
private Double uharm20Overtime;
/**
* 21次电压谐波含有率越限次数
*/
@TableField(value = "uharm_21_overtime")
private Double uharm21Overtime;
/**
* 22次电压谐波含有率越限次数
*/
@TableField(value = "uharm_22_overtime")
private Double uharm22Overtime;
/**
* 23次电压谐波含有率越限次数
*/
@TableField(value = "uharm_23_overtime")
private Double uharm23Overtime;
/**
* 24次电压谐波含有率越限次数
*/
@TableField(value = "uharm_24_overtime")
private Double uharm24Overtime;
/**
* 25次电压谐波含有率越限次数
*/
@TableField(value = "uharm_25_overtime")
private Double uharm25Overtime;
/**
* 2次电流谐波幅值越限次数
*/
@TableField(value = "iharm_2_overtime")
private Double iharm2Overtime;
/**
* 3次电流谐波幅值越限次数
*/
@TableField(value = "iharm_3_overtime")
private Double iharm3Overtime;
/**
* 4次电流谐波幅值越限次数
*/
@TableField(value = "iharm_4_overtime")
private Double iharm4Overtime;
/**
* 5次电流谐波幅值越限次数
*/
@TableField(value = "iharm_5_overtime")
private Double iharm5Overtime;
/**
* 6次电流谐波幅值越限次数
*/
@TableField(value = "iharm_6_overtime")
private Double iharm6Overtime;
/**
* 7次电流谐波幅值越限次数
*/
@TableField(value = "iharm_7_overtime")
private Double iharm7Overtime;
/**
* 8次电流谐波幅值越限次数
*/
@TableField(value = "iharm_8_overtime")
private Double iharm8Overtime;
/**
* 9次电流谐波幅值越限次数
*/
@TableField(value = "iharm_9_overtime")
private Double iharm9Overtime;
/**
* 10次电流谐波幅值越限次数
*/
@TableField(value = "iharm_10_overtime")
private Double iharm10Overtime;
/**
* 11次电流谐波幅值越限次数
*/
@TableField(value = "iharm_11_overtime")
private Double iharm11Overtime;
/**
* 12次电流谐波幅值越限次数
*/
@TableField(value = "iharm_12_overtime")
private Double iharm12Overtime;
/**
* 13次电流谐波幅值越限次数
*/
@TableField(value = "iharm_13_overtime")
private Double iharm13Overtime;
/**
* 14次电流谐波幅值越限次数
*/
@TableField(value = "iharm_14_overtime")
private Double iharm14Overtime;
/**
* 15次电流谐波幅值越限次数
*/
@TableField(value = "iharm_15_overtime")
private Double iharm15Overtime;
/**
* 16次电流谐波幅值越限次数
*/
@TableField(value = "iharm_16_overtime")
private Double iharm16Overtime;
/**
* 17次电流谐波幅值越限次数
*/
@TableField(value = "iharm_17_overtime")
private Double iharm17Overtime;
/**
* 18次电流谐波幅值越限次数
*/
@TableField(value = "iharm_18_overtime")
private Double iharm18Overtime;
/**
* 19次电流谐波幅值越限次数
*/
@TableField(value = "iharm_19_overtime")
private Double iharm19Overtime;
/**
* 20次电流谐波幅值越限次数
*/
@TableField(value = "iharm_20_overtime")
private Double iharm20Overtime;
/**
* 21次电流谐波幅值越限次数
*/
@TableField(value = "iharm_21_overtime")
private Double iharm21Overtime;
/**
* 22次电流谐波幅值越限次数
*/
@TableField(value = "iharm_22_overtime")
private Double iharm22Overtime;
/**
* 23次电流谐波幅值越限次数
*/
@TableField(value = "iharm_23_overtime")
private Double iharm23Overtime;
/**
* 24次电流谐波幅值越限次数
*/
@TableField(value = "iharm_24_overtime")
private Double iharm24Overtime;
/**
* 25次电流谐波幅值越限次数
*/
@TableField(value = "iharm_25_overtime")
private Double iharm25Overtime;
/**
* 0.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_1_overtime")
private Double inuharm1Overtime;
/**
* 1.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_2_overtime")
private Double inuharm2Overtime;
/**
* 2.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_3_overtime")
private Double inuharm3Overtime;
/**
* 3.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_4_overtime")
private Double inuharm4Overtime;
/**
* 4.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_5_overtime")
private Double inuharm5Overtime;
/**
* 5.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_6_overtime")
private Double inuharm6Overtime;
/**
* 6.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_7_overtime")
private Double inuharm7Overtime;
/**
* 7.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_8_overtime")
private Double inuharm8Overtime;
/**
* 8.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_9_overtime")
private Double inuharm9Overtime;
/**
* 9.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_10_overtime")
private Double inuharm10Overtime;
/**
* 10.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_11_overtime")
private Double inuharm11Overtime;
/**
* 11.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_12_overtime")
private Double inuharm12Overtime;
/**
* 12.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_13_overtime")
private Double inuharm13Overtime;
/**
* 13.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_14_overtime")
private Double inuharm14Overtime;
/**
* 14.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_15_overtime")
private Double inuharm15Overtime;
/**
* 15.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_16_overtime")
private Double inuharm16Overtime;
}

View File

@@ -1,468 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
@Data
@TableName(value = "r_stat_limit_rate_d")
public class RStatLimitRateD implements Serializable {
/**
* 监测点ID合格率的变电站/装置/母线/线路序号
*/
@MppMultiId
@TableField(value = "my_index")
private String lineId;
/**
* 数据类型,A表示A相B表示B相,C表示C相,M表示ABC三项总和T表示总
*/
@MppMultiId
@TableField(value = "phasic_type")
private String phasicType;
/**
* 合格率时间
*/
@MppMultiId
@TableField(value = "time_id")
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
private LocalDate time;
/**
* 总计算次数
*/
@TableField(value = "all_time")
private Integer allTime;
/**
* 闪变越限次数
*/
@TableField(value = "flicker_overtime")
private Integer flickerOvertime;
/**
* 闪变总计算次数
*/
@TableField(value = "flicker_all_time")
private Integer flickerAllTime;
/**
* 频率偏差越限次数
*/
@TableField(value = "freq_dev_overtime")
private Integer freqDevOvertime;
/**
* 电压偏差越限次数
*/
@TableField(value = "voltage_dev_overtime")
private Integer voltageDevOvertime;
/**
* 三相电压不平衡度越限次数
*/
@TableField(value = "ubalance_overtime")
private Integer ubalanceOvertime;
/**
* 电压谐波畸变率越限次数
*/
@TableField(value = "uaberrance_overtime")
private Integer uaberranceOvertime;
/**
* 负序电流限值次数
*/
@TableField(value = "i_neg_overtime")
private Integer iNegOvertime;
/**
* 2次电压谐波含有率越限次数
*/
@TableField(value = "uharm_2_overtime")
private Integer uharm2Overtime;
/**
* 3次电压谐波含有率越限次数
*/
@TableField(value = "uharm_3_overtime")
private Integer uharm3Overtime;
/**
* 4次电压谐波含有率越限次数
*/
@TableField(value = "uharm_4_overtime")
private Integer uharm4Overtime;
/**
* 5次电压谐波含有率越限次数
*/
@TableField(value = "uharm_5_overtime")
private Integer uharm5Overtime;
/**
* 6次电压谐波含有率越限次数
*/
@TableField(value = "uharm_6_overtime")
private Integer uharm6Overtime;
/**
* 7次电压谐波含有率越限次数
*/
@TableField(value = "uharm_7_overtime")
private Integer uharm7Overtime;
/**
* 8次电压谐波含有率越限次数
*/
@TableField(value = "uharm_8_overtime")
private Integer uharm8Overtime;
/**
* 9次电压谐波含有率越限次数
*/
@TableField(value = "uharm_9_overtime")
private Integer uharm9Overtime;
/**
* 10次电压谐波含有率越限次数
*/
@TableField(value = "uharm_10_overtime")
private Integer uharm10Overtime;
/**
* 11次电压谐波含有率越限次数
*/
@TableField(value = "uharm_11_overtime")
private Integer uharm11Overtime;
/**
* 12次电压谐波含有率越限次数
*/
@TableField(value = "uharm_12_overtime")
private Integer uharm12Overtime;
/**
* 13次电压谐波含有率越限次数
*/
@TableField(value = "uharm_13_overtime")
private Integer uharm13Overtime;
/**
* 14次电压谐波含有率越限次数
*/
@TableField(value = "uharm_14_overtime")
private Integer uharm14Overtime;
/**
* 15次电压谐波含有率越限次数
*/
@TableField(value = "uharm_15_overtime")
private Integer uharm15Overtime;
/**
* 16次电压谐波含有率越限次数
*/
@TableField(value = "uharm_16_overtime")
private Integer uharm16Overtime;
/**
* 17次电压谐波含有率越限次数
*/
@TableField(value = "uharm_17_overtime")
private Integer uharm17Overtime;
/**
* 18次电压谐波含有率越限次数
*/
@TableField(value = "uharm_18_overtime")
private Integer uharm18Overtime;
/**
* 19次电压谐波含有率越限次数
*/
@TableField(value = "uharm_19_overtime")
private Integer uharm19Overtime;
/**
* 20次电压谐波含有率越限次数
*/
@TableField(value = "uharm_20_overtime")
private Integer uharm20Overtime;
/**
* 21次电压谐波含有率越限次数
*/
@TableField(value = "uharm_21_overtime")
private Integer uharm21Overtime;
/**
* 22次电压谐波含有率越限次数
*/
@TableField(value = "uharm_22_overtime")
private Integer uharm22Overtime;
/**
* 23次电压谐波含有率越限次数
*/
@TableField(value = "uharm_23_overtime")
private Integer uharm23Overtime;
/**
* 24次电压谐波含有率越限次数
*/
@TableField(value = "uharm_24_overtime")
private Integer uharm24Overtime;
/**
* 25次电压谐波含有率越限次数
*/
@TableField(value = "uharm_25_overtime")
private Integer uharm25Overtime;
/**
* 2次电流谐波幅值越限次数
*/
@TableField(value = "iharm_2_overtime")
private Integer iharm2Overtime;
/**
* 3次电流谐波幅值越限次数
*/
@TableField(value = "iharm_3_overtime")
private Integer iharm3Overtime;
/**
* 4次电流谐波幅值越限次数
*/
@TableField(value = "iharm_4_overtime")
private Integer iharm4Overtime;
/**
* 5次电流谐波幅值越限次数
*/
@TableField(value = "iharm_5_overtime")
private Integer iharm5Overtime;
/**
* 6次电流谐波幅值越限次数
*/
@TableField(value = "iharm_6_overtime")
private Integer iharm6Overtime;
/**
* 7次电流谐波幅值越限次数
*/
@TableField(value = "iharm_7_overtime")
private Integer iharm7Overtime;
/**
* 8次电流谐波幅值越限次数
*/
@TableField(value = "iharm_8_overtime")
private Integer iharm8Overtime;
/**
* 9次电流谐波幅值越限次数
*/
@TableField(value = "iharm_9_overtime")
private Integer iharm9Overtime;
/**
* 10次电流谐波幅值越限次数
*/
@TableField(value = "iharm_10_overtime")
private Integer iharm10Overtime;
/**
* 11次电流谐波幅值越限次数
*/
@TableField(value = "iharm_11_overtime")
private Integer iharm11Overtime;
/**
* 12次电流谐波幅值越限次数
*/
@TableField(value = "iharm_12_overtime")
private Integer iharm12Overtime;
/**
* 13次电流谐波幅值越限次数
*/
@TableField(value = "iharm_13_overtime")
private Integer iharm13Overtime;
/**
* 14次电流谐波幅值越限次数
*/
@TableField(value = "iharm_14_overtime")
private Integer iharm14Overtime;
/**
* 15次电流谐波幅值越限次数
*/
@TableField(value = "iharm_15_overtime")
private Integer iharm15Overtime;
/**
* 16次电流谐波幅值越限次数
*/
@TableField(value = "iharm_16_overtime")
private Integer iharm16Overtime;
/**
* 17次电流谐波幅值越限次数
*/
@TableField(value = "iharm_17_overtime")
private Integer iharm17Overtime;
/**
* 18次电流谐波幅值越限次数
*/
@TableField(value = "iharm_18_overtime")
private Integer iharm18Overtime;
/**
* 19次电流谐波幅值越限次数
*/
@TableField(value = "iharm_19_overtime")
private Integer iharm19Overtime;
/**
* 20次电流谐波幅值越限次数
*/
@TableField(value = "iharm_20_overtime")
private Integer iharm20Overtime;
/**
* 21次电流谐波幅值越限次数
*/
@TableField(value = "iharm_21_overtime")
private Integer iharm21Overtime;
/**
* 22次电流谐波幅值越限次数
*/
@TableField(value = "iharm_22_overtime")
private Integer iharm22Overtime;
/**
* 23次电流谐波幅值越限次数
*/
@TableField(value = "iharm_23_overtime")
private Integer iharm23Overtime;
/**
* 24次电流谐波幅值越限次数
*/
@TableField(value = "iharm_24_overtime")
private Integer iharm24Overtime;
/**
* 25次电流谐波幅值越限次数
*/
@TableField(value = "iharm_25_overtime")
private Integer iharm25Overtime;
/**
* 0.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_1_overtime")
private Integer inuharm1Overtime;
/**
* 1.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_2_overtime")
private Integer inuharm2Overtime;
/**
* 2.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_3_overtime")
private Integer inuharm3Overtime;
/**
* 3.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_4_overtime")
private Integer inuharm4Overtime;
/**
* 4.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_5_overtime")
private Integer inuharm5Overtime;
/**
* 5.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_6_overtime")
private Integer inuharm6Overtime;
/**
* 6.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_7_overtime")
private Integer inuharm7Overtime;
/**
* 7.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_8_overtime")
private Integer inuharm8Overtime;
/**
* 8.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_9_overtime")
private Integer inuharm9Overtime;
/**
* 9.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_10_overtime")
private Integer inuharm10Overtime;
/**
* 10.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_11_overtime")
private Integer inuharm11Overtime;
/**
* 11.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_12_overtime")
private Integer inuharm12Overtime;
/**
* 12.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_13_overtime")
private Integer inuharm13Overtime;
/**
* 13.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_14_overtime")
private Integer inuharm14Overtime;
/**
* 14.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_15_overtime")
private Integer inuharm15Overtime;
/**
* 15.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_16_overtime")
private Integer inuharm16Overtime;
}

View File

@@ -1,450 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
@Data
@TableName(value = "r_stat_limit_rate_detail_d")
public class RStatLimitRateDetailD implements Serializable {
/**
* 监测点ID合格率的变电站/装置/母线/线路序号
*/
@MppMultiId
@TableField(value = "my_index")
private String lineId;
/**
* 合格率时间
*/
@MppMultiId
@TableField(value = "time_id")
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
private LocalDate time;
/**
* 闪变越限次数
*/
@TableField(value = "flicker_overtime")
private String flickerOvertime;
/**
* 频率偏差越限次数
*/
@TableField(value = "freq_dev_overtime")
private String freqDevOvertime;
/**
* 电压偏差越限次数
*/
@TableField(value = "voltage_dev_overtime")
private String voltageDevOvertime;
/**
* 三相电压不平衡度越限次数
*/
@TableField(value = "ubalance_overtime")
private String ubalanceOvertime;
/**
* 电压谐波畸变率越限次数
*/
@TableField(value = "uaberrance_overtime")
private String uaberranceOvertime;
/**
* 负序电流限值次数
*/
@TableField(value = "i_neg_overtime")
private String iNegOvertime;
/**
* 2次电压谐波含有率越限次数
*/
@TableField(value = "uharm_2_overtime")
private String uharm2Overtime;
/**
* 3次电压谐波含有率越限次数
*/
@TableField(value = "uharm_3_overtime")
private String uharm3Overtime;
/**
* 4次电压谐波含有率越限次数
*/
@TableField(value = "uharm_4_overtime")
private String uharm4Overtime;
/**
* 5次电压谐波含有率越限次数
*/
@TableField(value = "uharm_5_overtime")
private String uharm5Overtime;
/**
* 6次电压谐波含有率越限次数
*/
@TableField(value = "uharm_6_overtime")
private String uharm6Overtime;
/**
* 7次电压谐波含有率越限次数
*/
@TableField(value = "uharm_7_overtime")
private String uharm7Overtime;
/**
* 8次电压谐波含有率越限次数
*/
@TableField(value = "uharm_8_overtime")
private String uharm8Overtime;
/**
* 9次电压谐波含有率越限次数
*/
@TableField(value = "uharm_9_overtime")
private String uharm9Overtime;
/**
* 10次电压谐波含有率越限次数
*/
@TableField(value = "uharm_10_overtime")
private String uharm10Overtime;
/**
* 11次电压谐波含有率越限次数
*/
@TableField(value = "uharm_11_overtime")
private String uharm11Overtime;
/**
* 12次电压谐波含有率越限次数
*/
@TableField(value = "uharm_12_overtime")
private String uharm12Overtime;
/**
* 13次电压谐波含有率越限次数
*/
@TableField(value = "uharm_13_overtime")
private String uharm13Overtime;
/**
* 14次电压谐波含有率越限次数
*/
@TableField(value = "uharm_14_overtime")
private String uharm14Overtime;
/**
* 15次电压谐波含有率越限次数
*/
@TableField(value = "uharm_15_overtime")
private String uharm15Overtime;
/**
* 16次电压谐波含有率越限次数
*/
@TableField(value = "uharm_16_overtime")
private String uharm16Overtime;
/**
* 17次电压谐波含有率越限次数
*/
@TableField(value = "uharm_17_overtime")
private String uharm17Overtime;
/**
* 18次电压谐波含有率越限次数
*/
@TableField(value = "uharm_18_overtime")
private String uharm18Overtime;
/**
* 19次电压谐波含有率越限次数
*/
@TableField(value = "uharm_19_overtime")
private String uharm19Overtime;
/**
* 20次电压谐波含有率越限次数
*/
@TableField(value = "uharm_20_overtime")
private String uharm20Overtime;
/**
* 21次电压谐波含有率越限次数
*/
@TableField(value = "uharm_21_overtime")
private String uharm21Overtime;
/**
* 22次电压谐波含有率越限次数
*/
@TableField(value = "uharm_22_overtime")
private String uharm22Overtime;
/**
* 23次电压谐波含有率越限次数
*/
@TableField(value = "uharm_23_overtime")
private String uharm23Overtime;
/**
* 24次电压谐波含有率越限次数
*/
@TableField(value = "uharm_24_overtime")
private String uharm24Overtime;
/**
* 25次电压谐波含有率越限次数
*/
@TableField(value = "uharm_25_overtime")
private String uharm25Overtime;
/**
* 2次电流谐波幅值越限次数
*/
@TableField(value = "iharm_2_overtime")
private String iharm2Overtime;
/**
* 3次电流谐波幅值越限次数
*/
@TableField(value = "iharm_3_overtime")
private String iharm3Overtime;
/**
* 4次电流谐波幅值越限次数
*/
@TableField(value = "iharm_4_overtime")
private String iharm4Overtime;
/**
* 5次电流谐波幅值越限次数
*/
@TableField(value = "iharm_5_overtime")
private String iharm5Overtime;
/**
* 6次电流谐波幅值越限次数
*/
@TableField(value = "iharm_6_overtime")
private String iharm6Overtime;
/**
* 7次电流谐波幅值越限次数
*/
@TableField(value = "iharm_7_overtime")
private String iharm7Overtime;
/**
* 8次电流谐波幅值越限次数
*/
@TableField(value = "iharm_8_overtime")
private String iharm8Overtime;
/**
* 9次电流谐波幅值越限次数
*/
@TableField(value = "iharm_9_overtime")
private String iharm9Overtime;
/**
* 10次电流谐波幅值越限次数
*/
@TableField(value = "iharm_10_overtime")
private String iharm10Overtime;
/**
* 11次电流谐波幅值越限次数
*/
@TableField(value = "iharm_11_overtime")
private String iharm11Overtime;
/**
* 12次电流谐波幅值越限次数
*/
@TableField(value = "iharm_12_overtime")
private String iharm12Overtime;
/**
* 13次电流谐波幅值越限次数
*/
@TableField(value = "iharm_13_overtime")
private String iharm13Overtime;
/**
* 14次电流谐波幅值越限次数
*/
@TableField(value = "iharm_14_overtime")
private String iharm14Overtime;
/**
* 15次电流谐波幅值越限次数
*/
@TableField(value = "iharm_15_overtime")
private String iharm15Overtime;
/**
* 16次电流谐波幅值越限次数
*/
@TableField(value = "iharm_16_overtime")
private String iharm16Overtime;
/**
* 17次电流谐波幅值越限次数
*/
@TableField(value = "iharm_17_overtime")
private String iharm17Overtime;
/**
* 18次电流谐波幅值越限次数
*/
@TableField(value = "iharm_18_overtime")
private String iharm18Overtime;
/**
* 19次电流谐波幅值越限次数
*/
@TableField(value = "iharm_19_overtime")
private String iharm19Overtime;
/**
* 20次电流谐波幅值越限次数
*/
@TableField(value = "iharm_20_overtime")
private String iharm20Overtime;
/**
* 21次电流谐波幅值越限次数
*/
@TableField(value = "iharm_21_overtime")
private String iharm21Overtime;
/**
* 22次电流谐波幅值越限次数
*/
@TableField(value = "iharm_22_overtime")
private String iharm22Overtime;
/**
* 23次电流谐波幅值越限次数
*/
@TableField(value = "iharm_23_overtime")
private String iharm23Overtime;
/**
* 24次电流谐波幅值越限次数
*/
@TableField(value = "iharm_24_overtime")
private String iharm24Overtime;
/**
* 25次电流谐波幅值越限次数
*/
@TableField(value = "iharm_25_overtime")
private String iharm25Overtime;
/**
* 0.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_1_overtime")
private String inuharm1Overtime;
/**
* 1.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_2_overtime")
private String inuharm2Overtime;
/**
* 2.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_3_overtime")
private String inuharm3Overtime;
/**
* 3.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_4_overtime")
private String inuharm4Overtime;
/**
* 4.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_5_overtime")
private String inuharm5Overtime;
/**
* 5.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_6_overtime")
private String inuharm6Overtime;
/**
* 6.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_7_overtime")
private String inuharm7Overtime;
/**
* 7.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_8_overtime")
private String inuharm8Overtime;
/**
* 8.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_9_overtime")
private String inuharm9Overtime;
/**
* 9.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_10_overtime")
private String inuharm10Overtime;
/**
* 10.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_11_overtime")
private String inuharm11Overtime;
/**
* 11.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_12_overtime")
private String inuharm12Overtime;
/**
* 12.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_13_overtime")
private String inuharm13Overtime;
/**
* 13.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_14_overtime")
private String inuharm14Overtime;
/**
* 14.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_15_overtime")
private String inuharm15Overtime;
/**
* 15.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_16_overtime")
private String inuharm16Overtime;
}

View File

@@ -1,469 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "r_stat_limit_target_d")
public class RStatLimitTargetD {
/**
* 监测点ID合格率的变电站/装置/母线/线路序号
*/
@MppMultiId
@TableField(value = "my_index")
private String lineId;
/**
* 数据类型,A表示A相B表示B相,C表示C相,M表示ABC三项总和T表示总
*/
@MppMultiId
@TableField(value = "phasic_type")
private String phasicType;
/**
* 合格率时间
*/
@MppMultiId
@TableField(value = "time_id")
private LocalDate time;
/**
* 总计算次数
*/
@TableField(value = "all_time")
private Integer allTime;
/**
* 闪变总计算次数
*/
@TableField(value = "flicker_all_time")
private Integer flickerAllTime;
/**
* 闪变越限次数
*/
@TableField(value = "flicker_overtime")
private Integer flickerOvertime;
/**
* 频率偏差越限次数
*/
@TableField(value = "freq_dev_overtime")
private Integer freqDevOvertime;
/**
* 电压偏差越限次数
*/
@TableField(value = "voltage_dev_overtime")
private Integer voltageDevOvertime;
/**
* 电压不平衡度越限次数
*/
@TableField(value = "ubalance_overtime")
private Integer ubalanceOvertime;
/**
* 电压谐波畸变率越限次数
*/
@TableField(value = "uaberrance_overtime")
private Integer uaberranceOvertime;
/**
* 负序电流限值次数
*/
@TableField(value = "i_neg_overtime")
private Integer iNegOvertime;
/**
* 2次电压谐波含有率越限次数
*/
@TableField(value = "uharm_2_overtime")
private Integer uharm2Overtime;
/**
* 3次电压谐波含有率越限次数
*/
@TableField(value = "uharm_3_overtime")
private Integer uharm3Overtime;
/**
* 4次电压谐波含有率越限次数
*/
@TableField(value = "uharm_4_overtime")
private Integer uharm4Overtime;
/**
* 5次电压谐波含有率越限次数
*/
@TableField(value = "uharm_5_overtime")
private Integer uharm5Overtime;
/**
* 6次电压谐波含有率越限次数
*/
@TableField(value = "uharm_6_overtime")
private Integer uharm6Overtime;
/**
* 7次电压谐波含有率越限次数
*/
@TableField(value = "uharm_7_overtime")
private Integer uharm7Overtime;
/**
* 8次电压谐波含有率越限次数
*/
@TableField(value = "uharm_8_overtime")
private Integer uharm8Overtime;
/**
* 9次电压谐波含有率越限次数
*/
@TableField(value = "uharm_9_overtime")
private Integer uharm9Overtime;
/**
* 10次电压谐波含有率越限次数
*/
@TableField(value = "uharm_10_overtime")
private Integer uharm10Overtime;
/**
* 11次电压谐波含有率越限次数
*/
@TableField(value = "uharm_11_overtime")
private Integer uharm11Overtime;
/**
* 12次电压谐波含有率越限次数
*/
@TableField(value = "uharm_12_overtime")
private Integer uharm12Overtime;
/**
* 13次电压谐波含有率越限次数
*/
@TableField(value = "uharm_13_overtime")
private Integer uharm13Overtime;
/**
* 14次电压谐波含有率越限次数
*/
@TableField(value = "uharm_14_overtime")
private Integer uharm14Overtime;
/**
* 15次电压谐波含有率越限次数
*/
@TableField(value = "uharm_15_overtime")
private Integer uharm15Overtime;
/**
* 16次电压谐波含有率越限次数
*/
@TableField(value = "uharm_16_overtime")
private Integer uharm16Overtime;
/**
* 17次电压谐波含有率越限次数
*/
@TableField(value = "uharm_17_overtime")
private Integer uharm17Overtime;
/**
* 18次电压谐波含有率越限次数
*/
@TableField(value = "uharm_18_overtime")
private Integer uharm18Overtime;
/**
* 19次电压谐波含有率越限次数
*/
@TableField(value = "uharm_19_overtime")
private Integer uharm19Overtime;
/**
* 20次电压谐波含有率越限次数
*/
@TableField(value = "uharm_20_overtime")
private Integer uharm20Overtime;
/**
* 21次电压谐波含有率越限次数
*/
@TableField(value = "uharm_21_overtime")
private Integer uharm21Overtime;
/**
* 22次电压谐波含有率越限次数
*/
@TableField(value = "uharm_22_overtime")
private Integer uharm22Overtime;
/**
* 23次电压谐波含有率越限次数
*/
@TableField(value = "uharm_23_overtime")
private Integer uharm23Overtime;
/**
* 24次电压谐波含有率越限次数
*/
@TableField(value = "uharm_24_overtime")
private Integer uharm24Overtime;
/**
* 25次电压谐波含有率越限次数
*/
@TableField(value = "uharm_25_overtime")
private Integer uharm25Overtime;
/**
* 2次电流谐波幅值越限次数
*/
@TableField(value = "iharm_2_overtime")
private Integer iharm2Overtime;
/**
* 3次电流谐波幅值越限次数
*/
@TableField(value = "iharm_3_overtime")
private Integer iharm3Overtime;
/**
* 4次电流谐波幅值越限次数
*/
@TableField(value = "iharm_4_overtime")
private Integer iharm4Overtime;
/**
* 5次电流谐波幅值越限次数
*/
@TableField(value = "iharm_5_overtime")
private Integer iharm5Overtime;
/**
* 6次电流谐波幅值越限次数
*/
@TableField(value = "iharm_6_overtime")
private Integer iharm6Overtime;
/**
* 7次电流谐波幅值越限次数
*/
@TableField(value = "iharm_7_overtime")
private Integer iharm7Overtime;
/**
* 8次电流谐波幅值越限次数
*/
@TableField(value = "iharm_8_overtime")
private Integer iharm8Overtime;
/**
* 9次电流谐波幅值越限次数
*/
@TableField(value = "iharm_9_overtime")
private Integer iharm9Overtime;
/**
* 10次电流谐波幅值越限次数
*/
@TableField(value = "iharm_10_overtime")
private Integer iharm10Overtime;
/**
* 11次电流谐波幅值越限次数
*/
@TableField(value = "iharm_11_overtime")
private Integer iharm11Overtime;
/**
* 12次电流谐波幅值越限次数
*/
@TableField(value = "iharm_12_overtime")
private Integer iharm12Overtime;
/**
* 13次电流谐波幅值越限次数
*/
@TableField(value = "iharm_13_overtime")
private Integer iharm13Overtime;
/**
* 14次电流谐波幅值越限次数
*/
@TableField(value = "iharm_14_overtime")
private Integer iharm14Overtime;
/**
* 15次电流谐波幅值越限次数
*/
@TableField(value = "iharm_15_overtime")
private Integer iharm15Overtime;
/**
* 16次电流谐波幅值越限次数
*/
@TableField(value = "iharm_16_overtime")
private Integer iharm16Overtime;
/**
* 17次电流谐波幅值越限次数
*/
@TableField(value = "iharm_17_overtime")
private Integer iharm17Overtime;
/**
* 18次电流谐波幅值越限次数
*/
@TableField(value = "iharm_18_overtime")
private Integer iharm18Overtime;
/**
* 19次电流谐波幅值越限次数
*/
@TableField(value = "iharm_19_overtime")
private Integer iharm19Overtime;
/**
* 20次电流谐波幅值越限次数
*/
@TableField(value = "iharm_20_overtime")
private Integer iharm20Overtime;
/**
* 21次电流谐波幅值越限次数
*/
@TableField(value = "iharm_21_overtime")
private Integer iharm21Overtime;
/**
* 22次电流谐波幅值越限次数
*/
@TableField(value = "iharm_22_overtime")
private Integer iharm22Overtime;
/**
* 23次电流谐波幅值越限次数
*/
@TableField(value = "iharm_23_overtime")
private Integer iharm23Overtime;
/**
* 24次电流谐波幅值越限次数
*/
@TableField(value = "iharm_24_overtime")
private Integer iharm24Overtime;
/**
* 25次电流谐波幅值越限次数
*/
@TableField(value = "iharm_25_overtime")
private Integer iharm25Overtime;
/**
* 0.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_1_overtime")
private Integer inuharm1Overtime;
/**
* 1.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_2_overtime")
private Integer inuharm2Overtime;
/**
* 2.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_3_overtime")
private Integer inuharm3Overtime;
/**
* 3.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_4_overtime")
private Integer inuharm4Overtime;
/**
* 4.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_5_overtime")
private Integer inuharm5Overtime;
/**
* 5.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_6_overtime")
private Integer inuharm6Overtime;
/**
* 6.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_7_overtime")
private Integer inuharm7Overtime;
/**
* 7.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_8_overtime")
private Integer inuharm8Overtime;
/**
* 8.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_9_overtime")
private Integer inuharm9Overtime;
/**
* 9.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_10_overtime")
private Integer inuharm10Overtime;
/**
* 10.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_11_overtime")
private Integer inuharm11Overtime;
/**
* 11.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_12_overtime")
private Integer inuharm12Overtime;
/**
* 12.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_13_overtime")
private Integer inuharm13Overtime;
/**
* 13.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_14_overtime")
private Integer inuharm14Overtime;
/**
* 14.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_15_overtime")
private Integer inuharm15Overtime;
/**
* 15.5次间谐波电压限值次数
*/
@TableField(value = "inuharm_16_overtime")
private Integer inuharm16Overtime;
}

View File

@@ -1,45 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
/**
* @Description: 在线率日表
* @Author: wr
* @Date: 2025/3/10 11:28
*/
@Data
@TableName("r_stat_onlinerate_d")
public class RStatOnlineRateD {
private static final long serialVersionUID = 1L;
/**
* 日期
*/
@MppMultiId
@TableField(value = "time_id")
private String timeId;
/**
* 装置id
*/
@MppMultiId
@TableField(value = "dev_index")
private String devIndex;
/**
* 在线条数
*/
@TableField(value = "online_min")
private Integer onlineMin;
/**
* 离线条数
*/
@TableField(value = "offline_min")
private Integer offlineMin;
}

View File

@@ -1,42 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
/**
* <p>
* 数据完整性日表
* </p>
*
* @author hongawen
* @since 2023-03-28
*/
@Data
@TableName("r_stat_org_integrity_d")
public class RStatOrgIntegrityD {
private static final long serialVersionUID = 1L;
@MppMultiId
@TableField(value = "time_id")
private String timeId;
@MppMultiId
@TableField(value = "org_id")
private String orgId;
/**
* 应收数量
*/
@TableField(value = "due_time")
private Integer dueTime;
/**
* 实收数量
*/
@TableField(value = "real_time")
private Integer realTime;
}

View File

@@ -1,54 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.time.LocalDate;
/**
* @Description: 单位污区图统计日表
* @Author: wr
* @Date: 2025/3/19 14:15
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "r_stat_pollution_org_d")
public class RStatPollutionOrgD implements Serializable {
/**
* 单位id
*/
@MppMultiId(value = "org_id")
@ApiModelProperty(value="单位id")
private String orgId;
/**
* 时间
*/
@MppMultiId(value = "data_date")
@ApiModelProperty(value="时间")
private LocalDate dataDate;
/**
* 污区图统计类型
*/
@MppMultiId(value = "pollution_type")
@ApiModelProperty(value="污区图统计类型")
private String pollutionType;
/**
* 统计值
*/
@TableField(value = "value")
@ApiModelProperty(value="统计值")
private Double value;
private static final long serialVersionUID = 1L;
}

View File

@@ -1,53 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.time.LocalDate;
/**
* @Description: 单位污区图统计月表
* @Author: wr
* @Date: 2025/3/19 14:15
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "r_stat_pollution_org_m")
public class RStatPollutionOrgM implements Serializable {
/**
* 单位id
*/
@MppMultiId(value = "org_id")
@ApiModelProperty(value="单位id")
private String orgId;
/**
* 时间
*/
@MppMultiId(value = "data_date")
@ApiModelProperty(value="时间")
private LocalDate dataDate;
/**
* 污区图统计类型
*/
@MppMultiId(value = "pollution_type")
@ApiModelProperty(value="污区图统计类型")
private String pollutionType;
/**
* 统计值
*/
@TableField(value = "value")
@ApiModelProperty(value="统计值")
private Double value;
private static final long serialVersionUID = 1L;
}

View File

@@ -1,53 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.time.LocalDate;
/**
* @Description: 单位污区图统计季表
* @Author: wr
* @Date: 2025/3/19 14:15
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "r_stat_pollution_org_q")
public class RStatPollutionOrgQ implements Serializable {
/**
* 单位id
*/
@MppMultiId(value = "org_id")
@ApiModelProperty(value="单位id")
private String orgId;
/**
* 时间
*/
@MppMultiId(value = "data_date")
@ApiModelProperty(value="时间")
private LocalDate dataDate;
/**
* 污区图统计类型
*/
@MppMultiId(value = "pollution_type")
@ApiModelProperty(value="污区图统计类型")
private String pollutionType;
/**
* 统计值
*/
@TableField(value = "value")
@ApiModelProperty(value="统计值")
private Double value;
private static final long serialVersionUID = 1L;
}

View File

@@ -1,53 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.time.LocalDate;
/**
* @Description: 单位污区图统计年表
* @Author: wr
* @Date: 2025/3/19 14:15
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "r_stat_pollution_org_y")
public class RStatPollutionOrgY implements Serializable {
/**
* 单位id
*/
@MppMultiId(value = "org_id")
@ApiModelProperty(value="单位id")
private String orgId;
/**
* 时间
*/
@MppMultiId(value = "data_date")
@ApiModelProperty(value="时间")
private LocalDate dataDate;
/**
* 污区图统计类型
*/
@MppMultiId(value = "pollution_type")
@ApiModelProperty(value="污区图统计类型")
private String pollutionType;
/**
* 统计值
*/
@TableField(value = "value")
@ApiModelProperty(value="统计值")
private Double value;
private static final long serialVersionUID = 1L;
}

View File

@@ -1,53 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.time.LocalDate;
/**
* @Description: 变电站污区图统计日表
* @Author: wr
* @Date: 2025/3/19 14:16
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "r_stat_pollution_substation_d")
public class RStatPollutionSubstationD implements Serializable {
/**
* 变电站id
*/
@MppMultiId(value = "substation_id")
@ApiModelProperty(value = "变电站id")
private String substationId;
/**
* 时间
*/
@MppMultiId(value = "data_date")
@ApiModelProperty(value = "时间")
private LocalDate dataDate;
/**
* 污区图统计类型
*/
@MppMultiId(value = "pollution_type")
@ApiModelProperty(value = "污区图统计类型")
private String pollutionType;
/**
* 统计值
*/
@TableField(value = "value")
@ApiModelProperty(value = "统计值")
private Double value;
private static final long serialVersionUID = 1L;
}

View File

@@ -1,53 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.time.LocalDate;
/**
* @Description: 变电站污区图统计月表
* @Author: wr
* @Date: 2025/3/19 14:16
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "r_stat_pollution_substation_m")
public class RStatPollutionSubstationM implements Serializable {
/**
* 变电站id
*/
@MppMultiId(value = "substation_id")
@ApiModelProperty(value = "变电站id")
private String substationId;
/**
* 时间
*/
@MppMultiId(value = "data_date")
@ApiModelProperty(value = "时间")
private LocalDate dataDate;
/**
* 污区图统计类型
*/
@MppMultiId(value = "pollution_type")
@ApiModelProperty(value = "污区图统计类型")
private String pollutionType;
/**
* 统计值
*/
@TableField(value = "value")
@ApiModelProperty(value = "统计值")
private Double value;
private static final long serialVersionUID = 1L;
}

View File

@@ -1,53 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.time.LocalDate;
/**
* @Description: 变电站污区图统计季表
* @Author: wr
* @Date: 2025/3/19 14:16
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "r_stat_pollution_substation_q")
public class RStatPollutionSubstationQ implements Serializable {
/**
* 变电站id
*/
@MppMultiId(value = "substation_id")
@ApiModelProperty(value="变电站id")
private String substationId;
/**
* 时间
*/
@MppMultiId(value = "data_date")
@ApiModelProperty(value="时间")
private LocalDate dataDate;
/**
* 污区图统计类型
*/
@MppMultiId(value = "pollution_type")
@ApiModelProperty(value="污区图统计类型")
private String pollutionType;
/**
* 统计值
*/
@TableField(value = "value")
@ApiModelProperty(value="统计值")
private Double value;
private static final long serialVersionUID = 1L;
}

View File

@@ -1,53 +0,0 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.time.LocalDate;
/**
* @Description: 变电站污区图统计年表
* @Author: wr
* @Date: 2025/3/19 14:16
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "r_stat_pollution_substation_y")
public class RStatPollutionSubstationY implements Serializable {
/**
* 变电站id
*/
@MppMultiId(value = "substation_id")
@ApiModelProperty(value="变电站id")
private String substationId;
/**
* 时间
*/
@MppMultiId(value = "data_date")
@ApiModelProperty(value="时间")
private LocalDate dataDate;
/**
* 污区图统计类型
*/
@MppMultiId(value = "pollution_type")
@ApiModelProperty(value="污区图统计类型")
private String pollutionType;
/**
* 统计值
*/
@TableField(value = "value")
@ApiModelProperty(value="统计值")
private Double value;
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,187 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
* 发电厂基础信息表(含光伏/风电新能源场站)
*/
@Data
@TableName("SG_CON_PLANT_B")
public class SGConPlantB {
/**
* 发电厂ID主键唯一编码
*/
@TableId()
private String id;
/**
* 地址
*/
private String address;
/**
* 海拔
*/
private BigDecimal altitude;
/**
* 资产权属
*/
private Integer assetsOwnership;
/**
* 权属单位ID
*/
private String assetsOwnershipComId;
/**
* 校验码
*/
private String checkCode;
/**
* 通信标识
*/
private String commTag;
/**
* 所属公司ID
*/
private String companyId;
/**
* 接入电网ID关联并网点变电站用于短路容量、谐波计算
*/
private String connectivePgId;
/**
* 调度机构ID
*/
private String dccId;
/**
* 有效期
*/
private Date expiryDate;
/**
* 传真
*/
private String faxNo;
/**
* 发电集团ID
*/
private String gencompanyId;
/**
* 地形
*/
private Integer landform;
/**
* 纬度
*/
private BigDecimal latitude;
/**
* 经度
*/
private BigDecimal longitude;
/**
* 最高电压等级类型
*/
private Integer maxVoltageType;
/**
* 场站名称
*/
private String name;
/**
* 简称
*/
private String nameAbbreviation;
/**
* 投运日期
*/
private Date operateDate;
/**
* 运行状态
*/
private Integer operateState;
/**
* 拥有者
*/
private String owner;
/**
* 联系电话
*/
private String phoneNo;
/**
* 场站细分类型
*/
private Integer plantDetailType;
/**
* 发电厂大类类型,区分火电/光伏/风电/储能
*/
private Integer plantType;
/**
* 邮编
*/
private String postcode;
/**
* 区域编码
*/
private Integer region;
/**
* 注册名称
*/
private String registerName;
/**
* 备注
*/
private String remarks;
/**
* 监控标识
*/
private String scsTag;
/**
* 戳记/版本号
*/
private String stamp;
/**
* 状态码
*/
private String stateCode;
/**
* 系统属性第16位标识场站是否配套储能
*/
private String sysFlag;
/**
* 标签
*/
private String tag;
}

View File

@@ -0,0 +1,138 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
* 变电站基础信息表
*/
@Data
@TableName("SG_CON_SUBSTATION_B")
public class SGConSubstationB {
/**
* 变电站ID
*/
@TableId
private String id;
/**
* 海拔
*/
private BigDecimal altitude;
/**
* 资产归属性质
*/
private Integer assetsOwnership;
/**
* 资产单位
*/
private String assetsOwnershipComId;
/**
* 校验码
*/
private String checkCode;
/**
* 通信标签
*/
private String commTag;
/**
* 所属调度机构
*/
private String dccId;
/**
* 直流电压等级
*/
private Integer dcVoltageType;
/**
* 退运日期
*/
private Date expiryDate;
/**
* 纬度
*/
private BigDecimal latitude;
/**
* 经度
*/
private BigDecimal longitude;
/**
* 维护单位
*/
private String manageDeptId;
/**
* 变电站名称
*/
private String name;
/**
* 投运日期
*/
private Date operateDate;
/**
* 运行状态
*/
private Integer operateState;
/**
* 拥有者
*/
private String owner;
/**
* 所属电网
*/
private String pgId;
/**
* 行政区划
*/
private Integer region;
/**
* 稳控系统标签
*/
private String scsTag;
/**
* 设备状态串码
*/
private String stateCode;
/**
* 系统属性
*/
private String sysFlag;
/**
* 交流最高电压等级
*/
private Integer topAcVoltageType;
/**
* 类型
*/
private Integer type;
/**
* 监控视频ID
*/
private String videosceneid;
}

View File

@@ -0,0 +1,111 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.time.LocalDateTime;
/**
* 变电站多系统关联映射表
*/
@Data
@TableName("SG_CON_SUBSTATION_C")
public class SGConSubstationBind {
/**
* D5000系统厂站ID
*/
private String d5000Id;
/**
* D5000系统厂站名称
*/
private String d5000Name;
/**
* 所属调度机构编码联合主键1
*/
private String dccId;
/**
* 云平台系统厂站ID联合主键2
*/
@TableId
private String dcloudId;
/**
* 云平台系统厂站名称
*/
private String dcloudName;
/**
* 云平台电压等级编码(单位kV如10、110、220)
*/
private String dcloudVoltagelevel;
/**
* OMS系统厂站ID
*/
private String omsId;
/**
* OMS系统厂站名称
*/
private String omsName;
/**
* 所属权属单位编码
*/
private String owner;
/**
* PMS系统厂站ID
*/
private String pmsId;
/**
* PSDB设备类型编码
*/
private String psdbDevType;
/**
* PSDB系统ID
*/
private String psdbId;
/**
* PSDB系统名称
*/
private String psdbName;
/**
* 整定平台系统ID
*/
private String settingId;
/**
* 整定平台系统名称
*/
private String settingName;
/**
* 数据状态:正常/停用/待同步
*/
private String status;
/**
* 软删除 0-正常 1-已删除
*/
private Integer isDelete;
/**
* 记录创建时间
*/
private LocalDateTime createTime;
/**
* 记录更新时间
*/
private LocalDateTime updateTime;
}

View File

@@ -31,9 +31,15 @@ public class SyncTableConfig {
// BLOB相关配置
private String blobColumns;
// CLOB相关配置
private String clobColumns;
// 新增:表对应的时间查询字段(动态配置)
private String timeColumn;
// 增量数据时间类型
private String dataTimeType;
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;

View File

@@ -0,0 +1,43 @@
package com.njcn.relational.pojo.po;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* @Author: cdf
* @CreateTime: 2026-06-28
* @Description:
*/
@Data
@TableName("SYNC_TABLE_LOGS")
public class SyncTableLogs {
/**
* 日期
*/
@TableId
private LocalDate timeId;
/**
* 是否转移成功 0.失败 1.成功
*/
private Integer result;
/**
* 本地处理结果 0.失败 1.成功
*/
private Integer localResult;
/**
* 创建日期
*/
private LocalDateTime createTime;
}

View File

@@ -0,0 +1,37 @@
package com.njcn.relational.pojo.vo;
/**
* @Author: cdf
* @CreateTime: 2026-06-28
* @Description:
*/
import lombok.Data;
@Data
public class HttpResult<T> {
private Integer code;
private String msg;
private T data;
private HttpResult(Integer code, String msg, T data) {
this.code = code;
this.msg = msg;
this.data = data;
}
public static <T> HttpResult<T> success(T data) {
return new HttpResult<>(200, "success", data);
}
public static <T> HttpResult<T> success() {
return new HttpResult<>(200, "success", null);
}
public static <T> HttpResult<T> error(String msg) {
return new HttpResult<>(500, msg, null);
}
public static <T> HttpResult<T> error(Integer code, String msg) {
return new HttpResult<>(code, msg, null);
}
}

View File

@@ -0,0 +1,31 @@
package com.njcn.relational.config;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class MybatisPlusConfig {
/**
* MyBatis-Plus 分页插件配置
* 必须配置,否则分页不生效
*/
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
// 添加分页插件(根据数据库类型选择)
PaginationInnerInterceptor paginationInnerInterceptor = new PaginationInnerInterceptor(DbType.ORACLE);
// 或 DbType.MYSQL / DbType.POSTGRE_SQL 等
// 设置最大单页限制默认500-1表示不限制
paginationInnerInterceptor.setMaxLimit(1000L);
// 设置溢出总页数后是否跳转到第一页默认false
paginationInnerInterceptor.setOverflow(false);
interceptor.addInnerInterceptor(paginationInnerInterceptor);
return interceptor;
}
}

View File

@@ -16,4 +16,5 @@ public class Security extends WebSecurityConfigurerAdapter {
}
}

View File

@@ -3,22 +3,21 @@ package com.njcn.relational.controller;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.util.StrUtil;
import com.njcn.relational.service.SyncTableConfigService;
import com.njcn.relational.service.SyncTableParseService;
import com.njcn.relational.service.SyncTwoDmExportService;
import com.njcn.relational.service.SyncThreeDmParseService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Profile;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.io.IOException;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -34,15 +33,19 @@ import java.util.Map;
@Slf4j
public class DataTransportController {
private final SyncTableConfigService syncTableConfigService;
private final SyncTwoDmExportService syncTwoDmExportService;
private final SyncTableParseService syncTableParseService;
private final SyncThreeDmParseService syncThreeDmParseService;
@Value("${spring.profiles.active:query}")
private String serverType;
@GetMapping("export")
public void export(@RequestParam(required = false)String date){
if(!serverType.contains("query")){
return;
}
if(StrUtil.isBlank(date)){
date = LocalDate.now().minusDays(1).format(DateTimeFormatter.ofPattern(DatePattern.PURE_DATE_PATTERN));
}else {
@@ -51,11 +54,14 @@ public class DataTransportController {
return;
}
}
syncTableConfigService.syncAllFullTables(date);
syncTwoDmExportService.syncAllFullTables(date);
}
@GetMapping("import")
public void importData(@RequestParam(required = false)String date){
if(!serverType.contains("insert")){
return;
}
if(StrUtil.isBlank(date)){
date = LocalDate.now().minusDays(1).format(DateTimeFormatter.ofPattern(DatePattern.PURE_DATE_PATTERN));
}else {
@@ -65,7 +71,7 @@ public class DataTransportController {
}
}
try {
syncTableParseService.syncFullTables(date);
syncThreeDmParseService.syncFullTables(date);
} catch (Exception e) {
e.printStackTrace();
}
@@ -73,18 +79,24 @@ public class DataTransportController {
@GetMapping("test")
public void test(){
syncTableConfigService.test();
if(!serverType.contains("query")){
return;
}
syncTwoDmExportService.test();
}
@GetMapping("testR")
public void testR(){
syncTableParseService.testR();
if(!serverType.contains("insert")){
return;
}
syncThreeDmParseService.testR();
}
@GetMapping("getRemoteTwoAll")
public List<String> getRemoteTwoAll(){
try {
return syncTableConfigService.getPendingFiles();
return syncTwoDmExportService.getPendingFiles();
} catch (Exception e) {
log.error("最终捕获二区异常",e);
throw new RuntimeException(e);
@@ -94,17 +106,24 @@ public class DataTransportController {
@GetMapping("getRemoteAll")
public List<String> getAll(){
try {
return syncTableParseService.getPendingFiles();
if("query_up".equals(serverType)){
return syncTwoDmExportService.getPendingFiles();
}else if("insert_up".equals(serverType)){
return syncThreeDmParseService.getPendingFiles();
}else {
return new ArrayList<>();
}
} catch (Exception e) {
log.error("最终捕获异常",e);
throw new RuntimeException(e);
return new ArrayList<>();
}
}
@GetMapping("removeTwo")
public String removeTwo(@RequestParam Integer a){
try {
syncTableConfigService.cleanLocalFiles(a);
syncTwoDmExportService.cleanLocalFiles(a);
} catch (Exception e) {
throw new RuntimeException(e);
}
@@ -115,7 +134,7 @@ public class DataTransportController {
@GetMapping("removeThree")
public String removeThree(@RequestParam Integer a){
try {
syncTableParseService.cleanLocalFiles(a);
syncThreeDmParseService.cleanLocalFiles(a);
} catch (Exception e) {
throw new RuntimeException(e);
}

View File

@@ -1,5 +1,6 @@
package com.njcn.relational.controller;
import com.njcn.relational.pojo.dto.DcloudSyncQuery;
import com.njcn.relational.service.DcloudBusService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
@@ -18,8 +19,27 @@ public class DcloudBusController {
private final DcloudBusService dcloudBusService;
@GetMapping("/sync")
@GetMapping("/sync1")
public void syncData() {
dcloudBusService.syncDataToDb();
DcloudSyncQuery query = DcloudSyncQuery.buildPlantDefault(null, null, null, null);
dcloudBusService.syncDataToDb(query);
}
@GetMapping("/sync2")
public void syncData2() {
DcloudSyncQuery query = DcloudSyncQuery.buildPlantChangZhan(null, null, null, null);
dcloudBusService.syncDataToDb(query);
}
@GetMapping("/sync3")
public void syncData3() {
DcloudSyncQuery query = DcloudSyncQuery.buildPlantBdB(null, null, null, null);
dcloudBusService.syncDataToDb(query);
}
@GetMapping("/sync4")
public void syncData4() {
DcloudSyncQuery query = DcloudSyncQuery.buildPlantBdC(null, null, null, null);
dcloudBusService.syncDataToDb(query);
}
}

View File

@@ -0,0 +1,37 @@
package com.njcn.relational.controller;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
/**
* @Author: cdf
* @CreateTime: 2026-06-28
* @Description:
*/
@Controller
@Slf4j
public class IndexController {
@GetMapping("/")
public String index() {
log.info("访问根路径,跳转到首页");
return "forward:/pages/index.html";
}
@GetMapping("/index")
public String indexPage() {
log.info("访问 /index跳转到首页");
return "forward:/pages/index.html";
}
@GetMapping("/config")
public String configPage() {
return "forward:/pages/config.html";
}
@GetMapping("/logs")
public String logs() {
return "forward:/pages/logs.html";
}
}

View File

@@ -0,0 +1,86 @@
package com.njcn.relational.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.relational.pojo.po.SGConPlantB;
import com.njcn.relational.service.SGConPlantBService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/plant")
@RequiredArgsConstructor
public class SGConPlantBController {
private final SGConPlantBService sgConPlantBService;
/**
* 新增场站
*/
@PostMapping("/add")
public Boolean add(@RequestBody SGConPlantB entity) {
return sgConPlantBService.save(entity);
}
/**
* 根据ID删除
*/
@DeleteMapping("/remove/{id}")
public Boolean remove(@PathVariable String id) {
return sgConPlantBService.removeById(id);
}
/**
* 批量删除
*/
@DeleteMapping("/batch")
public Boolean batchRemove(@RequestBody List<String> idList) {
return sgConPlantBService.removeByIds(idList);
}
/**
* 修改场站
*/
@PutMapping("/update")
public Boolean update(@RequestBody SGConPlantB entity) {
return sgConPlantBService.updateById(entity);
}
/**
* 根据ID查询单条
*/
@GetMapping("/get/{id}")
public SGConPlantB getById(@PathVariable String id) {
return sgConPlantBService.getById(id);
}
/**
* 分页查询
*/
@GetMapping("/page")
public IPage<SGConPlantB> page(
@RequestParam(defaultValue = "1") long pageNum,
@RequestParam(defaultValue = "10") long pageSize,
SGConPlantB query
) {
Page<SGConPlantB> page = new Page<>(pageNum, pageSize);
LambdaQueryWrapper<SGConPlantB> wrapper = new LambdaQueryWrapper<>();
// 可根据业务自行拼接模糊/等值条件示例
wrapper.like(query.getName() != null, SGConPlantB::getName, query.getName());
wrapper.eq(query.getPlantType() != null, SGConPlantB::getPlantType, query.getPlantType());
wrapper.eq(query.getConnectivePgId() != null, SGConPlantB::getConnectivePgId, query.getConnectivePgId());
return sgConPlantBService.page(page, wrapper);
}
/**
* 查询全部列表(不分页)
*/
@GetMapping("/list")
public List<SGConPlantB> list(SGConPlantB query) {
LambdaQueryWrapper<SGConPlantB> wrapper = new LambdaQueryWrapper<>();
wrapper.like(query.getName() != null, SGConPlantB::getName, query.getName());
return sgConPlantBService.list(wrapper);
}
}

View File

@@ -0,0 +1,91 @@
package com.njcn.relational.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.relational.pojo.po.SGConSubstationB;
import com.njcn.relational.service.SGConSubstationBService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/substation")
@RequiredArgsConstructor
public class SGConSubstationBController {
private final SGConSubstationBService substationBService;
/**
* 新增变电站
*/
@PostMapping("/add")
public Boolean add(@RequestBody SGConSubstationB entity) {
return substationBService.save(entity);
}
/**
* 根据ID删除
*/
@DeleteMapping("/remove/{id}")
public Boolean remove(@PathVariable String id) {
return substationBService.removeById(id);
}
/**
* 批量删除
*/
@DeleteMapping("/batch")
public Boolean batchRemove(@RequestBody List<String> idList) {
return substationBService.removeByIds(idList);
}
/**
* 修改变电站
*/
@PutMapping("/update")
public Boolean update(@RequestBody SGConSubstationB entity) {
return substationBService.updateById(entity);
}
/**
* 根据ID单条查询
*/
@GetMapping("/get/{id}")
public SGConSubstationB getById(@PathVariable String id) {
return substationBService.getById(id);
}
/**
* 分页查询
*/
@GetMapping("/page")
public IPage<SGConSubstationB> page(
@RequestParam(defaultValue = "1") long pageNum,
@RequestParam(defaultValue = "10") long pageSize,
SGConSubstationB query
) {
Page<SGConSubstationB> page = new Page<>(pageNum, pageSize);
LambdaQueryWrapper<SGConSubstationB> wrapper = new LambdaQueryWrapper<>();
// 常用查询条件示例
wrapper.like(query.getName() != null, SGConSubstationB::getName, query.getName());
wrapper.eq(query.getDccId() != null, SGConSubstationB::getDccId, query.getDccId());
wrapper.eq(query.getPgId() != null, SGConSubstationB::getPgId, query.getPgId());
wrapper.eq(query.getTopAcVoltageType() != null, SGConSubstationB::getTopAcVoltageType, query.getTopAcVoltageType());
wrapper.eq(query.getOperateState() != null, SGConSubstationB::getOperateState, query.getOperateState());
return substationBService.page(page, wrapper);
}
/**
* 不分页全量列表
*/
@GetMapping("/list")
public List<SGConSubstationB> list(SGConSubstationB query) {
LambdaQueryWrapper<SGConSubstationB> wrapper = new LambdaQueryWrapper<>();
wrapper.like(query.getName() != null, SGConSubstationB::getName, query.getName());
wrapper.eq(query.getDccId() != null, SGConSubstationB::getDccId, query.getDccId());
return substationBService.list(wrapper);
}
}

View File

@@ -0,0 +1,94 @@
package com.njcn.relational.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.relational.pojo.po.SGConSubstationBind;
import com.njcn.relational.service.impl.SGConSubstationCServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/substation/map")
@RequiredArgsConstructor
public class SGConSubstationCController {
private final SGConSubstationCServiceImpl substationCService;
/**
* 新增多系统映射记录
*/
@PostMapping("/add")
public Boolean add(@RequestBody SGConSubstationBind entity) {
// 新增默认未删除
entity.setIsDelete(0);
return substationCService.save(entity);
}
/**
* 根据联合主键查询
*/
@GetMapping("/get")
public SGConSubstationBind get(
@RequestParam String dccId,
@RequestParam String dcloudId
) {
return substationCService.getByUnionKey(dccId, dcloudId);
}
/**
* 修改映射记录
*/
@PutMapping("/update")
public Boolean update(@RequestBody SGConSubstationBind entity) {
return substationCService.updateById(entity);
}
/**
* 逻辑删除(软删)
*/
@DeleteMapping("/logicRemove")
public Boolean logicRemove(
@RequestParam String dccId,
@RequestParam String dcloudId
) {
return substationCService.logicRemoveByUnionKey(dccId, dcloudId);
}
/**
* 分页查询映射关系
*/
@GetMapping("/page")
public IPage<SGConSubstationBind> page(
@RequestParam(defaultValue = "1") long pageNum,
@RequestParam(defaultValue = "10") long pageSize,
SGConSubstationBind query
) {
Page<SGConSubstationBind> page = new Page<>(pageNum, pageSize);
LambdaQueryWrapper<SGConSubstationBind> wrapper = new LambdaQueryWrapper<>();
// 默认只查正常未删除数据
wrapper.eq(SGConSubstationBind::getIsDelete, 0);
wrapper.eq(query.getDccId() != null, SGConSubstationBind::getDccId, query.getDccId());
wrapper.eq(query.getDcloudId() != null, SGConSubstationBind::getDcloudId, query.getDcloudId());
wrapper.like(query.getDcloudName() != null, SGConSubstationBind::getDcloudName, query.getDcloudName());
wrapper.eq(query.getDcloudVoltagelevel() != null, SGConSubstationBind::getDcloudVoltagelevel, query.getDcloudVoltagelevel());
wrapper.eq(query.getD5000Id() != null, SGConSubstationBind::getD5000Id, query.getD5000Id());
wrapper.eq(query.getOmsId() != null, SGConSubstationBind::getOmsId, query.getOmsId());
wrapper.eq(query.getStatus() != null, SGConSubstationBind::getStatus, query.getStatus());
return substationCService.page(page, wrapper);
}
/**
* 不分页列表
*/
@GetMapping("/list")
public List<SGConSubstationBind> list(SGConSubstationBind query) {
LambdaQueryWrapper<SGConSubstationBind> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SGConSubstationBind::getIsDelete, 0);
wrapper.eq(query.getDccId() != null, SGConSubstationBind::getDccId, query.getDccId());
return substationCService.list(wrapper);
}
}

View File

@@ -0,0 +1,121 @@
package com.njcn.relational.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.relational.pojo.po.SyncTableConfig;
import com.njcn.relational.pojo.vo.HttpResult;
import com.njcn.relational.service.SyncTableConfigService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
/**
* 同步表配置控制器
*
* @author cdf
* @date 2026/6/28
*/
@RestController
@RequestMapping("/sync-table-config")
@RequiredArgsConstructor
public class SyncTableConfigController {
private final SyncTableConfigService syncTableConfigService;
/**
* 分页查询
*/
@GetMapping("/page")
public HttpResult<IPage<SyncTableConfig>> page(
@RequestParam(defaultValue = "1") Integer pageNum,
@RequestParam(defaultValue = "10") Integer pageSize,
@RequestParam(required = false) String tableName,
@RequestParam(required = false) String syncMode,
@RequestParam(required = false) Integer enabled) {
Page<SyncTableConfig> page = new Page<>(pageNum, pageSize);
LambdaQueryWrapper<SyncTableConfig> wrapper = new LambdaQueryWrapper<>();
if (tableName != null && !tableName.isEmpty()) {
wrapper.like(SyncTableConfig::getTableName, tableName);
}
if (syncMode != null && !syncMode.isEmpty()) {
wrapper.eq(SyncTableConfig::getSyncMode, syncMode);
}
if (enabled != null) {
wrapper.eq(SyncTableConfig::getEnabled, enabled);
}
wrapper.orderByAsc(SyncTableConfig::getSortOrder);
IPage<SyncTableConfig> result = syncTableConfigService.page(page, wrapper);
return HttpResult.success(result);
}
/**
* 查询所有启用的配置
*/
@GetMapping("/list")
public HttpResult<List<SyncTableConfig>> list() {
LambdaQueryWrapper<SyncTableConfig> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SyncTableConfig::getEnabled, 1)
.orderByAsc(SyncTableConfig::getSortOrder);
return HttpResult.success(syncTableConfigService.list(wrapper));
}
/**
* 根据ID查询
*/
@GetMapping("/{tableName}")
public HttpResult<SyncTableConfig> getById(@PathVariable String tableName) {
return HttpResult.success(syncTableConfigService.getById(tableName));
}
/**
* 新增
*/
@PostMapping
public HttpResult<Boolean> add(@RequestBody SyncTableConfig config) {
return HttpResult.success(syncTableConfigService.save(config));
}
/**
* 更新
*/
@PutMapping
public HttpResult<Boolean> update(@RequestBody SyncTableConfig config) {
return HttpResult.success(syncTableConfigService.updateById(config));
}
/**
* 删除
*/
@DeleteMapping("/{tableName}")
public HttpResult<Boolean> delete(@PathVariable String tableName) {
return HttpResult.success(syncTableConfigService.removeById(tableName));
}
/**
* 批量删除
*/
@DeleteMapping("/batch")
public HttpResult<Boolean> deleteBatch(@RequestBody List<String> tableNames) {
return HttpResult.success(syncTableConfigService.removeByIds(tableNames));
}
/**
* 更新启用状态
*/
@PutMapping("/status/{tableName}")
public HttpResult<Boolean> updateStatus(@PathVariable String tableName, @RequestParam Integer enabled) {
SyncTableConfig config = new SyncTableConfig();
config.setTableName(tableName);
config.setEnabled(enabled);
return HttpResult.success(syncTableConfigService.updateById(config));
}
}

View File

@@ -0,0 +1,249 @@
package com.njcn.relational.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.njcn.relational.pojo.po.SyncTableLogs;
import com.njcn.relational.pojo.vo.HttpResult;
import com.njcn.relational.service.SyncTableLogsService;
import lombok.RequiredArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/**
* 二三区数据转移日志 Controller
*
* @author cdf
* @date 2026-06-28
*/
@RestController
@RequestMapping("/sync-logs")
@RequiredArgsConstructor
public class SyncTableLogsController {
private final SyncTableLogsService syncTableLogsService;
// ========== 查询 ==========
/**
* 分页查询日志
* GET /api/sync-logs/page?pageNum=1&pageSize=10&timeId=2026-06-28&result=1
*/
@GetMapping("/page")
public HttpResult<IPage<SyncTableLogs>> page(
@RequestParam(defaultValue = "1") Integer pageNum,
@RequestParam(defaultValue = "10") Integer pageSize,
@RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate timeId,
@RequestParam(required = false) Integer result) {
IPage<SyncTableLogs> page = syncTableLogsService.pageQuery(pageNum, pageSize, timeId, result);
return HttpResult.success(page);
}
/**
* 根据日期查询日志列表
* GET /api/sync-logs/list?timeId=2026-06-28
*/
@GetMapping("/list")
public HttpResult<List<SyncTableLogs>> listByTimeId(
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate timeId) {
List<SyncTableLogs> list = syncTableLogsService.listByTimeId(timeId);
return HttpResult.success(list);
}
/**
* 根据日期和结果查询
* GET /api/sync-logs/list/condition?timeId=2026-06-28&result=1
*/
@GetMapping("/list/condition")
public HttpResult<List<SyncTableLogs>> listByTimeIdAndResult(
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate timeId,
@RequestParam Integer result) {
List<SyncTableLogs> list = syncTableLogsService.listByTimeIdAndResult(timeId, result);
return HttpResult.success(list);
}
/**
* 根据ID查询单条记录
* GET /api/sync-logs/2026-06-28/1
*/
@GetMapping("/{timeId}/{result}")
public HttpResult<SyncTableLogs> getById(
@PathVariable @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate timeId,
@PathVariable Integer result) {
LambdaQueryWrapper<SyncTableLogs> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SyncTableLogs::getTimeId, timeId)
.eq(SyncTableLogs::getResult, result);
SyncTableLogs log = syncTableLogsService.getOne(wrapper);
return HttpResult.success(log);
}
/**
* 检查某日期是否存在记录
* GET /api/sync-logs/exists/2026-06-28
*/
@GetMapping("/exists/{timeId}")
public HttpResult<Boolean> existsByTimeId(
@PathVariable @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate timeId) {
boolean exists = syncTableLogsService.existsByTimeId(timeId);
return HttpResult.success(exists);
}
/**
* 统计某日期的成功/失败数量
* GET /api/sync-logs/count/2026-06-28/1
*/
@GetMapping("/count/{timeId}/{result}")
public HttpResult<Integer> countByTimeIdAndResult(
@PathVariable @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate timeId,
@PathVariable Integer result) {
int count = syncTableLogsService.countByTimeIdAndResult(timeId, result);
return HttpResult.success(count);
}
/**
* 查询所有日志
* GET /api/sync-logs/all
*/
@GetMapping("/all")
public HttpResult<List<SyncTableLogs>> listAll() {
List<SyncTableLogs> list = syncTableLogsService.list();
return HttpResult.success(list);
}
// ========== 新增 ==========
/**
* 新增日志
* POST /api/sync-logs
*/
@PostMapping
public HttpResult<Boolean> add(@RequestBody SyncTableLogs log) {
// 设置创建时间
if (log.getCreateTime() == null) {
log.setCreateTime(LocalDateTime.now());
}
boolean success = syncTableLogsService.save(log);
return success ? HttpResult.success(true) : HttpResult.error("新增日志失败");
}
/**
* 批量新增日志
* POST /api/sync-logs/batch
*/
@PostMapping("/batch")
public HttpResult<Boolean> batchAdd(@RequestBody List<SyncTableLogs> logs) {
boolean success = syncTableLogsService.batchInsert(logs);
return success ? HttpResult.success(true) : HttpResult.error("批量新增失败");
}
/**
* 保存或更新(存在则更新,不存在则插入)
* POST /api/sync-logs/saveOrUpdate
*/
@PostMapping("/saveOrUpdate")
public HttpResult<Boolean> saveOrUpdate(@RequestBody SyncTableLogs log) {
boolean success = syncTableLogsService.saveOrUpdateLog(log);
return success ? HttpResult.success(true) : HttpResult.error("保存或更新失败");
}
// ========== 更新 ==========
/**
* 更新日志
* PUT /api/sync-logs
* 注意:由于 timeId 和 result 是复合主键,更新时不能修改这两个字段
*/
@PutMapping
public HttpResult<Boolean> update(@RequestBody SyncTableLogs log) {
// 使用条件更新
LambdaQueryWrapper<SyncTableLogs> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SyncTableLogs::getTimeId, log.getTimeId())
.eq(SyncTableLogs::getResult, log.getResult());
// 只更新 localResult 字段(如果有其他字段需要更新,在这里设置)
SyncTableLogs update = new SyncTableLogs();
update.setLocalResult(log.getLocalResult());
boolean success = syncTableLogsService.update(update, wrapper);
return success ? HttpResult.success(true) : HttpResult.error("更新失败");
}
/**
* 更新本地处理结果
* PUT /api/sync-logs/localResult/2026-06-28/1?localResult=1
*/
@PutMapping("/localResult/{timeId}/{result}")
public HttpResult<Boolean> updateLocalResult(
@PathVariable @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate timeId,
@PathVariable Integer result,
@RequestParam Integer localResult) {
LambdaQueryWrapper<SyncTableLogs> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SyncTableLogs::getTimeId, timeId)
.eq(SyncTableLogs::getResult, result);
SyncTableLogs update = new SyncTableLogs();
update.setLocalResult(localResult);
boolean success = syncTableLogsService.update(update, wrapper);
return success ? HttpResult.success(true) : HttpResult.error("更新本地处理结果失败");
}
// ========== 删除 ==========
/**
* 根据日期和结果删除
* DELETE /api/sync-logs/2026-06-28/1
*/
@DeleteMapping("/{timeId}/{result}")
public HttpResult<Boolean> delete(
@PathVariable @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate timeId,
@PathVariable Integer result) {
boolean success = syncTableLogsService.deleteByTimeIdAndResult(timeId, result);
return success ? HttpResult.success(true) : HttpResult.error("删除失败");
}
/**
* 根据日期删除所有日志
* DELETE /api/sync-logs/timeId/2026-06-28
*/
@DeleteMapping("/timeId/{timeId}")
public HttpResult<Boolean> deleteByTimeId(
@PathVariable @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate timeId) {
boolean success = syncTableLogsService.deleteByTimeId(timeId);
return success ? HttpResult.success(true) : HttpResult.error("删除失败");
}
/**
* 批量删除
* DELETE /api/sync-logs/batch
*/
@DeleteMapping("/batch")
public HttpResult<Boolean> deleteBatch(@RequestBody List<SyncTableLogs> logs) {
if (logs == null || logs.isEmpty()) {
return HttpResult.error("请选择要删除的记录");
}
// 构建删除条件
LambdaQueryWrapper<SyncTableLogs> wrapper = new LambdaQueryWrapper<>();
for (SyncTableLogs log : logs) {
wrapper.or(w -> w.eq(SyncTableLogs::getTimeId, log.getTimeId())
.eq(SyncTableLogs::getResult, log.getResult()));
}
boolean success = syncTableLogsService.remove(wrapper);
return success ? HttpResult.success(true) : HttpResult.error("批量删除失败");
}
}

View File

@@ -1,11 +1,9 @@
package com.njcn.relational.job;
import cn.hutool.core.date.DatePattern;
import com.njcn.relational.service.SyncTableConfigService;
import com.njcn.relational.service.SyncTableParseService;
import com.njcn.relational.service.SyncThreeDmParseService;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Profile;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@@ -24,7 +22,7 @@ import java.time.format.DateTimeFormatter;
public class importJob {
private final SyncTableParseService syncTableParseService;
private final SyncThreeDmParseService syncThreeDmParseService;
@@ -38,7 +36,7 @@ public class importJob {
@Scheduled(cron = "0 55 4 * * ?")
public void threeImport(){
String date = LocalDate.now().minusDays(1).format(DateTimeFormatter.ofPattern(DatePattern.PURE_DATE_PATTERN));
syncTableParseService.syncFullTables(date);
syncThreeDmParseService.syncFullTables(date);
}
@@ -52,7 +50,7 @@ public class importJob {
@Scheduled(cron = "0 44 5 * * ?")
@Profile("insert_up")
public void removeThreeLocal(){
syncTableParseService.cleanLocalFiles(7);
syncThreeDmParseService.cleanLocalFiles(7);
}
}

View File

@@ -1,11 +1,9 @@
package com.njcn.relational.job;
import cn.hutool.core.date.DatePattern;
import com.njcn.relational.service.SyncTableConfigService;
import com.njcn.relational.service.SyncTableParseService;
import com.njcn.relational.service.SyncTwoDmExportService;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Profile;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@@ -23,7 +21,7 @@ import java.time.format.DateTimeFormatter;
@Profile("query_up")
public class reportJob {
private final SyncTableConfigService syncTableConfigService;
private final SyncTwoDmExportService syncTwoDmExportService;
/**
@@ -35,7 +33,7 @@ public class reportJob {
@Scheduled(cron = "0 40 4 * * ?")
public void twoExport(){
String date = LocalDate.now().minusDays(1).format(DateTimeFormatter.ofPattern(DatePattern.PURE_DATE_PATTERN));
syncTableConfigService.syncAllFullTables(date);
syncTwoDmExportService.syncAllFullTables(date);
}
@@ -48,7 +46,7 @@ public class reportJob {
*/
@Scheduled(cron = "0 33 5 * * ?")
public void removeTwoLocal(){
syncTableConfigService.cleanLocalFiles(7);
syncTwoDmExportService.cleanLocalFiles(7);
}

View File

@@ -1,16 +0,0 @@
package com.njcn.relational.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.relational.pojo.po.RStatDataFlickerD;
/**
* <p>
* Mapper 接口
* </p>
*/
public interface RStatDataFlickerRelationMapper extends MppBaseMapper<RStatDataFlickerD> {
}

View File

@@ -1,16 +0,0 @@
package com.njcn.relational.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.relational.pojo.po.RStatDataFlucD;
/**
* <p>
* Mapper 接口
* </p>
*/
public interface RStatDataFlucRelationMapper extends MppBaseMapper<RStatDataFlucD> {
}

View File

@@ -1,16 +0,0 @@
package com.njcn.relational.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.relational.pojo.po.RStatDataHarmPhasicID;
/**
* <p>
* Mapper 接口
* </p>
*/
public interface RStatDataHarmPhasicIRelationMapper extends MppBaseMapper<RStatDataHarmPhasicID> {
}

View File

@@ -1,16 +0,0 @@
package com.njcn.relational.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.relational.pojo.po.RStatDataHarmPhasicVD;
/**
* <p>
* Mapper 接口
* </p>
*/
public interface RStatDataHarmPhasicVRelationMapper extends MppBaseMapper<RStatDataHarmPhasicVD> {
}

View File

@@ -1,16 +0,0 @@
package com.njcn.relational.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.relational.pojo.po.RStatDataHarmPowerPD;
/**
* <p>
* Mapper 接口
* </p>
*/
public interface RStatDataHarmPowerPRelationMapper extends MppBaseMapper<RStatDataHarmPowerPD> {
}

View File

@@ -1,16 +0,0 @@
package com.njcn.relational.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.relational.pojo.po.RStatDataHarmPowerQD;
/**
* <p>
* Mapper 接口
* </p>
*/
public interface RStatDataHarmPowerQRelationMapper extends MppBaseMapper<RStatDataHarmPowerQD> {
}

View File

@@ -1,16 +0,0 @@
package com.njcn.relational.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.relational.pojo.po.RStatDataHarmPowerSD;
/**
* <p>
* Mapper 接口
* </p>
*/
public interface RStatDataHarmPowerSRelationMapper extends MppBaseMapper<RStatDataHarmPowerSD> {
}

View File

@@ -1,16 +0,0 @@
package com.njcn.relational.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.relational.pojo.po.RStatDataHarmRateID;
/**
* <p>
* Mapper 接口
* </p>
*/
public interface RStatDataHarmRateIRelationMapper extends MppBaseMapper<RStatDataHarmRateID> {
}

View File

@@ -1,16 +0,0 @@
package com.njcn.relational.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.relational.pojo.po.RStatDataHarmRateVD;
/**
* <p>
* Mapper 接口
* </p>
*/
public interface RStatDataHarmRateVRelationMapper extends MppBaseMapper<RStatDataHarmRateVD> {
}

View File

@@ -1,16 +0,0 @@
package com.njcn.relational.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.relational.pojo.po.RStatDataID;
/**
* <p>
* Mapper 接口
* </p>
*/
public interface RStatDataIRelationMapper extends MppBaseMapper<RStatDataID> {
}

View File

@@ -1,16 +0,0 @@
package com.njcn.relational.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.relational.pojo.po.RStatDataInHarmID;
/**
* <p>
* Mapper 接口
* </p>
*/
public interface RStatDataInHarmIRelationMapper extends MppBaseMapper<RStatDataInHarmID> {
}

View File

@@ -1,16 +0,0 @@
package com.njcn.relational.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.relational.pojo.po.RStatDataInHarmVD;
/**
* <p>
* Mapper 接口
* </p>
*/
public interface RStatDataInHarmVRelationMapper extends MppBaseMapper<RStatDataInHarmVD> {
}

View File

@@ -1,16 +0,0 @@
package com.njcn.relational.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.relational.pojo.po.RStatDataPltD;
/**
* <p>
* Mapper 接口
* </p>
*/
public interface RStatDataPltRelationMapper extends MppBaseMapper<RStatDataPltD> {
}

View File

@@ -1,16 +0,0 @@
package com.njcn.relational.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.relational.pojo.po.RStatDataVD;
/**
* <p>
* Mapper 接口
* </p>
*/
public interface RStatDataVRelationMapper extends MppBaseMapper<RStatDataVD> {
}

View File

@@ -4,6 +4,7 @@ package com.njcn.relational.service;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.njcn.relational.pojo.dto.DcloudSyncQuery;
import dcloud.common.InnerServiceBus.ServiceBus;
import dcloud.model.common.ConModel;
import lombok.RequiredArgsConstructor;
@@ -13,6 +14,6 @@ import org.springframework.stereotype.Service;
public interface DcloudBusService {
boolean syncDataToDb();
boolean syncDataToDb(DcloudSyncQuery query);
}

View File

@@ -1,17 +0,0 @@
package com.njcn.relational.service;
import java.util.List;
/**
* Description:
* Date: 2024/11/18 11:17【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface InsertIDataFlicker {
}

View File

@@ -1,17 +0,0 @@
package com.njcn.relational.service;
import java.util.List;
/**
* Description:
* Date: 2024/11/18 11:17【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface InsertIDataFluc {
}

View File

@@ -1,13 +0,0 @@
package com.njcn.relational.service;
import java.util.List;
/**
* @author xy
*/
public interface InsertIDataHarmRateI {
}

View File

@@ -1,14 +0,0 @@
package com.njcn.relational.service;
import java.util.List;
/**
* @author xy
*/
public interface InsertIDataHarmRateV {
}

View File

@@ -1,19 +0,0 @@
package com.njcn.relational.service;
import java.util.List;
/**
* Description:
* Date: 2024/11/18 11:17【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface InsertIDataHarmphasicI {
}

View File

@@ -1,17 +0,0 @@
package com.njcn.relational.service;
import java.util.List;
/**
* Description:
* Date: 2024/11/18 11:17【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface InsertIDataHarmphasicV {
}

View File

@@ -1,18 +0,0 @@
package com.njcn.relational.service;
import java.util.List;
/**
* Description:
* Date: 2024/11/18 11:17【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface InsertIDataHarmpowerP {
}

View File

@@ -1,18 +0,0 @@
package com.njcn.relational.service;
import java.util.List;
/**
* Description:
* Date: 2024/11/18 11:17【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface InsertIDataHarmpowerQ {
}

View File

@@ -1,17 +0,0 @@
package com.njcn.relational.service;
import java.util.List;
/**
* Description:
* Date: 2024/11/18 11:17【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface InsertIDataHarmpowerS {
}

View File

@@ -1,17 +0,0 @@
package com.njcn.relational.service;
import java.util.List;
/**
* Description:
* Date: 2024/11/18 11:17【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface InsertIDataI {
}

View File

@@ -1,17 +0,0 @@
package com.njcn.relational.service;
import java.util.List;
/**
* Description:
* Date: 2024/11/18 13:27【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface InsertIDataInharmI {
}

View File

@@ -1,17 +0,0 @@
package com.njcn.relational.service;
import java.util.List;
/**
* Description:
* Date: 2024/11/18 13:27【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface InsertIDataInharmV {
}

View File

@@ -1,15 +0,0 @@
package com.njcn.relational.service;
import java.util.List;
/**
* Description:
* Date: 2024/11/18 11:17【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface InsertIDataPlt {
}

View File

@@ -1,19 +0,0 @@
package com.njcn.relational.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.njcn.relational.pojo.po.RStatDataID;
import com.njcn.relational.pojo.po.RStatDataVD;
import java.util.List;
/**
* @author hongawen
* @version 1.0
* @data 2024/11/7 10:54
*/
public interface InsertIDataV extends IService<RStatDataID> {
}

View File

@@ -0,0 +1,15 @@
package com.njcn.relational.service;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.extension.service.IService;
import com.njcn.relational.pojo.po.SGConPlantB;
public interface SGConPlantBService extends IService<SGConPlantB> {
/**
* 云平台批量同步场站数据入库
* @param dataArr 云平台分页返回JSON数组
* @return 同步结果
*/
boolean batchSyncFromDcloud(JSONArray dataArr);
}

View File

@@ -0,0 +1,15 @@
package com.njcn.relational.service;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.extension.service.IService;
import com.njcn.relational.pojo.po.SGConSubstationB;
public interface SGConSubstationBService extends IService<SGConSubstationB> {
/**
* 云平台批量同步场站数据入库
* @param dataArr 云平台分页返回JSON数组
* @return 同步结果
*/
boolean batchSyncFromDcloud(JSONArray dataArr) throws Exception;
}

View File

@@ -0,0 +1,15 @@
package com.njcn.relational.service;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.extension.service.IService;
import com.njcn.relational.pojo.po.SGConSubstationBind;
public interface SGConSubstationCService extends IService<SGConSubstationBind> {
/**
* 云平台批量同步场站数据入库
* @param dataArr 云平台分页返回JSON数组
* @return 同步结果
*/
boolean batchSyncFromDcloud(JSONArray dataArr) throws Exception;
}

View File

@@ -1,490 +1,7 @@
package com.njcn.relational.service;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.njcn.relational.mapper.DynamicSyncMapper;
import com.njcn.relational.mapper.SyncTableConfigMapper;
import com.njcn.relational.pojo.bo.UploadResult;
import com.njcn.relational.pojo.po.SyncTableConfig;
import com.njcn.relational.serializer.BlobSerializer;
import com.njcn.relational.serializer.ClobSerializer;
import com.njcn.relational.utils.SftpUploadUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.PostConstruct;
import java.io.*;
import java.sql.Blob;
import java.sql.Clob;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.stream.Collectors;
@Slf4j
@Service
public class SyncTableConfigService extends ServiceImpl<SyncTableConfigMapper, SyncTableConfig> {
@Autowired
private DynamicSyncMapper dynamicSyncMapper;
@Value("${sync.export.remotePath}")
private String remotePath;
@Value("${sync.export.localPath}")
private String localPath;
@Value("${sync.ip}")
private String ip;
@Value("${sync.port:22}")
private Integer port;
@Value("${sync.username}")
private String username;
@Value("${sync.password}")
private String password;
// 新增:表名 -> 时间字段 缓存
private Map<String, String> timeColumnCache = new HashMap<>();
private static final int BATCH_SIZE = 10000;
private static final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd");
private static final DateTimeFormatter FILE_DATE_FORMATTER = DateTimeFormatter.ofPattern("yyyyMMdd");
// JSON序列化工具自动处理时间、换行符等
private final ObjectMapper objectMapper = new ObjectMapper()
.registerModule(new JavaTimeModule())
.registerModule(new SimpleModule() {{
addSerializer(Blob.class, new BlobSerializer());
addSerializer(Clob.class, new ClobSerializer());
}})
.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
.enable(SerializationFeature.INDENT_OUTPUT)
.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));; // 格式化输出,可读性好
// 缓存当前Schema
private String currentSchema;
// 记录本次生成的所有文件
private final List<String> generatedFiles = new ArrayList<>();
@PostConstruct
public void init() {
currentSchema = dynamicSyncMapper.getCurrentUser();
log.info("当前数据库Schema: {}", currentSchema);
}
/**
* 获取所有启用的全量表(从配置表)
*/
public List<SyncTableConfig> getEnabledFullTables() {
LambdaQueryWrapper<SyncTableConfig> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SyncTableConfig::getEnabled, 1)
.eq(SyncTableConfig::getSyncMode, "FULL")
.orderByAsc(SyncTableConfig::getSortOrder);
return this.list(wrapper);
}
/**
* 获取所有启用的增量表(从配置表)
*/
public List<SyncTableConfig> getEnabledIncrementTables() {
LambdaQueryWrapper<SyncTableConfig> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SyncTableConfig::getEnabled, 1)
.eq(SyncTableConfig::getSyncMode, "INC")
.orderByAsc(SyncTableConfig::getSortOrder);
return this.list(wrapper);
}
/**
* 确保本地目录存在
*/
private void ensureLocalDirectory() {
File dir = new File(localPath);
if (!dir.exists()) {
dir.mkdirs();
log.info("创建目录: {}", localPath);
}
}
/**
* 全量同步所有表
*/
public void syncAllFullTables(String dateStr) {
List<SyncTableConfig> tables = getEnabledFullTables();
log.info("========== 全量同步开始,共 {} 张表 ==========", tables.size());
// 确保目录存在
ensureLocalDirectory();
generatedFiles.clear();
for (SyncTableConfig config : tables) {
String tableName = config.getTableName();
try {
long startTime = System.currentTimeMillis();
/*IService<?> service = registry.getServiceByTableName(tableName);
if (service != null) {
String filePath = exportFullTableWithEntity(service, tableName, dateStr);
log.info("表 {} 使用实体方式导出完成", tableName);
} else {*/
String filePath = exportFullTableToJson(tableName, dateStr);
log.info("表 {} 使用Map方式导出完成", tableName);
// }
long duration = System.currentTimeMillis() - startTime;
log.info("表 {} 全量导出完成,耗时 {} ms", tableName, duration);
} catch (Exception e) {
log.error("表 {} 全量导出失败", tableName, e);
}
}
syncAllIncrementTables(dateStr);
}
/**
* 增量同步所有表
*/
public void syncAllIncrementTables(String dateStr) {
List<SyncTableConfig> tables = getEnabledIncrementTables();
timeColumnCache = tables.stream().filter(it-> StrUtil.isNotBlank(it.getTimeColumn())).collect(Collectors.toMap(SyncTableConfig::getTableName,SyncTableConfig::getTimeColumn));
log.info("========== 增量同步开始,共 {} 张表 ==========", tables.size());
for (SyncTableConfig config : tables) {
String tableName = config.getTableName();
try {
long startTime = System.currentTimeMillis();
/*IService<?> service = registry.getServiceByTableName(tableName);
if (service != null) {
String filePath = exportIncrementWithEntity(service, tableName, dateStr);
log.info("表 {} 使用实体方式导出完成", tableName);
} else {*/
String filePath = exportTodayDataToJson(tableName, dateStr);
log.info("表 {} 使用Map方式导出完成", tableName);
// }
long duration = System.currentTimeMillis() - startTime;
log.info("表 {} 增量导出完成,耗时 {} ms", tableName, duration);
} catch (Exception e) {
log.error("表 {} 增量同步失败", tableName, e);
}
}
// 推送所有文件到横向隔离设备
if (!generatedFiles.isEmpty()) {
uploadAllFiles();
}
}
/**
* 上传所有生成的文件(批量上传)
*/
private void uploadAllFiles() {
if (generatedFiles.isEmpty()) {
log.info("没有文件需要上传");
return;
}
try {
List<UploadResult> resultList = SftpUploadUtil.batchUploadFiles(
ip, port, username, password, generatedFiles, remotePath
);
// 统计上传结果
long successCount = resultList.stream().filter(UploadResult::isSuccess).count();
long failCount = resultList.size() - successCount;
log.info("批量上传完成 - 成功: {}, 失败: {}, 总计: {}", successCount, failCount, resultList.size());
// 记录失败的文件
for (UploadResult result : resultList) {
if (!result.isSuccess()) {
log.error("上传失败文件: {}, 原因: {}", result.getLocalFilePath(), result.getErrorMessage());
}
}
} catch (Exception e) {
log.error("批量上传失败", e);
}
}
/**
* Map方式全量导出为JSON保存为.txt文件
*/
@Transactional
public String exportFullTableToJson(String tableName, String dateStr) throws IOException {
String fileName = String.format("%s_FULL_%s.txt", tableName, dateStr);
String filePath = localPath + fileName;
log.info("开始导出全量表: {} -> {}", tableName, filePath);
List<Map<String, Object>> allData = new ArrayList<>();
int offset = 0;
while (true) {
List<Map<String, Object>> batchData = dynamicSyncMapper.selectPage(
tableName, BATCH_SIZE, offset);
if (batchData.isEmpty()) {
break;
}
allData.addAll(batchData);
log.info("表 {} 已读取 {} 条记录", tableName, allData.size());
if (batchData.size() < BATCH_SIZE) {
break;
}
offset += BATCH_SIZE;
}
// 写入JSON格式到.txt文件
try (BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath))) {
objectMapper.writeValue(bos, allData);
}
// 记录生成的文件
generatedFiles.add(filePath);
log.info("表 {} 全量导出完成,共 {} 条记录,文件: {}", tableName, allData.size(), filePath);
return filePath;
}
/**
* Map方式增量导出为JSON保存为.txt文件
*/
@Transactional
public String exportTodayDataToJson(String tableName, String dateStr) throws IOException {
// 1. 判断表属于哪种周期D/M/Q/Y
String periodType = getTablePeriodType(tableName);
if (periodType == null) {
log.warn("表 {} 无法识别周期类型,跳过增量导出", tableName);
return null;
}
// 2. 根据周期构建 开始/结束 时间
Map<String, String> timeRange = buildPeriodTimeRange(periodType, dateStr);
String dateStart = timeRange.get("start");
String dateEnd = timeRange.get("end");
log.info("导出表 {} 数据: {} 至 {}", tableName, dateStart, dateEnd);
String timeColumn = getTimeColumn(tableName);
List<Map<String, Object>> queryData = dynamicSyncMapper.selectTodayData(
tableName, timeColumn, dateStart, dateEnd);
if (queryData.isEmpty()) {
log.info("表 {} {} - {}无数据", tableName,dateStart,dateEnd);
return null;
}
String fileName = String.format("%s_INC_%s.txt", tableName, dateStr);
String filePath = localPath + fileName;
// 写入JSON格式到.txt文件
try (BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath))) {
objectMapper.writeValue(bos, queryData);
}
// 记录生成的文件
generatedFiles.add(filePath);
log.info("表 {} {}数据导出完成,共 {} 条记录,文件: {}", tableName,dateStr, queryData.size(), filePath);
return filePath;
}
/**
* 从表名识别周期类型
* D=天, M=月, Q=季, Y=年
*/
private String getTablePeriodType(String tableName) {
if (tableName.endsWith("_D") || tableName.equalsIgnoreCase("R_MP_V_THD")) return "D";
if (tableName.endsWith("_M")) return "M";
if (tableName.endsWith("_Q")) return "Q";
if (tableName.endsWith("_Y")) return "Y";
return null;
}
/**
* 根据周期 & 入参日期计算【当前周期】时间范围JDK8 兼容)
*/
private Map<String, String> buildPeriodTimeRange(String periodType, String dateStr) {
DateTime baseDate = DateUtil.parse(dateStr, DatePattern.PURE_DATE_PATTERN);
String start;
String end;
// JDK8 标准 switch
switch (periodType) {
case "D":
// 入参日期 当天
start = DateUtil.format(DateUtil.beginOfDay(baseDate), DatePattern.NORM_DATETIME_PATTERN);
end = DateUtil.format(DateUtil.endOfDay(baseDate), DatePattern.NORM_DATETIME_PATTERN);
break;
case "M":
// 入参日期 所在整月
start = DateUtil.format(DateUtil.beginOfMonth(baseDate), DatePattern.NORM_DATETIME_PATTERN);
end = DateUtil.format(DateUtil.endOfMonth(baseDate), DatePattern.NORM_DATETIME_PATTERN);
break;
case "Q":
// 入参日期 所在整季度
start = DateUtil.format(DateUtil.beginOfQuarter(baseDate), DatePattern.NORM_DATETIME_PATTERN);
end = DateUtil.format(DateUtil.endOfQuarter(baseDate), DatePattern.NORM_DATETIME_PATTERN);
break;
case "Y":
// 入参日期 所在整年
start = DateUtil.format(DateUtil.beginOfYear(baseDate), DatePattern.NORM_DATETIME_PATTERN);
end = DateUtil.format(DateUtil.endOfYear(baseDate), DatePattern.NORM_DATETIME_PATTERN);
break;
default:
throw new IllegalArgumentException("不支持的周期类型:" + periodType);
}
Map<String, String> map = new HashMap<>(2);
map.put("start", start);
map.put("end", end);
return map;
}
/**
* 获取时间字段
*/
private String getTimeColumn(String tableName) {
String createTitle = timeColumnCache.get(tableName);
if(Objects.isNull(createTitle)){
switch (tableName) {
case "R_STAT_DATA_FLICKER_D":
case "R_STAT_DATA_FLUC_D":
case "R_STAT_DATA_HARMPHASIC_I_D":
case "R_STAT_DATA_HARMPHASIC_V_D":
case "R_STAT_DATA_HARMPOWER_P_D":
case "R_STAT_DATA_HARMPOWER_Q_D":
case "R_STAT_DATA_HARMPOWER_S_D":
case "R_STAT_DATA_HARMRATE_I_D":
case "R_STAT_DATA_HARMRATE_V_D":
case "R_STAT_DATA_INHARM_I_D":
case "R_STAT_DATA_INHARM_V_D":
case "R_STAT_DATA_I_D":
case "R_STAT_DATA_PLT_D":
case "R_STAT_DATA_V_D":
return "TIME";
// 新增表
case "R_STAT_COMASSES_D":
case "R_STAT_ASSES_D":
case "R_STAT_LIMIT_RATE_D":
case "R_STAT_ONLINERATE_D":
case "R_STAT_INTEGRITY_D":
case "R_STAT_ORG_INTEGRITY_D":
case "R_STAT_LIMIT_RATE_DETAIL_D":
case "R_STAT_LIMIT_TARGET_D":
return "TIME_ID";
case "R_MP_POLLUTION_D":
case "R_MP_V_THD":
case "R_STAT_POLLUTION_ORG_D":
case "R_STAT_POLLUTION_ORG_M":
case "R_STAT_POLLUTION_ORG_Q":
case "R_STAT_POLLUTION_ORG_Y":
case "R_STAT_POLLUTION_SUBSTATION_D":
case "R_STAT_POLLUTION_SUBSTATION_M":
case "R_STAT_POLLUTION_SUBSTATION_Q":
case "R_STAT_POLLUTION_SUBSTATION_Y":
return "DATA_DATE";
default:
log.warn("表 {} 未配置时间字段,跳过", tableName);
return "CREATE_TIME";
}
}else {
return createTitle;
}
}
public void test(){
try {
// 确保目录存在
File localDir = new File(localPath);
if (!localDir.exists()) {
localDir.mkdirs();
}
// 生成txt文件
String filePath = localPath + "test.txt";
try (BufferedWriter writer = new BufferedWriter(new FileWriter(filePath))) {
writer.write("test");
}
// 上传到SFTP服务器
SftpUploadUtil.uploadFile(ip, port, username, password, filePath, remotePath);
log.info("test.txt文件生成并上传成功");
} catch (Exception e) {
log.error("失败", e);
}
}
public List<String> getPendingFiles() {
List<String> matchedFiles = new ArrayList<>();
Vector<?> files;
try {
// 列目录也纳入异常捕获
files = SftpUploadUtil.listFiles(ip, port, username, password, remotePath);
for (Object obj : files) {
if (obj instanceof com.jcraft.jsch.ChannelSftp.LsEntry) {
com.jcraft.jsch.ChannelSftp.LsEntry entry = (com.jcraft.jsch.ChannelSftp.LsEntry) obj;
String fileName = entry.getFilename();
matchedFiles.add(fileName);
}
}
} catch (Exception e) {
log.error("获取待处理文件列表失败,远端目录:{}", remotePath, e);
return new ArrayList<>();
}
return matchedFiles;
}
/**
* 清理本地已处理过的文件
*/
public void cleanLocalFiles(int daysToKeep) {
File localDir = new File(localPath);
if (!localDir.exists()) {
return;
}
long cutoffTime = System.currentTimeMillis() - (daysToKeep * 24L * 60 * 60 * 1000);
File[] files = localDir.listFiles();
if (files != null) {
int deletedCount = 0;
for (File file : files) {
if (file.isFile() && file.lastModified() < cutoffTime) {
file.delete();
deletedCount++;
}
}
log.info("清理了10.11.7.5二区服务器 {} 个七天前的本地txt文件", deletedCount);
}
}
public interface SyncTableConfigService extends IService<SyncTableConfig> {
}

View File

@@ -0,0 +1,57 @@
package com.njcn.relational.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.njcn.relational.pojo.po.SyncTableLogs;
import java.time.LocalDate;
import java.util.List;
public interface SyncTableLogsService extends IService<SyncTableLogs> {
/**
* 分页查询日志
*/
IPage<SyncTableLogs> pageQuery(Integer pageNum, Integer pageSize, LocalDate timeId, Integer result);
/**
* 根据日期查询日志列表
*/
List<SyncTableLogs> listByTimeId(LocalDate timeId);
/**
* 根据日期和结果查询
*/
List<SyncTableLogs> listByTimeIdAndResult(LocalDate timeId, Integer result);
/**
* 查询某日期是否存在记录
*/
boolean existsByTimeId(LocalDate timeId);
/**
* 批量插入日志
*/
boolean batchInsert(List<SyncTableLogs> logs);
/**
* 根据日期删除日志
*/
boolean deleteByTimeId(LocalDate timeId);
/**
* 根据日期和结果删除
*/
boolean deleteByTimeIdAndResult(LocalDate timeId, Integer result);
/**
* 统计某日期的成功/失败数量
*/
int countByTimeIdAndResult(LocalDate timeId, Integer result);
/**
* 保存或更新日志(如果存在则更新,不存在则插入)
*/
boolean saveOrUpdateLog(SyncTableLogs log);
}

View File

@@ -1,5 +1,6 @@
package com.njcn.relational.service;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -9,6 +10,7 @@ import com.njcn.relational.mapper.DynamicSyncMapper;
import com.njcn.relational.mapper.SyncTableConfigMapper;
import com.njcn.relational.pojo.bo.DownloadResult;
import com.njcn.relational.pojo.po.SyncTableConfig;
import com.njcn.relational.pojo.po.SyncTableLogs;
import com.njcn.relational.utils.SftpUploadUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -20,18 +22,23 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.PostConstruct;
import java.io.*;
import java.nio.file.*;
import java.sql.Clob;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.Timestamp;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
@Slf4j
@Service
public class SyncTableParseService {
public class SyncThreeDmParseService {
@Autowired
private DynamicSyncMapper dynamicSyncMapper;
@@ -39,6 +46,9 @@ public class SyncTableParseService {
@Autowired
private SyncTableConfigMapper syncTableConfigMapper;
@Autowired
private SyncTableLogsService syncTableLogsService;
// 缓存当前Schema
private String currentSchema;
@@ -78,16 +88,29 @@ public class SyncTableParseService {
log.info("当前数据库Schema: {}", currentSchema);
}
private Map<String, String> syncData(){
Map<String, String> tableBlobCache = new ConcurrentHashMap<>();
Map<String, String> tableClobCache = new ConcurrentHashMap<>();
private void syncData(){
// 加载表配置到缓存
Map<String, String> tableConfigCache = new HashMap<>();
tableBlobCache.clear();
tableClobCache.clear();
LambdaQueryWrapper<SyncTableConfig> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SyncTableConfig::getEnabled, 1).isNotNull(SyncTableConfig::getBlobColumns);
wrapper.eq(SyncTableConfig::getEnabled, 1);
List<SyncTableConfig> configs = syncTableConfigMapper.selectList(wrapper);
for (SyncTableConfig config : configs) {
tableConfigCache.put(config.getTableName().toUpperCase(), config.getBlobColumns());
String tableUpper = config.getTableName().toUpperCase();
if(StrUtil.isNotBlank(config.getBlobColumns())) {
tableBlobCache.put(tableUpper, config.getBlobColumns());
}
if(StrUtil.isNotBlank(config.getClobColumns())){
tableClobCache.put(tableUpper, config.getClobColumns());
}
}
return tableConfigCache;
log.info("加载表配置BLOB缓存完成共 {} 张表", tableBlobCache.size());
log.info("加载表配置CLOB缓存完成共 {} 张表", tableClobCache.size());
}
/**
@@ -97,12 +120,14 @@ public class SyncTableParseService {
log.info("========== 开始批量同步数据{} ==========",LocalDateTime.now());
// 缓存表配置
Map<String, String> tableConfigCache = syncData();
log.info("加载表配置缓存完成,共 {} 张表", tableConfigCache.size());
syncData();
// 确保本地目录存在
ensureLocalDirectory();
boolean localFlag =true;
boolean resultFlag = true;
try {
// 1. 获取待下载的文件列表
List<String> remoteFilePaths = getRemoteFilePaths(dataStr);
@@ -116,8 +141,7 @@ public class SyncTableParseService {
// 2. 批量下载并删除远程文件
List<DownloadResult> downloadResults = SftpUploadUtil.batchDownloadAndDelete(
ip, port, username, password,
remoteFilePaths, localPath, true // true = 下载后删除远程文件
ip, port, username, password, remoteFilePaths, localPath, true // true = 下载后删除远程文件
);
// 3. 统计下载结果
@@ -128,6 +152,7 @@ public class SyncTableParseService {
// 记录下载失败的文件
for (DownloadResult result : downloadResults) {
if (!result.isSuccess()) {
localFlag = false;
log.error("下载失败: {}, 原因: {}", result.getRemoteFilePath(), result.getErrorMessage());
}
}
@@ -138,7 +163,8 @@ public class SyncTableParseService {
.collect(Collectors.toList());
if (successfulDownloads.isEmpty()) {
log.warn("没有成功下载的文件,停止处理");
log.error("没有成功下载的文件,停止处理");
localFlag = false;
return;
}
@@ -152,7 +178,7 @@ public class SyncTableParseService {
String localFilePath = downloadResult.getLocalFilePath();
log.info("开始导入表: {}, 文件: {}", tableName, localFilePath);
importJsonToTable(tableName, localFilePath,tableConfigCache);
importJsonToTable(tableName, localFilePath);
importSuccessCount++;
log.info("表 {} 导入成功", tableName);
@@ -161,6 +187,7 @@ public class SyncTableParseService {
deleteLocalFile(localFilePath);
} catch (Exception e) {
resultFlag = false;
importFailCount++;
log.error("导入失败: {}", downloadResult.getRemoteFilePath(), e);
}
@@ -171,7 +198,15 @@ public class SyncTableParseService {
} catch (Exception e) {
log.error("批量同步失败", e);
resultFlag = false;
}
SyncTableLogs syncTableLogs = new SyncTableLogs();
syncTableLogs.setLocalResult(localFlag?1:0);
syncTableLogs.setResult((resultFlag&&localFlag) ? 1:0);
syncTableLogs.setTimeId(LocalDate.parse(dataStr, DateTimeFormatter.ofPattern("yyyyMMdd")));
syncTableLogs.setCreateTime(LocalDateTime.now());
syncTableLogsService.saveOrUpdate(syncTableLogs);
}
/**
@@ -319,8 +354,8 @@ public class SyncTableParseService {
/**
* 从配置缓存中获取BLOB字段列表
*/
private List<String> getBlobColumnsFromCache(String tableName, Map<String, String> tableConfigCache) {
String blobColumnsStr = tableConfigCache.get(tableName.toUpperCase());
private List<String> getBlobColumnsFromCache(String tableName) {
String blobColumnsStr = tableBlobCache.get(tableName.toUpperCase());
if (blobColumnsStr == null || blobColumnsStr.trim().isEmpty()) {
return new ArrayList<>();
}
@@ -342,7 +377,7 @@ public class SyncTableParseService {
* 导入JSON数据到表支持BLOB字段
*/
@Transactional
public void importJsonToTable(String tableName, String filePath, Map<String, String> tableConfigCache) throws Exception {
public void importJsonToTable(String tableName, String filePath) throws Exception {
log.info("开始导入表: {}, 文件: {}", tableName, filePath);
File dataFile = new File(filePath);
@@ -384,7 +419,7 @@ public class SyncTableParseService {
List<String> timeColumns = getTimeColumns(tableName.toUpperCase());
// 从缓存配置中获取BLOB字段列表
List<String> blobColumns = getBlobColumnsFromCache(tableName, tableConfigCache);
List<String> blobColumns = getBlobColumnsFromCache(tableName);
// 转换数据Map key转大写并将时间字段转换为TimestampBLOB字段转换为byte[]
List<Map<String, Object>> convertedData = new ArrayList<>();
@@ -428,6 +463,19 @@ public class SyncTableParseService {
convertedData.add(convertedRow);
}
// 仅CLOB配置表 + 增量文件 才走先删当日再插入全量保留原有truncate逻辑
String tableUpper = tableName.toUpperCase();
if (tableClobCache.containsKey(tableUpper) && !isFull) {
log.info("表 {} 专用先删后插流程开始执行", tableName);
String syncDate = extractDateFromFileName(fileName);
// 从缓存拿当前表配置的timeColumn
SyncTableConfig cfg = getTableConfig(tableName);
String delTimeCol = cfg.getTimeColumn();
deleteDayThenInsert(tableName, columns, convertedData, syncDate, delTimeCol);
log.info("表 {} 专用先删后插流程执行完毕,删除时间字段:{},直接返回", tableName, delTimeCol);
return;
}
// ==============================================
// 核心修改增量使用MERGE INTO(存在更新/不存在插入)
// ==============================================
@@ -473,6 +521,16 @@ public class SyncTableParseService {
log.info("表 {} 导入完成,共 {} 条记录", tableName, totalCount);
}
private SyncTableConfig getTableConfig(String tableName) {
LambdaQueryWrapper<SyncTableConfig> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SyncTableConfig::getTableName, tableName.toUpperCase());
SyncTableConfig config = syncTableConfigMapper.selectOne(wrapper);
if (config == null || StrUtil.isBlank(config.getTimeColumn())) {
throw new RuntimeException("表[" + tableName + "]未配置timeColumn无法执行按日期删除增量逻辑");
}
return config;
}
/**
* 将Base64字符串转换为byte[]
*/
@@ -518,6 +576,10 @@ public class SyncTableParseService {
}
}
/**
* 构建达梦MERGE INTO SQL存在更新不存在插入
* 根据表配置CLOB_COLUMN动态使用TO_CLOB(?)不再硬编码后缀_OVERTIME
*/
/**
* 构建达梦MERGE INTO SQL存在更新不存在插入
*/
@@ -558,7 +620,6 @@ public class SyncTableParseService {
sb.append(")");
return sb.toString();
}
/**
* 批量执行MERGE
*/
@@ -581,7 +642,7 @@ public class SyncTableParseService {
private List<String> getTimeColumns(String tableName) {
String sql = "SELECT COLUMN_NAME FROM ALL_TAB_COLUMNS " +
"WHERE TABLE_NAME = ? AND OWNER = ? " +
"AND DATA_TYPE IN ('DATE', 'TIMESTAMP')";
"AND DATA_TYPE IN ('DATE', 'TIMESTAMP','DATETIME')";
try {
List<String> timeColumns = targetJdbcTemplate.queryForList(sql, String.class, tableName, currentSchema);
log.debug("表 {} 的时间字段: {}", tableName, timeColumns);
@@ -596,59 +657,63 @@ public class SyncTableParseService {
* 将字符串转换为 java.sql.Timestamp增强版
*/
private Timestamp convertToTimestamp(String timeStr) {
if (timeStr == null || timeStr.isEmpty()) {
return null;
if (timeStr == null || StrUtil.isBlank(timeStr)) {
log.warn("时间字符串为空,使用当日零点兜底");
return Timestamp.valueOf(LocalDate.now(java.time.ZoneId.of("Asia/Shanghai")).atStartOfDay());
}
timeStr = timeStr.trim();
if (timeStr.startsWith("\"") && timeStr.endsWith("\"")) {
timeStr = timeStr.substring(1, timeStr.length() - 1);
}
// 1. 带时区 ISO 2026-06-10T14:53:23.853+08:00
try {
// 去除可能的引号
timeStr = timeStr.trim();
if (timeStr.startsWith("\"") && timeStr.endsWith("\"")) {
timeStr = timeStr.substring(1, timeStr.length() - 1);
}
java.time.OffsetDateTime offsetDateTime = java.time.OffsetDateTime.parse(timeStr);
LocalDateTime ldt = offsetDateTime.atZoneSameInstant(java.time.ZoneId.of("Asia/Shanghai")).toLocalDateTime();
return Timestamp.valueOf(ldt);
} catch (Exception ignored) {}
// 尝试多种解析器
// 1. ISO_OFFSET_DATE_TIME (支持 2025-04-17T03:42:04.000+00:00)
try {
java.time.OffsetDateTime offsetDateTime = java.time.OffsetDateTime.parse(timeStr);
return Timestamp.valueOf(offsetDateTime.toLocalDateTime());
} catch (Exception e) {
// 继续尝试其他格式
}
// 2. 本地带T 2026-06-10T14:53:23.853
try {
java.time.LocalDateTime localDateTime = java.time.LocalDateTime.parse(timeStr);
return Timestamp.valueOf(localDateTime);
} catch (Exception ignored) {}
// 2. ISO_LOCAL_DATE_TIME (支持 2025-04-17T03:42:04)
try {
java.time.LocalDateTime localDateTime = java.time.LocalDateTime.parse(timeStr);
return Timestamp.valueOf(localDateTime);
} catch (Exception e) {
// 继续尝试其他格式
}
// 3. yyyy-MM-dd HH:mm:ss.SSS
try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS");
LocalDateTime ldt = LocalDateTime.parse(timeStr, formatter);
return Timestamp.valueOf(ldt);
} catch (Exception ignored) {}
// 3. 自定义格式: yyyy-MM-dd HH:mm:ss
try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
LocalDateTime ldt = LocalDateTime.parse(timeStr, formatter);
return Timestamp.valueOf(ldt);
} catch (Exception e) {
// 继续尝试其他格式
}
// 4. yyyy-MM-dd HH:mm:ss
try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
LocalDateTime ldt = LocalDateTime.parse(timeStr, formatter);
return Timestamp.valueOf(ldt);
} catch (Exception ignored) {}
// 4. 日期格式: yyyy-MM-dd
try {
LocalDate ld = LocalDate.parse(timeStr, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
return Timestamp.valueOf(ld.atStartOfDay());
} catch (Exception e) {
// 继续尝试其他格式
}
// 5. 最后尝试直接转换
return Timestamp.valueOf(timeStr);
// 5. 日期 yyyy-MM-dd
try {
LocalDate ld = LocalDate.parse(timeStr, DateTimeFormatter.ISO_LOCAL_DATE);
return Timestamp.valueOf(ld.atStartOfDay());
} catch (Exception ignored) {}
// 6. 纯时分秒 HH:mm:ss解决MINS_TIME数组内时间
try {
DateTimeFormatter timeFmt = DateTimeFormatter.ofPattern("HH:mm:ss");
LocalTime lt = LocalTime.parse(timeStr, timeFmt);
LocalDate today = LocalDate.now(java.time.ZoneId.of("Asia/Shanghai"));
LocalDateTime ldt = LocalDateTime.of(today, lt);
return Timestamp.valueOf(ldt);
} catch (Exception e) {
log.warn("时间转换失败: {}, 返回null", timeStr);
return null;
log.error("所有格式均无法解析时间字符串:[{}],使用当日零点兜底", timeStr, e);
// 兜底返回当日零点防止NOT NULL字段插入null报错
return Timestamp.valueOf(LocalDate.now(java.time.ZoneId.of("Asia/Shanghai")).atStartOfDay());
}
}
/**
* 构建INSERT语句
*/
@@ -668,6 +733,7 @@ public class SyncTableParseService {
return sql.toString();
}
/**
* 执行批量插入
*/
@@ -684,6 +750,105 @@ public class SyncTableParseService {
return Arrays.stream(results).sum();
}
/**
* 专用带动态时间字段先删当日再批量插入
* @param tableName 表名
* @param columns 全表字段
* @param dataList 待入库数据
* @param fileDate 文件名内日期 yyyyMMdd
* @param timeColumn 配置的时间字段如TIME_ID
*/
private void deleteDayThenInsert(String tableName, List<String> columns, List<Map<String, Object>> dataList, String fileDate, String timeColumn) throws Exception {
// 读取本表CLOB字段配置
String clobText = tableClobCache.get(tableName.toUpperCase());
List<String> clobFields = Arrays.stream(clobText.split(","))
.map(String::trim)
.map(String::toUpperCase)
.collect(Collectors.toList());
// 动态拼接删除SQL使用配置的timeColumn
String deleteSql = String.format("DELETE FROM %s WHERE TRUNC(%s) = TO_DATE(?, 'yyyyMMdd')", tableName, timeColumn);
// 2INSERT SQL ?占位符无TO_CLOB
StringBuilder colSb = new StringBuilder();
StringBuilder valSb = new StringBuilder();
for (String col : columns) {
if (colSb.length() > 0) {
colSb.append(",");
valSb.append(",");
}
colSb.append(col);
valSb.append("?");
}
String insertSql = "INSERT INTO " + tableName + "(" + colSb + ") VALUES(" + valSb + ")";
Connection conn = targetJdbcTemplate.getDataSource().getConnection();
conn.setAutoCommit(false);
PreparedStatement delStmt = null;
PreparedStatement insStmt = null;
final int BATCH_COMMIT = 1000;
int batchCnt = 0;
try {
// 执行删除当日数据
delStmt = conn.prepareStatement(deleteSql);
delStmt.setString(1, fileDate);
int delRows = delStmt.executeUpdate();
log.info("专用入库:根据字段{}删除{}日原有{}条记录", timeColumn, fileDate, delRows);
insStmt = conn.prepareStatement(insertSql);
for (Map<String, Object> row : dataList) {
for (int i = 0; i < columns.size(); i++) {
String col = columns.get(i);
Object val = row.get(col);
int paramIndex = i + 1;
// CLOB文本使用原生Clob完整存储不截断
if (clobFields.contains(col) && val instanceof String) {
Clob clob = conn.createClob();
clob.setString(1, (String) val);
insStmt.setClob(paramIndex, clob);
} else {
insStmt.setObject(paramIndex, val);
}
}
insStmt.addBatch();
batchCnt++;
// 分段提交
if (batchCnt >= BATCH_COMMIT) {
insStmt.executeBatch();
batchCnt = 0;
}
}
// 提交剩余批次
if (batchCnt > 0) {
insStmt.executeBatch();
}
conn.commit();
log.info("专用入库完成,共插入{}条数据", dataList.size());
} catch (Exception e) {
conn.rollback();
log.error("{} 入库失败,事务回滚", tableName, e);
throw new Exception("入库异常", e);
} finally {
if (delStmt != null) delStmt.close();
if (insStmt != null) insStmt.close();
if (conn != null) conn.close();
}
}
/**
* 从文件名提取同步日期 yyyyMMdd
*/
private String extractDateFromFileName(String fileName) {
Pattern pattern = Pattern.compile("_(FULL|INC)_(\\d{8})\\.txt");
Matcher matcher = pattern.matcher(fileName);
if (matcher.find()) {
return matcher.group(2);
}
throw new RuntimeException("文件无法提取同步日期:" + fileName);
}
/**
* 手动导入指定的远程文件单个文件处理
*/
@@ -708,13 +873,11 @@ public class SyncTableParseService {
String tableName = extractTableNameFromFile(remoteFileName);
try {
// 缓存表配置
Map<String, String> tableConfigCache = syncData();
log.info("加载表配置缓存完成,共 {} 张表", tableConfigCache.size());
syncData();
// 导入数据
importJsonToTable(tableName, result.getLocalFilePath(),tableConfigCache);
importJsonToTable(tableName, result.getLocalFilePath());
// 导入成功后删除本地文件
deleteLocalFile(result.getLocalFilePath());
@@ -773,6 +936,26 @@ public class SyncTableParseService {
}
}
/**
* 判断当前字段是否配置为CLOB大文本字段
* @param col 字段名大写
* @param tableName 表名大写
* @param tableConfigCache 表配置缓存 key=表名大写 value=逗号分隔CLOB字段大写
*/
private boolean isClobColumn(String col, String tableName, Map<String, String> tableConfigCache) {
String clobColStr = tableConfigCache.get(tableName);
if (StrUtil.isBlank(clobColStr)) {
return false;
}
// 分割配置的CLOB字段列表统一大写匹配
List<String> clobCols = Arrays.stream(clobColStr.split(","))
.map(String::trim)
.map(String::toUpperCase)
.collect(Collectors.toList());
return clobCols.contains(col.toUpperCase());
}
/**
* 测试方法
*/

View File

@@ -0,0 +1,523 @@
package com.njcn.relational.service;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.njcn.relational.mapper.DynamicSyncMapper;
import com.njcn.relational.mapper.SyncTableConfigMapper;
import com.njcn.relational.pojo.bo.UploadResult;
import com.njcn.relational.pojo.po.SyncTableConfig;
import com.njcn.relational.pojo.po.SyncTableLogs;
import com.njcn.relational.serializer.BlobSerializer;
import com.njcn.relational.serializer.ClobSerializer;
import com.njcn.relational.utils.SftpUploadUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.PostConstruct;
import java.io.*;
import java.sql.Blob;
import java.sql.Clob;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.stream.Collectors;
@Slf4j
@Service
public class SyncTwoDmExportService extends ServiceImpl<SyncTableConfigMapper, SyncTableConfig> {
@Autowired
private SyncTableLogsService syncTableLogsService;
@Autowired
private DynamicSyncMapper dynamicSyncMapper;
@Value("${sync.export.remotePath}")
private String remotePath;
@Value("${sync.export.localPath}")
private String localPath;
@Value("${sync.ip}")
private String ip;
@Value("${sync.port:22}")
private Integer port;
@Value("${sync.username}")
private String username;
@Value("${sync.password}")
private String password;
// 新增:表名 -> 时间字段 缓存
private Map<String, String> timeColumnCache = new HashMap<>();
private Map<String, String> dataTimeTypeCache = new HashMap<>();
private static final int BATCH_SIZE = 10000;
private static final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd");
private static final DateTimeFormatter FILE_DATE_FORMATTER = DateTimeFormatter.ofPattern("yyyyMMdd");
// JSON序列化工具自动处理时间、换行符等
private final ObjectMapper objectMapper = new ObjectMapper()
.registerModule(new JavaTimeModule())
.registerModule(new SimpleModule() {{
addSerializer(Blob.class, new BlobSerializer());
addSerializer(Clob.class, new ClobSerializer());
}})
.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"))
.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
.enable(SerializationFeature.INDENT_OUTPUT)
.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
; // 格式化输出,可读性好
// 缓存当前Schema
private String currentSchema;
// 记录本次生成的所有文件
private final List<String> generatedFiles = new ArrayList<>();
@PostConstruct
public void init() {
currentSchema = dynamicSyncMapper.getCurrentUser();
log.info("当前数据库Schema: {}", currentSchema);
}
/**
* 获取所有启用的全量表(从配置表)
*/
public List<SyncTableConfig> getEnabledFullTables() {
LambdaQueryWrapper<SyncTableConfig> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SyncTableConfig::getEnabled, 1)
.eq(SyncTableConfig::getSyncMode, "FULL")
.orderByAsc(SyncTableConfig::getSortOrder);
return this.list(wrapper);
}
/**
* 获取所有启用的增量表(从配置表)
*/
public List<SyncTableConfig> getEnabledIncrementTables() {
LambdaQueryWrapper<SyncTableConfig> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SyncTableConfig::getEnabled, 1)
.eq(SyncTableConfig::getSyncMode, "INC")
.orderByAsc(SyncTableConfig::getSortOrder);
return this.list(wrapper);
}
/**
* 确保本地目录存在
*/
private void ensureLocalDirectory() {
File dir = new File(localPath);
if (!dir.exists()) {
dir.mkdirs();
log.info("创建目录: {}", localPath);
}
}
/**
* 全量同步所有表
*/
public void syncAllFullTables(String dateStr) {
List<SyncTableConfig> tables = getEnabledFullTables();
log.info("========== 全量同步开始,共 {} 张表 ==========", tables.size());
// 确保目录存在
ensureLocalDirectory();
generatedFiles.clear();
for (SyncTableConfig config : tables) {
String tableName = config.getTableName();
try {
long startTime = System.currentTimeMillis();
/*IService<?> service = registry.getServiceByTableName(tableName);
if (service != null) {
String filePath = exportFullTableWithEntity(service, tableName, dateStr);
log.info("表 {} 使用实体方式导出完成", tableName);
} else {*/
String filePath = exportFullTableToJson(tableName, dateStr);
log.info("表 {} 使用Map方式导出完成", tableName);
// }
long duration = System.currentTimeMillis() - startTime;
log.info("表 {} 全量导出完成,耗时 {} ms", tableName, duration);
} catch (Exception e) {
log.error("表 {} 全量导出失败", tableName, e);
}
}
syncAllIncrementTables(dateStr);
}
/**
* 增量同步所有表
*/
public void syncAllIncrementTables(String dateStr) {
List<SyncTableConfig> tables = getEnabledIncrementTables();
timeColumnCache = tables.stream().filter(it -> StrUtil.isNotBlank(it.getTimeColumn())).collect(Collectors.toMap(SyncTableConfig::getTableName, SyncTableConfig::getTimeColumn));
dataTimeTypeCache = tables.stream().filter(it -> StrUtil.isNotBlank(it.getDataTimeType())).collect(Collectors.toMap(SyncTableConfig::getTableName, SyncTableConfig::getDataTimeType));
log.info("========== 增量同步开始,共 {} 张表 ==========", tables.size());
boolean localFlag = true;
boolean resultFlag = true;
for (SyncTableConfig config : tables) {
String tableName = config.getTableName();
try {
long startTime = System.currentTimeMillis();
String filePath = exportTodayDataToJson(tableName, dateStr);
log.info("表 {} 使用Map方式导出完成", tableName);
long duration = System.currentTimeMillis() - startTime;
log.info("表 {} 增量导出完成,耗时 {} ms", tableName, duration);
} catch (Exception e) {
log.error("表 {} 增量同步失败", tableName, e);
localFlag = false;
}
}
// 推送所有文件到横向隔离设备
if (!generatedFiles.isEmpty()) {
try {
uploadAllFiles();
} catch (Exception e) {
log.error("批量上传失败", e);
resultFlag = false;
}
} else {
resultFlag = false;
}
SyncTableLogs syncTableLogs = new SyncTableLogs();
syncTableLogs.setLocalResult(localFlag?1:0);
syncTableLogs.setResult((resultFlag&&localFlag) ? 1:0);
syncTableLogs.setTimeId(LocalDate.parse(dateStr, DateTimeFormatter.ofPattern("yyyyMMdd")));
syncTableLogs.setCreateTime(LocalDateTime.now());
syncTableLogsService.saveOrUpdate(syncTableLogs);
}
/**
* 上传所有生成的文件(批量上传)
*/
private void uploadAllFiles() throws Exception {
if (generatedFiles.isEmpty()) {
log.info("没有文件需要上传");
return;
}
List<UploadResult> resultList = SftpUploadUtil.batchUploadFiles(
ip, port, username, password, generatedFiles, remotePath
);
// 统计上传结果
long successCount = resultList.stream().filter(UploadResult::isSuccess).count();
long failCount = resultList.size() - successCount;
log.info("批量上传完成 - 成功: {}, 失败: {}, 总计: {}", successCount, failCount, resultList.size());
// 记录失败的文件
for (UploadResult result : resultList) {
if (!result.isSuccess()) {
log.error("上传失败文件: {}, 原因: {}", result.getLocalFilePath(), result.getErrorMessage());
}
}
}
/**
* Map方式全量导出为JSON保存为.txt文件
*/
@Transactional
public String exportFullTableToJson(String tableName, String dateStr) throws IOException {
String fileName = String.format("%s_FULL_%s.txt", tableName, dateStr);
String filePath = localPath + fileName;
log.info("开始导出全量表: {} -> {}", tableName, filePath);
List<Map<String, Object>> allData = new ArrayList<>();
int offset = 0;
while (true) {
List<Map<String, Object>> batchData = dynamicSyncMapper.selectPage(
tableName, BATCH_SIZE, offset);
if (batchData.isEmpty()) {
break;
}
allData.addAll(batchData);
log.info("表 {} 已读取 {} 条记录", tableName, allData.size());
if (batchData.size() < BATCH_SIZE) {
break;
}
offset += BATCH_SIZE;
}
// 写入JSON格式到.txt文件
try (BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath))) {
objectMapper.writeValue(bos, allData);
}
// 记录生成的文件
generatedFiles.add(filePath);
log.info("表 {} 全量导出完成,共 {} 条记录,文件: {}", tableName, allData.size(), filePath);
return filePath;
}
/**
* Map方式增量导出为JSON保存为.txt文件
*/
@Transactional
public String exportTodayDataToJson(String tableName, String dateStr) throws IOException {
// 1. 判断表属于哪种周期D/M/Q/Y
String periodType = getTablePeriodType(tableName);
if (periodType == null) {
log.error("表 {} 无法识别周期类型,跳过增量导出", tableName);
return null;
}
// 2. 根据周期构建 开始/结束 时间
Map<String, String> timeRange = buildPeriodTimeRange(periodType, dateStr);
String dateStart = timeRange.get("start");
String dateEnd = timeRange.get("end");
log.info("导出表 {} 数据: {} 至 {}", tableName, dateStart, dateEnd);
String timeColumn = getTimeColumn(tableName);
List<Map<String, Object>> queryData = dynamicSyncMapper.selectTodayData(
tableName, timeColumn, dateStart, dateEnd);
if (queryData.isEmpty()) {
log.info("表 {} {} - {}无数据", tableName, dateStart, dateEnd);
return null;
}
String fileName = String.format("%s_INC_%s.txt", tableName, dateStr);
String filePath = localPath + fileName;
// 写入JSON格式到.txt文件
try (BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath))) {
objectMapper.writeValue(bos, queryData);
}
// 记录生成的文件
generatedFiles.add(filePath);
log.info("表 {} {}数据导出完成,共 {} 条记录,文件: {}", tableName, dateStr, queryData.size(), filePath);
return filePath;
}
/**
* 从表名识别周期类型
* D=天, M=月, Q=季, Y=年
*/
private String getTablePeriodType(String tableName) {
String dTypeCreateTitle = dataTimeTypeCache.get(tableName);
if (dTypeCreateTitle != null) {
if ("D".equals(dTypeCreateTitle) || "M".equalsIgnoreCase(tableName) || "Q".equals(tableName) || "Y".equals(tableName)) {
return dTypeCreateTitle;
}
} else {
if (tableName.endsWith("_D")) {
return "D";
}
if (tableName.endsWith("_M")) {
return "M";
}
if (tableName.endsWith("_Q")) {
return "Q";
}
if (tableName.endsWith("_Y")) {
return "Y";
}
}
return null;
}
/**
* 根据周期 & 入参日期计算【当前周期】时间范围JDK8 兼容)
*/
private Map<String, String> buildPeriodTimeRange(String periodType, String dateStr) {
DateTime baseDate = DateUtil.parse(dateStr, DatePattern.PURE_DATE_PATTERN);
String start;
String end;
// JDK8 标准 switch
switch (periodType) {
case "D":
// 入参日期 当天
start = DateUtil.format(DateUtil.beginOfDay(baseDate), DatePattern.NORM_DATETIME_PATTERN);
end = DateUtil.format(DateUtil.endOfDay(baseDate), DatePattern.NORM_DATETIME_PATTERN);
break;
case "M":
// 入参日期 所在整月
start = DateUtil.format(DateUtil.beginOfMonth(baseDate), DatePattern.NORM_DATETIME_PATTERN);
end = DateUtil.format(DateUtil.endOfMonth(baseDate), DatePattern.NORM_DATETIME_PATTERN);
break;
case "Q":
// 入参日期 所在整季度
start = DateUtil.format(DateUtil.beginOfQuarter(baseDate), DatePattern.NORM_DATETIME_PATTERN);
end = DateUtil.format(DateUtil.endOfQuarter(baseDate), DatePattern.NORM_DATETIME_PATTERN);
break;
case "Y":
// 入参日期 所在整年
start = DateUtil.format(DateUtil.beginOfYear(baseDate), DatePattern.NORM_DATETIME_PATTERN);
end = DateUtil.format(DateUtil.endOfYear(baseDate), DatePattern.NORM_DATETIME_PATTERN);
break;
default:
throw new IllegalArgumentException("不支持的周期类型:" + periodType);
}
Map<String, String> map = new HashMap<>(2);
map.put("start", start);
map.put("end", end);
return map;
}
/**
* 获取时间字段
*/
private String getTimeColumn(String tableName) {
String createTitle = timeColumnCache.get(tableName);
if (Objects.isNull(createTitle)) {
switch (tableName) {
case "R_STAT_DATA_FLICKER_D":
case "R_STAT_DATA_FLUC_D":
case "R_STAT_DATA_HARMPHASIC_I_D":
case "R_STAT_DATA_HARMPHASIC_V_D":
case "R_STAT_DATA_HARMPOWER_P_D":
case "R_STAT_DATA_HARMPOWER_Q_D":
case "R_STAT_DATA_HARMPOWER_S_D":
case "R_STAT_DATA_HARMRATE_I_D":
case "R_STAT_DATA_HARMRATE_V_D":
case "R_STAT_DATA_INHARM_I_D":
case "R_STAT_DATA_INHARM_V_D":
case "R_STAT_DATA_I_D":
case "R_STAT_DATA_PLT_D":
case "R_STAT_DATA_V_D":
return "TIME";
// 新增表
case "R_STAT_COMASSES_D":
case "R_STAT_ASSES_D":
case "R_STAT_LIMIT_RATE_D":
case "R_STAT_ONLINERATE_D":
case "R_STAT_INTEGRITY_D":
case "R_STAT_ORG_INTEGRITY_D":
case "R_STAT_LIMIT_RATE_DETAIL_D":
case "R_STAT_LIMIT_TARGET_D":
return "TIME_ID";
case "R_MP_POLLUTION_D":
case "R_MP_V_THD":
case "R_STAT_POLLUTION_ORG_D":
case "R_STAT_POLLUTION_ORG_M":
case "R_STAT_POLLUTION_ORG_Q":
case "R_STAT_POLLUTION_ORG_Y":
case "R_STAT_POLLUTION_SUBSTATION_D":
case "R_STAT_POLLUTION_SUBSTATION_M":
case "R_STAT_POLLUTION_SUBSTATION_Q":
case "R_STAT_POLLUTION_SUBSTATION_Y":
return "DATA_DATE";
default:
log.warn("表 {} 未配置时间字段,跳过", tableName);
return "CREATE_TIME";
}
} else {
return createTitle;
}
}
public void test() {
try {
// 确保目录存在
File localDir = new File(localPath);
if (!localDir.exists()) {
localDir.mkdirs();
}
// 生成txt文件
String filePath = localPath + "test.txt";
try (BufferedWriter writer = new BufferedWriter(new FileWriter(filePath))) {
writer.write("test");
}
// 上传到SFTP服务器
SftpUploadUtil.uploadFile(ip, port, username, password, filePath, remotePath);
log.info("test.txt文件生成并上传成功");
} catch (Exception e) {
log.error("失败", e);
}
}
public List<String> getPendingFiles() {
List<String> matchedFiles = new ArrayList<>();
Vector<?> files;
try {
// 列目录也纳入异常捕获
files = SftpUploadUtil.listFiles(ip, port, username, password, remotePath);
for (Object obj : files) {
if (obj instanceof com.jcraft.jsch.ChannelSftp.LsEntry) {
com.jcraft.jsch.ChannelSftp.LsEntry entry = (com.jcraft.jsch.ChannelSftp.LsEntry) obj;
String fileName = entry.getFilename();
matchedFiles.add(fileName);
}
}
} catch (Exception e) {
log.error("获取待处理文件列表失败,远端目录:{}", remotePath, e);
return new ArrayList<>();
}
return matchedFiles;
}
/**
* 清理本地已处理过的文件
*/
public void cleanLocalFiles(int daysToKeep) {
File localDir = new File(localPath);
if (!localDir.exists()) {
return;
}
long cutoffTime = System.currentTimeMillis() - (daysToKeep * 24L * 60 * 60 * 1000);
File[] files = localDir.listFiles();
if (files != null) {
int deletedCount = 0;
for (File file : files) {
if (file.isFile() && file.lastModified() < cutoffTime) {
file.delete();
deletedCount++;
}
}
log.info("清理了10.11.7.5二区服务器 {} 个七天前的本地txt文件", deletedCount);
}
}
}

View File

@@ -4,8 +4,7 @@ import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.njcn.relational.pojo.dto.DcloudSyncQuery;
import com.njcn.relational.service.DcloudBusService;
import com.njcn.relational.service.SgConPlantCService;
import com.njcn.relational.service.*;
import dcloud.common.InnerServiceBus.ServiceBus;
import dcloud.model.common.ConModel;
import lombok.RequiredArgsConstructor;
@@ -28,6 +27,37 @@ public class DcloudBusServiceImpl implements DcloudBusService {
private final SgConPlantCService sgConPlantCService;
private final SGConPlantBService sgConPlantBService;
private final SGConSubstationBService sgConSubstationBService;
private final SGConSubstationCService sgConSubstationCService;
/**
* 数据入库入口
*/
@Override
public boolean syncDataToDb(DcloudSyncQuery query) {
log.info("开始从云平台同步厂站数据到本地数据库");
ServiceBus serviceBus = initServiceBus();
if (serviceBus == null) {
log.error("ServiceBus初始化失败终止同步");
return false;
}
try {
handleConModelSync(serviceBus, query);
log.info("厂站数据同步完成");
return true;
} catch (Exception e) {
log.error("厂站数据同步失败", e);
return false;
}
}
/**
* 统一同步入口
*/
@@ -175,7 +205,20 @@ public class DcloudBusServiceImpl implements DcloudBusService {
log.info("[{}] 第{}页查询到 {} 条数据,开始入库", tableName, pageIndex, pageData.size());
// 分批入库(每页数据直接入库)
boolean batchResult = sgConPlantCService.batchSyncFromDcloud(pageData);
boolean batchResult = false;
if("SG_CON_PLANT_C".equals(tableName)) {
log.info("【全量同步入口】执行同步厂站基础数据---------");
batchResult = sgConPlantCService.batchSyncFromDcloud(pageData);
}else if("SG_CON_PLANT_B".equals(tableName)){
log.info("【全量同步入口】执行同步厂站绑定数据1111111111");
batchResult = sgConPlantBService.batchSyncFromDcloud(pageData);
}else if("SG_CON_SUBSTATION_B".equals(tableName)){
log.info("【全量同步入口】执行变电站站基础数据---------");
batchResult = sgConSubstationBService.batchSyncFromDcloud(pageData);
}else if("SG_CON_SUBSTATION_C".equals(tableName)){
log.info("【全量同步入口】执行变电站站绑定数据---------");
batchResult = sgConSubstationCService.batchSyncFromDcloud(pageData);
}
if (batchResult) {
successCount += pageData.size();
log.info("[{}] 第{}页入库成功,当前累计成功 {} 条", tableName, pageIndex, successCount);
@@ -192,30 +235,6 @@ public class DcloudBusServiceImpl implements DcloudBusService {
}
}
/**
* 数据入库入口
*/
@Override
public boolean syncDataToDb() {
log.info("开始从云平台同步厂站数据到本地数据库");
DcloudSyncQuery query = DcloudSyncQuery.buildPlantDefault(null, null, 1, DEFAULT_PAGE_SIZE);
ServiceBus serviceBus = initServiceBus();
if (serviceBus == null) {
log.error("ServiceBus初始化失败终止同步");
return false;
}
try {
handleConModelSync(serviceBus, query);
log.info("厂站数据同步完成");
return true;
} catch (Exception e) {
log.error("厂站数据同步失败", e);
return false;
}
}
// ===================== 便捷方法 =====================

View File

@@ -1,21 +0,0 @@
package com.njcn.relational.service.impl;
import com.njcn.relational.service.InsertIDataFlicker;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* Description:
* Date: 2024/11/18 11:17【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Service
@RequiredArgsConstructor
public class InsertDataFlickerImpl implements InsertIDataFlicker {
}

View File

@@ -1,21 +0,0 @@
package com.njcn.relational.service.impl;
import com.njcn.relational.service.InsertIDataFluc;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* Description:
* Date: 2024/11/18 11:17【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Service
@RequiredArgsConstructor
public class InsertDataFlucImpl implements InsertIDataFluc {
}

View File

@@ -1,18 +0,0 @@
package com.njcn.relational.service.impl;
import com.njcn.relational.service.InsertIDataHarmRateI;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* @author xy
*/
@Service
@RequiredArgsConstructor
public class InsertDataHarmRateIImpl implements InsertIDataHarmRateI {
}

View File

@@ -1,17 +0,0 @@
package com.njcn.relational.service.impl;
import com.njcn.relational.service.InsertIDataHarmRateV;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* @author xy
*/
@Service
@RequiredArgsConstructor
public class InsertDataHarmRateVImpl implements InsertIDataHarmRateV {
}

View File

@@ -1,22 +0,0 @@
package com.njcn.relational.service.impl;
import com.njcn.relational.service.InsertIDataHarmphasicI;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* Description:
* Date: 2024/11/18 11:17【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Service
@RequiredArgsConstructor
public class InsertDataHarmphasicIImpl implements InsertIDataHarmphasicI {
}

Some files were not shown because too many files have changed in this diff Show More