算法模块删除不必要的代码,有备份,如果存疑就联系我

This commit is contained in:
2024-11-22 09:30:56 +08:00
parent 04ce3eb97d
commit a904650751
89 changed files with 1492 additions and 660 deletions

View File

@@ -0,0 +1,55 @@
package com.njcn.event.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:
* 接口文档访问地址http://serverIP:port/swagger-ui.html
* Date: 2022/12/28 14:58【需求编号】
*
* @author clam
* @version V1.0.0
*/
/**
* 监测点暂态指标超标明细日表
*/
@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,55 @@
package com.njcn.event.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:
* 接口文档访问地址http://serverIP:port/swagger-ui.html
* Date: 2022/12/28 14:58【需求编号】
*
* @author clam
* @version V1.0.0
*/
/**
* 监测点暂态指标超标明细月表
*/
@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

@@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.data.annotation.Transient;
import java.io.Serializable;
import java.time.LocalDateTime;
@@ -20,9 +21,8 @@ import java.time.LocalDateTime;
* @since 2022-10-12 18:34:55
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("r_mp_event_detail")
@ApiModel(value="RmpEventDetail对象", description="")
@ApiModel(value="RmpEventDetail对象")
public class RmpEventDetailPO implements Serializable {
private static final long serialVersionUID = 1L;
@@ -120,8 +120,11 @@ public class RmpEventDetailPO implements Serializable {
private LocalDateTime createTime;
private Double transientValue;
@ApiModelProperty(value = "用于计算数量")
@TableField(exist = false)
@Transient
private Integer count;
}

View File

@@ -11,7 +11,7 @@ import com.njcn.device.pq.pojo.vo.GridDiagramVO;
import com.njcn.event.pojo.vo.EventDetailVO;
import com.njcn.event.service.majornetwork.RmpEventDetailService;
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
import com.njcn.harmonic.pojo.po.RMpEventDetailMPO;
import com.njcn.event.pojo.po.RMpEventDetailM;
import com.njcn.web.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -57,9 +57,9 @@ public class GridDiagramEventController extends BaseController {
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/getEventDetailByLineId")
@ApiOperation("根据监测点获取暂态短时中断和暂态赞升暂降")
public HttpResult<RMpEventDetailMPO> getEventDetailByLineId(@RequestBody StatisticsBizBaseParam param) {
public HttpResult<RMpEventDetailM> getEventDetailByLineId(@RequestBody StatisticsBizBaseParam param) {
String methodDescribe = getMethodDescribe("getEventDetailByLineId");
RMpEventDetailMPO eventDetailByLine = rmpEventDetailService.getEventDetailByLine(param);
RMpEventDetailM eventDetailByLine = rmpEventDetailService.getEventDetailByLine(param);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, eventDetailByLine, methodDescribe);
}
}

View File

@@ -1,7 +1,7 @@
package com.njcn.event.mapper.majornetwork;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.harmonic.pojo.po.RMpEventDetailMPO;
import com.njcn.event.pojo.po.RMpEventDetailM;
/**
* <p>
@@ -11,6 +11,6 @@ import com.njcn.harmonic.pojo.po.RMpEventDetailMPO;
* @author wr
* @since 2024-05-04
*/
public interface RMpEventDetailMMapper extends BaseMapper<RMpEventDetailMPO> {
public interface RMpEventDetailMMapper extends BaseMapper<RMpEventDetailM> {
}

View File

@@ -38,10 +38,9 @@ import com.njcn.event.mapper.majornetwork.RmpEventDetailMapper;
import com.njcn.event.pojo.param.UniversalFrontEndParam;
import com.njcn.event.pojo.po.RmpEventDetailPO;
import com.njcn.event.pojo.vo.*;
import com.njcn.event.service.majornetwork.EventDetailService;
import com.njcn.event.service.majornetwork.RmpEventDetailService;
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
import com.njcn.harmonic.pojo.po.RMpEventDetailMPO;
import com.njcn.event.pojo.po.RMpEventDetailM;
import com.njcn.system.api.DicDataFeignClient;
import com.njcn.system.enums.DicDataEnum;
import com.njcn.system.enums.DicDataTypeEnum;
@@ -384,13 +383,13 @@ public class RmpEventDetailServiceImpl extends ServiceImpl<RmpEventDetailMapper,
}
@Override
public RMpEventDetailMPO getEventDetailByLine(StatisticsBizBaseParam param) {
RMpEventDetailMPO rMpEventDetailMPO = eventDetailMMapper.selectOne(new LambdaQueryWrapper<RMpEventDetailMPO>()
.eq(RMpEventDetailMPO::getMeasurementPointId, param.getId())
.ge(StrUtil.isNotBlank(param.getStartTime()), RMpEventDetailMPO::getDataDate, DateUtil.beginOfDay(DateUtil.parse(param.getStartTime())))
.le(StrUtil.isNotBlank(param.getEndTime()), RMpEventDetailMPO::getDataDate, DateUtil.endOfDay(DateUtil.parse(param.getEndTime())))
public RMpEventDetailM getEventDetailByLine(StatisticsBizBaseParam param) {
RMpEventDetailM rMpEventDetailM = eventDetailMMapper.selectOne(new LambdaQueryWrapper<RMpEventDetailM>()
.eq(RMpEventDetailM::getMeasurementPointId, param.getId())
.ge(StrUtil.isNotBlank(param.getStartTime()), RMpEventDetailM::getDataDate, DateUtil.beginOfDay(DateUtil.parse(param.getStartTime())))
.le(StrUtil.isNotBlank(param.getEndTime()), RMpEventDetailM::getDataDate, DateUtil.endOfDay(DateUtil.parse(param.getEndTime())))
);
return rMpEventDetailMPO;
return rMpEventDetailM;
}

View File

@@ -11,7 +11,7 @@ import com.njcn.event.pojo.vo.AdvanceEventDetailVO;
import com.njcn.event.pojo.vo.EventDetailVO;
import com.njcn.event.pojo.vo.RmpEventDetailVO;
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
import com.njcn.harmonic.pojo.po.RMpEventDetailMPO;
import com.njcn.event.pojo.po.RMpEventDetailM;
import com.njcn.system.pojo.po.DictData;
import com.njcn.web.pojo.param.BaseParam;
@@ -72,5 +72,5 @@ public interface RmpEventDetailService extends IService<RmpEventDetailPO> {
* @Author: wr
* @Date: 2024/5/4 17:08
*/
RMpEventDetailMPO getEventDetailByLine(StatisticsBizBaseParam param);
RMpEventDetailM getEventDetailByLine(StatisticsBizBaseParam param);
}