|
@@ -201,13 +201,13 @@ public class ImageClassificationFileController extends BladeController {
|
|
|
Drawing<?> drawing = sheet.createDrawingPatriarch();
|
|
|
ClientAnchor anchor = helper.createClientAnchor();
|
|
|
|
|
|
- if (i == 0) {
|
|
|
+ /*if (i == 0) {
|
|
|
anchor.setRow1(0);
|
|
|
anchor.setCol1(0);
|
|
|
} else {
|
|
|
- anchor.setRow1(28);
|
|
|
+ anchor.setRow1(6);
|
|
|
anchor.setCol1(1);
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
//获取文件流
|
|
|
byte[] bytes = CommonUtil.InputStreamToBytes(CommonUtil.getOSSInputStream(urls.get(i)));
|
|
@@ -220,23 +220,23 @@ public class ImageClassificationFileController extends BladeController {
|
|
|
picture.resize();
|
|
|
|
|
|
//图片定位
|
|
|
- FileUtils.imageOrientation(sheet, anchor, i == 1 ? new DataVO(1, 8) : new DataVO(0, 0));
|
|
|
+ FileUtils.imageOrientation(sheet, anchor, i == 1 ? new DataVO(1, 8) : new DataVO(0, 2));
|
|
|
|
|
|
//定位其它信息
|
|
|
//文字说明
|
|
|
- sheet.getRow(i == 0 ? 0 : 6).getCell(i == 0 ? 3 : 0).setCellValue("文字说明:\n" + " " + file.getTextContent());
|
|
|
+ sheet.getRow(i == 0 ? 0 : 6).getCell(i == 0 ? 3 : 0).setCellValue("文字说明:\n" + " " + (ObjectUtil.isNotEmpty(file.getTextContent()) ? file.getTextContent() : ""));
|
|
|
//照片号
|
|
|
- sheet.getRow(i == 0 ? 1 : 7).getCell(i == 0 ? 3 : 0).setCellValue("照片号:\n" + " " + file.getPhotoCode());
|
|
|
+ sheet.getRow(i == 0 ? 1 : 7).getCell(i == 0 ? 3 : 0).setCellValue("照片号:\n" + " " + (ObjectUtil.isNotEmpty(file.getPhotoCode()) ? file.getPhotoCode() : ""));
|
|
|
//底片号
|
|
|
- sheet.getRow(i == 0 ? 2 : 8).getCell(i == 0 ? 3 : 0).setCellValue("底片号:\n" + " " + file.getFilmCode());
|
|
|
+ sheet.getRow(i == 0 ? 2 : 8).getCell(i == 0 ? 3 : 0).setCellValue("底片号:\n" + " " + (ObjectUtil.isNotEmpty(file.getFilmCode()) ? file.getFilmCode() : ""));
|
|
|
//题名
|
|
|
- sheet.getRow(i == 0 ? 3 : 9).getCell(i == 0 ? 0 : 2).setCellValue("题名:\n" + " " + file.getTitle());
|
|
|
+ sheet.getRow(i == 0 ? 3 : 9).getCell(i == 0 ? 0 : 2).setCellValue("题名:\n" + " " + (ObjectUtil.isNotEmpty(file.getTitle()) ? file.getTitle() : ""));
|
|
|
//参见号
|
|
|
- sheet.getRow(i == 0 ? 3 : 9).getCell(i == 0 ? 2 : 0).setCellValue("参见号:\n" + " " + file.getSeeAlsoCode());
|
|
|
+ sheet.getRow(i == 0 ? 3 : 9).getCell(i == 0 ? 2 : 0).setCellValue("参见号:\n" + " " + (ObjectUtil.isNotEmpty(file.getSeeAlsoCode()) ? file.getSeeAlsoCode() : ""));
|
|
|
//拍摄时间
|
|
|
- sheet.getRow(i == 0 ? 4 : 10).getCell(i == 0 ? 2 : 0).setCellValue("拍摄时间:\n" + " " + DateUtil.format(file.getShootingTime(), "yyyy-MM-dd"));
|
|
|
+ sheet.getRow(i == 0 ? 4 : 10).getCell(i == 0 ? 2 : 0).setCellValue("拍摄时间:\n" + " " + (ObjectUtil.isNotEmpty(DateUtil.format(file.getShootingTime(), "yyyy-MM-dd")) ? DateUtil.format(file.getShootingTime(), "yyyy-MM-dd") : ""));
|
|
|
//拍摄者
|
|
|
- sheet.getRow(i == 0 ? 5 : 11).getCell(i == 0 ? 2 : 0).setCellValue("拍摄者:\n" + " " + file.getShootingUser());
|
|
|
+ sheet.getRow(i == 0 ? 5 : 11).getCell(i == 0 ? 2 : 0).setCellValue("拍摄者:\n" + " " + (ObjectUtil.isNotEmpty(file.getShootingUser()) ? file.getShootingUser() : ""));
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|