Selaa lähdekoodia

修改excel字段位置

zhouxianguang 6 vuotta sitten
vanhempi
commit
23a79093d6

+ 14 - 11
rankin-cms-web/src/main/java/cn/rankin/cmsweb/controller/stmt/StmtCampusController.java

@@ -99,22 +99,24 @@ public class StmtCampusController
         HSSFSheet sheet = wb.createSheet("已开通校区报表");
         //设置单元格宽度
         sheet.setColumnWidth(0, 50 * 256);
-        sheet.setColumnWidth(1, 10 * 256);
+        sheet.setColumnWidth(1, 50 * 256);
         sheet.setColumnWidth(2, 10 * 256);
-        sheet.setColumnWidth(3, 30 * 256);
-        sheet.setColumnWidth(4, 10 * 256);
-        sheet.setColumnWidth(5, 15 * 256);
+        sheet.setColumnWidth(3, 10 * 256);
+        sheet.setColumnWidth(4, 30 * 256);
+        sheet.setColumnWidth(5, 10 * 256);
         sheet.setColumnWidth(6, 15 * 256);
+        sheet.setColumnWidth(7, 15 * 256);
         //在sheet里创建第一行,参数为行索引(excel的行),可以是0~65535之间的任何一个
         HSSFRow row1 = sheet.createRow(0);
         //创建单元格并设置单元格内容
-        row1.createCell(0).setCellValue("校区名");
-        row1.createCell(1).setCellValue("客户类型");
-        row1.createCell(2).setCellValue("省");
-        row1.createCell(3).setCellValue("市");
-        row1.createCell(4).setCellValue("联系人");
-        row1.createCell(5).setCellValue("联系方式");
-        row1.createCell(6).setCellValue("创建日期");
+        row1.createCell(0).setCellValue("校区编号");
+        row1.createCell(1).setCellValue("校区名称");
+        row1.createCell(2).setCellValue("客户类型");
+        row1.createCell(3).setCellValue("所属省");
+        row1.createCell(4).setCellValue("所属市");
+        row1.createCell(5).setCellValue("联系人");
+        row1.createCell(6).setCellValue("联系方式");
+        row1.createCell(7).setCellValue("更新时间");
 
         //单元格日期格式
         HSSFCellStyle cellStyle = wb.createCellStyle();
@@ -133,6 +135,7 @@ public class StmtCampusController
                 vo.setProvinceName(provinceName);
 
                 HSSFRow row = sheet.createRow(i + 1);
+                row.createCell(0).setCellValue(vo.getCode());
                 row.createCell(0).setCellValue(vo.getName());
                 row.createCell(1).setCellValue(vo.getMerchantName());
                 row.createCell(2).setCellValue(vo.getProvinceName());

+ 6 - 6
rankin-cms-web/src/main/java/cn/rankin/cmsweb/controller/stmt/StmtTerminalUserController.java

@@ -124,9 +124,9 @@ public class StmtTerminalUserController
         row1.createCell(2).setCellValue("课程包名称");
         row1.createCell(3).setCellValue("权限有效期");
         row1.createCell(4).setCellValue("权限有效时长");
-        row1.createCell(5).setCellValue("联系人");
-        row1.createCell(6).setCellValue("联系方式");
-        row1.createCell(7).setCellValue("校区名称");
+        row1.createCell(5).setCellValue("校区名称");
+        row1.createCell(6).setCellValue("联系");
+        row1.createCell(7).setCellValue("联系方式");
 
         //单元格日期格式
         HSSFCellStyle cellStyle = wb.createCellStyle();
@@ -160,9 +160,9 @@ public class StmtTerminalUserController
                 }
 
                 row.createCell(4).setCellValue(new HSSFRichTextString(expiredStr));
-                row.createCell(5).setCellValue(vo.getCampusContactName());
-                row.createCell(6).setCellValue(vo.getCampusContactWay());
-                row.createCell(7).setCellValue(vo.getCampusName());
+                row.createCell(5).setCellValue(vo.getCampusName());
+                row.createCell(6).setCellValue(vo.getCampusContactName());
+                row.createCell(7).setCellValue(vo.getCampusContactWay());
             }
         }