fix: 合并代码

This commit is contained in:
2023-09-04 10:22:45 +08:00
146 changed files with 511 additions and 183 deletions

View File

@@ -599,6 +599,7 @@ class MainViewModel @Inject constructor(
DataCodeEnum.OMDB_TRAFFICLIGHT.code,//交通灯 DataCodeEnum.OMDB_TRAFFICLIGHT.code,//交通灯
DataCodeEnum.OMDB_LANEINFO.code,//车信 DataCodeEnum.OMDB_LANEINFO.code,//车信
DataCodeEnum.OMDB_WARNINGSIGN.code,//危险信息 DataCodeEnum.OMDB_WARNINGSIGN.code,//危险信息
DataCodeEnum.OMDB_TOLLGATE.code,//收费站
-> signList.add( -> signList.add(
signBean signBean
) )

View File

@@ -13,6 +13,7 @@ import com.navinfo.omqs.R
import com.navinfo.omqs.bean.SignBean import com.navinfo.omqs.bean.SignBean
import com.navinfo.omqs.databinding.AdapterSignBinding import com.navinfo.omqs.databinding.AdapterSignBinding
import com.navinfo.omqs.databinding.AdapterSignLaneinfoBinding import com.navinfo.omqs.databinding.AdapterSignLaneinfoBinding
import com.navinfo.omqs.databinding.AdapterSignTollgateBinding
import com.navinfo.omqs.ui.other.BaseRecyclerViewAdapter import com.navinfo.omqs.ui.other.BaseRecyclerViewAdapter
import com.navinfo.omqs.ui.other.BaseViewHolder import com.navinfo.omqs.ui.other.BaseViewHolder
import com.navinfo.omqs.util.SignUtil import com.navinfo.omqs.util.SignUtil
@@ -34,15 +35,18 @@ class SignAdapter(private var listener: OnSignAdapterClickListener?) :
private var selectMoreInfoTag: String = "" private var selectMoreInfoTag: String = ""
override fun getItemViewType(position: Int): Int { override fun getItemViewType(position: Int): Int {
if (data.isNotEmpty() && data[position].renderEntity.code == "4601") { if (data.isNotEmpty() && data[position].renderEntity.code == DataCodeEnum.OMDB_LANEINFO.code) {
return 4601 return 4601
} else if (data.isNotEmpty() && data[position].renderEntity.code == DataCodeEnum.OMDB_TOLLGATE.code) {
return 4023
} }
return 0 return 0
} }
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BaseViewHolder { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BaseViewHolder {
return if (viewType == 4601) { return when (viewType) {
4601 -> {
val viewBinding = val viewBinding =
AdapterSignLaneinfoBinding.inflate( AdapterSignLaneinfoBinding.inflate(
LayoutInflater.from(parent.context), LayoutInflater.from(parent.context),
@@ -50,17 +54,28 @@ class SignAdapter(private var listener: OnSignAdapterClickListener?) :
false false
) )
BaseViewHolder(viewBinding) BaseViewHolder(viewBinding)
} else { }
4023 -> {
val viewBinding = AdapterSignTollgateBinding.inflate(
LayoutInflater.from(parent.context),
parent,
false
)
BaseViewHolder(viewBinding)
}
else -> {
val viewBinding = val viewBinding =
AdapterSignBinding.inflate(LayoutInflater.from(parent.context), parent, false) AdapterSignBinding.inflate(LayoutInflater.from(parent.context), parent, false)
BaseViewHolder(viewBinding) BaseViewHolder(viewBinding)
} }
} }
}
override fun onBindViewHolder(holder: BaseViewHolder, position: Int) { override fun onBindViewHolder(holder: BaseViewHolder, position: Int) {
val context = holder.viewBinding.root.context val context = holder.viewBinding.root.context
val item = data[position] val item = data[position]
if (holder.viewBinding is AdapterSignBinding) { when (holder.viewBinding) {
is AdapterSignBinding -> {
val bd = holder.viewBinding val bd = holder.viewBinding
if (item.iconId != 0) { if (item.iconId != 0) {
@@ -74,7 +89,14 @@ class SignAdapter(private var listener: OnSignAdapterClickListener?) :
holder.viewBinding.root.context.assets.open("omdb/appendix/1105_${typeCode}_0.svg") holder.viewBinding.root.context.assets.open("omdb/appendix/1105_${typeCode}_0.svg")
if (input != null) { if (input != null) {
val bitmap = val bitmap =
AndroidSvgBitmap.getResourceBitmap(input, 1.0f, 60.0f, 60, 60, 100) AndroidSvgBitmap.getResourceBitmap(
input,
1.0f,
60.0f,
60,
60,
100
)
input.close() input.close()
val drawable = BitmapDrawable( val drawable = BitmapDrawable(
holder.viewBinding.root.context.resources, holder.viewBinding.root.context.resources,
@@ -90,7 +112,6 @@ class SignAdapter(private var listener: OnSignAdapterClickListener?) :
} }
} }
bd.signMainIcon.text = item.iconText bd.signMainIcon.text = item.iconText
bd.signBottomText.text = item.name bd.signBottomText.text = item.name
//点击错误按钮 //点击错误按钮
@@ -117,7 +138,8 @@ class SignAdapter(private var listener: OnSignAdapterClickListener?) :
bd.signMainBg.setOnClickListener { bd.signMainBg.setOnClickListener {
listener?.onItemClick(item) listener?.onItemClick(item)
} }
} else if (holder.viewBinding is AdapterSignLaneinfoBinding) { }
is AdapterSignLaneinfoBinding -> {
val bd = holder.viewBinding val bd = holder.viewBinding
bd.signMoreIconsLayout.removeAllViews() bd.signMoreIconsLayout.removeAllViews()
bd.signBottomText.text = item.name bd.signBottomText.text = item.name
@@ -149,7 +171,8 @@ class SignAdapter(private var listener: OnSignAdapterClickListener?) :
if (i < list.size - 1) { if (i < list.size - 1) {
val lineView = View(context) val lineView = View(context)
lineView.layoutParams = ViewGroup.LayoutParams(24, 80) lineView.layoutParams = ViewGroup.LayoutParams(24, 80)
lineView.background = context.getDrawable(R.drawable.shape_vertical_dashed_line) lineView.background =
context.getDrawable(R.drawable.shape_vertical_dashed_line)
bd.signMoreIconsLayout.addView(lineView, lineView.layoutParams) bd.signMoreIconsLayout.addView(lineView, lineView.layoutParams)
} }
} }
@@ -161,6 +184,33 @@ class SignAdapter(private var listener: OnSignAdapterClickListener?) :
listener?.onItemClick(item) listener?.onItemClick(item)
} }
} }
is AdapterSignTollgateBinding -> {
val bd = holder.viewBinding
if (item.iconId != 0) {
bd.signMainIconBg.setImageResource(item.iconId)
}
bd.signBottomText.text = item.name
//点击错误按钮
bd.signMainFastError.setOnClickListener {
listener?.onErrorClick(item)
}
bd.signBottomRightText.text = item.bottomRightText
if (item.isMoreInfo) {
bd.signMainInfo.visibility = View.VISIBLE
bd.signMainInfo.setOnClickListener {
listener?.onMoreInfoClick(selectMoreInfoTag, holder.tag, item)
selectMoreInfoTag = holder.tag
}
} else {
bd.signMainInfo.visibility = View.GONE
}
bd.signMainBg.setOnClickListener {
listener?.onItemClick(item)
}
}
}
holder.tag = item.name + position holder.tag = item.name + position
} }

