feat: 国际出港 开始计重 通道

This commit is contained in:
2025-12-08 15:02:06 +08:00
parent 5fc51e7af3
commit 9149d1ad35
4 changed files with 25 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
package com.lukouguoji.module_base.bean
import dev.utils.app.info.KeyValue
/**
* 字典-Location接口返回数据Bean
*/
data class DictLocationBean(
var code: String = "", // 编码值 (例如: "18")
var name: String = "" // 显示名称 (例如: "国际出港通道01")
) {
/**
* 转换为KeyValue
* KeyValue(显示名称, 编码值)
*/
fun toKeyValue() = KeyValue(name, code)
}

View File

@@ -13,6 +13,7 @@ import com.lukouguoji.module_base.bean.CarOrUldBean
import com.lukouguoji.module_base.bean.DiBangChannelBean
import com.lukouguoji.module_base.bean.DictIdValueBean
import com.lukouguoji.module_base.bean.DictListBean
import com.lukouguoji.module_base.bean.DictLocationBean
import com.lukouguoji.module_base.bean.DocumentHandoverBean
import com.lukouguoji.module_base.bean.FlatcarBean
import com.lukouguoji.module_base.bean.FlightBean
@@ -150,6 +151,11 @@ interface Api {
@GET("typeCode/searchDateType")
suspend fun getDictList(@Query("code") code: String): BaseResultBean<List<DictIdValueBean>>
/**
* 获取字典列表 - location接口
*/
@GET("typeCode/locationByCode")
suspend fun getDictListByLocation(@Query("code") code: String): BaseResultBean<List<DictLocationBean>>
/**
* 获取字典列表----根据用户角色选择转运类型

View File

@@ -409,7 +409,7 @@ object DictUtils {
) {
launchCollect({
NetApply.api
.getDictList("GJCPASSAGEWAY")
.getDictListByLocation("GJCPASSAGEWAY")
}) {
onSuccess = {
callBack((it.data ?: emptyList()).map { b -> b.toKeyValue() })

View File

@@ -74,6 +74,7 @@
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.channel}'
required="@{true}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"