导入导出设备数据
This commit is contained in:
@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user