View File

@@ -74,6 +74,12 @@ class SignMoreInfoFragment : BaseFragment() {
binding.signInfoRecyclerview.adapter = adapter binding.signInfoRecyclerview.adapter = adapter
adapter.refreshData(SignUtil.getIntersectionInfo(it)) adapter.refreshData(SignUtil.getIntersectionInfo(it))
} }
//收费站
DataCodeEnum.OMDB_TOLLGATE.code -> {
val adapter = LaneBoundaryAdapter()
binding.signInfoRecyclerview.adapter = adapter
adapter.refreshData(SignUtil.getTollgateInfo(it))
}
//电子眼 //电子眼
DataCodeEnum.OMDB_ELECTRONICEYE.code -> { DataCodeEnum.OMDB_ELECTRONICEYE.code -> {
val drawable = resources.getDrawable(R.drawable.icon_electronic_eye_left, null) val drawable = resources.getDrawable(R.drawable.icon_electronic_eye_left, null)

View File

@@ -126,27 +126,9 @@ class SignUtil {
//常规线限速 //常规线限速
DataCodeEnum.OMDB_LINK_SPEEDLIMIT.code -> "线限速" DataCodeEnum.OMDB_LINK_SPEEDLIMIT.code -> "线限速"
DataCodeEnum.OMDB_LINK_ATTRIBUTE_MAIN_SIDE_ACCESS.code, DataCodeEnum.OMDB_LINK_ATTRIBUTE_MAIN_SIDE_ACCESS.code, DataCodeEnum.OMDB_LINK_ATTRIBUTE_FORNTAGE.code, DataCodeEnum.OMDB_LINK_ATTRIBUTE_SA.code, DataCodeEnum.OMDB_LINK_ATTRIBUTE_PA.code -> "道路属性"
DataCodeEnum.OMDB_LINK_ATTRIBUTE_FORNTAGE.code,
DataCodeEnum.OMDB_LINK_ATTRIBUTE_SA.code,
DataCodeEnum.OMDB_LINK_ATTRIBUTE_PA.code -> "道路属性"
DataCodeEnum.OMDB_LINK_FORM1_1.code, DataCodeEnum.OMDB_LINK_FORM1_1.code, DataCodeEnum.OMDB_LINK_FORM1_2.code, DataCodeEnum.OMDB_LINK_FORM1_3.code, DataCodeEnum.OMDB_LINK_FORM2_1.code, DataCodeEnum.OMDB_LINK_FORM2_2.code, DataCodeEnum.OMDB_LINK_FORM2_3.code, DataCodeEnum.OMDB_LINK_FORM2_4.code, DataCodeEnum.OMDB_LINK_FORM2_5.code, DataCodeEnum.OMDB_LINK_FORM2_6.code, DataCodeEnum.OMDB_LINK_FORM2_7.code, DataCodeEnum.OMDB_LINK_FORM2_8.code, DataCodeEnum.OMDB_LINK_FORM2_9.code, DataCodeEnum.OMDB_LINK_FORM2_10.code, DataCodeEnum.OMDB_LINK_FORM2_11.code, DataCodeEnum.OMDB_LINK_FORM2_12.code, DataCodeEnum.OMDB_LINK_FORM2_13.code -> "道路形态"
DataCodeEnum.OMDB_LINK_FORM1_2.code,
DataCodeEnum.OMDB_LINK_FORM1_3.code,
DataCodeEnum.OMDB_LINK_FORM2_1.code,
DataCodeEnum.OMDB_LINK_FORM2_2.code,
DataCodeEnum.OMDB_LINK_FORM2_3.code,
DataCodeEnum.OMDB_LINK_FORM2_4.code,
DataCodeEnum.OMDB_LINK_FORM2_5.code,
DataCodeEnum.OMDB_LINK_FORM2_6.code,
DataCodeEnum.OMDB_LINK_FORM2_7.code,
DataCodeEnum.OMDB_LINK_FORM2_8.code,
DataCodeEnum.OMDB_LINK_FORM2_9.code,
DataCodeEnum.OMDB_LINK_FORM2_10.code,
DataCodeEnum.OMDB_LINK_FORM2_11.code,
DataCodeEnum.OMDB_LINK_FORM2_12.code,
DataCodeEnum.OMDB_LINK_FORM2_13.code -> "道路形态"
else -> DataCodeEnum.findTableNameByCode(data.code) else -> DataCodeEnum.findTableNameByCode(data.code)
} }
@@ -161,15 +143,20 @@ class SignUtil {
val list = mutableListOf<TwoItemAdapterItem>() val list = mutableListOf<TwoItemAdapterItem>()
when (data.code) { when (data.code) {
//可变线限速 //可变线限速
DataCodeEnum.OMDB_LINK_SPEEDLIMIT_VAR.code -> DataCodeEnum.OMDB_LINK_SPEEDLIMIT_VAR.code -> list.addAll(
list.addAll(getChangeLimitSpeedInfo(data)) getChangeLimitSpeedInfo(
data
)
)
//常规点限速 //常规点限速
DataCodeEnum.OMDB_SPEEDLIMIT.code -> DataCodeEnum.OMDB_SPEEDLIMIT.code -> list.addAll(getSpeedLimitMoreInfoText(data))
list.addAll(getSpeedLimitMoreInfoText(data))
//条件点限速 //条件点限速
DataCodeEnum.OMDB_SPEEDLIMIT_COND.code -> DataCodeEnum.OMDB_SPEEDLIMIT_COND.code -> list.addAll(
list.addAll(getConditionLimitMoreInfoText(data)) getConditionLimitMoreInfoText(
data
)
)
//到路线 //到路线
DataCodeEnum.OMDB_RD_LINK.code -> { DataCodeEnum.OMDB_RD_LINK.code -> {
list.add( list.add(
@@ -229,14 +216,12 @@ class SignUtil {
DataCodeEnum.OMDB_RESTRICTION.code -> { DataCodeEnum.OMDB_RESTRICTION.code -> {
list.add( list.add(
TwoItemAdapterItem( TwoItemAdapterItem(
title = "linkIn", title = "linkIn", text = "${data.properties["linkIn"]}"
text = "${data.properties["linkIn"]}"
) )
) )
list.add( list.add(
TwoItemAdapterItem( TwoItemAdapterItem(
title = "linkOut", title = "linkOut", text = "${data.properties["linkOut"]}"
text = "${data.properties["linkOut"]}"
) )
) )
} }
@@ -244,8 +229,7 @@ class SignUtil {
DataCodeEnum.OMDB_RD_LINK_FUNCTION_CLASS.code -> { DataCodeEnum.OMDB_RD_LINK_FUNCTION_CLASS.code -> {
list.add( list.add(
TwoItemAdapterItem( TwoItemAdapterItem(
title = "功能等级", title = "功能等级", text = "等级${data.properties["functionClass"]}"
text = "等级${data.properties["functionClass"]}"
) )
) )
} }
@@ -257,20 +241,17 @@ class SignUtil {
DataCodeEnum.OMDB_LANE_NUM.code -> { DataCodeEnum.OMDB_LANE_NUM.code -> {
list.add( list.add(
TwoItemAdapterItem( TwoItemAdapterItem(
title = "车道总数", title = "车道总数", text = "${data.properties["laneNum"]}"
text = "${data.properties["laneNum"]}"
) )
) )
list.add( list.add(
TwoItemAdapterItem( TwoItemAdapterItem(
title = "顺方向车道数", title = "顺方向车道数", text = "${data.properties["laneS2e"]}"
text = "${data.properties["laneS2e"]}"
) )
) )
list.add( list.add(
TwoItemAdapterItem( TwoItemAdapterItem(
title = "逆方向车道数", title = "逆方向车道数", text = "${data.properties["laneE2s"]}"
text = "${data.properties["laneE2s"]}"
) )
) )
var str = when (data.properties["laneClass"]) { var str = when (data.properties["laneClass"]) {
@@ -284,8 +265,7 @@ class SignUtil {
list.add( list.add(
TwoItemAdapterItem( TwoItemAdapterItem(
title = "车道数等级", title = "车道数等级", text = str
text = str
) )
) )
} }
@@ -298,8 +278,7 @@ class SignUtil {
} }
list.add( list.add(
TwoItemAdapterItem( TwoItemAdapterItem(
title = "路口类型", title = "路口类型", text = type
text = type
) )
) )
} }
@@ -318,8 +297,7 @@ class SignUtil {
} }
list.add( list.add(
TwoItemAdapterItem( TwoItemAdapterItem(
title = "限制类型", title = "限制类型", text = limitType
text = limitType
) )
) )
val validPeriod = data.properties["validPeriod"] val validPeriod = data.properties["validPeriod"]
@@ -352,8 +330,7 @@ class SignUtil {
if (endTime != null) { if (endTime != null) {
list.add( list.add(
TwoItemAdapterItem( TwoItemAdapterItem(
title = "施工结束时间", title = "施工结束时间", text = "${TimePeriodUtil.getTimePeriod(endTime)}"
text = "${TimePeriodUtil.getTimePeriod(endTime)}"
) )
) )
} }
@@ -370,14 +347,13 @@ class SignUtil {
title = "警示信息号码", text = "${data.properties["warningsignId"]}" title = "警示信息号码", text = "${data.properties["warningsignId"]}"
) )
) )
val direct = when (data.properties["direct"]) { list.add(
TwoItemAdapterItem(
title = "作用方向", text = when (data.properties["direct"]) {
"2" -> "顺方向" "2" -> "顺方向"
"3" -> "逆方向" "3" -> "逆方向"
else -> "" else -> ""
} }
list.add(
TwoItemAdapterItem(
title = "作用方向", text = direct
) )
) )
@@ -418,11 +394,234 @@ class SignUtil {
) )
) )
} }
DataCodeEnum.OMDB_OBJECT_STOPLOCATION.code -> {
list.add(
TwoItemAdapterItem(
title = "对象号码", text = "${data.properties["objectPid"]}"
)
)
list.add(
TwoItemAdapterItem(
title = "宽度", text = "${data.properties["width"]}mm"
)
)
list.add(
TwoItemAdapterItem(
title = "颜色", text = when (data.properties["color"]) {
"1" -> "白色"
"9" -> "其他"
else -> ""
}
)
)
list.add(
TwoItemAdapterItem(
title = "类型", text = when (data.properties["locationType"]) {
"1" -> "停止线"
"2" -> "停车让行线"
"3" -> "减速让行线"
"4" -> "虚拟停止线"
else -> ""
}
)
)
list.add(
TwoItemAdapterItem(
title = "符合高精", text = when (data.properties["compliant"]) {
"0" -> ""
"1" -> ""
else -> ""
}
)
)
}
//人行横道
DataCodeEnum.OMDB_CROSS_WALK.code -> {
list.add(
TwoItemAdapterItem(
title = "对象号码", text = "${data.properties["objectPid"]}"
)
)
list.add(
TwoItemAdapterItem(
title = "颜色", text = when (data.properties["color"]) {
"1" -> "白色"
"9" -> "其他"
else -> ""
}
)
)
list.add(
TwoItemAdapterItem(
title = "符合高精", text = when (data.properties["compliant"]) {
"0" -> ""
"1" -> ""
else -> ""
}
)
)
}
DataCodeEnum.OMDB_OBJECT_TEXT.code -> {
list.add(
TwoItemAdapterItem(
title = "对象号码", text = "${data.properties["objectPid"]}"
)
)
list.add(
TwoItemAdapterItem(
title = "长度", text = "${data.properties["length"]}mm"
)
)
list.add(
TwoItemAdapterItem(
title = "宽度", text = "${data.properties["width"]}mm"
)
)
list.add(
TwoItemAdapterItem(
title = "颜色", text = when (data.properties["color"]) {
"0" -> "未验证"
"1" -> "白色"
"2" -> "黄色"
"3" -> "红色"
"4" -> "彩色"
"9" -> "其他"
else -> ""
}
)
)
list.add(
TwoItemAdapterItem(
title = "文字内容", text = "${data.properties["textString"]}"
)
)
list.add(
TwoItemAdapterItem(
title = "符合高精", text = when (data.properties["compliant"]) {
"0" -> ""
"1" -> ""
else -> ""
}
)
)
}
} }
adapter.data = list adapter.data = list
return adapter return adapter
} }
/**
* 获取路口详细信息
*/
fun getTollgateInfo(renderEntity: RenderEntity): List<LaneBoundaryItem> {
val list = mutableListOf<LaneBoundaryItem>()
list.add(
LaneBoundaryItem("linkPid", "${renderEntity.properties["linkPid"]}", null)
)
list.add(
LaneBoundaryItem("收费站号码", "${renderEntity.properties["tollgatePid"]}", null)
)
list.add(
LaneBoundaryItem(
"作用方向", when (renderEntity.properties["direct"]) {
"2" -> "顺方向"
"3" -> "逆方向"
else -> ""
}, null
)
)
list.add(
LaneBoundaryItem(
"类型", when (renderEntity.properties["tollType"]) {
"0" -> "未调查"
"1" -> "领卡"
"2" -> "交卡付费"
"3" -> "固定收费(次费)"
"4" -> "交卡付费后再领卡"
"5" -> "交卡付费并代收固定费用"
"6" -> "验票(无票收费)值先保留"
"7" -> "领卡并代收固定费用"
"8" -> "持卡打标识不收费"
"9" -> "验票领卡"
"10" -> "交卡不收费"
"11" -> "无收费站建筑物结构但收费"
"12" -> "废弃或非收费通道"
else -> ""
}, null
)
)
list.add(
LaneBoundaryItem("地图代码", "${renderEntity.properties["backimageCode"]}", null)
)
list.add(
LaneBoundaryItem("箭头代码", "${renderEntity.properties["arrowCode"]}", null)
)
try {
val linkList = renderEntity.properties["tollinfoList"]
if (linkList != null && linkList != "" && linkList != "null") {
val itemList = mutableListOf<TwoItemAdapterItem>()
val jsonArray = JSONArray(linkList)
for (i in 0 until jsonArray.length()) {
val arrayObject: JSONObject = jsonArray[i] as JSONObject
// itemList.add(TwoItemAdapterItem("方向", direct))
try {
val stringBuffer = StringBuffer()
val cardType = arrayObject.getInt("cardType")
for (i in 2 downTo 0) {
val bit = (cardType 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) {
Log.e("jingo", "领卡方式 报错 ${e.message}")
}
try {
val stringBuffer = StringBuffer()
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) {
Log.e("jingo", "领卡方式 报错 ${e.message}")
}
}
list.add(
LaneBoundaryItem(
"车道信息", null, itemList
)
)
}
} catch (e: Exception) {
}
return list
}
/** /**
* 获取路口详细信息 * 获取路口详细信息
@@ -431,9 +630,7 @@ class SignUtil {
val list = mutableListOf<LaneBoundaryItem>() val list = mutableListOf<LaneBoundaryItem>()
list.add( list.add(
LaneBoundaryItem( LaneBoundaryItem(
"路口号码", "路口号码", "${renderEntity.properties["intersectionPid"]}", null
"${renderEntity.properties["intersectionPid"]}",
null
) )
) )
val type = when (renderEntity.properties["type"]) { val type = when (renderEntity.properties["type"]) {
@@ -464,9 +661,7 @@ class SignUtil {
list.add( list.add(
LaneBoundaryItem( LaneBoundaryItem(
"车道标线序号${arrayObject.getInt("markSeqNum")}", "车道标线序号${arrayObject.getInt("markSeqNum")}", null, itemList
null,
itemList
) )
) )
} }
@@ -533,8 +728,7 @@ class SignUtil {
itemList.add(TwoItemAdapterItem("车道标线颜色", markColor)) itemList.add(TwoItemAdapterItem("车道标线颜色", markColor))
itemList.add( itemList.add(
TwoItemAdapterItem( TwoItemAdapterItem(
"车道标线宽度(mm)", "车道标线宽度(mm)", "${arrayObject.getInt("markWidth")}"
"${arrayObject.getInt("markWidth")}"
) )
) )
@@ -548,15 +742,12 @@ class SignUtil {
itemList.add(TwoItemAdapterItem("车道标线材质", markMaterial)) itemList.add(TwoItemAdapterItem("车道标线材质", markMaterial))
itemList.add( itemList.add(
TwoItemAdapterItem( TwoItemAdapterItem(
"横向偏移(mm)", "横向偏移(mm)", "${arrayObject.getInt("lateralOffset")}"
"${arrayObject.getInt("lateralOffset")}"
) )
) )
list.add( list.add(
LaneBoundaryItem( LaneBoundaryItem(
"车道标线序号${arrayObject.getInt("markSeqNum")}", "车道标线序号${arrayObject.getInt("markSeqNum")}", null, itemList
null,
itemList
) )
) )
} }
@@ -577,6 +768,16 @@ class SignUtil {
DataCodeEnum.OMDB_SPEEDLIMIT_COND.code -> getConditionLimitText(data) DataCodeEnum.OMDB_SPEEDLIMIT_COND.code -> getConditionLimitText(data)
//电子眼 //电子眼
DataCodeEnum.OMDB_ELECTRONICEYE.code -> data.properties["name"].toString() DataCodeEnum.OMDB_ELECTRONICEYE.code -> data.properties["name"].toString()
//收费站
DataCodeEnum.OMDB_TOLLGATE.code -> {
val tollinfoList = data.properties["tollinfoList"]
try {
val jsonArray = JSONArray(tollinfoList)
return "${jsonArray.length()}"
} catch (e: Exception) {
return ""
}
}
else -> "" else -> ""
} }
} }
@@ -673,8 +874,7 @@ class SignUtil {
val multiDigitized = data.properties["multiDigitized"] val multiDigitized = data.properties["multiDigitized"]
try { try {
if (multiDigitized?.toInt() == 1) if (multiDigitized?.toInt() == 1) return "上下线"
return "上下线"
} catch (e: Throwable) { } catch (e: Throwable) {
} }
@@ -787,8 +987,16 @@ class SignUtil {
//警示信息 //警示信息
DataCodeEnum.OMDB_WARNINGSIGN.code -> { DataCodeEnum.OMDB_WARNINGSIGN.code -> {
val typeCode = data.properties["typeCode"] val typeCode = data.properties["typeCode"]
if (typeCode != null) if (typeCode != null) return typeCode.toInt()
return typeCode.toInt() return 0
}
//收费站
DataCodeEnum.OMDB_TOLLGATE.code -> {
var backimageCode = data.properties["backimageCode"]
if (backimageCode != null) {
backimageCode = backimageCode.lowercase()
return getResId(backimageCode, R.drawable::class.java)
}
return 0 return 0
} }
else -> 0 else -> 0
@@ -957,6 +1165,8 @@ class SignUtil {
DataCodeEnum.OMDB_SPEEDLIMIT_COND.code, DataCodeEnum.OMDB_SPEEDLIMIT_COND.code,
//电子眼 //电子眼
DataCodeEnum.OMDB_ELECTRONICEYE.code, DataCodeEnum.OMDB_ELECTRONICEYE.code,
//收费站
DataCodeEnum.OMDB_TOLLGATE.code,
//警示信息 //警示信息
DataCodeEnum.OMDB_WARNINGSIGN.code -> true DataCodeEnum.OMDB_WARNINGSIGN.code -> true
else -> false else -> false
@@ -1008,8 +1218,7 @@ class SignUtil {
if (dir != "") { if (dir != "") {
list.add( list.add(
TwoItemAdapterItem( TwoItemAdapterItem(
title = "作用方向", title = "作用方向", text = dir
text = dir
) )
) )
} }
@@ -1245,15 +1454,13 @@ class SignUtil {
if (dir != "") { if (dir != "") {
list.add( list.add(
TwoItemAdapterItem( TwoItemAdapterItem(
title = "限速方向", title = "限速方向", text = dir
text = dir
) )
) )
} }
list.add( list.add(
TwoItemAdapterItem( TwoItemAdapterItem(
title = "最高限速值(km/h)", title = "最高限速值(km/h)", text = "${data.properties["maxSpeed"]}"
text = "${data.properties["maxSpeed"]}"
) )
) )
var maxStr = when (data.properties["maxSpeedSource"]) { var maxStr = when (data.properties["maxSpeedSource"]) {
@@ -1271,15 +1478,13 @@ class SignUtil {
if (maxStr != "") { if (maxStr != "") {
list.add( list.add(
TwoItemAdapterItem( TwoItemAdapterItem(
title = "最高限速来源", title = "最高限速来源", text = maxStr
text = maxStr
) )
) )
} }
list.add( list.add(
TwoItemAdapterItem( TwoItemAdapterItem(
title = "最低限速值(km/h)", title = "最低限速值(km/h)", text = "${data.properties["minSpeed"]}"
text = "${data.properties["minSpeed"]}"
) )
) )
var minStr = when (data.properties["minSpeedSource"]) { var minStr = when (data.properties["minSpeedSource"]) {
@@ -1297,8 +1502,7 @@ class SignUtil {
if (minStr != "") { if (minStr != "") {
list.add( list.add(
TwoItemAdapterItem( TwoItemAdapterItem(
title = "最低限速来源", title = "最低限速来源", text = minStr
text = minStr
) )
) )
} }
@@ -1314,8 +1518,7 @@ class SignUtil {
if (isLaneDependent != "") { if (isLaneDependent != "") {
list.add( list.add(
TwoItemAdapterItem( TwoItemAdapterItem(
title = "是否车道依赖", title = "是否车道依赖", text = isLaneDependent
text = isLaneDependent
) )
) )
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Some files were not shown because too many files have changed in this diff Show More