增加质检结果展示页面
This commit is contained in:
6
app/src/main/java/com/navinfo/omqs/bean/BaseBean.kt
Normal file
6
app/src/main/java/com/navinfo/omqs/bean/BaseBean.kt
Normal file
@@ -0,0 +1,6 @@
|
||||
package com.navinfo.omqs.bean
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
open class BaseBean : Serializable, Cloneable {
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.navinfo.omqs.bean
|
||||
|
||||
import android.os.Parcelable
|
||||
import androidx.room.Entity
|
||||
import androidx.room.PrimaryKey
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
|
||||
@Entity(tableName = "OfflineMapCity")
|
||||
@Parcelize
|
||||
data class OfflineMapCityBean @JvmOverloads constructor(
|
||||
@PrimaryKey
|
||||
var id: String = "",
|
||||
var fileName: String = "",
|
||||
var name: String = "",
|
||||
var url: String = "",
|
||||
var version: Long = 0L,
|
||||
var fileSize: Long = 0L,
|
||||
var currentSize: Long = 0L,
|
||||
var status: Int = NONE
|
||||
) : Parcelable {
|
||||
|
||||
companion object Status {
|
||||
const val NONE = 0 //无状态
|
||||
const val WAITING = 1 //等待中
|
||||
const val LOADING = 2 //下载中
|
||||
const val PAUSE = 3 //暂停
|
||||
const val ERROR = 4 //错误
|
||||
const val DONE = 5 //完成
|
||||
const val UPDATE = 6 //有新版本要更新
|
||||
}
|
||||
|
||||
// // status的转换对象
|
||||
// var statusEnum: StatusEnum
|
||||
// get() {
|
||||
// return try {
|
||||
// StatusEnum.values().find { it.status == status }!!
|
||||
// } catch (e: IllegalArgumentException) {
|
||||
// StatusEnum.NONE
|
||||
// }
|
||||
// }
|
||||
// set(value) {
|
||||
// status = value.status
|
||||
// }
|
||||
|
||||
fun getFileSizeText(): String {
|
||||
return if (fileSize < 1024.0)
|
||||
"$fileSize B"
|
||||
else if (fileSize < 1048576.0)
|
||||
"%.2f K".format(fileSize / 1024.0)
|
||||
else if (fileSize < 1073741824.0)
|
||||
"%.2f M".format(fileSize / 1048576.0)
|
||||
else
|
||||
"%.2f M".format(fileSize / 1073741824.0)
|
||||
}
|
||||
|
||||
}
|
||||
115
app/src/main/java/com/navinfo/omqs/bean/QsRecord.kt
Normal file
115
app/src/main/java/com/navinfo/omqs/bean/QsRecord.kt
Normal file
@@ -0,0 +1,115 @@
|
||||
package com.navinfo.omqs.bean
|
||||
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
|
||||
|
||||
/**
|
||||
* @author zhjch
|
||||
* @version V1.0
|
||||
* @ClassName: Rd_qcRecord
|
||||
* @Date 2016/1/12
|
||||
* @Description: ${TODO}(质检对象)
|
||||
*/
|
||||
open class QsRecord @JvmOverloads constructor(
|
||||
/**
|
||||
* id 主键
|
||||
*
|
||||
*/
|
||||
@PrimaryKey var id: String = "",
|
||||
/**
|
||||
* linkPid 绑定的道路ID
|
||||
*/
|
||||
var linkPid: String = "",
|
||||
/**
|
||||
*问题分类
|
||||
*/
|
||||
var classType: String = "",
|
||||
/**
|
||||
* 问题类型
|
||||
*/
|
||||
var type: String = "",
|
||||
|
||||
/**
|
||||
* 问题现象
|
||||
*/
|
||||
var phenomenon: String = "",
|
||||
/**
|
||||
* 问题描述
|
||||
*/
|
||||
var description: String = "",
|
||||
/**
|
||||
* 设置initial_cause
|
||||
* @param initial_cause
|
||||
* initial_cause
|
||||
*/
|
||||
// var initial_cause: String? = StringEntity.STRING_DEFAULT
|
||||
// /**
|
||||
// * 获取root_cause
|
||||
// * @return root_cause
|
||||
// */
|
||||
// /**
|
||||
// * 设置root_cause
|
||||
// * @param root_cause
|
||||
// * root_cause
|
||||
// */
|
||||
////根本原因(RCA)
|
||||
// var root_cause: String? = StringEntity.STRING_DEFAULT
|
||||
// /**
|
||||
// * 获取check_userid
|
||||
// * @return check_userid
|
||||
// */
|
||||
// /**
|
||||
// * 设置check_userid
|
||||
// * @param check_userid
|
||||
// * check_userid
|
||||
// */
|
||||
////质检员
|
||||
// var check_userid: String? = StringEntity.STRING_DEFAULT
|
||||
// /**
|
||||
// * 获取check_time
|
||||
// * @return check_time
|
||||
// */
|
||||
// /**
|
||||
// * 设置check_time
|
||||
// * @param check_time
|
||||
// * check_time
|
||||
// */
|
||||
////质检日期
|
||||
// var check_time: String? = StringEntity.STRING_DEFAULT
|
||||
// /**
|
||||
// * 获取confirm_userid
|
||||
// * @return confirm_userid
|
||||
// */
|
||||
// /**
|
||||
// * 设置confirm_userid
|
||||
// * @param confirm_userid
|
||||
// * confirm_userid
|
||||
// */
|
||||
////确认人
|
||||
// var confirm_userid: String? = StringEntity.STRING_DEFAULT
|
||||
// /**
|
||||
// * 获取t_lifecycle
|
||||
// * @return t_lifecycle
|
||||
// */
|
||||
// /**
|
||||
// * 设置t_lifecycle
|
||||
// * @param t_lifecycle
|
||||
// * t_lifecycle
|
||||
// */
|
||||
////状态 0 无; 1 删除;2 更新;3 新增;
|
||||
// var t_lifecycle = 0
|
||||
// /**
|
||||
// * 获取t_status
|
||||
// * @return t_status
|
||||
// */
|
||||
// /**
|
||||
// * 设置t_status
|
||||
// * @param t_status
|
||||
// * t_status
|
||||
// */
|
||||
////问题记录提交状态 0 未提交;1 已提交;
|
||||
// var t_status = 0
|
||||
) : RealmObject(
|
||||
|
||||
)
|
||||
30
app/src/main/java/com/navinfo/omqs/bean/ScProblemTypeBean.kt
Normal file
30
app/src/main/java/com/navinfo/omqs/bean/ScProblemTypeBean.kt
Normal file
@@ -0,0 +1,30 @@
|
||||
package com.navinfo.omqs.bean
|
||||
|
||||
import android.os.Parcelable
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Entity
|
||||
import androidx.room.PrimaryKey
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
@Entity(tableName = "ScProblemType")
|
||||
@Parcelize
|
||||
data class ScProblemTypeBean(
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
var id: Long = 0,
|
||||
/**
|
||||
* 问题分类
|
||||
*/
|
||||
@ColumnInfo("CLASS_TYPE")
|
||||
var classType: String = "",
|
||||
/**
|
||||
* 问题类型
|
||||
*/
|
||||
@ColumnInfo("TYPE")
|
||||
var problemType: String = "",
|
||||
/**
|
||||
* 问题现象
|
||||
*/
|
||||
@ColumnInfo("PHENOMENON")
|
||||
var phenomenon: String = ""
|
||||
|
||||
) : Parcelable
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.navinfo.omqs.bean
|
||||
|
||||
import android.os.Parcelable
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Entity
|
||||
import androidx.room.PrimaryKey
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
@Entity(tableName = "ScRootCauseAnalysis")
|
||||
@Parcelize
|
||||
data class ScRootCauseAnalysisBean(
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
var id: Long = 0,
|
||||
/**
|
||||
* 问题环节
|
||||
*/
|
||||
@ColumnInfo("PROBLEM_LINK")
|
||||
var problemLink: String = "",
|
||||
/**
|
||||
* 问题原因
|
||||
*/
|
||||
@ColumnInfo("PROBLEM_CAUSE")
|
||||
var problemCause: String = "",
|
||||
) : Parcelable
|
||||
Reference in New Issue
Block a user