This commit is contained in:
2023-06-29 16:11:48 +08:00
parent cb605c1de7
commit e4f441fb85
4 changed files with 7 additions and 3 deletions

View File

@@ -1,6 +1,5 @@
package com.njcn.csdevice.pojo.vo; package com.njcn.csdevice.pojo.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@@ -47,5 +46,8 @@ public class DeviceManagerVO {
@ApiModelProperty(value = "数据集名称") @ApiModelProperty(value = "数据集名称")
private String name; private String name;
@ApiModelProperty(value = "数据类型 rt:实时数据 history:历史数据")
private String type;
} }
} }

View File

@@ -143,7 +143,7 @@ public class EquipmentDeliveryController extends BaseController {
@ApiImplicitParam(name = "type", value = "类型", required = true), @ApiImplicitParam(name = "type", value = "类型", required = true),
}) })
public HttpResult<DeviceManagerVO> getDeviceData(@RequestParam String deviceId,@RequestParam String type){ public HttpResult<DeviceManagerVO> getDeviceData(@RequestParam String deviceId,@RequestParam String type){
String methodDescribe = getMethodDescribe("deviceData"); String methodDescribe = getMethodDescribe("getDeviceData");
DeviceManagerVO vo = csEquipmentDeliveryService.getDeviceData(deviceId,type); DeviceManagerVO vo = csEquipmentDeliveryService.getDeviceData(deviceId,type);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, vo, methodDescribe); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, vo, methodDescribe);
} }

View File

@@ -185,11 +185,13 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliv
DeviceManagerVO.DataSetVO dataSetVO = new DeviceManagerVO.DataSetVO(); DeviceManagerVO.DataSetVO dataSetVO = new DeviceManagerVO.DataSetVO();
dataSetVO.setId(item.getId()); dataSetVO.setId(item.getId());
dataSetVO.setName(item.getAnotherName()); dataSetVO.setName(item.getAnotherName());
dataSetVO.setType("rt");
dataSetList.add(dataSetVO); dataSetList.add(dataSetVO);
if (Objects.equals(type,"history")){ if (Objects.equals(type,"history")){
DeviceManagerVO.DataSetVO dataSetVo2 = new DeviceManagerVO.DataSetVO(); DeviceManagerVO.DataSetVO dataSetVo2 = new DeviceManagerVO.DataSetVO();
dataSetVo2.setId(item.getId()); dataSetVo2.setId(item.getId());
dataSetVo2.setName("历史"+item.getAnotherName()); dataSetVo2.setName("历史"+item.getAnotherName());
dataSetVo2.setType("history");
dataSetList.add(dataSetVo2); dataSetList.add(dataSetVo2);
} }
}); });

View File

@@ -44,7 +44,7 @@
<!--切换阿里&华为的配置sdk--> <!--切换阿里&华为的配置sdk-->
<micro.sdk>common-microservice</micro.sdk> <micro.sdk>common-microservice</micro.sdk>
<!--<micro.sdk>common-huawei</micro.sdk>--> <!--<micro.sdk>common-huawei</micro.sdk>-->
<docker.operate>install</docker.operate> <docker.operate>site</docker.operate>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<maven.compiler.source>8</maven.compiler.source> <maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target> <maven.compiler.target>8</maven.compiler.target>