diff --git a/src/main/java/com/biutag/supervision/service/ModifiedVerifyContentCellWriteHandler.java b/src/main/java/com/biutag/supervision/service/ModifiedVerifyContentCellWriteHandler.java index cb58d04..9d974e7 100644 --- a/src/main/java/com/biutag/supervision/service/ModifiedVerifyContentCellWriteHandler.java +++ b/src/main/java/com/biutag/supervision/service/ModifiedVerifyContentCellWriteHandler.java @@ -9,6 +9,8 @@ import org.apache.poi.ss.usermodel.Font; import org.apache.poi.ss.usermodel.IndexedColors; import org.apache.poi.ss.usermodel.RichTextString; import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.xssf.usermodel.XSSFColor; +import org.apache.poi.xssf.usermodel.XSSFFont; public class ModifiedVerifyContentCellWriteHandler implements CellWriteHandler { @@ -35,11 +37,11 @@ public class ModifiedVerifyContentCellWriteHandler implements CellWriteHandler { String[] lines = content.split("\\n", -1); int offset = 0; for (String line : lines) { - int separatorIndex = line.indexOf(':'); + int separatorIndex = line.indexOf('\uFF1A'); if (separatorIndex > 0) { richText.applyFont(offset, offset + separatorIndex, getLabelFont(workbook)); } - int arrowIndex = line.indexOf('→', separatorIndex + 1); + int arrowIndex = line.indexOf('\u2192', separatorIndex + 1); if (arrowIndex >= 0) { richText.applyFont(offset + arrowIndex, offset + arrowIndex + 1, getArrowFont(workbook)); } @@ -63,7 +65,11 @@ public class ModifiedVerifyContentCellWriteHandler implements CellWriteHandler { if (arrowFont == null) { arrowFont = workbook.createFont(); arrowFont.setBold(true); - arrowFont.setColor(IndexedColors.RED.getIndex()); + if (arrowFont instanceof XSSFFont xssfFont) { + xssfFont.setColor(new XSSFColor(new byte[]{(byte) 255, 0, 0}, null)); + } else { + arrowFont.setColor(IndexedColors.RED.getIndex()); + } } return arrowFont; } diff --git a/src/main/java/com/biutag/supervision/service/NegativeReturnExportService.java b/src/main/java/com/biutag/supervision/service/NegativeReturnExportService.java index 169a8d3..ca4717b 100644 --- a/src/main/java/com/biutag/supervision/service/NegativeReturnExportService.java +++ b/src/main/java/com/biutag/supervision/service/NegativeReturnExportService.java @@ -58,7 +58,7 @@ public class NegativeReturnExportService { returnVo.setReturnTime(history.getCrtTime()); returnVo.setReturnUser(history.getCrtName()); returnVo.setReturnOpinion(parsedHistory.comments()); - returnVo.setModifiedVerifyContent("尚未再次提交"); + returnVo.setModifiedVerifyContent(null); returnRecords.add(returnVo); pendingReturn = new PendingReturn(parsedHistory.actionKey(), latestSnapshot, returnVo); } else if (pendingReturn != null && parsedHistory.snapshot() != null) {