暂降模块代码合并
终端运行管理接口调整
This commit is contained in:
@@ -32,7 +32,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/areaAnalysis")
|
||||
@Api(tags = "区域分析")
|
||||
@Api(tags = "区域统计")
|
||||
@RequiredArgsConstructor
|
||||
public class AreaAnalysisController extends BaseController {
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.common.utils.LogUtil;
|
||||
import com.njcn.device.pojo.param.DeviceInfoParam;
|
||||
import com.njcn.event.pojo.po.BalanceInfo;
|
||||
import com.njcn.event.pojo.vo.AreaLineVO;
|
||||
import com.njcn.event.pojo.vo.EventHeatMapVO;
|
||||
import com.njcn.event.pojo.vo.EventSeverityVO;
|
||||
@@ -25,8 +24,6 @@ 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;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
* @version 1.0.0
|
||||
@@ -109,22 +106,5 @@ public class AreaController extends BaseController {
|
||||
TerminalRunningStatisticsVO result = areaLineService.getTerminalRunningStatistics(deviceInfoParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取暂降严重度
|
||||
*
|
||||
* @param deviceInfoParam 参数
|
||||
* @return 结果
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getBalanceInfo")
|
||||
@ApiOperation("获取区域暂降综合评估")
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "参数", required = true)
|
||||
public HttpResult<List<BalanceInfo>> getBalanceInfo(@RequestBody @Validated DeviceInfoParam.BusinessParam deviceInfoParam) {
|
||||
String methodDescribe = getMethodDescribe("getBalanceInfo");
|
||||
LogUtil.njcnDebug(log, "{},参数为:{}", methodDescribe, deviceInfoParam);
|
||||
List<BalanceInfo> result = areaLineService.getBalanceInfo(deviceInfoParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -124,4 +124,5 @@ public class EventDetailController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,25 +2,27 @@ 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.constant.OperateType;
|
||||
import com.njcn.common.pojo.dto.wave.WaveDataDTO;
|
||||
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.param.*;
|
||||
import com.njcn.event.pojo.po.EventDetail;
|
||||
import com.njcn.event.pojo.vo.*;
|
||||
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 io.swagger.annotations.*;
|
||||
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;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.text.ParseException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* pqs-event
|
||||
@@ -38,12 +40,6 @@ public class MonitorPointController extends BaseController {
|
||||
|
||||
private final EventAnalysisService eventAnalysisService;
|
||||
|
||||
/**
|
||||
* 获取暂降幅值/持续时间分布函数
|
||||
* @author cdf
|
||||
* @date 2022/6/23
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@@ -61,4 +57,183 @@ public class MonitorPointController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取电压暂态表及密度图
|
||||
* @author xxy
|
||||
* @param statisticsParam
|
||||
* @return
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getCoords")
|
||||
@ApiOperation("获取电压暂态表及密度坐标图")
|
||||
@ApiImplicitParam(name = "statisticsParam", value = "电压暂态表及密度图坐标参数", required = true)
|
||||
public HttpResult<List<CoordsVO>> getCoords(@RequestBody @Validated StatisticsParam statisticsParam){
|
||||
String methodDescribe = getMethodDescribe("getCoords");
|
||||
List<CoordsVO> list = eventAnalysisService.getCoords(statisticsParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,list,methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取Disdip表格
|
||||
* @param statisticsParam
|
||||
* @return
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/eventDisdip")
|
||||
@ApiOperation("获取Disdip表格")
|
||||
@ApiImplicitParam(name = "statisticsParam", value = "Disdip表格参数", required = true)
|
||||
public HttpResult<List<DISDIPVO>> eventDisdip(@RequestBody @Validated StatisticsParam statisticsParam){
|
||||
String methodDescribe = getMethodDescribe("eventDisdip");
|
||||
List<DISDIPVO> list = eventAnalysisService.eventDisdip(statisticsParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,list,methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取IEC411数据
|
||||
* @param statisticsParam
|
||||
* @return
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/IEC411")
|
||||
@ApiOperation("获取IEC411数据")
|
||||
@ApiImplicitParam(name = "statisticsParam", value = "IEC411参数", required = true)
|
||||
public HttpResult<List<IEC411VO>> IEC411(@RequestBody @Validated StatisticsParam statisticsParam){
|
||||
String methodDescribe = getMethodDescribe("IEC411");
|
||||
List<IEC411VO> list = eventAnalysisService.IEC411(statisticsParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,list,methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取IEC28数据
|
||||
* @param statisticsParam
|
||||
* @return
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/IEC28")
|
||||
@ApiOperation("获取IEC28数据")
|
||||
@ApiImplicitParam(name = "statisticsParam", value = "IEC28参数", required = true)
|
||||
public HttpResult<List<IEC28VO>> IEC28(@RequestBody @Validated StatisticsParam statisticsParam){
|
||||
String methodDescribe = getMethodDescribe("IEC28");
|
||||
List<IEC28VO> list = eventAnalysisService.IEC28(statisticsParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,list,methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 暂降原因类型和时间
|
||||
* @author xxy
|
||||
* @param statisticsParam
|
||||
* @return
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getReasonTypeTime")
|
||||
@ApiOperation("暂降原因类型和时间")
|
||||
@ApiImplicitParam(name = "statisticsParam", value = "暂降原因类型和时间参数", required = true)
|
||||
public HttpResult<List<TimeVO>> getReasonTypeTime(@RequestBody @Validated StatisticsParam statisticsParam) throws ParseException {
|
||||
String methodDescribe = getMethodDescribe("getReasonTypeTime");
|
||||
List<TimeVO> page = eventAnalysisService.getReasonTypeTime(statisticsParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,page,methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 暂降原因类型和时间分布统计
|
||||
* @author xxy
|
||||
* @param statisticsParam
|
||||
* @return
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getStatistic")
|
||||
@ApiOperation("暂降原因类型和时间分布统计")
|
||||
@ApiImplicitParam(name = "statisticsParam", value = "暂降原因类型和时间分布统计参数", required = true)
|
||||
public HttpResult<StatisticVO> getStatistic(@RequestBody @Validated StatisticsParam statisticsParam){
|
||||
String methodDescribe = getMethodDescribe("getStatistic");
|
||||
StatisticVO page = eventAnalysisService.getStatistic(statisticsParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,page,methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 暂降幅值的概率分布函数
|
||||
* @author xxy
|
||||
* @param statisticsParam
|
||||
* @return
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getProbabilityDistribution")
|
||||
@ApiOperation("暂降幅值的概率分布函数")
|
||||
@ApiImplicitParam(name = "statisticsParam", value = "暂降幅值的概率分布函数参数", required = true)
|
||||
public HttpResult<ProbabilityVO> getProbabilityDistribution(@RequestBody @Validated StatisticsParam statisticsParam){
|
||||
String methodDescribe = getMethodDescribe("getProbabilityDistribution");
|
||||
ProbabilityVO page = eventAnalysisService.getProbabilityDistribution(statisticsParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,page,methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 暂降事件点图
|
||||
* @author xxy
|
||||
* @param statisticsParam
|
||||
* @return
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getPlot")
|
||||
@ApiOperation("暂降事件点图")
|
||||
@ApiImplicitParam(name = "statisticsParam", value = "暂降事件点图参数", required = true)
|
||||
public HttpResult<List<EventDetail>> getPlot(@RequestBody @Validated StatisticsParam statisticsParam){
|
||||
String methodDescribe = getMethodDescribe("getPlot");
|
||||
List<EventDetail> page = eventAnalysisService.getPlot(statisticsParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,page,methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*监测点暂降事件分析查询
|
||||
* @author zbj
|
||||
* @date 2022/7/25
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getMonitorEventAnalyseQuery")
|
||||
@ApiOperation("监测点暂降事件分析查询")
|
||||
@ApiImplicitParam(name = "eventBaseParam", value = "暂降事件分析参数", required = true)
|
||||
public HttpResult<Page<WaveTypeVO>> getMonitorEventAnalyseQuery (@RequestBody @Validated EventBaseParam eventBaseParam){
|
||||
String methodDescribe = getMethodDescribe("getMonitorEventAnalyseQuery");
|
||||
Page<WaveTypeVO> result = eventAnalysisService.getMonitorEventAnalyseQuery(eventBaseParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*监测点事件波形分析
|
||||
* @author zbj
|
||||
* @date 2022/7/27
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getMonitorEventAnalyseWave")
|
||||
@ApiOperation("监测点事件波形分析")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "timeId", value = "时间Id", required = true),
|
||||
@ApiImplicitParam(name = "lineId", value = "监测点Id", required = true)
|
||||
})
|
||||
public HttpResult<WaveDataDTO> getMonitorEventAnalyseWave(@RequestParam("timeId") String timeId, @RequestParam("lineId") String lineId){
|
||||
String methodDescribe = getMethodDescribe("getMonitorEventAnalyseWave");
|
||||
WaveDataDTO wave = eventAnalysisService.getMonitorEventAnalyseWave(timeId, lineId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, wave, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
*监测点事件波形下载
|
||||
* @author zbj
|
||||
* @date 2022/7/28
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.DOWNLOAD)
|
||||
@PostMapping("/downloadMonitorEventWaveFile")
|
||||
@ApiOperation("监测点事件波形下载")
|
||||
@ApiImplicitParam(name = "waveFileParam", value = "波形下载参数", required = true)
|
||||
public HttpResult downloadMonitorEventWaveFile(@RequestBody @Validated WaveFileParam waveFileParam, HttpServletResponse response) throws Exception {
|
||||
String methodDescribe = getMethodDescribe("downloadMonitorEventWaveFile");
|
||||
HttpServletResponse resp = eventAnalysisService.downloadMonitorEventWaveFile(waveFileParam, response);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, resp, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,218 @@
|
||||
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.dto.SimpleDTO;
|
||||
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.api.GeneralDeviceInfoClient;
|
||||
import com.njcn.device.pojo.param.DeviceInfoParam;
|
||||
import com.njcn.event.pojo.param.*;
|
||||
import com.njcn.event.pojo.vo.DetailVO;
|
||||
import com.njcn.event.pojo.vo.GeneralVO;
|
||||
import com.njcn.event.pojo.vo.ReasonsVO;
|
||||
import com.njcn.event.pojo.vo.WaveTypeVO;
|
||||
import com.njcn.event.service.ReportService;
|
||||
import com.njcn.poi.util.PoiUtil;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import freemarker.template.TemplateException;
|
||||
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.apache.poi.hssf.usermodel.*;
|
||||
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
|
||||
import org.apache.poi.ss.usermodel.ClientAnchor;
|
||||
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||
import org.apache.poi.ss.usermodel.VerticalAlignment;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.awt.*;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.text.ParseException;
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xxy
|
||||
* @version 1.0.0
|
||||
* @date 2022年07月28日 11:36
|
||||
*/
|
||||
@Validated
|
||||
@Slf4j
|
||||
@Api(tags = "暂态报告")
|
||||
@RestController
|
||||
@RequestMapping("/report")
|
||||
@RequiredArgsConstructor
|
||||
public class ReportController extends BaseController {
|
||||
|
||||
private final ReportService reportService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getGeneralSituation")
|
||||
@ApiOperation("暂态总体概况(区域)")
|
||||
@ApiImplicitParam(name = "businessParam", value = "暂态总体概况区域参数", required = true)
|
||||
public HttpResult<List<GeneralVO>> getGeneralSituation(@RequestBody @Validated DeviceInfoParam.BusinessParam businessParam){
|
||||
String methodDescribe = getMethodDescribe("getGeneralSituation");
|
||||
List<GeneralVO> page = reportService.getGeneralSituation(businessParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,page,methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getVoltage")
|
||||
@ApiOperation("暂态总体概况(电压)")
|
||||
@ApiImplicitParam(name = "businessParam", value = "暂态总体概况电压参数", required = true)
|
||||
public HttpResult<List<GeneralVO>> getVoltage(@RequestBody @Validated DeviceInfoParam.BusinessParam businessParam){
|
||||
String methodDescribe = getMethodDescribe("getVoltage");
|
||||
List<GeneralVO> page = reportService.getVoltage(businessParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,page,methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getSeverity")
|
||||
@ApiOperation("暂态严重度")
|
||||
@ApiImplicitParam(name = "businessParam", value = "暂态严重度参数", required = true)
|
||||
public HttpResult<List<WaveTypeVO>> getSeverity(@RequestBody @Validated DeviceInfoParam.BusinessParam businessParam){
|
||||
String methodDescribe = getMethodDescribe("getSeverity");
|
||||
List<WaveTypeVO> page = reportService.getSeverity(businessParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,page,methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getReason")
|
||||
@ApiOperation("暂态原因统计表")
|
||||
@ApiImplicitParam(name = "businessParam", value = "暂态严重度参数", required = true)
|
||||
public HttpResult<List<ReasonsVO>> getReason(@RequestBody @Validated DeviceInfoParam.BusinessParam businessParam){
|
||||
String methodDescribe = getMethodDescribe("getSeverity");
|
||||
List<ReasonsVO> page = reportService.getReason(businessParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,page,methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getContinueTime")
|
||||
@ApiOperation("详细时间列表")
|
||||
@ApiImplicitParam(name = "businessParam", value = "详细时间列表参数", required = true)
|
||||
public HttpResult<Page<DetailVO>> getContinueTime(@RequestBody @Validated WaveTypeParam businessParam){
|
||||
String methodDescribe = getMethodDescribe("getContinueTime");
|
||||
Page<DetailVO> page = reportService.getContinueTime(businessParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,page,methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getSagTimes")
|
||||
@ApiOperation("暂降次数统计")
|
||||
@ApiImplicitParam(name = "waveTypeParam", value = "暂降次数统计参数", required = true)
|
||||
public HttpResult<Page<DetailVO>> getSagTimes(@RequestBody @Validated WaveTypeParam waveTypeParam){
|
||||
String methodDescribe = getMethodDescribe("getSagTimes");
|
||||
Page<DetailVO> page = reportService.getSagTimes(waveTypeParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,page,methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getUpTimes")
|
||||
@ApiOperation("暂升次数统计")
|
||||
@ApiImplicitParam(name = "waveTypeParam", value = "暂升次数统计参数", required = true)
|
||||
public HttpResult<Page<DetailVO>> getUpTimes(@RequestBody @Validated WaveTypeParam waveTypeParam){
|
||||
String methodDescribe = getMethodDescribe("getUpTimes");
|
||||
Page<DetailVO> page = reportService.getUpTimes(waveTypeParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,page,methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getBreakTimes")
|
||||
@ApiOperation("中断次数统计")
|
||||
@ApiImplicitParam(name = "waveTypeParam", value = "中断次数统计参数", required = true)
|
||||
public HttpResult<Page<DetailVO>> getBreakTimes(@RequestBody @Validated WaveTypeParam waveTypeParam){
|
||||
String methodDescribe = getMethodDescribe("getBreakTimes");
|
||||
Page<DetailVO> page = reportService.getBreakTimes(waveTypeParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,page,methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getExport")
|
||||
@ApiOperation("周报导出")
|
||||
@ApiImplicitParam(name = "businessParam", value = "周报导出参数", required = true)
|
||||
public void getExport(@RequestBody @Validated DeviceInfoParam.BusinessParam businessParam, HttpServletResponse response) throws TemplateException, IOException {
|
||||
reportService.getExport(businessParam,response);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLineExport")
|
||||
@ApiOperation("监测点报告导出")
|
||||
@ApiImplicitParam(name = "exportParam", value = "监测点报告导出参数", required = true)
|
||||
public void getLineExport(@RequestBody @Validated ExportParam exportParam, HttpServletResponse response) throws IOException, InvalidFormatException, TemplateException, ParseException {
|
||||
// @RequestParam(name = "lineIndex") String lineIndex,@RequestParam(name = "startTime") String startTime,@RequestParam(name = "endTime") String endTime,@RequestParam("flag")Integer flag
|
||||
// ExportParam exportParam = new ExportParam();
|
||||
// exportParam.setFlag(flag);
|
||||
// exportParam.setXq(true);
|
||||
// exportParam.setLb(true);
|
||||
// exportParam.setMdbg(true);
|
||||
// exportParam.setMdtx(true);
|
||||
// exportParam.setSjdF47(true);
|
||||
// exportParam.setSjdITIC(true);
|
||||
// exportParam.setGlfbfz(true);
|
||||
// exportParam.setGlfbsj(true);
|
||||
// exportParam.setTjbg(true);
|
||||
// exportParam.setTjtx(true);
|
||||
// exportParam.setYybg(true);
|
||||
// exportParam.setYytx(true);
|
||||
// exportParam.setLxbg(true);
|
||||
// exportParam.setLxtx(true);
|
||||
//
|
||||
// exportParam.setLineName("江苏省->常熟市->常熟森泉印染厂_6600087524->10kV I母_电源总进线1");
|
||||
// exportParam.setSearchBeginTime(startTime);
|
||||
// exportParam.setSearchEndTime(endTime);
|
||||
// exportParam.setDeptIndex("5699e5916a18a6381e1ac92da5bd2628");
|
||||
// exportParam.setMonitorFlag(0);
|
||||
// exportParam.setLineId(lineIndex);
|
||||
// exportParam.setStatFlag(false);
|
||||
// exportParam.setServerName("event-boot");
|
||||
// exportParam.setPowerFlag(1);
|
||||
// SimpleDTO simpleDTO = new SimpleDTO();
|
||||
// simpleDTO.setName("电网拓扑");
|
||||
// simpleDTO.setSort(0);
|
||||
// simpleDTO.setCode("Power_Network");
|
||||
// exportParam.setStatisticalType(simpleDTO);
|
||||
reportService.getLineExport(exportParam,response);
|
||||
}
|
||||
|
||||
/**
|
||||
*获取事件报告
|
||||
* @author zbj
|
||||
* @date 2022/7/29
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getEventReport")
|
||||
@ApiOperation("获取事件报告")
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "参数体", required = true)
|
||||
public HttpResult<Page<WaveTypeVO>> getEventReport(@RequestBody @Validated WaveTypeParam deviceInfoParam) {
|
||||
String methodDescribe = getMethodDescribe("getEventReport");
|
||||
Page<WaveTypeVO> res = reportService.getEventReport(deviceInfoParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, res, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
*获取区域报告
|
||||
* @author zbj
|
||||
* @date 2022/8/4
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getAreaReport")
|
||||
@ApiOperation("获取区域报告")
|
||||
@ApiImplicitParam(name = "areaReportParam", value = "参数体", required = true)
|
||||
public void getAreaReport(@RequestBody @Validated AreaReportParam areaReportParam, HttpServletResponse response) throws Exception {
|
||||
reportService.getAreaReport(areaReportParam,response);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -2,6 +2,7 @@ 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.constant.OperateType;
|
||||
import com.njcn.common.pojo.dto.wave.WaveDataDTO;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
@@ -9,6 +10,7 @@ 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.po.EventDetailNew;
|
||||
import com.njcn.event.pojo.vo.TransientVO;
|
||||
import com.njcn.event.service.TransientService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
@@ -48,6 +50,8 @@ public class TransientController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
//TODO 111
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getTransientAnalyseWave")
|
||||
@ApiOperation("暂态事件波形分析")
|
||||
@@ -61,7 +65,7 @@ public class TransientController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, wave, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.DOWNLOAD)
|
||||
@PostMapping("/downloadWaveFile")
|
||||
@ApiOperation("暂态波形下载")
|
||||
@ApiImplicitParam(name = "waveFileParam", value = "波形下载参数", required = true)
|
||||
@@ -71,5 +75,14 @@ public class TransientController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, resp, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getTransientValue")
|
||||
@ApiOperation("根据条件查询暂态事件")
|
||||
@ApiImplicitParam(name = "transientParam", value = "暂态列表参数", required = true)
|
||||
public HttpResult<Page<EventDetailNew>> getTransientValue(@RequestBody @Validated TransientParam transientParam){
|
||||
String methodDescribe = getMethodDescribe("getTransientValue");
|
||||
Page<EventDetailNew> list = transientService.getTransientValue(transientParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ 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.po.EventDetailNew;
|
||||
import com.njcn.event.pojo.vo.AreaSubLineVO;
|
||||
import com.njcn.event.service.AreaInfoService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
@@ -17,11 +18,9 @@ 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 org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -75,9 +74,26 @@ public class AreaInfoController extends BaseController {
|
||||
@PostMapping("/getNoDealEvents")
|
||||
@ApiOperation("获取区域未处理暂态事件")
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "参数体", required = true)
|
||||
public HttpResult<List<EventDetail>> getNoDealEvents(@RequestBody @Validated DeviceInfoParam.BusinessParam deviceInfoParam) {
|
||||
public HttpResult<List<EventDetailNew>> getNoDealEvents(@RequestBody @Validated DeviceInfoParam deviceInfoParam) {
|
||||
String methodDescribe = getMethodDescribe("getNoDealEvents");
|
||||
List<EventDetail> res = areaInfoService.getNoDealEvents(deviceInfoParam);
|
||||
List<EventDetailNew> res = areaInfoService.getNoDealEvents(deviceInfoParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, res, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取监测点下未处理的暂降事件
|
||||
* @author cdf
|
||||
* @date 2022/8/23
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@GetMapping("/getNoDealEventsByLineId")
|
||||
@ApiOperation("获取监测点下未处理的暂降事件")
|
||||
@ApiImplicitParam(name = "id", value = "监测点id", required = true)
|
||||
public HttpResult<List<EventDetailNew>> getNoDealEventsByLineId(@RequestParam("id") @NotBlank(message = "监测点id不可为空") String id) {
|
||||
String methodDescribe = getMethodDescribe("getNoDealEventsByLineId");
|
||||
List<EventDetailNew> res = areaInfoService.getNoDealEventsByLineId(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, res, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user