|
|
@ -129,14 +129,16 @@ public class UploadManager { |
|
|
|
SyncTaskDao syncTaskDao = new SyncTaskDao(ProfilometerApplication.getContext()); |
|
|
|
SyncTask syncTask = syncTaskDao.getSyncTaskById(uploadId); |
|
|
|
ProfileRecordPointSet profileRecordPointSet = profileRecordPointSetDao.getProfileRecordPointSetByUuid(profileRecordDescription.getUuid()); |
|
|
|
String leftPointJsonStr = profileRecordPointSet.getLeftPoints(); |
|
|
|
String rightPointJsonStr = profileRecordPointSet.getLeftPoints(); |
|
|
|
List<XYPoint> leftPointList = JSONUtil.toList(leftPointJsonStr, XYPoint.class); |
|
|
|
List<XYPoint> rightPointList = JSONUtil.toList(rightPointJsonStr, XYPoint.class); |
|
|
|
String alignPointJsonStr = profileRecordPointSet.getAlignPoints(); |
|
|
|
List<XYPoint> alignPointList = JSONUtil.toList(alignPointJsonStr, XYPoint.class); |
|
|
|
// String leftPointJsonStr = profileRecordPointSet.getLeftPoints(); |
|
|
|
// String rightPointJsonStr = profileRecordPointSet.getLeftPoints(); |
|
|
|
// List<XYPoint> leftPointList = JSONUtil.toList(leftPointJsonStr, XYPoint.class); |
|
|
|
// List<XYPoint> rightPointList = JSONUtil.toList(rightPointJsonStr, XYPoint.class); |
|
|
|
// 合并左右点列表 |
|
|
|
List<XYPoint> mergedPoints = new ArrayList<>(); |
|
|
|
mergedPoints.addAll(leftPointList); // 添加左点 |
|
|
|
mergedPoints.addAll(rightPointList); // 添加右点 |
|
|
|
// List<XYPoint> mergedPoints = new ArrayList<>(); |
|
|
|
// mergedPoints.addAll(leftPointList); // 添加左点 |
|
|
|
// mergedPoints.addAll(rightPointList); // 添加右点 |
|
|
|
String fileName = ""; |
|
|
|
String zipName = ""; |
|
|
|
if (profileRecordDescription.getDataSource().equals("XLDC")) { |
|
|
@ -152,7 +154,7 @@ public class UploadManager { |
|
|
|
"-" + profileRecordDescription.getCreateTime().format(DateTimeFormatter.ofPattern("yyyyMMdd")) + ".ban"; |
|
|
|
zipName = "道岔廓形数据" + "-" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + ".zip"; |
|
|
|
} |
|
|
|
byte[] banByte = pointToBanFile(mergedPoints, fileName); |
|
|
|
byte[] banByte = pointToBanFile(alignPointList, fileName); |
|
|
|
BanFile banFile = new BanFile(fileName, banByte); |
|
|
|
List<BanFile> banFileList = List.of(banFile); |
|
|
|
byte[] zipBytes = compressionToZipBytes(banFileList); |
|
|
|