Merge branch 'dev_robotaxi-d-app-module_240_230131_2.14.0' into test_robotaxi-d-app-module_240_230131_2.14.0.1
This commit is contained in:
@@ -59,6 +59,8 @@ class BadCaseManagerView @JvmOverloads constructor(
|
||||
|
||||
private val audioSavePath = "/mnt/sdcard/mogo/"
|
||||
|
||||
private var isNameModify = false
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.layout_badcase_manager, this, true)
|
||||
initView()
|
||||
@@ -187,6 +189,7 @@ class BadCaseManagerView @JvmOverloads constructor(
|
||||
|
||||
override fun editDescription(key: Long, description: BagDescriptionEntity) {
|
||||
//编辑Bag包描述信息
|
||||
isNameModify = true
|
||||
bagManagerEntity.reqType = 5
|
||||
bagManagerEntity.keyReq = key
|
||||
bagManagerEntity.descReq = description
|
||||
@@ -277,6 +280,7 @@ class BadCaseManagerView @JvmOverloads constructor(
|
||||
clBagHaveDataLayout.visibility = View.VISIBLE
|
||||
clBagNoDataLayout.visibility = View.GONE
|
||||
if(bagManager.bagsInfoRespCount>0){
|
||||
bagManagerEntity.bagsInfoResp.clear()
|
||||
for(bagInfo in bagManager.bagsInfoRespList){
|
||||
bagInfo?.let {
|
||||
it.timestamp?.let { time ->
|
||||
@@ -288,6 +292,7 @@ class BadCaseManagerView @JvmOverloads constructor(
|
||||
bagInfoEntity.bagPath = it.bagPath
|
||||
bagInfoEntity.mergeStat = it.mergeStat
|
||||
bagInfoEntity.uploadStat = it.uploadStat
|
||||
bagInfoEntity.itemType = 0
|
||||
bagInfoEntity.description = descriptionEntity
|
||||
for(subBag in it.subBagsList){
|
||||
val subBagEntity = SubBagEntity(subBag.key,subBag.host,subBag.size)
|
||||
@@ -296,7 +301,7 @@ class BadCaseManagerView @JvmOverloads constructor(
|
||||
|
||||
val month = time.substring(4,6)
|
||||
val day = time.substring(6,8)
|
||||
val time = "${month}月${day}日"
|
||||
val timeStr = "${month}月${day}日"
|
||||
var containTime = false
|
||||
for(bag in bagManagerEntity.bagsInfoResp){
|
||||
if(bag.timeStr == time){
|
||||
@@ -305,13 +310,21 @@ class BadCaseManagerView @JvmOverloads constructor(
|
||||
}
|
||||
if(!containTime || bagManagerEntity.bagsInfoResp.size ==0){
|
||||
//增加时间的
|
||||
val bagInfoEntity = BagInfoEntity()
|
||||
bagInfoEntity.itemType = 1
|
||||
bagInfoEntity.timeStr = time
|
||||
val bagInfoTimeEntity = BagInfoEntity()
|
||||
bagInfoTimeEntity.itemType = 1
|
||||
bagInfoTimeEntity.timeStr = timeStr
|
||||
bagInfoTimeEntity.timestamp = time.substring(0,8)
|
||||
bagManagerEntity.bagsInfoResp.add(bagInfoTimeEntity)
|
||||
}
|
||||
var containKey = false
|
||||
for(bagInfoContain in bagManagerEntity.bagsInfoResp){
|
||||
if(bagInfoContain.key == bagInfoEntity.key){
|
||||
containKey = true
|
||||
}
|
||||
}
|
||||
if(!containKey){
|
||||
bagManagerEntity.bagsInfoResp.add(bagInfoEntity)
|
||||
}
|
||||
|
||||
bagManagerEntity.bagsInfoResp.add(bagInfoEntity)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -358,10 +371,9 @@ class BadCaseManagerView @JvmOverloads constructor(
|
||||
val deleteBagInfo = iterator.next()
|
||||
if(deleteBagInfo.key == bagManager.keyReq){
|
||||
iterator.remove()
|
||||
// bagManagerEntity.bagsInfoResp.remove(deleteBagInfo)
|
||||
bagManagerList.remove(deleteBagInfo)
|
||||
//更新列表
|
||||
bagManagerListAdapter?.setData(bagManagerEntity.bagsInfoResp)
|
||||
// bagManagerListAdapter?.setData(bagManagerEntity.bagsInfoResp)
|
||||
if(bagManagerList.size>0){
|
||||
//继续执行删除命令
|
||||
bagManagerEntity.reqType = 4
|
||||
@@ -370,6 +382,30 @@ class BadCaseManagerView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
}
|
||||
//遍历列表,如当天Bag全部删除,同时把日期标题也删除更新列表
|
||||
val titleIterator = bagManagerEntity.bagsInfoResp.iterator()
|
||||
while(titleIterator.hasNext()){
|
||||
val titleBagInfo = titleIterator.next()
|
||||
if(titleBagInfo.itemType == 1){
|
||||
val bagIterator = bagManagerEntity.bagsInfoResp.iterator()
|
||||
var hasBag = false
|
||||
while(bagIterator.hasNext()){
|
||||
val bagBagInfo = bagIterator.next()
|
||||
if(bagBagInfo.itemType == 0){
|
||||
bagBagInfo.timestamp?.let {
|
||||
if(it.contains(titleBagInfo.timestamp.toString())){
|
||||
hasBag = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!hasBag){
|
||||
bagIterator.remove()
|
||||
}
|
||||
}
|
||||
}
|
||||
//更新列表
|
||||
bagManagerListAdapter?.setData(bagManagerEntity.bagsInfoResp)
|
||||
}
|
||||
//修改bag附加信息
|
||||
else if(bagManager.reqType == 5){
|
||||
@@ -382,10 +418,13 @@ class BadCaseManagerView @JvmOverloads constructor(
|
||||
it.hasAudio = bagManager.descReq.hasAudio
|
||||
it.audioUrl = bagManager.descReq.audioUrl
|
||||
}
|
||||
//更新List
|
||||
bagManagerListAdapter?.setData(bagManagerEntity.bagsInfoResp)
|
||||
}
|
||||
}
|
||||
if(!isNameModify){
|
||||
//更新List
|
||||
bagManagerListAdapter?.setData(bagManagerEntity.bagsInfoResp)
|
||||
}
|
||||
isNameModify = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -155,6 +155,7 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
TipToast.shortTip("请选择至少一个Case")
|
||||
return@setOnClickListener
|
||||
}
|
||||
uploadReason.clear()
|
||||
if(rbOne.isChecked){
|
||||
uploadReason.append("严重画龙 ")
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ object CallerObuTrafficLightListenerManager {
|
||||
if (M_OBU_TRAFFIC_LIGHT_LISTENER.containsKey(tag)) {
|
||||
return
|
||||
}
|
||||
listener.onObuTrafficLight(mLight)
|
||||
M_OBU_TRAFFIC_LIGHT_LISTENER[tag] = listener
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user