Browse Source

add:画布向量源数据

zhongwei
luyie 2 months ago
parent
commit
8745069568
  1. 11
      hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/controller/VectorDataController.java
  2. 3
      hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/service/VectorDataService.java
  3. 16
      hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/service/impl/VectorDataServiceImpl.java

11
hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/controller/VectorDataController.java

@ -11,6 +11,7 @@ import com.hnac.hzinfo.sdk.v5.device.dto.DeviceFuncInfoDTO;
import com.hnac.hzinfo.sdk.v5.model.vo.ModelAttrVO; import com.hnac.hzinfo.sdk.v5.model.vo.ModelAttrVO;
import com.hnac.hzinfo.sdk.v5.model.vo.ModelEventVO; import com.hnac.hzinfo.sdk.v5.model.vo.ModelEventVO;
import com.hnac.hzinfo.sdk.v5.model.vo.ModelFuncVO; import com.hnac.hzinfo.sdk.v5.model.vo.ModelFuncVO;
import com.hnac.hzinfo.sdk.v5.scada.vo.CanvasInfo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@ -73,7 +74,7 @@ public class VectorDataController {
@ApiOperation(value = "获取设备属性数据") @ApiOperation(value = "获取设备属性数据")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
@ApiInterface @ApiInterface
public R<List<DeviceAttrInfoDTO>> getDeviceAttr( ) { public R<List<DeviceAttrInfoDTO>> getDeviceAttr() {
return R.data(vectorDataService.getDeviceAttr()); return R.data(vectorDataService.getDeviceAttr());
} }
@ -93,4 +94,12 @@ public class VectorDataController {
return R.data(knowledgeDataService.listKnowledgeData()); return R.data(knowledgeDataService.listKnowledgeData());
} }
@GetMapping("/listCanvas")
@ApiOperation(value = "获取画布数据")
@ApiOperationSupport(order = 8)
@ApiInterface
public R<List<CanvasInfo>> listCanvas() {
return R.data(vectorDataService.getScadaCanvas());
}
} }

3
hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/service/VectorDataService.java

@ -6,6 +6,7 @@ import com.hnac.hzinfo.sdk.v5.device.dto.DeviceFuncInfoDTO;
import com.hnac.hzinfo.sdk.v5.model.vo.ModelAttrVO; import com.hnac.hzinfo.sdk.v5.model.vo.ModelAttrVO;
import com.hnac.hzinfo.sdk.v5.model.vo.ModelEventVO; import com.hnac.hzinfo.sdk.v5.model.vo.ModelEventVO;
import com.hnac.hzinfo.sdk.v5.model.vo.ModelFuncVO; import com.hnac.hzinfo.sdk.v5.model.vo.ModelFuncVO;
import com.hnac.hzinfo.sdk.v5.scada.vo.CanvasInfo;
import java.util.List; import java.util.List;
@ -26,4 +27,6 @@ public interface VectorDataService {
List<DeviceAttrInfoDTO> getDeviceAttr(); List<DeviceAttrInfoDTO> getDeviceAttr();
List<DeviceFuncInfoDTO> getDeviceFunc(); List<DeviceFuncInfoDTO> getDeviceFunc();
List<CanvasInfo> getScadaCanvas();
} }

16
hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/service/impl/VectorDataServiceImpl.java

@ -10,6 +10,8 @@ import com.hnac.hzinfo.sdk.v5.model.ModelClient;
import com.hnac.hzinfo.sdk.v5.model.vo.ModelAttrVO; import com.hnac.hzinfo.sdk.v5.model.vo.ModelAttrVO;
import com.hnac.hzinfo.sdk.v5.model.vo.ModelEventVO; import com.hnac.hzinfo.sdk.v5.model.vo.ModelEventVO;
import com.hnac.hzinfo.sdk.v5.model.vo.ModelFuncVO; import com.hnac.hzinfo.sdk.v5.model.vo.ModelFuncVO;
import com.hnac.hzinfo.sdk.v5.scada.ScadaClient;
import com.hnac.hzinfo.sdk.v5.scada.vo.CanvasInfo;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
@ -29,6 +31,7 @@ import java.util.stream.Collectors;
public class VectorDataServiceImpl implements VectorDataService { public class VectorDataServiceImpl implements VectorDataService {
private final ModelClient modelClient; private final ModelClient modelClient;
private final DeviceClient deviceClient; private final DeviceClient deviceClient;
private final ScadaClient scadaClient;
@Override @Override
@ -84,12 +87,11 @@ public class VectorDataServiceImpl implements VectorDataService {
@Override @Override
public List<DeviceFuncInfoDTO> getDeviceFunc() { public List<DeviceFuncInfoDTO> getDeviceFunc() {
List<DeviceFuncInfoDTO> list = deviceClient.listDeviceFunc().getData(); return deviceClient.listDeviceFunc().getData();
if (null != list && !list.isEmpty()) { }
list.forEach(item -> {
item.setItemName(item.getProjectName() + " " + item.getDeviceName() + " " + item.getName()); @Override
}); public List<CanvasInfo> getScadaCanvas() {
} return scadaClient.listCanvas().getData();
return list;
} }
} }

Loading…
Cancel
Save