[2.14.0]fix录包工具Bag列表显示问题
This commit is contained in:
@@ -281,30 +281,40 @@ class BadCaseManagerView @JvmOverloads constructor(
|
||||
clBagNoDataLayout.visibility = View.GONE
|
||||
if(bagManager.bagsInfoRespCount>0){
|
||||
bagManagerEntity.bagsInfoResp.clear()
|
||||
val originBagInfoList = ArrayList<BagInfoEntity>()
|
||||
for(bagInfo in bagManager.bagsInfoRespList){
|
||||
bagInfo?.let {
|
||||
it.timestamp?.let { time ->
|
||||
val descriptionEntity = BagDescriptionEntity(it.description.description,it.description.hasAudio,it.description.audioUrl,it.description.reportBI)
|
||||
val bagInfoEntity = BagInfoEntity()
|
||||
bagInfoEntity.key = it.key
|
||||
bagInfoEntity.totalSize = it.totalSize
|
||||
bagInfoEntity.timestamp = it.timestamp
|
||||
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)
|
||||
bagInfoEntity.subBags.add(subBagEntity)
|
||||
}
|
||||
val descriptionEntity = BagDescriptionEntity(it.description.description,it.description.hasAudio,it.description.audioUrl,it.description.reportBI)
|
||||
val bagInfoEntity = BagInfoEntity()
|
||||
bagInfoEntity.key = it.key
|
||||
bagInfoEntity.totalSize = it.totalSize
|
||||
bagInfoEntity.timestamp = it.timestamp
|
||||
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)
|
||||
bagInfoEntity.subBags.add(subBagEntity)
|
||||
}
|
||||
originBagInfoList.add(bagInfoEntity)
|
||||
//对数组按照时间顺序进行倒序排序
|
||||
originBagInfoList.sortWith(Comparator { o1, o2 ->
|
||||
o2.timestamp.compareTo(o1.timestamp)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
for(originBagInfo in originBagInfoList){
|
||||
originBagInfo.let {
|
||||
it.timestamp.let { time ->
|
||||
val month = time.substring(4,6)
|
||||
val day = time.substring(6,8)
|
||||
val timeStr = "${month}月${day}日"
|
||||
var containTime = false
|
||||
for(bag in bagManagerEntity.bagsInfoResp){
|
||||
if(bag.timeStr == time){
|
||||
if(bag.timeStr == timeStr){
|
||||
containTime = true
|
||||
}
|
||||
}
|
||||
@@ -318,16 +328,17 @@ class BadCaseManagerView @JvmOverloads constructor(
|
||||
}
|
||||
var containKey = false
|
||||
for(bagInfoContain in bagManagerEntity.bagsInfoResp){
|
||||
if(bagInfoContain.key == bagInfoEntity.key){
|
||||
if(bagInfoContain.key == it.key){
|
||||
containKey = true
|
||||
}
|
||||
}
|
||||
if(!containKey){
|
||||
bagManagerEntity.bagsInfoResp.add(bagInfoEntity)
|
||||
bagManagerEntity.bagsInfoResp.add(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//更新List
|
||||
bagManagerListAdapter?.setData(bagManagerEntity.bagsInfoResp)
|
||||
}
|
||||
@@ -362,6 +373,22 @@ class BadCaseManagerView @JvmOverloads constructor(
|
||||
bagUploadDialog?.uploadCompleted()
|
||||
tvCancelSelect.performClick()
|
||||
}
|
||||
|
||||
when (bagManager.uploadCosResp.stat) {
|
||||
0 -> {
|
||||
ToastUtils.showShort("${bagManager.uploadCosResp.key} 上传cos桶成功")
|
||||
}
|
||||
2 -> {
|
||||
ToastUtils.showShort("${bagManager.uploadCosResp.key} 上传cos桶copy过程失败,原因:${bagManager.uploadCosResp.message}")
|
||||
}
|
||||
3 -> {
|
||||
ToastUtils.showShort("${bagManager.uploadCosResp.key} 上传cos桶合并过程失败,原因:${bagManager.uploadCosResp.message}")
|
||||
}
|
||||
4 -> {
|
||||
ToastUtils.showShort("${bagManager.uploadCosResp.key} 上传cos桶上传过程失败,原因:${bagManager.uploadCosResp.message}")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//删除Bag
|
||||
else if(bagManager.reqType == 4){
|
||||
|
||||
@@ -29,11 +29,11 @@
|
||||
android:layout_marginEnd="30dp"
|
||||
android:background="@null"
|
||||
android:drawableEnd="@drawable/icon_bag_edit"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32dp"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:maxLength="9"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
|
||||
Reference in New Issue
Block a user