Pārlūkot izejas kodu

update

Signed-off-by: anderx <312518615@qq.com>
anderx 5 gadi atpakaļ
vecāks
revīzija
1d7518973e

+ 4 - 4
src/main/java/com/goafanti/demandCollection/bo/OutDemandCollection.java

@@ -102,9 +102,9 @@ public class OutDemandCollection {
 	private String createTime;
 	private String sfxwgw;
 	private String sfyxck;
+	/*private String qyyzkdgjqykjcxhzqk;
 	private String zyhzfs;
-	private String qyyzkdgjqykjcxhzqk;
-	private String zyhzfsValue;
+	private String zyhzfsValue;*/
 
 	public String getId() {
 		return id;
@@ -1384,7 +1384,7 @@ public class OutDemandCollection {
 		this.sfyxck = sfyxck;
 	}
 
-	public String getZyhzfs() {
+/*	public String getZyhzfs() {
 		if (zyhzfs != null) {
 			String str = zyhzfs;
 			String str2 = "";
@@ -1431,5 +1431,5 @@ public class OutDemandCollection {
 
 	public void setZyhzfsValue(String zyhzfsValue) {
 		this.zyhzfsValue = zyhzfsValue;
-	}
+	}*/
 }

+ 13 - 11
src/main/java/com/goafanti/demandCollection/service/impl/DemandCollectionServiceImpl.java

@@ -1,5 +1,6 @@
 package com.goafanti.demandCollection.service.impl;
 
+import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
 import java.text.SimpleDateFormat;
@@ -8,6 +9,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import javax.servlet.ServletOutputStream;
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.commons.lang3.StringUtils;
@@ -83,9 +85,9 @@ public class DemandCollectionServiceImpl extends BaseMybatisDao<DemandCollection
     		XSSFWorkbook wb =ExportExcelUtil.exportTemplateInfoS(comment,"需求征集表");
     		//根据列表编写文档
     		XSSFSheet sheet =wb.getSheetAt(0);
-    		XSSFCellStyle styleTitle = wb.createCellStyle();
-			styleTitle.setAlignment(HorizontalAlignment.CENTER);
-			styleTitle.setWrapText(true);
+//    		XSSFCellStyle styleTitle = wb.createCellStyle();
+//			styleTitle.setAlignment(HorizontalAlignment.CENTER);
+//			styleTitle.setWrapText(true);
     		for (OutDemandCollection ob : (List<OutDemandCollection>)list) {
     			//新增一行
     			XSSFRow r = sheet.createRow(sheet.getLastRowNum()+1);
@@ -152,8 +154,8 @@ public class DemandCollectionServiceImpl extends BaseMybatisDao<DemandCollection
     				case "是否有意向合作单位" : o = ob.getSfyyxhzdw(); break;
     				case "意向合作单位" : o = ob.getSfyyxhzdwValue(); break;
     				case "意向合作方式" : o = ob.getYxhzfs(); break;
-    				case "企业已展开的国际与区域科技创新合作方式" : o = ob.getQyyzkdgjqykjcxhzqk(); break;
-    				case "主要合作方式 " : o = ob.getZyhzfs(); break;
+//    				case "企业已展开的国际与区域科技创新合作方式" : o = ob.getQyyzkdgjqykjcxhzqk(); break;
+//    				case "主要合作方式 " : o = ob.getZyhzfs(); break;
     				case "已享受的科技政策" : o = ob.getYssdkjzc(); break;
     				case "拟申请的省级项目" : o = ob.getNsqdsjxm(); break; 
     				case "是否授权省科技主管部门将上述有关信息对外公开发布" : o = ob.getSqskjzgbmxxdwgkfb(); break;
@@ -190,12 +192,12 @@ public class DemandCollectionServiceImpl extends BaseMybatisDao<DemandCollection
     				XSSFCell c = r.createCell(i);
     				sheet.autoSizeColumn(i,true); 
     				
-    				c.setCellStyle(styleTitle);
-    				if (sheet.getColumnWidth(i)>10000) {
-    					sheet.setColumnWidth(i, 10000);
-					}else {
-						sheet.setColumnWidth(i, sheet.getColumnWidth(i) * 12 / 10);
-					}
+//    				c.setCellStyle(styleTitle);
+//    				if (sheet.getColumnWidth(i)>10000) {
+//    					sheet.setColumnWidth(i, 10000);
+//					}else {
+//						sheet.setColumnWidth(i, sheet.getColumnWidth(i) * 12 / 10);
+//					}
     				c.setCellValue(o);
     			}
     		}