fix: 修复图片上传字段、航班查询接口及图片鉴权加载问题

- 国际进港舱单列表页航班查询接口改为 /flt/searchFlightList,支持多航班校验
- 修复国内进港移库编辑/交接页图片上传缺少 pic、picNumber 字段
- 国际进港舱单详情页对接交接图片展示
- 图片缩略图和大图预览加载带 Authorization header 解决 403
- CLAUDE.md 新增图片上传与展示规范

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-02 16:25:24 +08:00
parent 52171c94df
commit cf8a7f38fb
15 changed files with 246 additions and 72 deletions

View File

@@ -56,7 +56,10 @@ data class GjjManifest(
var subCode: String = "", // 子代码
var unNumber: String = "", // 危险品编号
var activeId: Long = 0, // 活动ID
var locationTally: String = "" // 理货库位号
var locationTally: String = "", // 理货库位号
var pic: String = "", // 交接图片缩略图路径
var originalPic: String = "", // 交接图片原图地址
var picNumber: String = "" // 交接图片数量
) : Serializable {
// 分单列表
var haWbList: List<GjjHaWb>? = null

View File

@@ -1367,6 +1367,12 @@ interface Api {
@POST("flt/queryFlight")
suspend fun queryFlightByDateAndNo(@Body data: RequestBody): BaseResultBean<FlightBean>
/**
* 根据航班日期、航班号、地区类型、进出港查询航班(返回列表)
*/
@POST("flt/searchFlightList")
suspend fun searchFlightList(@Body data: RequestBody): BaseResultBean<List<FlightBean>>
/**
* 获取航班目的站、经停站
*/

View File

@@ -1,9 +1,14 @@
package com.lukouguoji.module_base.ui.page.preview
import android.view.View
import com.bumptech.glide.Glide
import com.bumptech.glide.load.model.GlideUrl
import com.bumptech.glide.load.model.LazyHeaders
import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.FileBean
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.databinding.ItemPreviewImageBinding
import com.lukouguoji.module_base.db.perference.SharedPreferenceUtil
/**
* @author孟凡华
@@ -14,8 +19,26 @@ class PreviewImageViewHolder(view: View) :
BaseViewHolder<FileBean, ItemPreviewImageBinding>(view) {
override fun onBind(item: Any?, position: Int) {
binding.bean = getItemBean(item)
val bean = getItemBean(item) ?: return
binding.bean = bean
// 加载图片
val path = bean.path
if (path.isNotEmpty()) {
if (path.startsWith("http")) {
// 网络图片带 Authorization header
val glideUrl = GlideUrl(
path,
LazyHeaders.Builder()
.addHeader("Authorization", SharedPreferenceUtil.getString(Constant.Share.token))
.build()
)
Glide.with(itemView.context).load(glideUrl).into(binding.photoView)
} else {
// 本地图片直接加载
Glide.with(itemView.context).load(path).into(binding.photoView)
}
}
}
}

View File

@@ -13,7 +13,7 @@
android:layout_height="match_parent">
<com.luck.picture.lib.photoview.PhotoView
loadImage="@{bean.path}"
android:id="@+id/photo_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />