diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/BadCaseManagerView.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/BadCaseManagerView.kt index 5984fb2881..8150cf6c1b 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/BadCaseManagerView.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/BadCaseManagerView.kt @@ -280,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 -> @@ -291,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) @@ -299,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){ @@ -308,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) } } }