From d57a3688e2d7d4968d48048cf1b0015827170fa0 Mon Sep 17 00:00:00 2001 From: yjz <3131811435@qq.com> Date: Tue, 14 Nov 2023 16:56:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AF=B9?= =?UTF-8?q?=E6=AF=94):=2078403?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LawsCustomCompareInfoServiceImpl.java | 31 +++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/laws-modules/src/main/java/com/jero/modules/laws/customcompare/service/impl/LawsCustomCompareInfoServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/laws/customcompare/service/impl/LawsCustomCompareInfoServiceImpl.java index cb1da67a..b91c2a1d 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/customcompare/service/impl/LawsCustomCompareInfoServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/customcompare/service/impl/LawsCustomCompareInfoServiceImpl.java @@ -446,7 +446,7 @@ public class LawsCustomCompareInfoServiceImpl extends ServiceImpl { cell.setCellValue(v.getContent()); // 处理文件 writeFile(v); + // 对比分析结果 + int allSize = featureList.size() * standardVOS.size(); + setCompareResult(finalIndex, allSize, indexRow, compareList, cellStyle, finalI); }); } } @@ -478,6 +482,18 @@ public class LawsCustomCompareInfoServiceImpl extends ServiceImpl compareList, CellStyle cellStyle, int finalI) { + // 最后一列 + if (finalIndex == allSize){ + // 对比分析结果 + Cell cellEnd = indexRow.createCell(finalIndex + 1); + cellEnd.setCellStyle(cellStyle); + if (StringUtils.isNotBlank(compareList.get(finalI - 3).getCompareResult())){ + cellEnd.setCellValue(compareList.get(finalI - 3).getCompareResult()); + } + } + } + private void writeFile(LawsCustomCompareCell v) { if (StringUtils.isNotBlank(v.getFileId())){ OSSFile ossFile = iossFileService.getById(v.getFileId()); @@ -528,7 +544,7 @@ public class LawsCustomCompareInfoServiceImpl extends ServiceImpl standardVOS, List featureList, Row indexRow, Cell indexCell, CellStyle cellStyle) { + private static void createFeatureColumn(List standardVOS, List featureList, Row indexRow, Cell indexCell, CellStyle cellStyle, XSSFSheet sheet) { indexCell.setCellValue("特点/对比项"); // 计算列数量 int index = 0; @@ -539,6 +555,17 @@ public class LawsCustomCompareInfoServiceImpl extends ServiceImpl