Sfoglia il codice sorgente

导入导出BUG修复

anderx 4 anni fa
parent
commit
677f9aafe9

+ 3 - 3
src/main/java/com/goafanti/common/utils/excel/NewExcelUtil.java

@@ -182,7 +182,7 @@ public class NewExcelUtil<T> {
 		try {
 			OutputStream out = response.getOutputStream();
 			// 取出一共有多少个sheet.
-			int sheetNo = (int) (list.size() / sheetSize);
+			int sheetNo = (int) Math.ceil(list.size() / sheetSize);
 			
 			String dateFilename =DateFilename(sheetName);
 			for (int index = 0; index <= sheetNo; index++) {
@@ -251,7 +251,7 @@ public class NewExcelUtil<T> {
 		OutputStream out = null;
 		try {
 			// 取出一共有多少个sheet.
-			double sheetNo = Math.ceil(list.size() / sheetSize);
+			int sheetNo = (int) Math.ceil(list.size() / sheetSize);
 			for (int index = 0; index <= sheetNo; index++) {
 				createSheet(sheetNo, index);
 				// 产生一行
@@ -806,7 +806,7 @@ public class NewExcelUtil<T> {
 	 * @param sheetNo sheet数量
 	 * @param index   序号
 	 */
-	public void createSheet(double sheetNo, int index) {
+	public void createSheet(int sheetNo, int index) {
 		this.sheet = wb.createSheet();
 		this.styles = createStyles(wb);
 		// 设置工作表的名称.

+ 0 - 2
src/main/java/com/goafanti/patent/bo/PatentNewBo.java

@@ -16,7 +16,6 @@ public class PatentNewBo extends PatentNew{
 
 	@Excel(name = "专利编号")
 	private String patentNo;
-	
 	@Excel(name = "专利名称")
 	private String name;
 	@Excel(name = "类型", readConverterExp="0=发明专利,1=实用新型,2=外观设计")
@@ -69,7 +68,6 @@ public class PatentNewBo extends PatentNew{
 	private String createEnd;
 	private Integer isFollow;
 	
-	
 	public Integer getCostReduction() {
 		return costReduction;
 	}