feat: 出港计重 优化时间显示
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
package com.lukouguoji.module_base.bean
|
package com.lukouguoji.module_base.bean
|
||||||
|
|
||||||
|
import com.lukouguoji.module_base.ktx.noNull
|
||||||
|
import dev.utils.DevFinal
|
||||||
|
import dev.utils.common.DateUtils
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 国际出港待计重-列表数据Bean
|
* 国际出港待计重-列表数据Bean
|
||||||
* 对应API: IntExpCheckIn/pageQuery
|
* 对应API: IntExpCheckIn/pageQuery
|
||||||
@@ -91,4 +95,32 @@ class GjcWeighingBean {
|
|||||||
var haWbList: List<Any>? = null // 分单列表
|
var haWbList: List<Any>? = null // 分单列表
|
||||||
var storageUseList: List<Any>? = null // 库位使用列表
|
var storageUseList: List<Any>? = null // 库位使用列表
|
||||||
var attachList: List<Any>? = null // 附件列表
|
var attachList: List<Any>? = null // 附件列表
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计起飞时间 - 仅时分格式 (HH:mm)
|
||||||
|
*/
|
||||||
|
val scheduledTackOffHM: String
|
||||||
|
get() {
|
||||||
|
return DateUtils.parseString(
|
||||||
|
scheduledTackOff,
|
||||||
|
DevFinal.TIME.yyyyMMddHHmmss_HYPHEN,
|
||||||
|
"HH:mm"
|
||||||
|
).noNull(scheduledTackOff)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证预计起飞时间是否为次日
|
||||||
|
*/
|
||||||
|
fun verifyScheduledTackOffNextDay(): Boolean {
|
||||||
|
if (fdate.isEmpty() || scheduledTackOff.isEmpty()) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return try {
|
||||||
|
val calendarFDate = DateUtils.getCalendar(fdate, DevFinal.TIME.yyyyMMdd_HYPHEN)
|
||||||
|
val calendarTakeOff = DateUtils.getCalendar(scheduledTackOff, DevFinal.TIME.yyyyMMddHHmmss_HYPHEN)
|
||||||
|
DateUtils.getDay(calendarTakeOff) > DateUtils.getDay(calendarFDate)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
|
<import type="android.view.View" />
|
||||||
|
|
||||||
<variable
|
<variable
|
||||||
name="bean"
|
name="bean"
|
||||||
type="com.lukouguoji.module_base.bean.GjcWeighingBean" />
|
type="com.lukouguoji.module_base.bean.GjcWeighingBean" />
|
||||||
@@ -30,8 +32,8 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<!-- 第一行数据 -->
|
<!-- 第一行数据 -->
|
||||||
@@ -47,9 +49,9 @@
|
|||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
completeSpace="@{4}"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{4}"
|
|
||||||
android:text="运单号:" />
|
android:text="运单号:" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -69,9 +71,9 @@
|
|||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
completeSpace="@{4}"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{4}"
|
|
||||||
android:text="代理人:" />
|
android:text="代理人:" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -90,9 +92,9 @@
|
|||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
completeSpace="@{3}"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{3}"
|
|
||||||
android:text="特码:" />
|
android:text="特码:" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -111,9 +113,9 @@
|
|||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
completeSpace="@{5}"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{5}"
|
|
||||||
android:text="预配件数:" />
|
android:text="预配件数:" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -132,9 +134,9 @@
|
|||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
completeSpace="@{5}"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{5}"
|
|
||||||
android:text="预配重量:" />
|
android:text="预配重量:" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -161,9 +163,9 @@
|
|||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
completeSpace="@{5}"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{5}"
|
|
||||||
android:text="计划航班:" />
|
android:text="计划航班:" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -182,9 +184,9 @@
|
|||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
completeSpace="@{3}"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{3}"
|
|
||||||
android:text="航程:" />
|
android:text="航程:" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -203,17 +205,26 @@
|
|||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
completeSpace="@{5}"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{5}"
|
|
||||||
android:text="预计起飞:" />
|
android:text="预计起飞:" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{bean.scheduledTackOff}"
|
android:text="@{bean.scheduledTackOffHM}"
|
||||||
tools:text="09:12" />
|
tools:text="09:12" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvDayPlus"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:text="+1"
|
||||||
|
android:textColor="@color/text_red"
|
||||||
|
android:visibility="@{bean.verifyScheduledTackOffNextDay() ? View.VISIBLE : View.GONE}" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
<!-- 业务类型 -->
|
<!-- 业务类型 -->
|
||||||
@@ -224,9 +235,9 @@
|
|||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
completeSpace="@{5}"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{5}"
|
|
||||||
android:text="业务类型:" />
|
android:text="业务类型:" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -245,14 +256,17 @@
|
|||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
completeSpace="@{5}"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{5}"
|
|
||||||
android:text="品名(中):" />
|
android:text="品名(中):" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:lines="1"
|
||||||
|
android:maxLines="1"
|
||||||
android:text='@{bean.goodsCn}'
|
android:text='@{bean.goodsCn}'
|
||||||
tools:text="电子元器件" />
|
tools:text="电子元器件" />
|
||||||
|
|
||||||
@@ -267,8 +281,8 @@
|
|||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:src="@drawable/img_pda_right"
|
android:layout_marginLeft="10dp"
|
||||||
android:layout_marginLeft="10dp" />
|
android:src="@drawable/img_pda_right" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
Reference in New Issue
Block a user