Selaa lähdekoodia

1.修改颜色

main
wangqiang 1 päivä sitten
vanhempi
commit
3e62c2e906

+ 4
- 3
zs-manager/src/main/java/com/ruoyi/zhushi/service/impl/DkRecordServiceImpl.java Näytä tiedosto

@@ -452,9 +452,10 @@ public class DkRecordServiceImpl implements DkRecordService {
cell = row.createCell(2);
}
Workbook workbook = sheet.getWorkbook();

CellStyle style = workbook.createCellStyle();
style.cloneStyleFrom(cell.getCellStyle()); // 保留原有样式
style.setFillForegroundColor(IndexedColors.RED.getIndex());
style.cloneStyleFrom(cell.getCellStyle()); // 保留原有样式lightcyan
style.setFillForegroundColor(IndexedColors.LIGHT_TURQUOISE.getIndex());
style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
cell.setCellStyle(style);
}
@@ -576,7 +577,7 @@ public class DkRecordServiceImpl implements DkRecordService {
Workbook workbook = sheet.getWorkbook();
CellStyle style = workbook.createCellStyle();
style.cloneStyleFrom(cell.getCellStyle()); // 保留原有样式
style.setFillForegroundColor(IndexedColors.RED.getIndex());
style.setFillForegroundColor(IndexedColors.LIGHT_TURQUOISE.getIndex());
style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
cell.setCellStyle(style);
}

Loading…
Peruuta
Tallenna