| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.enums.*; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.interfaces.OperLog; |
| | | import com.panzhihua.common.listen.*; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.community_backstage.excel.CustomSheetWriteHandler; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @Api(tags = {"社区管理/基础数据库/实有人口"}) |
| | |
| | | |
| | | @ApiOperation(value = "excel导入实有人口") |
| | | @PostMapping(value = "/serve/import", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "实有人口导入") |
| | | public R downloadPopulationTemplate(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | ComMngPopulationServeExcelListen comMngPopulationServeExcelListen = new ComMngPopulationServeExcelListen( |
| | | communityService, this.getCommunityId(), this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | communityService, this.getCommunityId(), this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | EasyExcel.read(inputStream, null, comMngPopulationServeExcelListen).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | |
| | | |
| | | @ApiOperation(value = "excel导入吸毒人员") |
| | | @PostMapping(value = "/serve/importDrug", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "吸毒人员导入") |
| | | public R importDrug(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | ComMngPopulationDrugExcelListen comMngPopulationDrugExcelListen = new ComMngPopulationDrugExcelListen( |
| | | communityService, this.getCommunityId(), this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | communityService, this.getCommunityId(), this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | EasyExcel.read(inputStream, null, comMngPopulationDrugExcelListen).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | |
| | | |
| | | @ApiOperation(value = "excel导入社区矫正人员") |
| | | @PostMapping(value = "/serve/importCorrect", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "社区矫正人员导入") |
| | | public R importCorrect(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | ComMngPopulationCorrectExcelListen comMngPopulationCorrectExcelListen = |
| | | new ComMngPopulationCorrectExcelListen(communityService, this.getCommunityId(), |
| | | this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | new ComMngPopulationCorrectExcelListen(communityService, this.getCommunityId(), |
| | | this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | EasyExcel.read(inputStream, null, comMngPopulationCorrectExcelListen).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | |
| | | |
| | | @ApiOperation(value = "excel导入重精人员") |
| | | @PostMapping(value = "/serve/importMajor", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "重精人员导入") |
| | | public R importMajor(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | ComMngPopulationMajorExcelListen comMngPopulationMajorExcelListen = new ComMngPopulationMajorExcelListen( |
| | | communityService, this.getCommunityId(), this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | communityService, this.getCommunityId(), this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | EasyExcel.read(inputStream, null, comMngPopulationMajorExcelListen).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | |
| | | |
| | | @ApiOperation(value = "excel导入邪教人员") |
| | | @PostMapping(value = "/serve/importCult", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "邪教人员导入") |
| | | public R importCult(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | ComMngPopulationCultExcelListen comMngPopulationCultExcelListen = new ComMngPopulationCultExcelListen( |
| | | communityService, this.getCommunityId(), this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | communityService, this.getCommunityId(), this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | EasyExcel.read(inputStream, null, comMngPopulationCultExcelListen).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | |
| | | |
| | | @ApiOperation(value = "excel导入刑释人员") |
| | | @PostMapping(value = "/serve/importRehabilitation", consumes = "multipart/*", |
| | | headers = "content-type=multipart/form-date") |
| | | headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "刑释人员导入") |
| | | public R importRehabilitation(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | ComMngPopulationRehabilitationExcelListen comMngPopulationRehabilitationExcelListen = |
| | | new ComMngPopulationRehabilitationExcelListen(communityService, this.getCommunityId(), |
| | | this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | new ComMngPopulationRehabilitationExcelListen(communityService, this.getCommunityId(), |
| | | this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | EasyExcel.read(inputStream, null, comMngPopulationRehabilitationExcelListen).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | |
| | | |
| | | @ApiOperation(value = "excel导入重点上访人员") |
| | | @PostMapping(value = "/serve/importKey", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "重点上访人员导入") |
| | | public R importKey(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | ComMngPopulationKeyExcelListen mngPopulationKeyExcelListen = new ComMngPopulationKeyExcelListen( |
| | | communityService, this.getCommunityId(), this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | communityService, this.getCommunityId(), this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | EasyExcel.read(inputStream, null, mngPopulationKeyExcelListen).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | |
| | | |
| | | @ApiOperation(value = "excel导入服刑人员") |
| | | @PostMapping(value = "/serve/importSentence", consumes = "multipart/*", |
| | | headers = "content-type=multipart/form-date") |
| | | headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "服刑人员导入") |
| | | public R importSentence(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | ComMngPopulationSentenceExcelListen comMngPopulationSentenceExcelListen = |
| | | new ComMngPopulationSentenceExcelListen(communityService, this.getCommunityId(), |
| | | this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | new ComMngPopulationSentenceExcelListen(communityService, this.getCommunityId(), |
| | | this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | EasyExcel.read(inputStream, null, comMngPopulationSentenceExcelListen).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | |
| | | |
| | | @ApiOperation(value = "excel导入退役军人") |
| | | @PostMapping(value = "/serve/importVeterans", consumes = "multipart/*", |
| | | headers = "content-type=multipart/form-date") |
| | | headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "退役军人导入") |
| | | public R importVeterans(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | ComMngPopulationVeteransExcelListen comMngPopulationVeteransExcelListen = |
| | | new ComMngPopulationVeteransExcelListen(communityService, this.getCommunityId(), |
| | | this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | new ComMngPopulationVeteransExcelListen(communityService, this.getCommunityId(), |
| | | this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | EasyExcel.read(inputStream, null, comMngPopulationVeteransExcelListen).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | |
| | | |
| | | @ApiOperation(value = "excel导入残疾人") |
| | | @PostMapping(value = "/serve/importDisability", consumes = "multipart/*", |
| | | headers = "content-type=multipart/form-date") |
| | | headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "残疾人导入") |
| | | public R importDisability(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | ComMngPopulationDisabilityExcelListen mngPopulationDisabilityExcelListen = |
| | | new ComMngPopulationDisabilityExcelListen(communityService, this.getCommunityId(), |
| | | this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | new ComMngPopulationDisabilityExcelListen(communityService, this.getCommunityId(), |
| | | this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | EasyExcel.read(inputStream, null, mngPopulationDisabilityExcelListen).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | |
| | | |
| | | @ApiOperation(value = "excel导入低保户") |
| | | @PostMapping(value = "/serve/importLowSecurity", consumes = "multipart/*", |
| | | headers = "content-type=multipart/form-date") |
| | | headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "低保户导入") |
| | | public R importLowSecurity(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | ComMngPopulationLowSecurityExcelListen mngPopulationDisabilityExcelListen = |
| | | new ComMngPopulationLowSecurityExcelListen(communityService, this.getCommunityId(), |
| | | this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | new ComMngPopulationLowSecurityExcelListen(communityService, this.getCommunityId(), |
| | | this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | EasyExcel.read(inputStream, null, mngPopulationDisabilityExcelListen).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | |
| | | @ApiOperation(value = "excel导入高龄老人") |
| | | @PostMapping(value = "/serve/importElder", consumes = "multipart/*", |
| | | headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "高龄老人导入") |
| | | public R importElder(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | @ApiOperation(value = "excel导入养老金人员") |
| | | @PostMapping(value = "/serve/importPension", consumes = "multipart/*", |
| | | headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "养老金人员导入") |
| | | public R importPension(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | */ |
| | | @ApiOperation(value = "excel-确认导入实有人口") |
| | | @PostMapping(value = "/import/confirm", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "实有人口导入") |
| | | public R listSavePopulationConfirm(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | ComMngPopulationConfirmServeExcelListen comMngPopulationConfirmServeExcelListen = |
| | | new ComMngPopulationConfirmServeExcelListen(communityService, this.getCommunityId()); |
| | | new ComMngPopulationConfirmServeExcelListen(communityService, this.getCommunityId()); |
| | | EasyExcel.read(inputStream, null, comMngPopulationConfirmServeExcelListen).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | |
| | | |
| | | @ApiOperation(value = "excel导入实有人口notoken") |
| | | @PostMapping(value = "/serve/import/noToken", consumes = "multipart/*", |
| | | headers = "content-type=multipart/form-date") |
| | | headers = "content-type=multipart/form-date") |
| | | public R downloadPopulationTemplateno(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | Long communityId = Long.valueOf(request.getParameter("communityId")); |
| | | inputStream = file.getInputStream(); |
| | | ComMngPopulationServeExcelListen comMngPopulationServeExcelListen = new ComMngPopulationServeExcelListen( |
| | | communityService, communityId, this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | communityService, communityId, this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | EasyExcel.read(inputStream, null, comMngPopulationServeExcelListen).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | |
| | | |
| | | @ApiOperation(value = "编辑实有人口") |
| | | @PostMapping(value = "/edit") |
| | | @OperLog(operModul = "居民信息管理", operType = 2, businessType = "编辑") |
| | | public R editPopulationInfo(@RequestBody ComMngPopulationEditDTO populationEditDTO) { |
| | | LoginUserInfoVO loginUserInfo = getLoginUserInfo(); |
| | | return communityService.editPopulation(populationEditDTO, loginUserInfo.getCommunityId()); |
| | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | List<String> TagsList = (List<String>) tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | | for (int i = 0; i < TagsList.size(); i++) { |
| | | List<String> head = new ArrayList<>(); |
| | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | List<String> TagsList = (List<String>) tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | | for (int i = 0; i < TagsList.size(); i++) { |
| | | if (!"吸毒人员".equals(TagsList.get(i))) { |
| | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | List<String> TagsList = (List<String>) tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | | for (int i = 0; i < TagsList.size(); i++) { |
| | | if (!"社区矫正".equals(TagsList.get(i))) { |
| | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | List<String> TagsList = (List<String>) tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | | for (int i = 0; i < TagsList.size(); i++) { |
| | | if (!"精神障碍患者".equals(TagsList.get(i))) { |
| | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | List<String> TagsList = (List<String>) tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | | for (int i = 0; i < TagsList.size(); i++) { |
| | | if (!"邪教人员".equals(TagsList.get(i))) { |
| | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | List<String> TagsList = (List<String>) tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | | for (int i = 0; i < TagsList.size(); i++) { |
| | | if (!"刑满释放".equals(TagsList.get(i))) { |
| | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | List<String> TagsList = (List<String>) tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | | for (int i = 0; i < TagsList.size(); i++) { |
| | | if (!"重点人员".equals(TagsList.get(i))) { |
| | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | List<String> TagsList = (List<String>) tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | | for (int i = 0; i < TagsList.size(); i++) { |
| | | if (!"服刑人员".equals(TagsList.get(i))) { |
| | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | List<String> TagsList = (List<String>) tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | | for (int i = 0; i < TagsList.size(); i++) { |
| | | if (!"退役军人".equals(TagsList.get(i))) { |
| | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | List<String> TagsList = (List<String>) tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | | for (int i = 0; i < TagsList.size(); i++) { |
| | | if (!"残疾人".equals(TagsList.get(i))) { |
| | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | List<String> TagsList = (List<String>) tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | | for (int i = 0; i < TagsList.size(); i++) { |
| | | if (!"低保户".equals(TagsList.get(i))) { |
| | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | List<String> TagsList = (List<String>) tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | | for (int i = 0; i < TagsList.size(); i++) { |
| | | if (!"高龄老人".equals(TagsList.get(i))) { |
| | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | List<String> TagsList = (List<String>) tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | | for (int i = 0; i < TagsList.size(); i++) { |
| | | if (!"养老金居民".equals(TagsList.get(i))) { |
| | |
| | | |
| | | @ApiOperation(value = "批量删除实有人口") |
| | | @PostMapping("/delete") |
| | | @OperLog(operModul = "居民信息管理", operType = 3, businessType = "批量删除实有人口") |
| | | public R deletePopulations(@RequestBody List<Long> ids) { |
| | | return communityService.deletePopulations(ids,this.getCommunityId()); |
| | | return communityService.deletePopulations(ids, this.getCommunityId()); |
| | | } |
| | | |
| | | private List<List<String>> headDataFilling() { |
| | |
| | | |
| | | @ApiOperation(value = "实有人口-数据导出") |
| | | @PostMapping("/data/export") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "实有人口导出") |
| | | public R dataExportPopulation(@RequestBody List<Long> Ids) { |
| | | // 获取登陆用户 |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | |
| | | R r = communityService.getVillageById(Ids.get(0)); |
| | | if (R.isOk(r)) { |
| | | populList = JSON.parseArray( |
| | | JSON.toJSONString( |
| | | communityService.getPopulationListByVillageId(Ids.get(0)).getData()), |
| | | ComMngPopulationVO.class); |
| | | JSON.toJSONString( |
| | | communityService.getPopulationListByVillageId(Ids.get(0)).getData()), |
| | | ComMngPopulationVO.class); |
| | | } else { |
| | | populList = JSON.parseArray( |
| | | JSON.toJSONString(communityService.getPopulationLists(Ids).getData()), |
| | | ComMngPopulationVO.class); |
| | | JSON.toJSONString(communityService.getPopulationLists(Ids).getData()), |
| | | ComMngPopulationVO.class); |
| | | } |
| | | } else { |
| | | populList = |
| | | JSON.parseArray(JSON.toJSONString(communityService.getPopulationLists(Ids).getData()), |
| | | ComMngPopulationVO.class); |
| | | JSON.parseArray(JSON.toJSONString(communityService.getPopulationLists(Ids).getData()), |
| | | ComMngPopulationVO.class); |
| | | } |
| | | } else {// 导出全部 |
| | | populList = JSON.parseArray( |
| | | JSON.toJSONString(communityService.getPopulationListByCommunityId(communityId).getData()), |
| | | ComMngPopulationVO.class); |
| | | JSON.toJSONString(communityService.getPopulationListByCommunityId(communityId).getData()), |
| | | ComMngPopulationVO.class); |
| | | } |
| | | |
| | | List<ComMngPopulationExcelVo> populationExcelVoList = new ArrayList<>(); |
| | |
| | | populationExcelVo.setSex(PopulSexEnum.getCnDescByName(popul.getSex())); |
| | | // 设置政治面貌 |
| | | populationExcelVo.setPoliticalOutlook( |
| | | PopulPoliticalOutlookEnum.getCnDescByName(popul.getPoliticalOutlook())); |
| | | PopulPoliticalOutlookEnum.getCnDescByName(popul.getPoliticalOutlook())); |
| | | // 设置是否租住 |
| | | // populationExcelVo.setIsRent(PopulIsOkEnum.getCnDescByName(popul.getIsRent())); |
| | | // 设置本地或外地 |
| | |
| | | populationExcelVo.setMarriage(PopulMarriageEnum.getCnDescByName(popul.getMarriage())); |
| | | // 设置文化程度 |
| | | populationExcelVo |
| | | .setCultureLevel(PopulCultureLevelEnum.getCnDescByName(popul.getCultureLevel())); |
| | | .setCultureLevel(PopulCultureLevelEnum.getCnDescByName(popul.getCultureLevel())); |
| | | // 设置年龄 |
| | | if (StringUtils.isNotEmpty(popul.getBirthday())) { |
| | | populationExcelVo.setAge(AgeUtils.getAgeFromBirthTimes(popul.getBirthday())); |
| | |
| | | } |
| | | |
| | | excelWriter = EasyExcel.write(fileName, ComMngPopulationExcelVo.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("实有人口导出数据").build(); |
| | | excelWriter.write(populationExcelVoList, writeSheet); |
| | | excelWriter.finish(); |
| | |
| | | InputStream inputStream = null; |
| | | try { |
| | | List<ComMngPopulationVO> populList = null; |
| | | populList = JSON.parseArray( |
| | | JSON.toJSONString(communityService.exportOld(comMngPopulationVO).getData()), |
| | | ComMngPopulationVO.class); |
| | | populList = JSON.parseArray( |
| | | JSON.toJSONString(communityService.exportOld(comMngPopulationVO).getData()), |
| | | ComMngPopulationVO.class); |
| | | List<ComMngPopulationExcelVo> populationExcelVoList = new ArrayList<>(); |
| | | if (populList != null && populList.size() > 0) { |
| | | for (ComMngPopulationVO popul : populList) { |
| | |
| | | /** |
| | | * 查询房屋二级级联菜单 |
| | | * |
| | | * @param cascadeHouseDTO |
| | | * 请求参数 |
| | | * @param cascadeHouseDTO 请求参数 |
| | | * @return 菜单列表 |
| | | */ |
| | | @ApiOperation(value = "房屋级联菜单查询") |
| | |
| | | /** |
| | | * 查询房屋二级级联菜单后台 |
| | | * |
| | | * @param cascadeHouseDTO |
| | | * 请求参数 |
| | | * @param cascadeHouseDTO 请求参数 |
| | | * @return 菜单列表 |
| | | */ |
| | | @ApiOperation(value = "房屋级联菜单查询") |
| | |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ComMngPopulationMistakeExcelVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("实有人口错误数据").build(); |
| | | excelWriter.write(list, writeSheet); |
| | | excelWriter.finish(); |
| | |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ComMngPopulationDrugMistakeExcelVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("吸毒人员错误数据").build(); |
| | | excelWriter.write(list, writeSheet); |
| | | excelWriter.finish(); |
| | |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ComMngPopulationCorrectMistakeExcelVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("社区矫正人员错误数据").build(); |
| | | excelWriter.write(list, writeSheet); |
| | | excelWriter.finish(); |
| | |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ComMngPopulationMajorMistakeExcelVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("重精人员错误数据").build(); |
| | | excelWriter.write(list, writeSheet); |
| | | excelWriter.finish(); |
| | |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ComMngPopulationCultMistakeExcelVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("邪教人员错误数据").build(); |
| | | excelWriter.write(list, writeSheet); |
| | | excelWriter.finish(); |
| | |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ComMngPopulationRehabilitationMistakeExcelVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("刑释人员错误数据").build(); |
| | | excelWriter.write(list, writeSheet); |
| | | excelWriter.finish(); |
| | |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ComMngPopulationKeyMistakeExcelVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("重点上访人员错误数据").build(); |
| | | excelWriter.write(list, writeSheet); |
| | | excelWriter.finish(); |
| | |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ComMngPopulationSentenceMistakeExcelVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("服刑人员错误数据").build(); |
| | | excelWriter.write(list, writeSheet); |
| | | excelWriter.finish(); |
| | |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ComMngPopulationVeteransMistakeExcelVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("退役军人错误数据").build(); |
| | | excelWriter.write(list, writeSheet); |
| | | excelWriter.finish(); |
| | |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ComMngPopulationDisabilityMistakeExcelVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("残疾人错误数据").build(); |
| | | excelWriter.write(list, writeSheet); |
| | | excelWriter.finish(); |
| | |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ComMngPopulationLowSecurityMistakeExcelVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("低保户错误数据").build(); |
| | | excelWriter.write(list, writeSheet); |
| | | excelWriter.finish(); |