根据主设备类型查询主设备

This commit is contained in:
weitang 2025-06-06 09:13:52 +08:00
parent 26a4b19724
commit 7928e671de

View File

@ -36,7 +36,6 @@ import java.util.stream.Collectors;
* 变电站_主设备 前端控制器
* </p>
*
*
* @since 2023-03-28
*/
@RestController
@ -111,6 +110,20 @@ public class SubstationMaindeviceController {
return ResponseResult.successData(substationMaindevice);
}
@GetMapping("/getMainDeviceByType")
@ApiOperation("根据主设备类型获取主设备")
public ResponseResult getMainDeviceByType(String stationCode, String deviceType) {
LambdaQueryWrapper<SubstationMaindevice> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(StrUtil.isNotBlank(stationCode), SubstationMaindevice::getStationCode, stationCode);
queryWrapper.eq(StrUtil.isNotBlank(deviceType), SubstationMaindevice::getDeviceType, StrUtil.split(deviceType
, ","));
queryWrapper.select(SubstationMaindevice::getMainDeviceId, SubstationMaindevice::getMainDeviceName,
SubstationMaindevice::getDeviceType, SubstationMaindevice::getFileUrl);
queryWrapper.eq(SubstationMaindevice::getDatastatus, "1");
List<Map<String, Object>> maps = substationMaindeviceService.listMaps(queryWrapper);
return ResponseResult.successData(maps);
}
@GetMapping("/getMainDevice")
@ApiOperation("根据条件获取主设备")
public ResponseResult getMainDevice(String stationCode, String areaId, String bayId, String mainDeviceName,
@ -482,7 +495,8 @@ public class SubstationMaindeviceController {
@ApiOperation("获取主设备导航树")
@GetMapping("/getSubstationMainDeviceTree")
public ResponseResult getSubstationMainDeviceTree(String stationCode, String mainDeviceName) {
List<Map<String, Object>> mainDeviceTree = substationMaindeviceService.getSubstationMainDeviceTree(stationCode,mainDeviceName);
List<Map<String, Object>> mainDeviceTree =
substationMaindeviceService.getSubstationMainDeviceTree(stationCode, mainDeviceName);
return ResponseResult.successData(mainDeviceTree);
}
@ -499,6 +513,7 @@ public class SubstationMaindeviceController {
List<TreeNode> treeNodes = substationMaindeviceService.getDeviceSignalTree(stationCode, signalName);
return ResponseResult.successData(treeNodes);
}
@GetMapping("/getComponentTree")
@ApiOperation("获取部件树(前台)")
public ResponseResult getComponentTree(String stationCode, String componentName) {