anderx лет назад: 4
Родитель
Сommit
0f96cfffe6

+ 19 - 8
pom.xml

@@ -70,7 +70,7 @@
 			<artifactId>spring-web</artifactId>
 			<version>${org.springframework-version}</version>
 		</dependency>
-		
+
 
 		<dependency>
 			<groupId>javax.annotation</groupId>
@@ -88,12 +88,9 @@
 			<artifactId>jaxb-api</artifactId>
 			<version>2.3.0</version>
 		</dependency>
-		<!-- <dependency>
-			<groupId>de.dfki.cos.basys.platform.wrapper-bundle-settings</groupId>
-			<artifactId>javax.websocket-api</artifactId>
-			<version>0.2.6</version>
-			<scope>provided</scope>
-		</dependency> -->
+		<!-- <dependency> <groupId>de.dfki.cos.basys.platform.wrapper-bundle-settings</groupId> 
+			<artifactId>javax.websocket-api</artifactId> <version>0.2.6</version> <scope>provided</scope> 
+			</dependency> -->
 		<dependency>
 			<groupId>org.springframework</groupId>
 			<artifactId>spring-webmvc</artifactId>
@@ -349,6 +346,13 @@
 			<artifactId>json-simple</artifactId>
 			<version>1.1.1</version>
 		</dependency>
+		
+		    <dependency>
+           <groupId>org.apache.poi</groupId>
+           <artifactId>poi</artifactId>
+           <version>3.17</version>
+       </dependency>
+       
 		<dependency>
 			<groupId>org.apache.poi</groupId>
 			<artifactId>poi-ooxml</artifactId>
@@ -369,7 +373,7 @@
 			<artifactId>httpasyncclient</artifactId>
 			<version>4.1.3</version>
 		</dependency>
-		
+
 		<dependency>
 			<groupId>cn.jpush.api</groupId>
 			<artifactId>jiguang-common</artifactId>
@@ -392,6 +396,13 @@
 			<artifactId>mail</artifactId>
 			<version>1.4.7</version>
 		</dependency>
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>easyexcel</artifactId>
+			<version>2.2.9</version>
+			<type>pom</type>
+		</dependency>
+
 	</dependencies>
 	<build>
 		<resources>

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

@@ -249,9 +249,15 @@ public class NewExcelUtil<T> {
 			double sheetNo = Math.ceil(list.size() / sheetSize);
 			for (int index = 0; index <= sheetNo; index++) {
 				createSheet(sheetNo, index);
-
 				// 产生一行
-				Row row = sheet.createRow(0);
+				Row title = sheet.createRow(0);
+				Cell cell = title.createCell(0);
+				cell.setCellValue(sheetName);
+				CellRangeAddress region = new CellRangeAddress(0, 0, 0, fields.size()-1);
+				sheet.addMergedRegion(region);
+				cell.setCellStyle(styles.get("total"));
+				Row row = sheet.createRow(1);
+				// 产生一行
 				int column = 0;
 				// 写入各个字段的列头名称
 				for (Object[] os : fields) {

+ 2 - 4
src/main/java/com/goafanti/organization/controller/ThirdPartyCompanyApiController.java

@@ -4,6 +4,7 @@ package com.goafanti.organization.controller;
 
 import java.io.IOException;
 import java.math.BigDecimal;
+import java.net.URLEncoder;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
@@ -685,14 +686,11 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 	 * type 0财务 1专利管理员 
 	 */
 	@RequestMapping(value = "/exportPaymentList", method = RequestMethod.GET)
-	public Result exportPaymentList(HttpServletResponse response,InputPaymentList ip,Integer type){
-		
+	public Result exportPaymentList2(HttpServletResponse response,InputPaymentList ip,Integer type){
 		return thirdPartyCompanyService.exportPaymentList(response,ip,type);
 		
 	}
 	
-	
-	
 	/**
 	 * 	审核
 	 *  

+ 1 - 0
src/main/java/com/goafanti/organization/service/ThirdPartyCompanyService.java

@@ -120,6 +120,7 @@ public interface ThirdPartyCompanyService {
 
 
 
+
 	
 
 

+ 0 - 1
src/main/java/com/goafanti/organization/service/impl/ThirdPartyCompanyServiceImpl.java

@@ -1019,5 +1019,4 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 		}
 		return false;
 	}
-		
 }