| | |
| | | import org.apache.poi.ss.usermodel.*; |
| | | import org.apache.poi.ss.util.CellRangeAddress; |
| | | import org.apache.poi.xssf.streaming.SXSSFWorkbook; |
| | | import org.checkerframework.checker.units.qual.C; |
| | | import org.springframework.core.annotation.AnnotationConfigurationException; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | sheet.addMergedRegion(new CellRangeAddress(0 ,0,0,5)); |
| | | Row header1 = sheet.createRow(1); |
| | | header1.setHeight((short) 500); |
| | | header1.createCell(0).setCellValue("投保企业"); |
| | | header1.createCell(0).setCellValue(Constants.equalsInteger(data.getSolutionType(), Constants.ZERO)?"投保企业":"被保险人"); |
| | | header1.createCell(1).setCellValue("保险方案"); |
| | | header1.createCell(2).setCellValue("保险生效起期"); |
| | | header1.createCell(3).setCellValue("保险生效止期"); |
| | | header1.createCell(4).setCellValue("投保人数"); |
| | | header1.createCell(2).setCellValue(Constants.getApplyTimeTitle(1,data)); |
| | | header1.createCell(3).setCellValue(Constants.getApplyTimeTitle(0,data)); |
| | | header1.createCell(4).setCellValue("在保/投保人数"); |
| | | header1.createCell(5).setCellValue("总费用(元)"); |
| | | for (int i = 0; i < 6; i++) { |
| | | configFirstCell(sxssfWorkbook,header1.getCell(i)); |
| | |
| | | header2.createCell(1).setCellValue(data.getSolutionsName()); |
| | | header2.createCell(2).setCellValue(com.doumee.core.utils.DateUtil.getPlusTime2(data.getStartTime())); |
| | | header2.createCell(3).setCellValue(com.doumee.core.utils.DateUtil.getPlusTime2(data.getEndTime())); |
| | | header2.createCell(4).setCellValue(data.getInsureNum()); |
| | | header2.createCell(4).setCellValue(data.getGuaranteeNum()+" / "+data.getInsureNum()); |
| | | header2.createCell(5).setCellValue(Constants.formatBigdecimal2Float(data.getFee()).toString()); |
| | | for (int i = 0; i < 6; i++) { |
| | | configDataCell(sxssfWorkbook, header2.getCell(i)); |
| | |
| | | header1.createCell(5).setCellValue(""); |
| | | header1.createCell(6).setCellValue("保险生效止期"); |
| | | header1.createCell(7).setCellValue(""); |
| | | header1.createCell(8).setCellValue("期望批增生效日期"); |
| | | header1.createCell(9).setCellValue("期望批减生效日期"); |
| | | header1.createCell(8).setCellValue(Constants.getChangeApplyTimeTitle(1,data)); |
| | | header1.createCell(9).setCellValue(Constants.getChangeApplyTimeTitle(0,data)); |
| | | header1.createCell(10).setCellValue("加保人数"); |
| | | header1.createCell(11).setCellValue("减保人数"); |
| | | for (int i = 0; i < 12; i++) { |
| | |
| | | configTitleCell(sxssfWorkbook,title.getCell(i)); |
| | | } |
| | | Row header1 = sheet.createRow(1); |
| | | header1.createCell(0).setCellValue("投保企业"); |
| | | header1.createCell(0).setCellValue(cellValue); |
| | | header1.createCell(1).setCellValue(""); |
| | | header1.createCell(2).setCellValue("保险方案"); |
| | | header1.createCell(3).setCellValue("保单号"); |
| | |
| | | header1.createCell(4).setCellValue("保险生效起期"); |
| | | header1.createCell(5).setCellValue("保险生效止期"); |
| | | header1.createCell(6).setCellValue("换厂人数"); |
| | | header1.createCell(7).setCellValue("期望批单生效期"); |
| | | header1.createCell(7).setCellValue(Constants.getChangeApplyTimeTitle(2,data)); |
| | | for (int i = 0; i < 8; i++) { |
| | | configFirstCell(sxssfWorkbook,header1.getCell(i)); |
| | | } |
| | |
| | | configTitleCell(sxssfWorkbook,title.getCell(i)); |
| | | } |
| | | Row header1 = sheet.createRow(1); |
| | | header1.createCell(0).setCellValue("投保企业"); |
| | | header1.createCell(0).setCellValue(cellValue); |
| | | header1.createCell(1).setCellValue(""); |
| | | header1.createCell(2).setCellValue("保险方案"); |
| | | header1.createCell(3).setCellValue("保单号"); |
| | |
| | | } |
| | | Row header1 = sheet.createRow(1); |
| | | header1.createCell(0).setCellValue("投保人"); |
| | | header1.createCell(1).setCellValue("被保险人"); |
| | | header1.createCell(2).setCellValue(""); |
| | | header1.createCell(3).setCellValue("保险方案"); |
| | | header1.createCell(4).setCellValue("保险生效起期"); |
| | | header1.createCell(5).setCellValue("保险生效止期"); |
| | | header1.createCell(1).setCellValue(""); |
| | | header1.createCell(2).setCellValue("被保险人"); |
| | | header1.createCell(3).setCellValue(""); |
| | | header1.createCell(4).setCellValue("保险方案"); |
| | | header1.createCell(5).setCellValue("申请提交日期"); |
| | | // header1.createCell(5).setCellValue("保险生效止期"); |
| | | for (int i = 0; i < 6; i++) { |
| | | configFirstCell(sxssfWorkbook,header1.getCell(i)); |
| | | } |
| | | sheet.addMergedRegion(new CellRangeAddress(1 ,1,1,2)); |
| | | sheet.addMergedRegion(new CellRangeAddress(1 ,1,0,1)); |
| | | sheet.addMergedRegion(new CellRangeAddress(1 ,1,2,3)); |
| | | |
| | | Row header2 = sheet.createRow(2); |
| | | header2.createCell(0).setCellValue(insuranceApply.getShopName()); |
| | | header2.createCell(1).setCellValue(insuranceApply.getCompanyName()); |
| | | header2.createCell(2).setCellValue(insuranceApply.getInsureNum()); |
| | | header2.createCell(3).setCellValue(insuranceApply.getSolutionsName()); |
| | | header2.createCell(4).setCellValue(com.doumee.core.utils.DateUtil.getPlusTime2(insuranceApply.getStartTime())); |
| | | header2.createCell(5).setCellValue(com.doumee.core.utils.DateUtil.getPlusTime2(insuranceApply.getEndTime())); |
| | | sheet.addMergedRegion(new CellRangeAddress(2 ,2,1,2)); |
| | | header2.createCell(1).setCellValue(""); |
| | | header2.createCell(2).setCellValue(insuranceApply.getCompanyName()); |
| | | header2.createCell(3).setCellValue(""); |
| | | header2.createCell(4).setCellValue(insuranceApply.getSolutionsName()); |
| | | header2.createCell(5).setCellValue(com.doumee.core.utils.DateUtil.getPlusTime2(insuranceApply.getCreateDate())); |
| | | sheet.addMergedRegion(new CellRangeAddress(2 ,2,0,1)); |
| | | sheet.addMergedRegion(new CellRangeAddress(2 ,2,2,3)); |
| | | for (int i = 0; i < 6; i++) { |
| | | configDataCell(sxssfWorkbook,header2.getCell(i)); |
| | | } |
| | |
| | | header1.createCell(2).setCellValue("保险方案"); |
| | | header1.createCell(3).setCellValue("保险生效起期"); |
| | | header1.createCell(4).setCellValue("保险生效止期"); |
| | | header1.createCell(5).setCellValue("投保人数"); |
| | | header1.createCell(5).setCellValue("在保/投保人数"); |
| | | header1.createCell(6).setCellValue("总费用(元)"); |
| | | for (int i = 0; i < 7; i++) { |
| | | configFirstCell(sxssfWorkbook,header1.getCell(i)); |
| | |
| | | header2.createCell(2).setCellValue(data.getSolutionName()); |
| | | header2.createCell(3).setCellValue(com.doumee.core.utils.DateUtil.getPlusTime2(data.getStartTime())); |
| | | header2.createCell(4).setCellValue(com.doumee.core.utils.DateUtil.getPlusTime2(data.getEndTime())); |
| | | header2.createCell(5).setCellValue(data.getInsureNum()); |
| | | header2.createCell(5).setCellValue(data.getGuaranteeNum()+" / "+data.getInsureNum()); |
| | | header2.createCell(6).setCellValue(Constants.formatBigdecimal2Float(data.getFee()).toString()); |
| | | for (int i = 0; i < 7; i++) { |
| | | configDataCell(sxssfWorkbook, header2.getCell(i)); |