[2.14.0]BadCase三期-录包管理

This commit is contained in:
xuxinchao
2023-02-08 14:53:37 +08:00
parent f8e74754f9
commit 0b40392b25
15 changed files with 304 additions and 202 deletions

View File

@@ -599,38 +599,39 @@ class MoGoAutopilotProvider :
// 包信息列表,获取响应且reqType=2时有效
for(bagsInfoRespEntity in bagManagerEntity.bagsInfoResp){
// 包描述信息
val bagDescription = BagManagerOuterClass.BagDescription
.newBuilder()
bagsInfoRespEntity.description?.let {
bagDescription.description = it.description
bagDescription.hasAudio = it.hasAudio
bagDescription.audioUrl = it.audioUrl
bagDescription.setReportBI(it.reportBI)
}
val bagsInfoResp = BagManagerOuterClass.BagInfo
.newBuilder()
.setKey(bagsInfoRespEntity.key)
.setTotalSize(bagsInfoRespEntity.totalSize)
.setTimestamp(bagsInfoRespEntity.timestamp)
.setBagPath(bagsInfoRespEntity.bagPath)
.setMergeStat(bagsInfoRespEntity.mergeStat)
.setUploadStat(bagsInfoRespEntity.uploadStat)
.setDescription(bagDescription.build())
// 子包信息
for(subBagEntity in bagsInfoRespEntity.subBags){
val subBag = BagManagerOuterClass.SubBag
if(bagsInfoRespEntity.itemType == 0){
// 包描述信息
val bagDescription = BagManagerOuterClass.BagDescription
.newBuilder()
.setKey(subBagEntity.key)
.setHost(subBagEntity.host)
.setSize(subBagEntity.size)
.build()
bagsInfoResp.addSubBags(subBag)
bagsInfoRespEntity.description?.let {
bagDescription.description = it.description
bagDescription.hasAudio = it.hasAudio
bagDescription.audioUrl = it.audioUrl
bagDescription.setReportBI(it.reportBI)
}
val bagsInfoResp = BagManagerOuterClass.BagInfo
.newBuilder()
.setKey(bagsInfoRespEntity.key)
.setTotalSize(bagsInfoRespEntity.totalSize)
.setTimestamp(bagsInfoRespEntity.timestamp)
.setBagPath(bagsInfoRespEntity.bagPath)
.setMergeStat(bagsInfoRespEntity.mergeStat)
.setUploadStat(bagsInfoRespEntity.uploadStat)
.setDescription(bagDescription.build())
// 子包信息
for(subBagEntity in bagsInfoRespEntity.subBags){
val subBag = BagManagerOuterClass.SubBag
.newBuilder()
.setKey(subBagEntity.key)
.setHost(subBagEntity.host)
.setSize(subBagEntity.size)
.build()
bagsInfoResp.addSubBags(subBag)
}
bagManager.addBagsInfoResp(bagsInfoResp)
}
bagManager.addBagsInfoResp(bagsInfoResp)
}
//反馈上传cos桶结果,获取响应且reqType=3时有效