Commit 42118ccf by 李小龙

整理代码

parent 2069f975
package com.makeit.entity.platform.device; package com.makeit.entity.platform.device;
import com.makeit.common.entity.BaseBusEntity; import com.makeit.common.entity.BaseBusEntity;
import com.makeit.module.iot.enums.DeviceState;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -47,7 +48,10 @@ public class PlatDevice extends BaseBusEntity { ...@@ -47,7 +48,10 @@ public class PlatDevice extends BaseBusEntity {
@ApiModelProperty(value = "说明") @ApiModelProperty(value = "说明")
private String description; private String description;
@ApiModelProperty(value = "状态 数据字典 1 在线 0离线") /**
* @see DeviceState
*/
@ApiModelProperty(value = "状态 数据字典 1 在线 0离线 ")
private String status; private String status;
@ApiModelProperty(value = "组织id") @ApiModelProperty(value = "组织id")
......
...@@ -106,7 +106,7 @@ public class IotSyncTask { ...@@ -106,7 +106,7 @@ public class IotSyncTask {
platDevice.setRegistrationDate(registryTime); platDevice.setRegistrationDate(registryTime);
platDevice.setDescription(iotDevice.getDescribe()); platDevice.setDescription(iotDevice.getDescribe());
String state = iotDevice.getState(); String state = iotDevice.getState();
platDevice.setStatus(StringUtils.equals("online", state) ? CommonEnum.YES.getValue() : CommonEnum.NO.getValue()); platDevice.setStatus(state);
//todo 根据类型名称来匹配 //todo 根据类型名称来匹配
platDevice.setCategory(dicNameIdMap.get(iotDevice.getProductName())); platDevice.setCategory(dicNameIdMap.get(iotDevice.getProductName()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment