fix(gjj): 国际事故签证「发现时间」改为下拉选择,数据源 POST typeCode/searchDateType
- Api 新增 getSearchDateTypeList(POST 无参,返回 code 1~8 + 中英文 name), 与同路径的 GET 通用字典 getDictList 区分 - 编辑页 DATE → SPINNER,与 Web 端一致提交字典 name - 历史数据(日期值、带尾随换行的 name)不在字典内时补进下拉列表, 避免编辑/详情回显为空、保存时被清掉 - phone-adapt api-doc 记录该接口 GET/POST 语义 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -65,6 +65,9 @@ curl -s -X POST "$URL" -H "$AUTH" -H "Content-Type: application/json" \
|
|||||||
- `IntExpMove`:出参无航班字段(缺口 #1)、无操作人姓名(缺口 #2);`opId`/`opdate`/`businessType`
|
- `IntExpMove`:出参无航班字段(缺口 #1)、无操作人姓名(缺口 #2);`opId`/`opdate`/`businessType`
|
||||||
文档有定义但实测恒 null(缺口 #3);`pageQueryTotal` 正常(与 pageQuery 口径一致,`moveState` 过滤生效)
|
文档有定义但实测恒 null(缺口 #3);`pageQueryTotal` 正常(与 pageQuery 口径一致,`moveState` 过滤生效)
|
||||||
- `typeCode/getSpecialCodeByParam`:`flag=1` 国际,`ieFlag` 必须传空串(传 `"E"` 返回空数组)
|
- `typeCode/getSpecialCodeByParam`:`flag=1` 国际,`ieFlag` 必须传空串(传 `"E"` 返回空数组)
|
||||||
|
- `typeCode/searchDateType`:**同一路径两个接口**——`GET ?code=xxx` 是通用字典(`Api.getDictList`),
|
||||||
|
`POST` 无参是「发现时间类型」(`Api.getSearchDateTypeList`,出参 `code` 1~8 + `name` 中英文时机);
|
||||||
|
国际事故签证 `seachDate` 与 Web 端一致存 **name**(历史数据另有 `2026-09-24` 日期值与带 `\r\n` 的 name)
|
||||||
- `eqm/uld`(ULD信息,6 个端点):查询入参仅 `uld`/`status`/`uldSuffix`(uldSuffix 名义是
|
- `eqm/uld`(ULD信息,6 个端点):查询入参仅 `uld`/`status`/`uldSuffix`(uldSuffix 名义是
|
||||||
"uld后两位",实际就是**按所属航司筛选**,配 `DictUtils.getIntCarrierList`);`status` 仅两态
|
"uld后两位",实际就是**按所属航司筛选**,配 `DictUtils.getIntCarrierList`);`status` 仅两态
|
||||||
0 正常/1 故障(三态需求=缺口 #7);无「来源」字段(#8)、无 `checkInDate`/`ifNo` 筛选入参(#9)、
|
0 正常/1 故障(三态需求=缺口 #7);无「来源」字段(#8)、无 `checkInDate`/`ifNo` 筛选入参(#9)、
|
||||||
|
|||||||
@@ -2168,6 +2168,12 @@ interface Api {
|
|||||||
@POST("typeCode/unusualType")
|
@POST("typeCode/unusualType")
|
||||||
suspend fun getUnusualTypeList(): DictListBean
|
suspend fun getUnusualTypeList(): DictListBean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典-发现时间类型(接收时 / 分拣理货时 / 提货时 …)
|
||||||
|
*/
|
||||||
|
@POST("typeCode/searchDateType")
|
||||||
|
suspend fun getSearchDateTypeList(): DictListBean
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// ULD管理
|
// ULD管理
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -60,6 +60,8 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
|
|||||||
val damageTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
val damageTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||||
val contentTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
val contentTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||||
val unusualTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
val unusualTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||||
|
val searchDateTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||||
|
private var searchDateTypeDict = emptyList<KeyValue>()
|
||||||
val photoList = MutableLiveData(
|
val photoList = MutableLiveData(
|
||||||
listOf(KeyValue("是", "是"), KeyValue("否", "否"))
|
listOf(KeyValue("是", "是"), KeyValue("否", "否"))
|
||||||
)
|
)
|
||||||
@@ -137,12 +139,33 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
|
|||||||
} ?: emptyList()
|
} ?: emptyList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 发现时间:与 Web 端一致提交字典 name(如"接收时 Cargo Acceptation")
|
||||||
|
launchCollect({ NetApply.api.getSearchDateTypeList() }) {
|
||||||
|
onSuccess = { result ->
|
||||||
|
searchDateTypeDict = result.data?.mapNotNull { bean ->
|
||||||
|
bean.name?.let { name -> KeyValue(name, name) }
|
||||||
|
} ?: emptyList()
|
||||||
|
refreshSearchDateTypeList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 历史数据的发现时间不一定在字典内(早期按日期录入如"2026-09-24",Web 端存值可能带尾随换行),
|
||||||
|
* 编辑/详情时把原值补进下拉列表,避免回显为空、保存时被下拉清掉
|
||||||
|
*/
|
||||||
|
private fun refreshSearchDateTypeList() {
|
||||||
|
val current = dataBean.value?.seachDate.orEmpty()
|
||||||
|
searchDateTypeList.value =
|
||||||
|
if (current.isEmpty() || searchDateTypeDict.any { it.value == current }) searchDateTypeDict
|
||||||
|
else searchDateTypeDict + KeyValue(current.trim(), current)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun loadDetail() {
|
private fun loadDetail() {
|
||||||
launchLoadingCollect({ NetApply.api.getGjAccidentVisaDetail(id) }) {
|
launchLoadingCollect({ NetApply.api.getGjAccidentVisaDetail(id) }) {
|
||||||
onSuccess = {
|
onSuccess = {
|
||||||
dataBean.value = it.data ?: GjAccidentVisaEditBean()
|
dataBean.value = it.data ?: GjAccidentVisaEditBean()
|
||||||
|
refreshSearchDateTypeList()
|
||||||
|
|
||||||
// 渲染图片:path 取原图 URL 确保预览清晰,url 取缩略图用于提交
|
// 渲染图片:path 取原图 URL 确保预览清晰,url 取缩略图用于提交
|
||||||
val bean = dataBean.value!!
|
val bean = dataBean.value!!
|
||||||
|
|||||||
@@ -285,9 +285,10 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
enable="@{!viewModel.isDetailMode}"
|
enable="@{!viewModel.isDetailMode}"
|
||||||
hint='@{"请选择发现时间"}'
|
hint='@{"请选择发现时间"}'
|
||||||
|
list="@{viewModel.searchDateTypeList}"
|
||||||
title='@{"发现时间"}'
|
title='@{"发现时间"}'
|
||||||
titleLength="@{6}"
|
titleLength="@{6}"
|
||||||
type="@{DataLayoutType.DATE}"
|
type="@{DataLayoutType.SPINNER}"
|
||||||
value='@={viewModel.dataBean.seachDate}' />
|
value='@={viewModel.dataBean.seachDate}' />
|
||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
|
|||||||
Reference in New Issue
Block a user