更新监测点时新增新能源站字段
This commit is contained in:
@@ -188,6 +188,7 @@ public class LineParam {
|
|||||||
@ApiModelProperty(name = "updateFlag",value = "修改标识")
|
@ApiModelProperty(name = "updateFlag",value = "修改标识")
|
||||||
private Integer updateFlag;
|
private Integer updateFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "newStationId",value = "新能源场站信息ID")
|
||||||
|
private String newStationId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ public class LineVO implements Serializable {
|
|||||||
@ApiModelProperty(name = "sort",value = "排序",required = true)
|
@ApiModelProperty(name = "sort",value = "排序",required = true)
|
||||||
private Integer sort;
|
private Integer sort;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "newStationId",value = "新能源场站信息ID")
|
||||||
|
private String newStationId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,6 +198,6 @@
|
|||||||
<select id="getLineByDeptIdAndNewStation" resultType="string">
|
<select id="getLineByDeptIdAndNewStation" resultType="string">
|
||||||
select pdl.Line_Id from pq_dept_line pdl
|
select pdl.Line_Id from pq_dept_line pdl
|
||||||
inner join pq_line_detail pld on pdl.Line_Id = pld.Id
|
inner join pq_line_detail pld on pdl.Line_Id = pld.Id
|
||||||
where pdl.Id = #{id} and pld.New_Station_Id in (select pns.id from pq_new_station pns where pns.station_type = #{stationType})
|
where pdl.Id = #{id} and pld.New_Station_Id in (select pns.id from pq_new_station pns where pns.station_type = #{stationType} and pns.state = 1)
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.njcn.device.pq.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
@@ -80,7 +81,9 @@ public class NewStationServiceImpl extends ServiceImpl<NewStationMapper, NewStat
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public NewStation selectById(String id) {
|
public NewStation selectById(String id) {
|
||||||
return this.baseMapper.selectById(id);
|
LambdaQueryWrapper<NewStation> lambdaUpdateWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaUpdateWrapper.eq(NewStation::getId,id).eq(NewStation::getState,1);
|
||||||
|
return this.baseMapper.selectOne(lambdaUpdateWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ public class VoltageRideThroughQueryParam extends BaseParam {
|
|||||||
@NotBlank(message = "新能源场站不能为空")
|
@NotBlank(message = "新能源场站不能为空")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
|
@ApiModelProperty("1:高电压次数,2:低电压次数")
|
||||||
|
private String frequencyType;
|
||||||
|
|
||||||
@ApiModelProperty("监测点集合(用于后端使用)")
|
@ApiModelProperty("监测点集合(用于后端使用)")
|
||||||
private List<String> lineIds;
|
private List<String> lineIds;
|
||||||
|
|
||||||
|
|||||||
@@ -70,8 +70,8 @@ public class VoltageRideThroughEventServiceImpl implements VoltageRideThroughEve
|
|||||||
voltageRideThroughVo.setLat(area.getLat());
|
voltageRideThroughVo.setLat(area.getLat());
|
||||||
voltageRideThroughVo.setLng(area.getLng());
|
voltageRideThroughVo.setLng(area.getLng());
|
||||||
}
|
}
|
||||||
voltageRideThroughVo.setHighPressure(new Random().nextInt()+1+"");
|
voltageRideThroughVo.setHighPressure((int) (Math.random() * 100 + 1)+"");
|
||||||
voltageRideThroughVo.setLowPressure(new Random().nextInt()+1+"");
|
voltageRideThroughVo.setLowPressure((int) (Math.random() * 100 + 1)+"");
|
||||||
//开始计算每个地区高低压穿越次数
|
//开始计算每个地区高低压穿越次数
|
||||||
//获取当前部门下所有的监测点(当然也会根据选择的新能源场站类型进行过滤)
|
//获取当前部门下所有的监测点(当然也会根据选择的新能源场站类型进行过滤)
|
||||||
List<String> lineIds = deptLineFeignClient.getLineByDeptIdAndNewStation(deptDTO.getId(),voltageRideThroughQueryParam.getType()).getData();
|
List<String> lineIds = deptLineFeignClient.getLineByDeptIdAndNewStation(deptDTO.getId(),voltageRideThroughQueryParam.getType()).getData();
|
||||||
|
|||||||
Reference in New Issue
Block a user