feat: 国际进港 报文解析
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
/**
|
||||
* 电报分页查询请求参数
|
||||
*/
|
||||
class MsgPoolPage(
|
||||
var pageNum: Int = 1, // 页号
|
||||
var pageSize: Int = 10, // 每页显示条数
|
||||
var fdate: String = "", // 航班日期
|
||||
var fno: String = "", // 航班号
|
||||
var fid: Long? = null, // 航班id
|
||||
var msgType: String = "", // 报文类型
|
||||
var sendAddress: String = "", // 发送地址(发站)
|
||||
var flow: String = "", // 流向:接收0、发送1
|
||||
var teleContent: String = "", // 报文内容
|
||||
var startTime: String = "", // 时间起
|
||||
var endTime: String = "", // 时间止
|
||||
var startIndex: Int? = null,
|
||||
var endIndex: Int? = null
|
||||
)
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
import androidx.databinding.BaseObservable
|
||||
import androidx.databinding.ObservableBoolean
|
||||
import com.lukouguoji.module_base.interfaces.ICheck
|
||||
|
||||
/**
|
||||
* 国际进港电报接收池Bean
|
||||
*/
|
||||
class MsgReceivePool(
|
||||
var id: Long? = null,
|
||||
var msgType: String = "", // 报文类型
|
||||
var receiveTime: String = "", // 接收时间
|
||||
var teleContent: String = "", // 报文内容
|
||||
var anaStatus: String = "", // 生成(解析)状态:0-未生成;1-已生成
|
||||
var wbNo: String = "", // 主单号
|
||||
var hno: String = "", // 分单号
|
||||
var sendAddress: String = "", // 发报地址
|
||||
var receiveAddress: String = "", // 接收地址
|
||||
var status: String = "", // 报文状态
|
||||
var errorMsg: String = "", // 报文识别异常原因
|
||||
var key: String = "", // 关键字
|
||||
var interfaceType: String = "" // 接口类型
|
||||
) : BaseObservable(), ICheck {
|
||||
|
||||
// 选中状态
|
||||
val checked = ObservableBoolean(false)
|
||||
|
||||
override fun getCheckObservable() = checked
|
||||
|
||||
// 兼容现有API的isSelected属性
|
||||
var isSelected: Boolean
|
||||
get() = checked.get()
|
||||
set(value) = checked.set(value)
|
||||
|
||||
/**
|
||||
* 判断是否已生成
|
||||
*/
|
||||
fun isGenerated() = anaStatus == "1"
|
||||
|
||||
/**
|
||||
* 获取状态标签文本
|
||||
*/
|
||||
fun getStatusLabel() = if (isGenerated()) "已生成" else "未生成"
|
||||
|
||||
/**
|
||||
* 获取状态标签颜色
|
||||
*/
|
||||
fun getStatusColor() = if (isGenerated()) "#00C853" else "#FF5252"
|
||||
}
|
||||
@@ -261,7 +261,8 @@ interface Constant {
|
||||
const val GjjChuKuListActivity = "AppIntImpPickUpDLV" //出库
|
||||
const val GjjQueryListActivity = "AppIntImpSearch" //查询
|
||||
|
||||
const val GjjPacketParseActivity = "AppIntExpPacketParse" //报文解析
|
||||
const val GjjPacketParseActivity = "AppIntExpPacketParse" //报文解析(旧)
|
||||
const val IntImpMsgParseActivity = "AppIntImpMsgParse" //电报解析(电报生成)
|
||||
const val GjjManifestListActivity = "AppIntExpManifest" //舱单
|
||||
const val GjjTallyListActivity = "AppIntExpTally" //理货
|
||||
const val GjjGoodsListActivity = "AppIntExpGjjGoods" //货物交接
|
||||
|
||||
@@ -74,6 +74,8 @@ import com.lukouguoji.module_base.bean.LogBean
|
||||
import com.lukouguoji.module_base.bean.ManifestTotalDto
|
||||
import com.lukouguoji.module_base.bean.MessageBean
|
||||
import com.lukouguoji.module_base.bean.MoveStashBean
|
||||
import com.lukouguoji.module_base.bean.MsgPoolPage
|
||||
import com.lukouguoji.module_base.bean.MsgReceivePool
|
||||
import com.lukouguoji.module_base.bean.PackageBean
|
||||
import com.lukouguoji.module_base.bean.PacketParseBean
|
||||
import com.lukouguoji.module_base.bean.PageInfo
|
||||
@@ -1516,4 +1518,20 @@ interface Api {
|
||||
|
||||
@GET("file/verifyVersion")
|
||||
suspend fun getAppUpdate(@Query("versionCode") versionCode: Int): AppUpdateResponse<AppUpdateResponseInfo>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// 国际进港-电报解析
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* 分页查询国际进港电报
|
||||
*/
|
||||
@POST("IntImpMsg/pageQuery")
|
||||
suspend fun getIntImpMsgList(@Body data: RequestBody): BaseResultBean<PageInfo<MsgReceivePool>>
|
||||
|
||||
/**
|
||||
* 批量生成电报
|
||||
*/
|
||||
@POST("IntImpMsg/batchGenerate")
|
||||
suspend fun batchGenerateMsg(@Body data: RequestBody): BaseResultBean<SimpleResultBean>
|
||||
}
|
||||
@@ -166,6 +166,7 @@ object ARouterConstants {
|
||||
const val ACTIVITY_URL_GJJ_MANIFEST = "/gjj/GjjManifestListActivity" //国际进港 舱单列表
|
||||
const val ACTIVITY_URL_GJJ_Tally = "/gjj/GjjTallyListActivity" //国际进港 理货
|
||||
const val ACTIVITY_URL_GJJ_GOODS = "/gjj/GjjGoodsListActivity" //国际进港 货物交接
|
||||
const val ACTIVITY_URL_INT_IMP_MSG_PARSE = "/gjj/IntImpMsgParseActivity" //国际进港 电报解析(电报生成)
|
||||
|
||||
///////////////// 航班查询模块
|
||||
/**
|
||||
|
||||
5
module_base/src/main/res/drawable/bg_status_error.xml
Normal file
5
module_base/src/main/res/drawable/bg_status_error.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#FF5252" />
|
||||
<corners android:radius="4dp" />
|
||||
</shape>
|
||||
5
module_base/src/main/res/drawable/bg_status_success.xml
Normal file
5
module_base/src/main/res/drawable/bg_status_success.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#00C853" />
|
||||
<corners android:radius="4dp" />
|
||||
</shape>
|
||||
Reference in New Issue
Block a user