TRX 1 năm trước cách đây
mục cha
commit
33ecb88e55

+ 13 - 0
FullCardClient/src/main/java/com/zhongshu/card/client/model/school/DeviceBindModel.java

@@ -3,6 +3,7 @@ package com.zhongshu.card.client.model.school;
 import com.github.microservice.models.type.DeviceType;
 import com.zhongshu.card.client.model.base.SuperModel;
 import com.zhongshu.card.client.model.org.OrganizationSimpleModel;
+import com.zhongshu.card.client.utils.type.DataState;
 import com.zhongshu.card.client.utils.type.OnLineState;
 import com.zhongshu.card.client.utils.type.PaymentModeType;
 import io.swagger.v3.oas.annotations.media.Schema;
@@ -47,6 +48,18 @@ public class DeviceBindModel extends SuperModel {
         return "";
     }
 
+    @Schema(description = "数据状态")
+    private DataState state;
+
+    public String stateStr;
+
+    public String getStateStr() {
+        if (state != null) {
+            return state.getRemark();
+        }
+        return "";
+    }
+
     @Schema(description = "网关")
     private String gateWayId;
 

+ 4 - 0
FullCardServer/src/main/java/com/zhongshu/card/server/core/domain/school/DeviceBind.java

@@ -1,6 +1,7 @@
 package com.zhongshu.card.server.core.domain.school;
 
 import com.github.microservice.models.type.DeviceType;
+import com.zhongshu.card.client.utils.type.DataState;
 import com.zhongshu.card.client.utils.type.OnLineState;
 import com.zhongshu.card.client.utils.type.PaymentModeType;
 import com.zhongshu.card.server.core.domain.base.SuperMain;
@@ -49,6 +50,9 @@ public class DeviceBind extends SuperMain {
     @Schema(description = "是否在线")
     private OnLineState onLineState = OnLineState.OnLine;
 
+    @Schema(description = "数据状态")
+    private DataState state = DataState.Enable;
+
     @Schema(description = "最上线时间")
     private Long lastOnlineTime;
 

+ 1 - 0
FullCardServer/src/main/java/com/zhongshu/card/server/core/service/school/DeviceBindServiceImpl.java

@@ -96,6 +96,7 @@ public class DeviceBindServiceImpl extends SuperService implements DeviceBindSer
         deviceBind.setDeviceName(deviceInfo.getDeviceName());
         deviceBind.setDeviceInfo(deviceInfo);
         deviceBind.setOnLineState(deviceInfo.getOnLineState());
+        deviceBind.setState(deviceInfo.getState());
         deviceBind.setProjectInfoCode(deviceInfo.getProjectInfoCode());
         deviceBind.setGateWayId(deviceInfo.getGateWayId());
         deviceBind.setDeviceType(deviceInfo.getDeviceType());