surverytest新增otherreport字段
This commit is contained in:
@@ -24,7 +24,7 @@ public class EventNewStationVo implements Serializable {
|
||||
private String newStationName;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@ApiModelProperty(value = "特征幅值")
|
||||
|
||||
@@ -49,8 +49,8 @@ public class VoltageRideThroughEventController extends BaseController {
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.QUERY)
|
||||
@PostMapping("/eventQueryPage")
|
||||
@ApiOperation("高低电压穿越暂态事件分页")
|
||||
@PostMapping("/voltageRideThroughEventQueryPage")
|
||||
@ApiOperation("查询高低电压穿越暂态事件列表")
|
||||
public HttpResult<List<EventNewStationVo>> voltageRideThroughEventQueryPage(@RequestBody @Validated VoltageRideThroughQueryParam voltageRideThroughQueryParam) {
|
||||
String methodDescribe = getMethodDescribe("voltageRideThroughEventQueryPage");
|
||||
LogUtil.njcnDebug(log, "{},查询对象为:{}", methodDescribe, voltageRideThroughQueryParam);
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.njcn.event.service.majornetwork.Impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.njcn.device.biz.commApi.CommLineClient;
|
||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||
import com.njcn.device.pq.api.DeptLineFeignClient;
|
||||
import com.njcn.device.pq.api.LineFeignClient;
|
||||
import com.njcn.device.pq.api.NewStationClient;
|
||||
@@ -26,6 +25,7 @@ import org.springframework.stereotype.Service;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -64,40 +64,26 @@ public class VoltageRideThroughEventServiceImpl implements VoltageRideThroughEve
|
||||
VoltageRideThroughVo voltageRideThroughVo = new VoltageRideThroughVo();
|
||||
//赋值子部门名称及ID
|
||||
BeanUtils.copyProperties(deptDTO,voltageRideThroughVo);
|
||||
//根据子部门的area获取经纬度
|
||||
//根据部门的area获取经纬度
|
||||
Area area = areaFeignClient.selectIdArea(deptDTO.getArea()).getData();
|
||||
if(area != null){
|
||||
voltageRideThroughVo.setLat(area.getLat());
|
||||
voltageRideThroughVo.setLng(area.getLng());
|
||||
}
|
||||
voltageRideThroughVo.setHighPressure(new Random().nextInt()+1+"");
|
||||
voltageRideThroughVo.setLowPressure(new Random().nextInt()+1+"");
|
||||
//开始计算每个地区高低压穿越次数
|
||||
//获取当前部门下所有的监测点(当然也会根据选择的新能源场站类型进行过滤)
|
||||
List<String> lineIds = deptLineFeignClient.getLineByDeptIdAndNewStation(deptDTO.getId(),voltageRideThroughQueryParam.getType()).getData();
|
||||
for(String lineId : lineIds){
|
||||
//监测点信息
|
||||
LineDTO lineDTO = commLineClient.getLineDetail(lineId).getData();
|
||||
if(lineDTO == null){
|
||||
continue;
|
||||
}
|
||||
//监测点绑定的暂降事件
|
||||
List<EventDetail> eventDetails = eventDetailService.getEventDetailData(lineId,voltageRideThroughQueryParam.getSearchBeginTime()+Param.BEGIN,voltageRideThroughQueryParam.getSearchEndTime()+Param.END);
|
||||
//取出事件类型为:暂升
|
||||
List<EventDetail> upperEventDetails = eventDetails.stream().filter(e -> e.getEventType().equals(Param.UPPEREVENT)).collect(Collectors.toList());
|
||||
//取出事件类型为:暂降
|
||||
List<EventDetail> lowerEventDetails = eventDetails.stream().filter(e -> e.getEventType().equals(Param.LOWEREVENT)).collect(Collectors.toList());
|
||||
//当前监测点为:光伏电站
|
||||
if(Param.PHOTOVOLTAICPOWER.equals(lineDTO.getStationType())){
|
||||
//计算 光伏电站 暂升次数
|
||||
for(EventDetail eventDetail : upperEventDetails){
|
||||
|
||||
}
|
||||
//计算 光伏电站 暂降次数
|
||||
for(EventDetail eventDetail : lowerEventDetails){
|
||||
|
||||
}
|
||||
}
|
||||
//当前监测点为:风电场
|
||||
if(Param.WINDFARM.equals(lineDTO.getStationType())){
|
||||
if("1".equals(voltageRideThroughQueryParam.getType())){
|
||||
//计算 风电场 暂升次数
|
||||
for(EventDetail eventDetail : upperEventDetails){
|
||||
|
||||
@@ -105,6 +91,17 @@ public class VoltageRideThroughEventServiceImpl implements VoltageRideThroughEve
|
||||
//计算 风电场 暂降次数
|
||||
for(EventDetail eventDetail : lowerEventDetails){
|
||||
|
||||
}
|
||||
}
|
||||
//当前监测点为:光伏电站
|
||||
if("2".equals(voltageRideThroughQueryParam.getType())){
|
||||
//计算 光伏电站 暂升次数
|
||||
for(EventDetail eventDetail : upperEventDetails){
|
||||
|
||||
}
|
||||
//计算 光伏电站 暂降次数
|
||||
for(EventDetail eventDetail : lowerEventDetails){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,8 +23,13 @@ public class SurveyTestVO extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 普测测试管理表id
|
||||
* 其他报告
|
||||
*/
|
||||
private String otherReport;
|
||||
|
||||
/**
|
||||
* 普测测试管理表id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
|
||||
@@ -217,6 +217,7 @@ public class SurveyTestServiceImpl extends ServiceImpl<SurveyTestMapper, SurveyT
|
||||
surveyTest.setSupervisionReport(surveyTestParam.getSupervisionReport());
|
||||
surveyTest.setProblemFlag(surveyTestParam.getProblemFlag());
|
||||
surveyTest.setProblemDetail(surveyTestParam.getProblemDetail());
|
||||
surveyTest.setOtherReport(surveyTestParam.getOtherReport());
|
||||
//设置状态
|
||||
if(Objects.equals(surveyTestParam.getSaveOrCheckflag(),"1")){
|
||||
surveyTest.setStatus(BpmTaskStatusEnum.WAIT.getStatus());
|
||||
|
||||
Reference in New Issue
Block a user