[2.14.0]修复录包工具三期Bug

This commit is contained in:
xuxinchao
2023-02-14 18:41:08 +08:00
parent 392eff6182
commit 689ea85737
2 changed files with 15 additions and 73 deletions

View File

@@ -73,6 +73,8 @@ internal class BadCaseManagerView @JvmOverloads constructor(
tvSelectAll.setOnClickListener {
if(bagManagerEntity.bagsInfoResp.size>0){
selectedBagSize = 0
selectedBagNum = 0
bagManagerList.clear()
for(selectBagInfo in bagManagerEntity.bagsInfoResp){
if(selectBagInfo.itemType == 0){
selectBagInfo.selectStatus = true
@@ -213,79 +215,6 @@ internal class BadCaseManagerView @JvmOverloads constructor(
// DownloadManager.getInstance().download("CarPad/mogopadlog/X20202111230C01YYW/2023-01-30/Audio_1675049657187_BadCase.wav",
// "/mnt/sdcard/mogo/","test13.wav")
// val descriptionEntityOne = BagDescriptionEntity("包信息描述1",false,
// "CarPad/mogopadlog/X20202111230C01YYW/2023-01-30/Audio_1675049657187_BadCase.wav",false)
// val bagInfoEntityOne = BagInfoEntity()
// bagInfoEntityOne.key = 12341
// bagInfoEntityOne.totalSize = 1*1024*1024*1000
// bagInfoEntityOne.timestamp = "20230208125414"
// bagInfoEntityOne.bagPath = ""
// bagInfoEntityOne.mergeStat = false
// bagInfoEntityOne.uploadStat = false
// bagInfoEntityOne.description = descriptionEntityOne
//
// val descriptionEntityTwo = BagDescriptionEntity("包信息描述2",true,
// "CarPad/mogopadlog/X20202111230C01YYW/2023-01-30/Audio_1675049657187_BadCase.wav",true)
// val bagInfoEntityTwo = BagInfoEntity()
// bagInfoEntityTwo.key = 12342
// bagInfoEntityTwo.totalSize = 2*1024*1024*1000
// bagInfoEntityTwo.timestamp = "20230208125414"
// bagInfoEntityTwo.bagPath = ""
// bagInfoEntityTwo.mergeStat = false
// bagInfoEntityTwo.uploadStat = false
// bagInfoEntityTwo.description = descriptionEntityTwo
//
// val descriptionEntityThree = BagDescriptionEntity("包信息描述3",true,
// "CarPad/mogopadlog/X20202111230C01YYW/2023-01-30/Audio_1675049657187_BadCase.wav",true)
// val bagInfoEntityThree = BagInfoEntity()
// bagInfoEntityThree.key = 12343
// bagInfoEntityThree.totalSize = 1*1027*1000
// bagInfoEntityThree.timestamp = "20230208125414"
// bagInfoEntityThree.bagPath = ""
// bagInfoEntityThree.mergeStat = false
// bagInfoEntityThree.uploadStat = false
// bagInfoEntityThree.description = descriptionEntityThree
//
// val descriptionEntityFour = BagDescriptionEntity("包信息描述4",true,
// "CarPad/mogopadlog/X20202111230C01YYW/2023-01-30/Audio_1675049657187_BadCase.wav",true)
// val bagInfoEntityFour = BagInfoEntity()
// bagInfoEntityFour.key = 12344
// bagInfoEntityFour.totalSize = 10*1024*1024*1000L
// bagInfoEntityFour.timestamp = "20230208125414"
// bagInfoEntityFour.bagPath = ""
// bagInfoEntityFour.mergeStat = false
// bagInfoEntityFour.uploadStat = false
// bagInfoEntityFour.description = descriptionEntityFour
//
// val list: MutableList<BagInfoEntity> = ArrayList()
// list.add(bagInfoEntityOne)
// list.add(bagInfoEntityTwo)
// list.add(bagInfoEntityThree)
// list.add(bagInfoEntityFour)
// for(entity in list){
// entity.timestamp?.let {
// val month = it.substring(4,6)
// val day = it.substring(6,8)
// val time = "${month}月${day}日"
// var containTime = false
// for(bag in bagManagerEntity.bagsInfoResp){
// if(bag.timeStr == time){
// containTime = true
// }
// }
// if(!containTime || bagManagerEntity.bagsInfoResp.size ==0){
// //增加时间的
// val bagInfoEntity = BagInfoEntity()
// bagInfoEntity.itemType = 1
// bagInfoEntity.timeStr = time
// bagManagerEntity.bagsInfoResp.add(bagInfoEntity)
// }
// bagManagerEntity.bagsInfoResp.add(entity)
// }
// }
//
// bagManagerListAdapter?.setData(bagManagerEntity.bagsInfoResp)
}
fun setOnClickListener(clickListener: ClickListener) {
@@ -303,6 +232,9 @@ internal class BadCaseManagerView @JvmOverloads constructor(
if(bagManager.reqType == 1){
//遍历各个主机的硬盘空间信息
if(bagManager.spaceInfoRespCount>0){
spaceTotal = 0
spaceUsed = 0
spaceFree = 0
for(spaceInfo in bagManager.spaceInfoRespList){
spaceInfo.diskSpaceInfo?.let {
spaceTotal += it.total
@@ -388,6 +320,12 @@ internal class BadCaseManagerView @JvmOverloads constructor(
}
}
}
//上传Cos执行完成
if(bagManagerList.size == 0 && selectedBagNum != 0){
ToastUtils.showShort("上传命令完成")
bagUploadDialog?.uploadCompleted()
tvCancelSelect.performClick()
}
}
//删除Bag
else if(bagManager.reqType == 4){

View File

@@ -109,6 +109,10 @@ public class BagUploadDialog extends Dialog {
viewUploadProgress.setProgress((totalNum-remainNum)*100/totalNum);
}
public void uploadCompleted(){
dismiss();
}
interface BagUploadListener{
//取消上传
void cancelUpload();