高低电压穿越相关接口走算法模块

This commit is contained in:
guofeihu
2024-08-23 11:15:41 +08:00
parent 043b8f9a71
commit 21f4466580
29 changed files with 378 additions and 84 deletions

View File

@@ -7,12 +7,11 @@ import com.njcn.event.pojo.param.EventCountParam;
import com.njcn.event.pojo.po.EventDetail;
import com.njcn.event.pojo.po.RmpEventDetailPO;
import com.njcn.event.pojo.vo.GeneralVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
@@ -76,4 +75,10 @@ public interface EventDetailFeignClient {
*/
@PostMapping("/getEventDetailByEventType")
HttpResult<List<RmpEventDetailPO>> getEventDetailByEventType(@RequestBody EventCountParam param);
/**
* 根据开始时间及结束时间获取暂态事件信息
*/
@PostMapping("/getNewEventDetailByTime")
HttpResult<List<RmpEventDetailPO>> getNewEventDetailByTime(@RequestParam(name = "lastTime",required = false)LocalDateTime lastTime,@RequestParam("currentTime")LocalDateTime currentTime);
}

View File

@@ -12,7 +12,7 @@ import com.njcn.event.utils.EventlEnumUtil;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
@@ -82,6 +82,11 @@ public class EventDetailFeignClientFallbackFactory implements FallbackFactory<Ev
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<List<RmpEventDetailPO>> getNewEventDetailByTime(LocalDateTime lastTime, LocalDateTime currentTime) {
log.error("{}异常,降级处理,异常为:{}", "根据开始时间及结束时间获取暂态事件信息", throwable.toString());
throw new BusinessException(finalExceptionEnum);
}
};
}
}

View File

@@ -27,14 +27,4 @@ public interface Param {
String BEGIN =" 00:00:00";
String END =" 23:59:59";
//以下四个固定ID用于某些业务判断
//字典(sys_dict_data):电压暂升的ID
String UPPEREVENT = "c5ce588cb76fba90c4519ab250c962d0";
//字典(sys_dict_data):电升暂升的ID
String LOWEREVENT = "c37861896dafab0883321e1d508caa51";
//字典(sys_dict_data):光伏电站的ID
String PHOTOVOLTAICPOWER = "45615057cb88650ffc4779b0629bac7e";
//字典(sys_dict_data):风电场的ID
String WINDFARM = "f9145acb79cbf136b9ee89fd38d72583";
}

View File

@@ -36,4 +36,7 @@ public class EventNewStationVo implements Serializable {
@ApiModelProperty(value = "暂降严重度")
private Double severity;
@ApiModelProperty(value = "波形路径")
private String wavePath;
}