|
@ -30,7 +30,7 @@ import com.elink.esua.epdc.dto.PartyMemberModifyFormDTO; |
|
|
import com.elink.esua.epdc.dto.UserDTO; |
|
|
import com.elink.esua.epdc.dto.UserDTO; |
|
|
import com.elink.esua.epdc.dto.epdc.form.EpdcUserPointsFormDTO; |
|
|
import com.elink.esua.epdc.dto.epdc.form.EpdcUserPointsFormDTO; |
|
|
import com.elink.esua.epdc.enums.AppUserStatesEnum; |
|
|
import com.elink.esua.epdc.enums.AppUserStatesEnum; |
|
|
import com.elink.esua.epdc.excel.UserExcel; |
|
|
import com.elink.esua.epdc.excel.*; |
|
|
import com.elink.esua.epdc.service.UserService; |
|
|
import com.elink.esua.epdc.service.UserService; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
@ -192,22 +192,30 @@ public class UserController { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@GetMapping("export") |
|
|
@GetMapping("export") |
|
|
@DataFilter(tableAlias = "u", isPendingCreator = false, deptId = "DEPT_ID", prefix = "AND") |
|
|
// @DataFilter(tableAlias = "u", isPendingCreator = false, deptId = "DEPT_ID", prefix = "AND")
|
|
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|
|
List<UserDTO> list = userService.list(params); |
|
|
|
|
|
String auditState = (String) params.get("state"); |
|
|
String auditState = (String) params.get("state"); |
|
|
// 状态(0-未审核,1-审核通过,2-审核未通过)
|
|
|
// 状态(0-未审核,1-审核通过,2-审核未通过)
|
|
|
String fileName = null; |
|
|
String fileName; |
|
|
|
|
|
List<UserDTO> list; |
|
|
if (AppUserStatesEnum.STATE_COMPLETED_INFORMATION_PENDING_REVIEW.value().equals(auditState)) { |
|
|
if (AppUserStatesEnum.STATE_COMPLETED_INFORMATION_PENDING_REVIEW.value().equals(auditState)) { |
|
|
|
|
|
list = userService.authenticatedExport(params); |
|
|
fileName = "待认证居民"; |
|
|
fileName = "待认证居民"; |
|
|
|
|
|
ExcelUtils.exportExcelToTarget(response, fileName, list, UserExcelStateOne.class); |
|
|
} else if (AppUserStatesEnum.STATE_INFORMATION_PASSED.value().equals(auditState)) { |
|
|
} else if (AppUserStatesEnum.STATE_INFORMATION_PASSED.value().equals(auditState)) { |
|
|
|
|
|
list = userService.authenticatedExport(params); |
|
|
fileName = "已认证居民"; |
|
|
fileName = "已认证居民"; |
|
|
|
|
|
ExcelUtils.exportExcelToTarget(response, fileName, list, UserExcelStateThree.class); |
|
|
} else if (AppUserStatesEnum.STATE_INFORMATION_NOT_PASSED.value().equals(auditState)) { |
|
|
} else if (AppUserStatesEnum.STATE_INFORMATION_NOT_PASSED.value().equals(auditState)) { |
|
|
|
|
|
list = userService.authenticatedExport(params); |
|
|
fileName = "居民认证失败"; |
|
|
fileName = "居民认证失败"; |
|
|
|
|
|
ExcelUtils.exportExcelToTarget(response, fileName, list, UserExcelStateTwo.class); |
|
|
} else if (AppUserStatesEnum.STATE_REGISTERED.value().equals(auditState)) { |
|
|
} else if (AppUserStatesEnum.STATE_REGISTERED.value().equals(auditState)) { |
|
|
|
|
|
list = userService.authenticatedExport(params); |
|
|
fileName = "未认证居民"; |
|
|
fileName = "未认证居民"; |
|
|
|
|
|
ExcelUtils.exportExcelToTarget(response, fileName, list, UserExcelStateZero.class); |
|
|
} |
|
|
} |
|
|
ExcelUtils.exportExcelToTarget(response, fileName, list, UserExcel.class); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -235,10 +243,10 @@ public class UserController { |
|
|
* @date 2020/3/18 15:59 |
|
|
* @date 2020/3/18 15:59 |
|
|
*/ |
|
|
*/ |
|
|
@GetMapping("unauthorizedexport") |
|
|
@GetMapping("unauthorizedexport") |
|
|
@DataFilter(tableAlias = "ug", isPendingCreator = false, deptId = "GRID_ID", prefix = "AND") |
|
|
// @DataFilter(tableAlias = "ug", isPendingCreator = false, deptId = "GRID_ID", prefix = "AND")
|
|
|
public void unauthorizedExport(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|
|
public void unauthorizedExport(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|
|
List<UserDTO> list = userService.list(params); |
|
|
List<UserDTO> list = userService.list(params); |
|
|
ExcelUtils.exportExcelToTarget(response, "未认证居民", list, UserExcel.class); |
|
|
ExcelUtils.exportExcelToTarget(response, "未认证居民", list, UserExcelStateZero.class); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/*** |
|
|
/*** |
|
@ -280,7 +288,7 @@ public class UserController { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** |
|
|
/*** |
|
|
* 已认证居民 |
|
|
* 待认证居民+已认证居民 |
|
|
* @param params |
|
|
* @param params |
|
|
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData < com.elink.esua.epdc.dto.UserDTO>> |
|
|
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData < com.elink.esua.epdc.dto.UserDTO>> |
|
|
* @author qushutong |
|
|
* @author qushutong |
|
|