导入导出设备数据

This commit is contained in:
2025-09-23 13:56:34 +08:00
parent e2821566c8
commit 89f08c2d91
11 changed files with 168 additions and 68 deletions

View File

@ -72,7 +72,7 @@ public class UploadDeviceDataListener implements ReadListener<DeviceExcelImportD
// 设置图片数据
byte[] imageData = rowImageMap.get(rowIndex);
if (imageData != null) {
recordWithImage.setDevicePicFromBytes(imageData);
// recordWithImage.setDevicePicFromBytes(imageData);
}
failedRecordsWithImages.add(recordWithImage);
@ -125,7 +125,6 @@ public class UploadDeviceDataListener implements ReadListener<DeviceExcelImportD
rowDeviceMap.put(rowIndex, device);
rowDtoMap.put(rowIndex, data);
rowIndexList.add(rowIndex);
}
@ -191,7 +190,8 @@ public class UploadDeviceDataListener implements ReadListener<DeviceExcelImportD
if (device != null) {
try {
byte[] imageData = picture.getPictureData().getData();
String extraValue = getCellValue(sheet, rowIndex, 4);
// 表示Excel表格中的第3列因为索引从0开始计算
String extraValue = getCellValue(sheet, rowIndex, 2);
String imageUrl = uploadAndGenerateUrl(imageData, extraValue);
device.setDevicePic(imageUrl);