合并暂降模块代码
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package com.njcn.event.controller;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* pqs-event
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/6/23
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/advance")
|
||||
@Api(tags = "高级分析")
|
||||
@AllArgsConstructor
|
||||
public class AdvancedAnalysisController {
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.njcn.event.controller;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.pojo.param.DeviceInfoParam;
|
||||
import com.njcn.event.pojo.vo.AreaAnalysisVO;
|
||||
import com.njcn.event.pojo.vo.VoltageToleranceCurveVO;
|
||||
import com.njcn.event.service.AreaAnalysisService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* pqs-event
|
||||
* 区域分析
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/6/24
|
||||
*/
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/areaAnalysis")
|
||||
@Api(tags = "区域分析")
|
||||
@RequiredArgsConstructor
|
||||
public class AreaAnalysisController extends BaseController {
|
||||
|
||||
private final AreaAnalysisService areaAnalysisService;
|
||||
|
||||
/**
|
||||
* 区域暂降原因,类型
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/6/24
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getEventReason")
|
||||
@ApiOperation("获取监测点暂降事件分析")
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "暂降事件分析参数", required = true)
|
||||
public HttpResult<AreaAnalysisVO> getEventReason(@RequestBody @Validated DeviceInfoParam.BusinessParam deviceInfoParam) {
|
||||
String methodDescribe = getMethodDescribe("getEventReason");
|
||||
AreaAnalysisVO res = areaAnalysisService.getEventReason(deviceInfoParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, res, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getVoltageToleranceCurve")
|
||||
@ApiOperation("获取电压容忍度曲线兼容性统计")
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "暂降事件分析参数", required = true)
|
||||
public HttpResult<VoltageToleranceCurveVO> getVoltageToleranceCurve(@RequestBody @Validated DeviceInfoParam.BusinessParam deviceInfoParam) {
|
||||
String methodDescribe = getMethodDescribe("getVoltageToleranceCurve");
|
||||
VoltageToleranceCurveVO res = areaAnalysisService.getVoltageToleranceCurve(deviceInfoParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, res, methodDescribe);
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import com.njcn.device.pojo.param.DeviceInfoParam;
|
||||
import com.njcn.event.pojo.vo.AreaLineVO;
|
||||
import com.njcn.event.pojo.vo.EventHeatMapVO;
|
||||
import com.njcn.event.pojo.vo.EventSeverityVO;
|
||||
import com.njcn.event.pojo.vo.TerminalRunningStatisticsVO;
|
||||
import com.njcn.event.service.AreaLineService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -18,7 +19,10 @@ import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
@@ -31,11 +35,12 @@ import org.springframework.web.bind.annotation.*;
|
||||
@Api(tags = "区域暂降相关")
|
||||
@AllArgsConstructor
|
||||
public class AreaController extends BaseController {
|
||||
|
||||
|
||||
private final AreaLineService areaLineService;
|
||||
|
||||
|
||||
/**
|
||||
* 获取监测网分布
|
||||
*
|
||||
* @param deviceInfoParam 参数
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -49,9 +54,10 @@ public class AreaController extends BaseController {
|
||||
AreaLineVO result = areaLineService.getAreaLineVO(deviceInfoParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取暂降热力图
|
||||
*
|
||||
* @param deviceInfoParam 参数
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -65,9 +71,10 @@ public class AreaController extends BaseController {
|
||||
EventHeatMapVO result = areaLineService.getEventHeatMap(deviceInfoParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取暂降严重度
|
||||
*
|
||||
* @param deviceInfoParam 参数
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -81,4 +88,23 @@ public class AreaController extends BaseController {
|
||||
EventSeverityVO result = areaLineService.getEventSeverity(deviceInfoParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取终端运行统计
|
||||
*
|
||||
* @param deviceInfoParam 参数
|
||||
* @return 结果
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getTerminalRunningStatistics")
|
||||
@ApiOperation("获取终端运行统计")
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "监测网分布参数", required = true)
|
||||
public HttpResult<TerminalRunningStatisticsVO> getTerminalRunningStatistics(@RequestBody @Validated DeviceInfoParam.BusinessParam deviceInfoParam) {
|
||||
String methodDescribe = getMethodDescribe("getTerminalRunningStatistics");
|
||||
LogUtil.njcnDebug(log, "{},参数为:{}", methodDescribe, deviceInfoParam);
|
||||
TerminalRunningStatisticsVO result = areaLineService.getTerminalRunningStatistics(deviceInfoParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.njcn.event.controller;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.pojo.param.DeviceInfoParam;
|
||||
import com.njcn.event.pojo.vo.AreaStatisticalVO;
|
||||
import com.njcn.event.service.AreaStatisticalService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 区域统计
|
||||
*
|
||||
* @author : zhaojun
|
||||
* @version : 1.0.0
|
||||
* @date : 2022年06月24日 11:02
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/areaStatistics")
|
||||
@Api(tags = "区域统计")
|
||||
@AllArgsConstructor
|
||||
public class AreaStatisticalController extends BaseController {
|
||||
|
||||
private final AreaStatisticalService areaStatisticalService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getAreaCalculation")
|
||||
@ApiOperation("获取暂降区域电压等级月份统计")
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "暂降事件分析参数", required = true)
|
||||
public HttpResult<AreaStatisticalVO> getAreaCalculation(@RequestBody @Validated DeviceInfoParam.BusinessParam deviceInfoParam) {
|
||||
String methodDescribe = getMethodDescribe("getAreaCalculation");
|
||||
AreaStatisticalVO res = areaStatisticalService.getAreaCalculation(deviceInfoParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, res, methodDescribe);
|
||||
}
|
||||
}
|
||||
@@ -104,7 +104,6 @@ public class EventDetailController extends BaseController {
|
||||
* @param lineIndexes
|
||||
* @param startTime
|
||||
* @param endTime
|
||||
* @param transientParam
|
||||
* @return
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.njcn.event.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.event.pojo.param.EventBaseParam;
|
||||
import com.njcn.event.pojo.po.EventDetail;
|
||||
import com.njcn.event.service.EventAnalysisService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* pqs-event
|
||||
* 暂降 监测点
|
||||
* @author cdf
|
||||
* @date 2022/6/23
|
||||
*/
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/monitor")
|
||||
@Api(tags = "监测点")
|
||||
@RequiredArgsConstructor
|
||||
public class MonitorPointController extends BaseController {
|
||||
|
||||
private final EventAnalysisService eventAnalysisService;
|
||||
|
||||
/**
|
||||
* 获取暂降幅值/持续时间分布函数
|
||||
* @author cdf
|
||||
* @date 2022/6/23
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取监测点暂降事件分析
|
||||
* @author cdf
|
||||
* @date 2022/6/23
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getEventAnalyse")
|
||||
@ApiOperation("获取监测点暂降事件分析")
|
||||
@ApiImplicitParam(name = "eventBaseParam", value = "暂降事件分析参数", required = true)
|
||||
public HttpResult<Page<EventDetail>> getEventAnalyse(@RequestBody @Validated EventBaseParam eventBaseParam){
|
||||
String methodDescribe = getMethodDescribe("getEventAnalyse");
|
||||
Page<EventDetail> page = eventAnalysisService.getEventAnalyse(eventBaseParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.event.pojo.param.TransientParam;
|
||||
import com.njcn.event.pojo.param.WaveFileParam;
|
||||
import com.njcn.event.pojo.vo.TransientVO;
|
||||
import com.njcn.event.service.TransientService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
@@ -20,6 +21,8 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @author: chenchao
|
||||
* @date: 2022/03/29 10:19
|
||||
@@ -58,4 +61,15 @@ public class TransientController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, wave, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/downloadWaveFile")
|
||||
@ApiOperation("暂态波形下载")
|
||||
@ApiImplicitParam(name = "waveFileParam", value = "波形下载参数", required = true)
|
||||
public HttpResult downloadWaveFile(@RequestBody @Validated WaveFileParam waveFileParam, HttpServletResponse response) throws Exception {
|
||||
String methodDescribe = getMethodDescribe("downloadWaveFile");
|
||||
HttpServletResponse resp = transientService.downloadWaveFile(waveFileParam, response);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, resp, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.njcn.event.controller.area;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.pojo.param.DeviceInfoParam;
|
||||
import com.njcn.device.pojo.vo.TerminalBaseVO;
|
||||
import com.njcn.event.pojo.po.EventDetail;
|
||||
import com.njcn.event.pojo.vo.AreaSubLineVO;
|
||||
import com.njcn.event.service.AreaInfoService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* pqs-event
|
||||
* 区域信息
|
||||
* @author cdf
|
||||
* @date 2022/6/29
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/areaInfo")
|
||||
@Api(tags = "区域地理信息")
|
||||
@AllArgsConstructor
|
||||
public class AreaInfoController extends BaseController {
|
||||
|
||||
private final AreaInfoService areaInfoService;
|
||||
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getAreaLineInfo")
|
||||
@ApiOperation("获取监测点区域信息")
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "参数体", required = true)
|
||||
public HttpResult<List<AreaSubLineVO>> getAreaLineInfo(@RequestBody @Validated DeviceInfoParam.BusinessParam deviceInfoParam) {
|
||||
String methodDescribe = getMethodDescribe("getAreaLineInfo");
|
||||
List<AreaSubLineVO> res = areaInfoService.getAreaLineInfo(deviceInfoParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, res, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取区域中断设备
|
||||
* @author cdf
|
||||
* @date 2022/6/29
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getAreaOffDev")
|
||||
@ApiOperation("获取区域中断设备")
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "参数体", required = true)
|
||||
public HttpResult<List<TerminalBaseVO>> getAreaOffDev(@RequestBody @Validated DeviceInfoParam.BusinessParam deviceInfoParam) {
|
||||
String methodDescribe = getMethodDescribe("getAreaOffDev");
|
||||
List<TerminalBaseVO> res = areaInfoService.getAreaOffDev(deviceInfoParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, res, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 未处理暂降事件列表
|
||||
* @author cdf
|
||||
* @date 2022/6/30
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getNoDealEvents")
|
||||
@ApiOperation("获取区域未处理暂态事件")
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "参数体", required = true)
|
||||
public HttpResult<List<EventDetail>> getNoDealEvents(@RequestBody @Validated DeviceInfoParam.BusinessParam deviceInfoParam) {
|
||||
String methodDescribe = getMethodDescribe("getNoDealEvents");
|
||||
List<EventDetail> res = areaInfoService.getNoDealEvents(deviceInfoParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, res, methodDescribe);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user