Commit d3bd4e7a authored by liuxinben's avatar liuxinben

commit

parent 31172096
...@@ -46,6 +46,8 @@ public class ExportExcel { ...@@ -46,6 +46,8 @@ public class ExportExcel {
sheet.setColumnWidth(11, 30 * 110); sheet.setColumnWidth(11, 30 * 110);
sheet.setColumnWidth(12, 30 * 110); sheet.setColumnWidth(12, 30 * 110);
sheet.setColumnWidth(13, 30 * 110); sheet.setColumnWidth(13, 30 * 110);
sheet.setColumnWidth(14, 30 * 110);
sheet.setColumnWidth(15, 30 * 110);
//第三步创建行row:添加表头0行 //第三步创建行row:添加表头0行
HSSFRow row = sheet.createRow(0); HSSFRow row = sheet.createRow(0);
HSSFCellStyle style = wb.createCellStyle();//样式 HSSFCellStyle style = wb.createCellStyle();//样式
...@@ -70,23 +72,23 @@ public class ExportExcel { ...@@ -70,23 +72,23 @@ public class ExportExcel {
cell = row.createCell(6); //设定值 cell = row.createCell(6); //设定值
cell.setCellValue("身份证号"); cell.setCellValue("身份证号");
cell = row.createCell(7); //设定值 cell = row.createCell(7); //设定值
cell.setCellValue("联系方式");
cell = row.createCell(8); //设定值
cell.setCellValue("条形码号"); cell.setCellValue("条形码号");
cell = row.createCell(9); //设定值 cell = row.createCell(8); //设定值
cell.setCellValue("签发机关"); cell.setCellValue("签发机关");
cell = row.createCell(10); //设定值 cell = row.createCell(9); //设定值
cell.setCellValue("运单号"); cell.setCellValue("运单号");
cell = row.createCell(11); //设定值 cell = row.createCell(10); //设定值
cell.setCellValue("制证类型"); cell.setCellValue("制证类型");
cell = row.createCell(12); //设定值 cell = row.createCell(11); //设定值
cell.setCellValue("原制证类型"); cell.setCellValue("原制证类型");
cell = row.createCell(13); //设定值 cell = row.createCell(12); //设定值
cell.setCellValue("复核日期"); cell.setCellValue("复核日期");
cell = row.createCell(14); //设定值 cell = row.createCell(13); //设定值
cell.setCellValue("复核人"); cell.setCellValue("复核人");
cell = row.createCell(15); //设定值 cell = row.createCell(14); //设定值
cell.setCellValue("备注"); cell.setCellValue("备注");
cell = row.createCell(15); //设定值
cell.setCellValue("联系方式");
for (int i =0;i<mapList.size();i++){ for (int i =0;i<mapList.size();i++){
row = sheet.createRow(i + 1); row = sheet.createRow(i + 1);
...@@ -105,24 +107,23 @@ public class ExportExcel { ...@@ -105,24 +107,23 @@ public class ExportExcel {
cell = row.createCell(6); //设定值 cell = row.createCell(6); //设定值
cell.setCellValue("null".equals(mapList.get(i).get("CARD_ID")+"")?"":mapList.get(i).get("CARD_ID")+""); cell.setCellValue("null".equals(mapList.get(i).get("CARD_ID")+"")?"":mapList.get(i).get("CARD_ID")+"");
cell = row.createCell(7); //设定值 cell = row.createCell(7); //设定值
cell.setCellValue("null".equals(mapList.get(i).get("APPLY_PHONE")+"")?"":mapList.get(i).get("APPLY_PHONE")+"");
cell = row.createCell(8); //设定值
cell.setCellValue("null".equals(mapList.get(i).get("QR_CODE")+"")?"":mapList.get(i).get("QR_CODE")+""); cell.setCellValue("null".equals(mapList.get(i).get("QR_CODE")+"")?"":mapList.get(i).get("QR_CODE")+"");
cell = row.createCell(9); //设定值 cell = row.createCell(8); //设定值
cell.setCellValue("null".equals(mapList.get(i).get("SIGN_GOVT")+"")?"":mapList.get(i).get("SIGN_GOVT")+""); cell.setCellValue("null".equals(mapList.get(i).get("SIGN_GOVT")+"")?"":mapList.get(i).get("SIGN_GOVT")+"");
cell = row.createCell(10); //设定值 cell = row.createCell(9); //设定值
cell.setCellValue("null".equals(mapList.get(i).get("WAYBILL_NUMBER")+"")?"":mapList.get(i).get("WAYBILL_NUMBER")+""); cell.setCellValue("null".equals(mapList.get(i).get("WAYBILL_NUMBER")+"")?"":mapList.get(i).get("WAYBILL_NUMBER")+"");
cell = row.createCell(11); //设定值 cell = row.createCell(10); //设定值
cell.setCellValue("null".equals(mapList.get(i).get("CARD_TYPE_ID")+"")?"":mapList.get(i).get("CARD_TYPE_ID")+""); cell.setCellValue("null".equals(mapList.get(i).get("CARD_TYPE_ID")+"")?"":mapList.get(i).get("CARD_TYPE_ID")+"");
cell = row.createCell(12); //设定值 cell = row.createCell(11); //设定值
cell.setCellValue("null".equals(mapList.get(i).get("OLD_CARD_TYPE_ID")+"")?"":mapList.get(i).get("OLD_CARD_TYPE_ID")+""); cell.setCellValue("null".equals(mapList.get(i).get("OLD_CARD_TYPE_ID")+"")?"":mapList.get(i).get("OLD_CARD_TYPE_ID")+"");
cell = row.createCell(13); //设定值 cell = row.createCell(12); //设定值
cell.setCellValue(mapList.get(i).get("CHECK_DATE")+""); cell.setCellValue(mapList.get(i).get("CHECK_DATE")+"");
cell = row.createCell(14); //设定值 cell = row.createCell(13); //设定值
cell.setCellValue("null".equals(mapList.get(i).get("CHECK_NAME")+"")?"":mapList.get(i).get("CHECK_NAME")+""); cell.setCellValue("null".equals(mapList.get(i).get("CHECK_NAME")+"")?"":mapList.get(i).get("CHECK_NAME")+"");
cell = row.createCell(15); //设定值 cell = row.createCell(14); //设定值
cell.setCellValue("null".equals(mapList.get(i).get("NOTE")+"")?"":mapList.get(i).get("NOTE")+""); cell.setCellValue("null".equals(mapList.get(i).get("NOTE")+"")?"":mapList.get(i).get("NOTE")+"");
cell = row.createCell(15); //设定值
cell.setCellValue("null".equals(mapList.get(i).get("APPLY_PHONE")+"")?"":mapList.get(i).get("APPLY_PHONE")+"");
} }
HSSFSheet sheet1 = wb.createSheet("公安网信息交接表"); HSSFSheet sheet1 = wb.createSheet("公安网信息交接表");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment