|
|
@ -17,6 +17,7 @@ |
|
|
|
|
|
|
|
package com.elink.esua.epdc.controller; |
|
|
|
|
|
|
|
import com.elink.esua.epdc.commons.tools.constant.NumConstant; |
|
|
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
|
|
@ -108,8 +109,17 @@ public class UserController { |
|
|
|
@GetMapping("export") |
|
|
|
public void export( @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|
|
|
List<UserDTO> list = userService.list(params); |
|
|
|
|
|
|
|
ExcelUtils.exportExcelToTarget(response, null, list, UserExcel.class); |
|
|
|
String auditState = (String) params.get("auditState"); |
|
|
|
// 状态(0-未审核,1-审核通过,2-审核未通过)
|
|
|
|
String fileName = null; |
|
|
|
if(NumConstant.ZERO_STR.equals(auditState)){ |
|
|
|
fileName="未审核"; |
|
|
|
}else if(NumConstant.ONE_STR.equals(auditState)){ |
|
|
|
fileName="审核通过"; |
|
|
|
}else if(NumConstant.TWO_STR.equals(auditState)){ |
|
|
|
fileName="审核未通过"; |
|
|
|
} |
|
|
|
ExcelUtils.exportExcelToTarget(response, fileName, list, UserExcel.class); |
|
|
|
} |
|
|
|
|
|
|
|
} |