修改供应商导入导出方法
This commit is contained in:
parent
50fd9e79d0
commit
07a38a5b2c
|
|
@ -99,17 +99,23 @@ public class NuBizAllMaterialInfoServiceImpl extends ServiceImpl<NuBizAllMateria
|
|||
unlockedStyleRed.setFont(redFont);
|
||||
|
||||
// 6. 创建大标题行(第1行)
|
||||
Row titleRow = sheet.createRow(0);
|
||||
Row titleOneRow = sheet.createRow(0);
|
||||
Cell materialTitleCellRow = titleOneRow.createCell(0);
|
||||
materialTitleCellRow.setCellValue("供应商物料列表");
|
||||
materialTitleCellRow.setCellStyle(lockedStyle);
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 6)); // 合并 B1:G1
|
||||
|
||||
Row titleRow = sheet.createRow(1);
|
||||
Cell materialTitleCell = titleRow.createCell(0);
|
||||
materialTitleCell.setCellValue("供应商名称:");
|
||||
materialTitleCell.setCellStyle(lockedStyle);
|
||||
Cell materialTitleCell2 = titleRow.createCell(1);
|
||||
materialTitleCell2.setCellValue("请填写供应商名称");
|
||||
materialTitleCell2.setCellStyle(unlockedStyleRed);
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, 1, 5)); // 合并 B1:G1
|
||||
sheet.addMergedRegion(new CellRangeAddress(1, 1, 1, 5)); // 合并 B1:G1
|
||||
|
||||
// 7. 创建列名行(第2行)
|
||||
Row headerRow = sheet.createRow(1);
|
||||
Row headerRow = sheet.createRow(2);
|
||||
String[] headers = { "是否提供", "货品名称", "规格型号", "品牌型号", "生产厂家", "销售单价", "销售单位"};
|
||||
for (int i = 0; i < headers.length; i++) {
|
||||
Cell cell = headerRow.createCell(i);
|
||||
|
|
@ -118,7 +124,7 @@ public class NuBizAllMaterialInfoServiceImpl extends ServiceImpl<NuBizAllMateria
|
|||
}
|
||||
|
||||
// 8. 填充数据(从第3行开始)
|
||||
int rowNum = 2;
|
||||
int rowNum = 3;
|
||||
for (NuBizAllMaterialInfo info : dataList) {
|
||||
Row row = sheet.createRow(rowNum++);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue