1
0
Prechádzať zdrojové kódy

土地供应数据统计年份优化

chenendian 5 dní pred
rodič
commit
4f0e083d2c

+ 3 - 1
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/controller/cadastre/SupplyController.java

@@ -416,7 +416,9 @@ public class SupplyController extends BaseController {
                 Cell categoryCell = headerRow1.createCell(colIndex);
                 categoryCell.setCellValue(categoryNames[i]);
                 categoryCell.setCellStyle(headerStyle);
-                sheet.addMergedRegion(new CellRangeAddress(1, 1, colIndex, colIndex + years.size() - 1));
+                if (years.size() > 1) {
+                    sheet.addMergedRegion(new CellRangeAddress(1, 1, colIndex, colIndex + years.size() - 1));
+                }
 
                 for (int j = 0; j < years.size(); j++) {
                     Cell yearCell = headerRow2.createCell(colIndex + j);