暂态算法

This commit is contained in:
wr
2025-03-14 16:36:59 +08:00
parent 7b986006dd
commit e4c269e3d6
25 changed files with 696 additions and 1 deletions

View File

@@ -0,0 +1,38 @@
package com.njcn.dataProcess.pojo.dto;
import lombok.Data;
import java.time.LocalDate;
/**
* @Description: 监测点暂态指标超标明细日表
* @Author: wr
* @Date: 2025/3/14 13:47
*/
@Data
public class DataEventDetailDto {
/**
* 监测点ID
*/
private String measurementPointId;
/**
* 时间
*/
private LocalDate dataDate;
/**
* 电压暂升发生次数
*/
private Integer swellTimes;
/**
* 电压暂降发生次数
*/
private Integer sagTimes;
/**
* 短时中断发生次数
*/
private Integer interruptTimes;
}

View File

@@ -0,0 +1,47 @@
package com.njcn.dataProcess.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

@@ -0,0 +1,47 @@
package com.njcn.dataProcess.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

@@ -0,0 +1,47 @@
package com.njcn.dataProcess.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

@@ -0,0 +1,47 @@
package com.njcn.dataProcess.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

@@ -0,0 +1,15 @@
package com.njcn.dataProcess.dao.relation.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.dataProcess.pojo.po.RMpEventDetailD;
import org.apache.ibatis.annotations.Mapper;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/14 13:47
*/
@Mapper
public interface RMpEventDetailDMapper extends MppBaseMapper<RMpEventDetailD> {
}

View File

@@ -0,0 +1,14 @@
package com.njcn.dataProcess.dao.relation.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.dataProcess.pojo.po.RMpEventDetailM;
import org.apache.ibatis.annotations.Mapper;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/14 13:47
*/
@Mapper
public interface RMpEventDetailMMapper extends MppBaseMapper<RMpEventDetailM> {
}

View File

@@ -0,0 +1,21 @@
package com.njcn.dataProcess.dao.relation.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.dataProcess.pojo.po.RMpEventDetailQ;
import org.apache.ibatis.annotations.Mapper;
/**
* @Description:
* @return: null
* @Author: wr
* @Date: 2025/3/14 13:48
*/
@Mapper
public interface RMpEventDetailQMapper extends MppBaseMapper<RMpEventDetailQ> {
}

View File

@@ -0,0 +1,17 @@
package com.njcn.dataProcess.dao.relation.mapper;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.dataProcess.pojo.po.RMpEventDetailY;
import org.apache.ibatis.annotations.Mapper;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/14 13:48
*/
@Mapper
public interface RMpEventDetailYMapper extends MppBaseMapper<RMpEventDetailY> {
}

View File

@@ -0,0 +1,25 @@
package com.njcn.dataProcess.service;
import com.github.jeffreyning.mybatisplus.service.IMppService;
import com.njcn.dataProcess.pojo.dto.DataEventDetailDto;
import com.njcn.dataProcess.pojo.po.RMpEventDetailD;
import java.util.List;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/14 13:49
*/
public interface IRmpEventDetailDService extends IMppService<RMpEventDetailD> {
/**
* 批量插入数据
* @param eventDetailDto
* @Author: wr
* @Date: 2025/3/14 14:03
*/
void batchInsertion(List<DataEventDetailDto> eventDetailDto);
}

View File

@@ -0,0 +1,24 @@
package com.njcn.dataProcess.service;
import com.github.jeffreyning.mybatisplus.service.IMppService;
import com.njcn.dataProcess.pojo.dto.DataEventDetailDto;
import com.njcn.dataProcess.pojo.po.RMpEventDetailM;
import java.util.List;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/14 13:49
*/
public interface IRmpEventDetailMService extends IMppService<RMpEventDetailM> {
/**
* 批量插入数据
* @param eventDetailDto
* @Author: wr
* @Date: 2025/3/14 14:03
*/
void batchInsertion(List<DataEventDetailDto> eventDetailDto);
}

View File

