From 76f47c6da8660b30cab7e3c71425398a81fb5c3c Mon Sep 17 00:00:00 2001 From: xuxinchao Date: Fri, 17 Feb 2023 07:35:57 +0800 Subject: [PATCH] =?UTF-8?q?[2.14.0]=E9=81=BF=E5=85=8DBag=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E9=87=8D=E5=A4=8Dkey=E7=9A=84bag=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../badcase/biz/BadCaseManagerView.kt | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) 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) } } }