Browse Source

@task: add state

bai 3 năm trước cách đây
mục cha
commit
06791f664f

+ 1 - 0
demo/src/main/java/com/framework/mvvm/model/db/entity/FileEntity.kt

@@ -29,4 +29,5 @@ data class FileEntity(
     @ColumnInfo(name = "modified_time") val modifiedTime: String?,  // 修改时间
     @ColumnInfo(name = "valid") val valid: Int?,                    // 合法标识
     @ColumnInfo(name = "upload_flag") val uploadFlag: String?,      // app端上传数据标记
+    @ColumnInfo(name = "state") var state: String = "0"             // 数据状态:0:未处理,1:已处理 2:已上传
 )

+ 2 - 1
demo/src/main/java/com/framework/mvvm/model/db/entity/ObjectEntity.kt

@@ -46,7 +46,8 @@ data class ObjectEntity(
     @Contextual
     var infos: JSONObject?,               // 信息点数据: Json 数据格式
     @ColumnInfo(name = "str_infos") var strInfos: String?,           // 信息点数据: Json 数据格式
-    @ColumnInfo(name = "floor_map") var floorMap: String?            // 楼层地图
+    @ColumnInfo(name = "floor_map") var floorMap: String?,           // 楼层地图
+    @ColumnInfo(name = "state") var state: String = "0"              // 数据状态:0:未处理,1:已处理 2:已上传
 )
 
 

+ 1 - 0
demo/src/main/java/com/framework/mvvm/model/db/entity/PipeEntity.kt

@@ -32,4 +32,5 @@ data class PipeEntity(
     @ColumnInfo(name = "upload_flag") val uploadFlag: String?,        // app端上传数据标记
     @ColumnInfo(name = "d2m_state") val d2mState: String?,            // 逆向数据的数模同步状态(0:未同步;1:已同步)
     @ColumnInfo(name = "delivery_state") val deliveryState: String?,  // 交付BDTP状态:1已交付,0待交付
+    @ColumnInfo(name = "state") var state: String = "0"               // 数据状态:0:未处理,1:已处理 2:已上传
 )

+ 2 - 1
demo/src/main/java/com/framework/mvvm/model/db/entity/ProblemArchEntity.kt

@@ -26,5 +26,6 @@ data class ProblemArchEntity(
     @ColumnInfo(name = "modified_time") val modifiedTime: String?,  // 修改时间
     @ColumnInfo(name = "upload_flag") val uploadFlag: String?,      // app端上传数据标记
     @ColumnInfo(name = "valid") val valid: Int?,                    // 1 有效,2 无效
-    @ColumnInfo(name = "geom") val geom: String?                   // 问题记录的几何数据(Json)
+    @ColumnInfo(name = "geom") val geom: String?,                   // 问题记录的几何数据(Json)
+    @ColumnInfo(name = "state") var state: String = "0"             // 数据状态:0:未处理,1:已处理 2:已上传
 )

+ 2 - 2
demo/src/main/java/com/framework/mvvm/model/db/entity/ProblemEquipEntity.kt

@@ -25,6 +25,6 @@ data class ProblemEquipEntity(
     @ColumnInfo(name = "modifier") val modifier: String?,           // 修改人
     @ColumnInfo(name = "modified_time") val modifiedTime: String?,  // 修改时间
     @ColumnInfo(name = "upload_flag") val uploadFlag: String?,      // app端上传数据标记
-    @ColumnInfo(name = "valid") val valid: Int?                    // 1 有效,2 无效
-
+    @ColumnInfo(name = "valid") val valid: Int?,                    // 1 有效,2 无效
+    @ColumnInfo(name = "state") var state: String = "0"             // 数据状态:0:未处理,1:已处理 2:已上传
 )

+ 2 - 0
demo/src/main/java/com/framework/mvvm/model/db/entity/QrCodeEntity.kt

@@ -25,4 +25,6 @@ data class QrCodeEntity(
     @ColumnInfo(name = "valid") val valid: Int?,                 // 合法标识
     @ColumnInfo(name = "upload_flag") val uploadFlag: String?,      // app端上传数据标记
     @ColumnInfo(name = "location") val location: String?,           // 位置坐标({x:1,y:1,z:1})
+    @ColumnInfo(name = "state") var state: String = "0"             // 数据状态:0:未处理,1:已处理 2:已上传
+
 )

+ 3 - 3
demo/src/main/java/com/framework/mvvm/model/db/entity/RelationEntity.kt

@@ -35,7 +35,7 @@ data class RelationEntity(
     @ColumnInfo(name = "client_device") val clientDevice: String?,   // 标识客户端设备
     @ColumnInfo(name = "upload_flag") val uploadFlag: String?,       // app端上传数据标记
     @ColumnInfo(name = "delivery_state") val deliveryState: Int?,    // BDTP交付状态: 1 已交付, 0 待交付
-    @ColumnInfo(name = "valid") val valid: Int?,                  // 合法标识: 1 合法, 0 非法
-    @ColumnInfo(name = "d2m_state") val d2mState: Int?,           // 逆向数据的数模同步状态(0:未同步;1:已同步)
-
+    @ColumnInfo(name = "valid") val valid: Int?,                     // 合法标识: 1 合法, 0 非法
+    @ColumnInfo(name = "d2m_state") val d2mState: Int?,              // 逆向数据的数模同步状态(0:未同步;1:已同步)
+    @ColumnInfo(name = "state") var state: String = "0"              // 数据状态:0:未处理,1:已处理 2:已上传
 )

+ 2 - 0
demo/src/main/java/com/framework/mvvm/model/db/entity/SpaceEntity.kt

@@ -6,6 +6,7 @@ import androidx.room.PrimaryKey
 import kotlinx.serialization.Contextual
 import kotlinx.serialization.Serializable
 import org.json.JSONObject
+import javax.persistence.Column
 
 /**
  * 工作空间表
@@ -33,6 +34,7 @@ data class SpaceEntity(
     @Contextual
     val outline: JSONObject?,               // 空间边界,模型更新空间变化时,用来做匹配计算
     @ColumnInfo(name = "strOutline") val strOutline: String?,         // 空间边界,模型更新空间变化时,用来做匹配计算
+    @ColumnInfo(name = "state") var state: String = "0"               // 数据状态:0:未处理,1:已处理过 2:已上传
 )
 
 /*