@@ -0,0 +1,24 @@
package com.njcn.dataProcess.service;
import com.github.jeffreyning.mybatisplus.service.IMppService;
import com.njcn.dataProcess.pojo.dto.DataEventDetailDto;
import com.njcn.dataProcess.pojo.po.RMpEventDetailQ;
import java.util.List;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/14 13:49
*/
public interface IRmpEventDetailQService extends IMppService<RMpEventDetailQ> {
/**
* 批量插入数据
* @param eventDetailDto
* @Author: wr
* @Date: 2025/3/14 14:03
*/
void batchInsertion(List<DataEventDetailDto> eventDetailDto);
}

View File

@@ -0,0 +1,24 @@
package com.njcn.dataProcess.service;
import com.github.jeffreyning.mybatisplus.service.IMppService;
import com.njcn.dataProcess.pojo.dto.DataEventDetailDto;
import com.njcn.dataProcess.pojo.po.RMpEventDetailY;
import java.util.List;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/14 13:49
*/
public interface IRmpEventDetailYService extends IMppService<RMpEventDetailY> {
/**
* 批量插入数据
* @param eventDetailDto
* @Author: wr
* @Date: 2025/3/14 14:03
*/
void batchInsertion(List<DataEventDetailDto> eventDetailDto);
}

View File

@@ -0,0 +1,27 @@
package com.njcn.dataProcess.service.impl.influxdb;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RMpEventDetailDMapper;
import com.njcn.dataProcess.pojo.dto.DataEventDetailDto;
import com.njcn.dataProcess.pojo.po.RMpEventDetailD;
import com.njcn.dataProcess.service.IRmpEventDetailDService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/14 13:54
*/
@Service("InfluxdbRmpEventDetailDImpl")
@RequiredArgsConstructor
public class InfluxdbRmpEventDetailDImpl extends MppServiceImpl<RMpEventDetailDMapper, RMpEventDetailD> implements IRmpEventDetailDService {
@Override
public void batchInsertion(List<DataEventDetailDto> eventDetailDto) {
}
}

View File

@@ -0,0 +1,27 @@
package com.njcn.dataProcess.service.impl.influxdb;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RMpEventDetailMMapper;
import com.njcn.dataProcess.pojo.dto.DataEventDetailDto;
import com.njcn.dataProcess.pojo.po.RMpEventDetailM;
import com.njcn.dataProcess.service.IRmpEventDetailMService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/14 13:54
*/
@Service("InfluxdbRmpEventDetailDImpl")
@RequiredArgsConstructor
public class InfluxdbRmpEventDetailMImpl extends MppServiceImpl<RMpEventDetailMMapper, RMpEventDetailM> implements IRmpEventDetailMService {
@Override
public void batchInsertion(List<DataEventDetailDto> eventDetailDto) {
}
}

View File

@@ -0,0 +1,27 @@
package com.njcn.dataProcess.service.impl.influxdb;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RMpEventDetailQMapper;
import com.njcn.dataProcess.pojo.dto.DataEventDetailDto;
import com.njcn.dataProcess.pojo.po.RMpEventDetailQ;
import com.njcn.dataProcess.service.IRmpEventDetailQService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/14 13:54
*/
@Service("InfluxdbRmpEventDetailQImpl")
@RequiredArgsConstructor
public class InfluxdbRmpEventDetailQImpl extends MppServiceImpl<RMpEventDetailQMapper, RMpEventDetailQ> implements IRmpEventDetailQService {
@Override
public void batchInsertion(List<DataEventDetailDto> eventDetailDto) {
}
}

View File

@@ -0,0 +1,27 @@
package com.njcn.dataProcess.service.impl.influxdb;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RMpEventDetailYMapper;
import com.njcn.dataProcess.pojo.dto.DataEventDetailDto;
import com.njcn.dataProcess.pojo.po.RMpEventDetailY;
import com.njcn.dataProcess.service.IRmpEventDetailYService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/14 13:54
*/
@Service("InfluxdbRmpEventDetailYImpl")
@RequiredArgsConstructor
public class InfluxdbRmpEventDetailYImpl extends MppServiceImpl<RMpEventDetailYMapper, RMpEventDetailY> implements IRmpEventDetailYService {
@Override
public void batchInsertion(List<DataEventDetailDto> eventDetailDto) {
}
}

View File

