feat: fix bugs

This commit is contained in:
2026-01-26 16:22:27 +08:00
parent 5e1e9e58a2
commit 8e2f584f3a
13 changed files with 32 additions and 23 deletions

View File

@@ -26,8 +26,8 @@ android {
applicationId "com.lukouguoji.aerologic"
minSdkVersion 24
targetSdkVersion 30
versionCode 186
versionName "1.8.6"
versionCode 85
versionName "1.8.5"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View File

@@ -41,7 +41,7 @@ import me.jessyan.autosize.internal.CustomAdapt
* ========== 开发调试开关 ==========
* TODO: 正式发布前务必设置为 false
*/
private const val DEV_AUTO_LOGIN = true // 自动登录开关
private const val DEV_AUTO_LOGIN = false // 自动登录开关
@Route(path = ARouterConstants.ACTIVITY_URL_LOGIN)
class LoginActivity : BaseActivity(),

View File

@@ -74,6 +74,7 @@ data class GjcMaWb(
var carId: String? = null, // 平板车号
var carNumber: String? = null, // 车牌号
var passageWay: String? = null, // 通道号
var passageWayId: String? = null,
// ==================== 状态信息 ====================
var checkIn: String? = null, // 收运状态。0待收运1已收运2收运中

View File

@@ -53,6 +53,7 @@ class GjcUldUseBean : Serializable {
var dgrCode: String = "" // IMP代码
var height: String = "" // 高度
var passageway: String = "" // 通道号
var passagewayId: String = ""
var passagewayName: String = "" // 通道号(中文)
var plClose: String = "" // 探板/收口
var plCloseSize: String = "" // 探板尺寸(CM)

View File

@@ -1,10 +1,12 @@
package com.lukouguoji.module_base.bean
import java.io.Serializable
/**
* 国际出港-运单明细Bean
* 对应API: IntExpAssemble/queryAssembled
*/
class GjcWarehouse {
class GjcWarehouse : Serializable {
var whId: Long = 0 // ID
var no: String = "" // 运单号11位
var prefix: String = "" // 运单前缀
@@ -44,10 +46,10 @@ class GjcWarehouse {
/**
* 重量字符串用于双向绑定EditText
*/
var weightStr: String
get() = if (weight == 0.0) "" else weight.toString()
var checkInWeightStr: String
get() = if (checkInWeight == 0.0) "" else checkInWeight.toString()
set(value) {
weight = value.toDoubleOrNull() ?: 0.0
checkInWeight = value.toDoubleOrNull() ?: 0.0
}
/**

View File

@@ -198,7 +198,7 @@ class GjcAssembleWeightEditViewModel : BaseViewModel() {
NetApply.api.updateIntExpAssemble(records.toRequestBody())
}) {
onSuccess = { result ->
if (result.data == true) {
if (result.verifySuccess()) {
showToast("保存成功")
// 发送刷新事件通知列表页
viewModelScope.launch {

View File

@@ -312,7 +312,8 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
bean.uld = uldNo.value ?: ""
bean.fno = flightNo.value ?: ""
bean.fdate = flightDate.value ?: ""
bean.passageway = channel.value ?: ""
bean.passageway = passagewayList.value?.firstOrNull{ it.value == channel.value }?.key ?: ""
bean.passagewayId = channel.value ?: ""
// 验证必填字段
if (bean.carId.verifyNullOrEmpty("请输入架子车号")) return
@@ -329,6 +330,7 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
val baseParams = mutableMapOf(
"carId" to bean.carId,
"passageway" to bean.passageway,
"passagewayId" to bean.passagewayId,
"uld" to bean.uld,
"dgrCode" to bean.dgrCode,
"boardType" to bean.boardType,

View File

@@ -13,7 +13,7 @@ import com.lukouguoji.module_base.ktx.launchLoadingCollect
import com.lukouguoji.module_base.ktx.toRequestBody
import com.lukouguoji.module_base.model.ScanModel
import dev.utils.common.DateUtils
import com.lukouguoji.module_base.ktx.formatDate
import com.lukouguoji.module_base.ktx.formatDate
/**
* 国际出港板箱过磅 ViewModel
@@ -33,7 +33,8 @@ class GjcBoxWeighingViewModel : BasePageViewModel() {
// 统计数据
val totalCount = MutableLiveData("0") // 合计票数
val totalPc = MutableLiveData("0") // 总件数
val totalPc = MutableLiveData("0")
val cargoWeight = MutableLiveData("0")// 总件数
val totalWeight = MutableLiveData("0") // 总重量
///////////////////////////////////////////////////////////////////////////
@@ -116,6 +117,7 @@ class GjcBoxWeighingViewModel : BasePageViewModel() {
val data = result.data
totalCount.value = (data?.wbNumber ?: 0).toString()
totalPc.value = (data?.totalPc ?: 0).toString()
cargoWeight.value = (data?.cargoWeight ?: 0).toString()
totalWeight.value = (data?.totalWeight ?: 0.0).toString()
}
}

View File

@@ -374,7 +374,8 @@ class GjcWeighingStartViewModel : BaseViewModel() {
arriveVolume =
this@GjcWeighingStartViewModel.arriveVolume.value?.toDoubleOrNull() ?: arriveVolume
// 添加通道号
passageWay = this@GjcWeighingStartViewModel.channel.value
passageWay = this@GjcWeighingStartViewModel.channelList.value?.firstOrNull{ it.value == channel.value }?.key ?: ""
passageWayId = this@GjcWeighingStartViewModel.channel.value
remark = pageRemark.value
}
@@ -472,7 +473,8 @@ class GjcWeighingStartViewModel : BaseViewModel() {
"carId" to bean.carId,
"remark" to pageRemark.value,
"checkIn" to "1", // 收运状态设置为已收运
"passageWay" to channel.value // 通道号参数
"passageWayId" to channel.value, // 通道号参数
"passageWay" to (channelList.value?.firstOrNull{ it.value == channel.value }?.key ?: "")
).toRequestBody(removeEmptyOrNull = true)
launchLoadingCollect({

View File

@@ -148,21 +148,20 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{"合计:"+viewModel.totalCount+"票"}'
android:text="合计:"
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="合计:1票" />
tools:text="合计:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{"总件数:"+viewModel.totalPc}'
android:text='@{"总货重:"+viewModel.cargoWeight}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="总件数100" />
tools:text="总货重100" />
<TextView
android:layout_width="wrap_content"

View File

@@ -56,7 +56,7 @@
title='@{"通道号"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.passagewayName}'
value='@{viewModel.dataBean.passageway}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />

View File

@@ -46,7 +46,7 @@
title="@{`件数`}"
titleLength="@{2}"
type="@{DataLayoutType.INPUT}"
value="@{String.valueOf(bean.pc)}" />
value="@{String.valueOf(bean.checkInPc)}" />
<!-- 重量(可编辑) -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
@@ -60,7 +60,7 @@
title="@{`重量`}"
titleLength="@{2}"
type="@{DataLayoutType.INPUT}"
value="@={bean.weightStr}" />
value="@={bean.checkInWeightStr}" />
</LinearLayout>
</layout>

View File

@@ -51,7 +51,7 @@
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center"
android:text="@{String.valueOf(bean.pc)}"
android:text="@{String.valueOf(bean.checkInPc)}"
android:textColor="@color/text_normal"
android:textSize="14sp" />
@@ -61,7 +61,7 @@
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center"
android:text="@{String.valueOf((int)bean.weight)}"
android:text="@{String.valueOf((int)bean.checkInWeight)}"
android:textColor="@color/text_normal"
android:textSize="14sp" />