新能源场站高低电压穿越统计
This commit is contained in:
@@ -112,6 +112,15 @@ public class DeptLineController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||
@PostMapping("/getLineByDeptIdAndNewStation")
|
||||
@ApiOperation("根据部门id获取绑定的监测点且再根据NewStation进行过滤")
|
||||
public HttpResult<List<String>> getLineByDeptIdAndNewStation(@RequestParam("id") String id,@RequestParam("type")String type) {
|
||||
String methodDescribe = getMethodDescribe("getLineByDeptIdAndNewStation");
|
||||
List<String> list = deptLineService.getLineByDeptIdAndNewStation(id,type);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||
@PostMapping("/getLineDetailByDeptId")
|
||||
@ApiOperation("部门Id获取绑定监测点详情")
|
||||
|
||||
@@ -82,4 +82,6 @@ public interface DeptLineMapper extends BaseMapper<DeptLine> {
|
||||
|
||||
|
||||
List<SubGetBase> selectSubStationList(@Param("param") SubstationParam substationParam);
|
||||
|
||||
List<String> getLineByDeptIdAndNewStation(@Param("id") String id,@Param("stationType") String stationType);
|
||||
}
|
||||
|
||||
@@ -194,4 +194,10 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getLineByDeptIdAndNewStation" resultType="string">
|
||||
select pdl.Line_Id from pq_dept_line pdl
|
||||
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})
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -67,7 +67,13 @@ public interface DeptLineService extends IService<DeptLine> {
|
||||
*/
|
||||
List<String> getLineByDeptId(String id);
|
||||
|
||||
|
||||
/**
|
||||
* 功能描述: 根据部门id获取绑定的监测点且再根据NewStation进行过滤
|
||||
* @param id,type
|
||||
* @author guofeihu
|
||||
* @date 2024/8/19
|
||||
*/
|
||||
List<String> getLineByDeptIdAndNewStation(String id,String type);
|
||||
|
||||
/**
|
||||
* @Description: 根据部门id获取所有子集部门所包含的部门信息
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.njcn.device.pq.mapper.LineMapper;
|
||||
import com.njcn.device.pq.pojo.po.DeptLine;
|
||||
import com.njcn.device.pq.pojo.vo.LineDeviceStateVO;
|
||||
import com.njcn.device.pq.service.DeptLineService;
|
||||
import com.njcn.event.pojo.constant.Param;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.pojo.dto.DeptDTO;
|
||||
import com.njcn.web.pojo.param.DeptLineParam;
|
||||
@@ -88,6 +89,13 @@ public class DeptLineServiceImpl extends ServiceImpl<DeptLineMapper, DeptLine> i
|
||||
return this.lambdaQuery().in(DeptLine::getId, id).list().stream().map(DeptLine::getLineId).distinct().collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getLineByDeptIdAndNewStation(String id, String type) {
|
||||
if("1".equals(type)) type = Param.WINDFARM;
|
||||
if("2".equals(type)) type = Param.PHOTOVOLTAICPOWER;
|
||||
return this.baseMapper.getLineByDeptIdAndNewStation(id,type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getLineNodeByDeptId(String id) {
|
||||
List<DeptDTO> deptInfos = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData();
|
||||
|
||||
@@ -501,9 +501,11 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
|
||||
List<DictData> data = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE_STAND.getCode()).getData();
|
||||
Map<String, String> dicMap = data.stream().collect(Collectors.toMap(DictData::getId, DictData::getValue));
|
||||
LineDTO lineDTO = this.baseMapper.selectLineDetail(id);
|
||||
if(dicMap.containsKey(lineDTO.getVoltageLevel())){
|
||||
lineDTO.setVoltageLevel(dicMap.get(lineDTO.getVoltageLevel()));
|
||||
return lineDTO;
|
||||
if(lineDTO != null){
|
||||
if(dicMap.containsKey(lineDTO.getVoltageLevel())){
|
||||
lineDTO.setVoltageLevel(dicMap.get(lineDTO.getVoltageLevel()));
|
||||
return lineDTO;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user