|
|
@@ -1,11 +1,11 @@
|
|
|
package com.xunmei.iot.vo.serverInfo;
|
|
|
|
|
|
-import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.alibaba.excel.converters.Converter;
|
|
|
import com.alibaba.excel.enums.CellDataTypeEnum;
|
|
|
import com.alibaba.excel.metadata.CellData;
|
|
|
import com.alibaba.excel.metadata.GlobalConfiguration;
|
|
|
import com.alibaba.excel.metadata.property.ExcelContentProperty;
|
|
|
+import com.xunmei.common.core.enums.iot.IotServerConnectStatus;
|
|
|
|
|
|
public class IotServerStatusConverter implements Converter<Integer> {
|
|
|
|
|
|
@@ -28,13 +28,7 @@ public class IotServerStatusConverter implements Converter<Integer> {
|
|
|
|
|
|
@Override
|
|
|
public CellData convertToExcelData(Integer status, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
|
|
|
- if (ObjectUtil.equal(0,status)) {
|
|
|
- return new CellData("未启用");
|
|
|
- }
|
|
|
- if (ObjectUtil.equal(1,status)) {
|
|
|
- return new CellData("在线");
|
|
|
- }
|
|
|
- return new CellData("离线");
|
|
|
+ return new CellData(IotServerConnectStatus.getName(status));
|
|
|
|
|
|
}
|
|
|
}
|