From 1229ecc9201b0d0c6a6dee6c379b28df263b22a7 Mon Sep 17 00:00:00 2001 From: YANG JIANKUAN Date: Fri, 9 Oct 2026 07:32:47 -0700 Subject: [PATCH] =?UTF-8?q?feat(=E8=BF=9B=E6=B8=AF=E4=BB=93=E5=BA=93):=20?= =?UTF-8?q?=E7=AD=9B=E9=80=89=E5=AF=B9=E9=BD=90=E5=B9=B3=E6=9D=BF=E3=80=81?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=8F=96=20notClearNumber/clearNumber?= =?UTF-8?q?=E3=80=81=E8=AF=A6=E6=83=85=E6=8C=89=E5=B9=B3=E6=9D=BF=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=EF=BC=88=E9=97=AE=E9=A2=98=E6=B8=85=E5=8D=95=20#25~#2?= =?UTF-8?q?7=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - #25 后端不新增入参:筛选弹层改为平板同款 航班日期/航班号/库位/清仓结果, 移除始发站/代理/特码/运单类型/业务类型/品名 - #26 未清仓/已清仓取 pageQueryTotal 出参 notClearNumber/clearNumber,统计请求 3 次 → 1 次 - #27 进港详情按平板:航程 range 替代 始发站/中转站/目的站(无经停站),入库时间(opDate 恒空) 改为平板同款 出库时间 dlvTime - 内网实测:48/42/5;详情 航程 LAX-HFE / UN编号 / 锁定状态 正常显示 - 注意:IntImpStorage/pageQuery 当前对所有过滤条件(含平板自用的 wbNo/fno/fdate/location/clearNormal) 均不生效,属后端缺陷,已登记问题清单 Co-Authored-By: Claude Opus 5.5 --- .../viewModel/IntImpStorageUseViewModel.kt | 70 +++---------------- .../layout/activity_int_imp_storage_use.xml | 61 +++------------- .../layout/fragment_int_imp_query_waybill.xml | 39 +++-------- 3 files changed, 29 insertions(+), 141 deletions(-) diff --git a/module_gjj/src/main/java/com/lukouguoji/gjj/viewModel/IntImpStorageUseViewModel.kt b/module_gjj/src/main/java/com/lukouguoji/gjj/viewModel/IntImpStorageUseViewModel.kt index 5f8e803..e3ab16e 100644 --- a/module_gjj/src/main/java/com/lukouguoji/gjj/viewModel/IntImpStorageUseViewModel.kt +++ b/module_gjj/src/main/java/com/lukouguoji/gjj/viewModel/IntImpStorageUseViewModel.kt @@ -18,7 +18,6 @@ import com.lukouguoji.module_base.ktx.noNull import com.lukouguoji.module_base.ktx.showToast import com.lukouguoji.module_base.ktx.toRequestBody import com.lukouguoji.module_base.model.ScanModel -import com.lukouguoji.module_base.util.DictUtils import dev.utils.app.info.KeyValue import kotlinx.coroutines.launch @@ -47,27 +46,10 @@ class IntImpStorageUseViewModel : BasePageViewModel() { // 筛选弹层显隐 val filterVisible = MutableLiveData(false) - // 筛选条件(fdep 为接口入参;其余 5 项为后端未定义入参,预留传参,见接口问题清单 #25) - val fdep = MutableLiveData("") // 始发站 - val agentId = MutableLiveData("") // 代理(agentCode,预留) - val spCode = MutableLiveData("") // 特码(预留) - val awbType = MutableLiveData("") // 运单类型(预留) - val businessType = MutableLiveData("") // 业务类型(预留) - val goodsCn = MutableLiveData("") // 品名(中)(预留) + // 筛选弹层与平板端查询参数保持一致(后端确认):航班日期 / 航班号 / 库位 / 清仓结果,运单号/航班号走顶部搜索框。 + // 始发站/代理/特码/运单类型/业务类型/品名 后端不支持(内网实测 fdep/agentCode 被忽略),已移除 - // 筛选下拉字典(initPhoneExtras 加载,平板不请求) - val agentList = MutableLiveData(listOf(KeyValue("全部", ""))) - val specialCodeList = MutableLiveData>(emptyList()) - val awbTypeList = MutableLiveData>(emptyList()) - val businessTypeList = MutableLiveData( - listOf( - KeyValue("全部", ""), - KeyValue("普货", "1"), - KeyValue("特货", "2") - ) - ) - - // 三格统计:未清仓 / 已清仓(复用 pageQueryTotal 按 clearNormal=0/1 各查一次) + // 三格统计:未清仓 / 已清仓,直接取 pageQueryTotal 出参 notClearNumber / clearNumber val unclearedCount = MutableLiveData("0") val clearedCount = MutableLiveData("0") @@ -79,18 +61,6 @@ class IntImpStorageUseViewModel : BasePageViewModel() { */ fun initPhoneExtras() { phoneExtrasEnabled = true - // 代理(国际进港口径) - DictUtils.getIntImpAgentList(addAll = false) { list -> - agentList.postValue(listOf(KeyValue("全部", "")) + list) - } - // 特码:flag=1 国际;ieFlag 必须留空 - DictUtils.getSpecialCodeList(addAll = false, flag = 1, ieFlag = "") { list -> - specialCodeList.postValue(listOf(KeyValue("全部", "")) + list) - } - // 运单类型(type=II 国际进港) - DictUtils.getWaybillTypeList(type = Constant.businessType.II, addAll = true) { - awbTypeList.postValue(it) - } } /** @@ -129,12 +99,8 @@ class IntImpStorageUseViewModel : BasePageViewModel() { fun resetFilter() { flightDate.value = "" flightNo.value = "" - fdep.value = "" - agentId.value = "" - spCode.value = "" - awbType.value = "" - businessType.value = "" - goodsCn.value = "" + location.value = "" + clearResult.value = "" } /** 确认筛选 - 关闭面板并刷新 */ @@ -354,20 +320,13 @@ class IntImpStorageUseViewModel : BasePageViewModel() { } override fun getData() { - // 手机专属 6 项平板恒为空,不进请求;agentCode/spCode/awbType/businessType/goodsCn - // 为 pageQuery 未定义入参(后端静默忽略,补齐后自动生效,见接口问题清单 #25) + // 查询条件与平板端一致 val filterParams = mapOf( "fdate" to flightDate.value?.ifEmpty { null }, "fno" to flightNo.value?.ifEmpty { null }, "wbNo" to wbNo.value?.ifEmpty { null }, "location" to location.value?.ifEmpty { null }, - "clearNormal" to clearResult.value?.ifEmpty { null }, - "fdep" to fdep.value?.ifEmpty { null }, - "agentCode" to agentId.value?.ifEmpty { null }, - "spCode" to spCode.value?.ifEmpty { null }, - "awbType" to awbType.value?.ifEmpty { null }, - "businessType" to businessType.value?.ifEmpty { null }, - "goodsCn" to goodsCn.value?.ifEmpty { null } + "clearNormal" to clearResult.value?.ifEmpty { null } ) val listParams = (filterParams + mapOf( @@ -391,18 +350,9 @@ class IntImpStorageUseViewModel : BasePageViewModel() { totalWbNumber.value = (data?.wbNumber ?: 0).toString() totalPc.value = (data?.totalPc ?: 0).toString() totalWeight.value = (data?.totalWeight ?: 0.0).toString() - } - } - - // 手机专属:未清仓/已清仓分项统计(同条件 + clearNormal=0/1 各查一次,平板不发) - if (phoneExtrasEnabled) { - val unclearedParams = (filterParams + mapOf("clearNormal" to "0")).toRequestBody() - launchCollect({ NetApply.api.getIntImpStorageUseTotal(unclearedParams) }) { - onSuccess = { unclearedCount.value = (it.data?.wbNumber ?: 0).toString() } - } - val clearedParams = (filterParams + mapOf("clearNormal" to "1")).toRequestBody() - launchCollect({ NetApply.api.getIntImpStorageUseTotal(clearedParams) }) { - onSuccess = { clearedCount.value = (it.data?.wbNumber ?: 0).toString() } + // 手机三格统计分项(平板布局不绑定,无影响) + unclearedCount.value = (data?.notClearNumber ?: 0).toString() + clearedCount.value = (data?.clearNumber ?: 0).toString() } } } diff --git a/module_gjj/src/main/res/layout/activity_int_imp_storage_use.xml b/module_gjj/src/main/res/layout/activity_int_imp_storage_use.xml index b9df685..12432a5 100644 --- a/module_gjj/src/main/res/layout/activity_int_imp_storage_use.xml +++ b/module_gjj/src/main/res/layout/activity_int_imp_storage_use.xml @@ -11,7 +11,7 @@ · 平板独有的 checkIcon(底部全选)手机版不提供,Binding 基类中自动变 @Nullable 交互差异(均复用既有 IntExpStorageUseViewModel 字段与接口): - · 平板 5 个横排搜索条 → 手机顶部搜索框(运单号)+ 底部筛选弹层 8 项 + · 平板 5 个横排搜索条 → 手机顶部搜索框(运单号)+ 底部筛选弹层 4 项(航班日期/航班号/库位/清仓结果,与平板查询参数一致) (设计稿弹层无「库位号/清仓结果」两项,对应平板字段保持空值不参与请求) · 三格统计(总票数/未清仓/已清仓),后两格为手机专属统计请求(initPhoneExtras 开启, 复用 pageQueryTotal 按 clearNormal=0/1 各查一次) @@ -235,7 +235,7 @@ - + - + - - - - - - + value="@={viewModel.location}" /> - + - - - - - - + value="@={viewModel.clearResult}" /> diff --git a/module_gjj/src/main/res/layout/fragment_int_imp_query_waybill.xml b/module_gjj/src/main/res/layout/fragment_int_imp_query_waybill.xml index 0bd2ca5..626e03a 100644 --- a/module_gjj/src/main/res/layout/fragment_int_imp_query_waybill.xml +++ b/module_gjj/src/main/res/layout/fragment_int_imp_query_waybill.xml @@ -12,8 +12,8 @@ 数据全部来自既有 viewModel.maWbData(IntImpSearch/detail 的 maWb Map), 取值统一走 viewModel.str()/dec() 帮助方法(空值兜底 "-")。 字段 key 以平板变体既有绑定为准(awbPc/awbWeight/cashWeight/inPc/inWeight/lockStateText/ - mftStatus/tallyStatus/command);始发站/中转站/目的站/UN编号/入库时间为设计稿新增展示, - key(dep/dest1/dest/unNumber/opDate)按出港同名字段推断,实机核对后如缺失记入问题清单。 + mftStatus/tallyStatus/command);后端确认按平板端展示(问题清单 #27): + 航程 range(无经停站,替代始发站/中转站/目的站)、UN编号 unNumber、出库时间 dlvTime。 --> @@ -121,7 +121,7 @@ - + - - - - - - - - - + title='@{"航程"}' + value='@{viewModel.str(viewModel.maWbData, "range")}' /> - + + title='@{"出库时间"}' + value='@{viewModel.str(viewModel.maWbData, "dlvTime")}' />