feat: 国际出港-出港仓库

This commit is contained in:
2026-01-13 11:16:21 +08:00
parent caeb68f9fd
commit ca81d8f8bb
5 changed files with 59 additions and 43 deletions

View File

@@ -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, // 清仓正常01
// ==================== 操作信息 ====================
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 ?: ""
}
}
/**