feat: 国际出港-出港仓库
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
import androidx.databinding.ObservableBoolean
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
import java.util.Locale
|
||||
|
||||
/**
|
||||
* 国际出港主单数据模型
|
||||
@@ -78,6 +80,7 @@ data class GjcMaWb(
|
||||
var declareStatus: String? = null, // 申报状态
|
||||
var reviewStatus: String? = null, // 审核状态(0:未审核;1:通过;2:退回)
|
||||
var tranFlag: String? = null, // 转运标志
|
||||
var clearNormal: String? = null, // 清仓正常(0:否,1:是)
|
||||
|
||||
// ==================== 操作信息 ====================
|
||||
var opDate: String? = null, // 操作时间(入库时间)
|
||||
@@ -145,6 +148,34 @@ data class GjcMaWb(
|
||||
"1" -> "提前运抵"
|
||||
else -> arriveFlag ?: ""
|
||||
}
|
||||
|
||||
/**
|
||||
* 航班信息(格式化后)
|
||||
* 格式: yyyyMMdd/航班号
|
||||
* 示例: 20260108/MU2025
|
||||
*/
|
||||
val flightInfo: String
|
||||
get() {
|
||||
val dateFormat = SimpleDateFormat("yyyyMMdd", Locale.getDefault())
|
||||
val formattedDate = fdate?.let { dateFormat.format(it) } ?: ""
|
||||
val flightNo = fno ?: ""
|
||||
return if (formattedDate.isNotEmpty() && flightNo.isNotEmpty()) {
|
||||
"$formattedDate/$flightNo"
|
||||
} else {
|
||||
flight ?: "" // 如果无法格式化,回退到原始flight字段
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 清仓正常状态中文
|
||||
* 0-否,1-是
|
||||
*/
|
||||
val clearNormalText: String
|
||||
get() = when (clearNormal) {
|
||||
"0" -> "否"
|
||||
"1" -> "是"
|
||||
else -> clearNormal ?: ""
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user