@@ -0,0 +1,35 @@
package com.njcn.dataProcess.service.impl.relation;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RMpEventDetailDMapper;
import com.njcn.dataProcess.pojo.dto.DataEventDetailDto;
import com.njcn.dataProcess.pojo.po.RMpEventDetailD;
import com.njcn.dataProcess.service.IRmpEventDetailDService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/14 13:54
*/
@Service("RelationRmpEventDetailDImpl")
@RequiredArgsConstructor
public class RelationRmpEventDetailDImpl extends MppServiceImpl<RMpEventDetailDMapper, RMpEventDetailD> implements IRmpEventDetailDService {
@Override
public void batchInsertion(List<DataEventDetailDto> eventDetailDto) {
List<RMpEventDetailD> result = new ArrayList<>();
eventDetailDto.forEach(item->{
RMpEventDetailD limitRate = new RMpEventDetailD();
BeanUtils.copyProperties(item, limitRate);
result.add(limitRate);
});
this.saveOrUpdateBatchByMultiId(result);
}
}

View File

@@ -0,0 +1,35 @@
package com.njcn.dataProcess.service.impl.relation;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RMpEventDetailMMapper;
import com.njcn.dataProcess.pojo.dto.DataEventDetailDto;
import com.njcn.dataProcess.pojo.po.RMpEventDetailM;
import com.njcn.dataProcess.service.IRmpEventDetailMService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/14 13:54
*/
@Service("RelationRmpEventDetailMImpl")
@RequiredArgsConstructor
public class RelationRmpEventDetailMImpl extends MppServiceImpl<RMpEventDetailMMapper, RMpEventDetailM> implements IRmpEventDetailMService {
@Override
public void batchInsertion(List<DataEventDetailDto> eventDetailDto) {
List<RMpEventDetailM> result = new ArrayList<>();
eventDetailDto.forEach(item->{
RMpEventDetailM limitRate = new RMpEventDetailM();
BeanUtils.copyProperties(item, limitRate);
result.add(limitRate);
});
this.saveOrUpdateBatchByMultiId(result);
}
}

View File

@@ -0,0 +1,35 @@
package com.njcn.dataProcess.service.impl.relation;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RMpEventDetailQMapper;
import com.njcn.dataProcess.pojo.dto.DataEventDetailDto;
import com.njcn.dataProcess.pojo.po.RMpEventDetailQ;
import com.njcn.dataProcess.service.IRmpEventDetailQService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/14 13:54
*/
@Service("RelationRmpEventDetailQImpl")
@RequiredArgsConstructor
public class RelationRmpEventDetailQImpl extends MppServiceImpl<RMpEventDetailQMapper, RMpEventDetailQ> implements IRmpEventDetailQService {
@Override
public void batchInsertion(List<DataEventDetailDto> eventDetailDto) {
List<RMpEventDetailQ> result = new ArrayList<>();
eventDetailDto.forEach(item->{
RMpEventDetailQ limitRate = new RMpEventDetailQ();
BeanUtils.copyProperties(item, limitRate);
result.add(limitRate);
});
this.saveOrUpdateBatchByMultiId(result);
}
}

View File

@@ -0,0 +1,35 @@
package com.njcn.dataProcess.service.impl.relation;
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
import com.njcn.dataProcess.dao.relation.mapper.RMpEventDetailYMapper;
import com.njcn.dataProcess.pojo.dto.DataEventDetailDto;
import com.njcn.dataProcess.pojo.po.RMpEventDetailY;
import com.njcn.dataProcess.service.IRmpEventDetailYService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* @Description:
* @Author: wr
* @Date: 2025/3/14 13:54
*/
@Service("RelationRmpEventDetailYImpl")
@RequiredArgsConstructor
public class RelationRmpEventDetailYImpl extends MppServiceImpl<RMpEventDetailYMapper, RMpEventDetailY> implements IRmpEventDetailYService {
@Override
public void batchInsertion(List<DataEventDetailDto> eventDetailDto) {
List<RMpEventDetailY> result = new ArrayList<>();
eventDetailDto.forEach(item->{
RMpEventDetailY limitRate = new RMpEventDetailY();
BeanUtils.copyProperties(item, limitRate);
result.add(limitRate);
});
this.saveOrUpdateBatchByMultiId(result);
}
}