diff --git a/aar/totalstation/totalstation-release.aar b/aar/totalstation/totalstation-release.aar index 8308435..492c49a 100644 Binary files a/aar/totalstation/totalstation-release.aar and b/aar/totalstation/totalstation-release.aar differ diff --git a/app/src/main/java/com/bingce/controlnetwork/func/level/util/LevelExportUtilTj.kt b/app/src/main/java/com/bingce/controlnetwork/func/level/util/LevelExportUtilTj.kt index 61620c2..9b1d86a 100644 --- a/app/src/main/java/com/bingce/controlnetwork/func/level/util/LevelExportUtilTj.kt +++ b/app/src/main/java/com/bingce/controlnetwork/func/level/util/LevelExportUtilTj.kt @@ -45,7 +45,7 @@ class LevelExportUtilTj { private var endPointName = "" - private val printSbLev = StringBuilder() + private var printSbLev = StringBuilder() /** * 导出路线文件夹下的数据 @@ -54,6 +54,8 @@ class LevelExportUtilTj { fun doExportRouteData(projectId: String, routeId: String) { val routeRecord = LevelingDbFactory.instance.levelDataSource.getByIdSync(routeId) ?: throw IllegalArgumentException("routeRecord==null") + // 初始化,防止导出多条路线时,后面的会在前面的基础上继续拼接 + printSbLev = StringBuilder() //路线的基础数据 confirmRouteCommonData(routeRecord) //收集路线的具体数据 @@ -434,7 +436,8 @@ class LevelExportUtilTj { //结束点高程 appendZ( lastFinishStation.frontSightPointId, - getFrontPointZ(stationHeightDiffTotal) + getFrontPointZ(stationHeightDiffTotal), + true ) column1Index++ //end-line @@ -565,12 +568,15 @@ class LevelExportUtilTj { return SurveyorDatabaseFactory.instance.pointDataSource.findByIdSync(pointId) } - private fun appendZ(pointId: String, height: Double) { + /** + * @param isShowEndPoint 是否显示最后一个点 + */ + private fun appendZ(pointId: String, height: Double, isShowEndPoint: Boolean = false) { val startPoint = getPoint(pointId) val z = LevelFormatUtil.formatHeight(height) val dataSecondLine = LevelExportLine( LevelExportLine.Column1(column1Index), - LevelExportLine.Column2("KD1", getPointName(startPoint), ""), + LevelExportLine.Column2("KD1", if (isShowEndPoint) endPointName else getPointName(startPoint), ""), LevelExportLine.ColumnHeight("", ""), LevelExportLine.ColumnDistance(""), LevelExportLine.ColumnEnd("Z", "$z m")