修改收费站详情
This commit is contained in:
@@ -37,6 +37,7 @@ class LaneBoundaryAdapter : RecyclerView.Adapter<ViewHolder>() {
|
|||||||
fun bind(pos: Int, laneBoundaryItem: LaneBoundaryItem) {
|
fun bind(pos: Int, laneBoundaryItem: LaneBoundaryItem) {
|
||||||
viewBinding.contactName.text = laneBoundaryItem.title
|
viewBinding.contactName.text = laneBoundaryItem.title
|
||||||
if (laneBoundaryItem.itemList != null) {
|
if (laneBoundaryItem.itemList != null) {
|
||||||
|
viewBinding.infos.removeAllViews()
|
||||||
for (item in laneBoundaryItem.itemList) {
|
for (item in laneBoundaryItem.itemList) {
|
||||||
var view = LayoutInflater.from(viewBinding.root.context)
|
var view = LayoutInflater.from(viewBinding.root.context)
|
||||||
.inflate(R.layout.adapter_two_item, null, false)
|
.inflate(R.layout.adapter_two_item, null, false)
|
||||||
|
|||||||
@@ -563,15 +563,57 @@ class SignUtil {
|
|||||||
try {
|
try {
|
||||||
val linkList = renderEntity.properties["tollinfoList"]
|
val linkList = renderEntity.properties["tollinfoList"]
|
||||||
if (linkList != null && linkList != "" && linkList != "null") {
|
if (linkList != null && linkList != "" && linkList != "null") {
|
||||||
val itemList = mutableListOf<TwoItemAdapterItem>()
|
|
||||||
val jsonArray = JSONArray(linkList)
|
val jsonArray = JSONArray(linkList)
|
||||||
for (i in 0 until jsonArray.length()) {
|
for (i in 0 until jsonArray.length()) {
|
||||||
val arrayObject: JSONObject = jsonArray[i] as JSONObject
|
val arrayObject: JSONObject = jsonArray[i] as JSONObject
|
||||||
|
val itemList = mutableListOf<TwoItemAdapterItem>()
|
||||||
// itemList.add(TwoItemAdapterItem("方向", direct))
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
itemList.add(
|
||||||
|
TwoItemAdapterItem("通道号码", "${arrayObject.optString("pid")}")
|
||||||
|
)
|
||||||
val stringBuffer = StringBuffer()
|
val stringBuffer = StringBuffer()
|
||||||
|
|
||||||
|
stringBuffer.setLength(0)
|
||||||
|
val passageType = arrayObject.getInt("passageType")
|
||||||
|
for (i in 1 downTo 0) {
|
||||||
|
val bit = (passageType shr i) and 1
|
||||||
|
if (bit == 1) {
|
||||||
|
when (i) {
|
||||||
|
0 -> stringBuffer.append("称重车道 ")
|
||||||
|
1 -> stringBuffer.append("绿色通道 ")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
itemList.add(
|
||||||
|
TwoItemAdapterItem("通道类型", stringBuffer.toString())
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
stringBuffer.setLength(0)
|
||||||
|
val payMethod = arrayObject.getInt("payMethod")
|
||||||
|
for (i in 8 downTo 0) {
|
||||||
|
val bit = (payMethod shr i) and 1
|
||||||
|
if (bit == 1) {
|
||||||
|
when (i) {
|
||||||
|
0 -> stringBuffer.append("ETC ")
|
||||||
|
1 -> stringBuffer.append("现金 ")
|
||||||
|
2 -> stringBuffer.append("银行卡(借记卡) ")
|
||||||
|
3 -> stringBuffer.append("信用卡 ")
|
||||||
|
4 -> stringBuffer.append("IC卡 ")
|
||||||
|
5 -> stringBuffer.append("预付卡 ")
|
||||||
|
6 -> stringBuffer.append("微信 ")
|
||||||
|
7 -> stringBuffer.append("支付宝 ")
|
||||||
|
8 -> stringBuffer.append("其他APP ")
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
itemList.add(
|
||||||
|
TwoItemAdapterItem("收费方式", stringBuffer.toString())
|
||||||
|
)
|
||||||
|
|
||||||
|
stringBuffer.setLength(0)
|
||||||
val cardType = arrayObject.getInt("cardType")
|
val cardType = arrayObject.getInt("cardType")
|
||||||
for (i in 2 downTo 0) {
|
for (i in 2 downTo 0) {
|
||||||
val bit = (cardType shr i) and 1
|
val bit = (cardType shr i) and 1
|
||||||
@@ -586,34 +628,18 @@ class SignUtil {
|
|||||||
itemList.add(
|
itemList.add(
|
||||||
TwoItemAdapterItem("领卡方式", stringBuffer.toString())
|
TwoItemAdapterItem("领卡方式", stringBuffer.toString())
|
||||||
)
|
)
|
||||||
} catch (e: Exception) {
|
|
||||||
Log.e("jingo", "领卡方式 报错 ${e.message}")
|
val seqNum = arrayObject.getInt("seqNum")
|
||||||
}
|
list.add(
|
||||||
try {
|
LaneBoundaryItem(
|
||||||
val stringBuffer = StringBuffer()
|
"车道$seqNum", null, itemList
|
||||||
val passageType = arrayObject.getInt("passageType")
|
)
|
||||||
for (i in 2 downTo 0) {
|
|
||||||
val bit = (passageType shr i) and 1
|
|
||||||
if (bit == 1) {
|
|
||||||
when (i) {
|
|
||||||
0 -> stringBuffer.append("ETC ")
|
|
||||||
1 -> stringBuffer.append("人工 ")
|
|
||||||
2 -> stringBuffer.append("自助 ")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
itemList.add(
|
|
||||||
TwoItemAdapterItem("领卡方式", stringBuffer.toString())
|
|
||||||
)
|
)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.e("jingo", "领卡方式 报错 ${e.message}")
|
Log.e("jingo", "领卡方式 报错 ${e.message}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
list.add(
|
|
||||||
LaneBoundaryItem(
|
|
||||||
"车道信息", null, itemList
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
@@ -642,9 +668,9 @@ class SignUtil {
|
|||||||
try {
|
try {
|
||||||
val linkList = renderEntity.properties["linkList"]
|
val linkList = renderEntity.properties["linkList"]
|
||||||
if (linkList != null && linkList != "" && linkList != "null") {
|
if (linkList != null && linkList != "" && linkList != "null") {
|
||||||
val itemList = mutableListOf<TwoItemAdapterItem>()
|
|
||||||
val jsonArray = JSONArray(linkList)
|
val jsonArray = JSONArray(linkList)
|
||||||
for (i in 0 until jsonArray.length()) {
|
for (i in 0 until jsonArray.length()) {
|
||||||
|
val itemList = mutableListOf<TwoItemAdapterItem>()
|
||||||
val arrayObject: JSONObject = jsonArray[i] as JSONObject
|
val arrayObject: JSONObject = jsonArray[i] as JSONObject
|
||||||
val direct = when (arrayObject.getInt("direct")) {
|
val direct = when (arrayObject.getInt("direct")) {
|
||||||
2 -> "顺方向"
|
2 -> "顺方向"
|
||||||
@@ -652,6 +678,7 @@ class SignUtil {
|
|||||||
else -> ""
|
else -> ""
|
||||||
}
|
}
|
||||||
itemList.add(TwoItemAdapterItem("方向", direct))
|
itemList.add(TwoItemAdapterItem("方向", direct))
|
||||||
|
|
||||||
val featureType = when (arrayObject.getInt("featureType")) {
|
val featureType = when (arrayObject.getInt("featureType")) {
|
||||||
1 -> "LINK"
|
1 -> "LINK"
|
||||||
2 -> "LINK PA"
|
2 -> "LINK PA"
|
||||||
|
|||||||
2
vtm
2
vtm
Submodule vtm updated: 91fd1a339c...facb2419b7
Reference in New Issue
Block a user