diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/history/controller/HistoryController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/history/controller/HistoryController.java index 8af9018..537c53f 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/history/controller/HistoryController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/history/controller/HistoryController.java @@ -8,6 +8,7 @@ import com.hnac.hzinfo.dataconfig.entity.Device; import com.hnac.hzinfo.datasearch.soe.domian.SoeData; import com.hnac.hzinfo.datasearch.soe.domian.SoeQueryCondition; import com.hnac.hzinfo.sdk.v5.device.vo.DeviceInstanceAttrVO; +import com.hnac.hzinfo.sdk.v5.device.vo.DeviceInstanceVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; @@ -38,24 +39,17 @@ public class HistoryController extends BladeController { return R.data(alarmService.alarm(soeQueryCondition)); } - @GetMapping("/projectSid") + @GetMapping("/projectFacDevice") @ApiOperationSupport(order = 2) - @ApiOperation(value = "查询站点sid", notes = "根据站点id查询sid") - public R projectSid(@RequestParam(value = "stationId") String projectId) { - return R.data(pointService.projectSid(projectId)); + @ApiOperation(value = "站点厂租点", notes = "根据站点id查询厂组点信息") + public R> projectFacDevice(@RequestParam(value = "projectId") String projectId) { + return R.data(pointService.projectFacDevice(projectId)); } - @GetMapping("/projectGroup") + @GetMapping("/projectDeviceInstance") @ApiOperationSupport(order = 3) - @ApiOperation(value = "站点分组信息", notes = "根据站点sid查询厂信息分组") - public R> projectGroup(@RequestParam(value = "sid") String sid) { - return R.data(pointService.projectGroup(sid)); - } - - @GetMapping("/onlineAttr") - @ApiOperationSupport(order = 3) - @ApiOperation(value = "分组点位信息", notes = "根据分组Id查询分组点位") - public R> onlineAttr(@RequestParam(value = "groupId") String groupId) { - return R.data(pointService.onlineAttr(groupId)); + @ApiOperation(value = "站点虚拟设备息", notes = "根据站点id查询虚拟设备") + public R> projectDeviceInstance(@RequestParam(value = "projectId") String projectId) { + return R.data(pointService.projectDeviceInstance(projectId)); } } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/history/service/PointService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/history/service/PointService.java index 3ae1460..43da1e1 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/history/service/PointService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/history/service/PointService.java @@ -5,6 +5,7 @@ import com.hnac.hzinfo.dataconfig.entity.Device; import com.hnac.hzinfo.datasearch.soe.domian.SoeData; import com.hnac.hzinfo.datasearch.soe.domian.SoeQueryCondition; import com.hnac.hzinfo.sdk.v5.device.vo.DeviceInstanceAttrVO; +import com.hnac.hzinfo.sdk.v5.device.vo.DeviceInstanceVO; import java.util.List; @@ -14,9 +15,8 @@ import java.util.List; public interface PointService { - String projectSid(String projectId); + List projectFacDevice(String projectId); - List projectGroup(String projectId); - List onlineAttr(String groupId); + List projectDeviceInstance(String projectId); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/history/service/impl/PointServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/history/service/impl/PointServiceImpl.java index 172a302..0bfe398 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/history/service/impl/PointServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/history/service/impl/PointServiceImpl.java @@ -5,6 +5,7 @@ import com.hnac.hzinfo.dataconfig.entity.Device; import com.hnac.hzinfo.sdk.core.response.Result; import com.hnac.hzinfo.sdk.v5.device.client.DeviceClient; import com.hnac.hzinfo.sdk.v5.device.vo.DeviceInstanceAttrVO; +import com.hnac.hzinfo.sdk.v5.device.vo.DeviceInstanceVO; import com.hnac.hzinfo.sdk.v5.project.ProjectClient; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -28,28 +29,15 @@ public class PointServiceImpl implements PointService { private final DeviceClient deviceClient; - /** - * 查询站点厂信息分组 - * @param projectId - * @return - */ - @Override - public String projectSid(String projectId) { - Result result = projectClient.getProjectBySid(projectId); - if(!result.isSuccess() || StringUtil.isBlank(result.getData())){ - return ""; - } - return result.getData(); - } /** - * 厂信息分组 - * @param sid + * 根据站点查询厂组点信息 + * @param projectId * @return */ @Override - public List projectGroup(String sid) { - Result> result = deviceClient.facDeviceByProjectId(sid); + public List projectFacDevice(String projectId) { + Result> result = deviceClient.facDeviceByProjectId(projectId); if(!result.isSuccess() || CollectionUtil.isEmpty(result.getData())){ return new ArrayList<>(); } @@ -57,17 +45,18 @@ public class PointServiceImpl implements PointService { } /** - * 查询分组点位信息 - * @param groupId + * 根据站点查询虚拟设备 + * @param projectId * @return */ @Override - public List onlineAttr(String groupId) { - R> result = deviceClient.getOnlineAttr(groupId); + public List projectDeviceInstance(String projectId) { + R> result = deviceClient.getOnlineDeviceInstance(projectId); if(!result.isSuccess() || CollectionUtil.isEmpty(result.getData())){ return new ArrayList<>(); } return result.getData(); } + } \ No newline at end of file