From f892f09a53fdec30c3b36a88496e723011da76c9 Mon Sep 17 00:00:00 2001 From: songyunpeng Date: Wed, 4 Nov 2020 17:27:20 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=B9=E6=AE=8A=E4=BA=BA=E7=BE=A4=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=88=9D=E6=AC=A1=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ApiScreenSpecialUserController.java | 94 ++++++++ .../esua/epdc/feign/CustomFeignClient.java | 138 +++++++---- .../fallback/CustomFeignClientFallback.java | 31 ++- .../esua/epdc/service/CustomService.java | 47 +++- .../epdc/service/impl/CustomServiceImpl.java | 31 ++- .../elink/esua/epdc/dto/SpecialUserDTO.java | 147 ++++++++++++ .../SpecialUserDisabilityTypeFormDTO.java | 29 +++ .../epdc/dto/form/SpecialUserFormDTO.java | 71 ++++++ .../SpecialUserMonthlySubsidyFormDTO.java | 29 +++ .../result/EpdcSpecialUserErrorResultDTO.java | 26 ++ ...pecialPopulationDistributionResultDTO.java | 50 ++++ .../SpecialUserDisabilityTypeResultDTO.java | 26 ++ .../SpecialUserMonthlySubsidyResultDTO.java | 32 +++ .../epdc/dto/result/SpecialUserResultDTO.java | 98 ++++++++ .../EpdcScreenSpecialUserController.java | 89 +++++++ .../controller/SpecialUserController.java | 135 +++++++++++ .../specialuser/dao/SpecialUserDao.java | 97 ++++++++ .../specialuser/entity/SpecialUserEntity.java | 116 +++++++++ .../specialuser/excel/SpecialUserExcel.java | 78 ++++++ .../service/SpecialUserService.java | 152 ++++++++++++ .../service/impl/SpecialUserServiceImpl.java | 222 ++++++++++++++++++ .../民政享受政策人员表 - 样表.xlsx | Bin 0 -> 10467 bytes .../main/resources/mapper/SpecialUserDao.xml | 166 +++++++++++++ 23 files changed, 1848 insertions(+), 56 deletions(-) create mode 100644 esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiScreenSpecialUserController.java create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/SpecialUserDTO.java create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/SpecialUserDisabilityTypeFormDTO.java create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/SpecialUserFormDTO.java create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/SpecialUserMonthlySubsidyFormDTO.java create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSpecialUserErrorResultDTO.java create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/SpecialPopulationDistributionResultDTO.java create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/SpecialUserDisabilityTypeResultDTO.java create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/SpecialUserMonthlySubsidyResultDTO.java create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/SpecialUserResultDTO.java create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/controller/EpdcScreenSpecialUserController.java create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/controller/SpecialUserController.java create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/dao/SpecialUserDao.java create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/entity/SpecialUserEntity.java create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/excel/SpecialUserExcel.java create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/service/SpecialUserService.java create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/service/impl/SpecialUserServiceImpl.java create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/excel/民政享受政策人员表 - 样表.xlsx create mode 100644 esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/SpecialUserDao.xml diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiScreenSpecialUserController.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiScreenSpecialUserController.java new file mode 100644 index 00000000..49369213 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiScreenSpecialUserController.java @@ -0,0 +1,94 @@ +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.annotation.ReportData; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.form.SpecialUserDisabilityTypeFormDTO; +import com.elink.esua.epdc.dto.form.SpecialUserFormDTO; +import com.elink.esua.epdc.dto.form.SpecialUserMonthlySubsidyFormDTO; +import com.elink.esua.epdc.dto.result.SpecialPopulationDistributionResultDTO; +import com.elink.esua.epdc.dto.result.SpecialUserDisabilityTypeResultDTO; +import com.elink.esua.epdc.dto.result.SpecialUserMonthlySubsidyResultDTO; +import com.elink.esua.epdc.dto.result.SpecialUserResultDTO; +import com.elink.esua.epdc.service.CustomService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * 特殊人群分析 + * + * @author songyunpeng + * @email yujintao@elink-cn.com + * @date 2019/9/6 19:30 + */ +@RestController +@RequestMapping("screenSpecialUser") +public class ApiScreenSpecialUserController { + + @Autowired + private CustomService customService; + + + /** + * @Description 特殊人群分析-人群分布接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + @ReportData + @PostMapping("selectMonthlySubsidy") + public Result selectPopulationDistribution(){ + return customService.selectPopulationDistribution(); + } + /** + * @Description 特殊人群分析-查人接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [specialUserFormDTO] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + **/ + @ReportData + @PostMapping("selectMonthlySubsidy") + public Result> selectPageSpecialUser(@RequestBody SpecialUserFormDTO dto){ + return customService.selectPageSpecialUser(dto); + } + /** + * @Description 特殊人群分析-详情接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [suId] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + @ReportData + @PostMapping("selectSpecialUserDetail/{suId}") + public Result selectSpecialUserDetail(@PathVariable String suId){ + return customService.selectSpecialUserDetail(suId); + } + /** + * @Description 特殊人群分析-残疾类别分布接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [specialUserDisabilityTypeFormDTO] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + @ReportData + @PostMapping("selectDisabilityType") + public Result> selectDisabilityType(@RequestBody SpecialUserDisabilityTypeFormDTO dto){ + return customService.selectDisabilityType(dto); + } + + /** + * @Description 特殊人群分析-月度补贴情况接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [specialUserDisabilityTypeFormDTO] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + @ReportData + @PostMapping("selectMonthlySubsidy") + public Result> selectMonthlySubsidy(@RequestBody SpecialUserMonthlySubsidyFormDTO dto){ + return customService.selectMonthlySubsidy(dto); + } + +} diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/CustomFeignClient.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/CustomFeignClient.java index 2b546b7f..cb232f86 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/CustomFeignClient.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/CustomFeignClient.java @@ -1,11 +1,9 @@ package com.elink.esua.epdc.feign; import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; +import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.commons.tools.utils.Result; -import com.elink.esua.epdc.dto.form.ArchiveDeptFormDTO; -import com.elink.esua.epdc.dto.form.ArchiveFormDTO; -import com.elink.esua.epdc.dto.form.EpdcDeptInfoFormDTO; -import com.elink.esua.epdc.dto.form.EpiDemicReportFormDTO; +import com.elink.esua.epdc.dto.form.*; import com.elink.esua.epdc.dto.result.*; import com.elink.esua.epdc.feign.fallback.CustomFeignClientFallback; import org.springframework.cloud.openfeign.FeignClient; @@ -13,6 +11,7 @@ import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import java.util.List; @@ -23,49 +22,49 @@ import java.util.List; */ @FeignClient(name = ServiceConstant.EPDC_CUSTOM_SERVER, fallback = CustomFeignClientFallback.class) public interface CustomFeignClient { - /** - * @param formDTO - * @return com.elink.esua.epdc.commons.tools.utils.Result - * @Author yinzuomei - * @Description 疫情上报 - * @Date 2020/1/28 13:27 - **/ - @PostMapping(value = "custom/epidemic/report", consumes = MediaType.APPLICATION_JSON_VALUE) - Result report(EpiDemicReportFormDTO formDTO); + /** + * @param formDTO + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 疫情上报 + * @Date 2020/1/28 13:27 + **/ + @PostMapping(value = "custom/epidemic/report", consumes = MediaType.APPLICATION_JSON_VALUE) + Result report(EpiDemicReportFormDTO formDTO); - /* - * 移动端获取 了解锦水-模块管理接口 - * - * @param - * @return com.elink.esua.epdc.commons.tools.utils.Result> - * @Author zhangyong - * @Date 10:42 2020-05-20 - **/ - @Deprecated - @GetMapping(value = "custom/epdc-app/module/list", consumes = MediaType.APPLICATION_JSON_VALUE) - Result> selectListModule(); + /* + * 移动端获取 了解锦水-模块管理接口 + * + * @param + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @Author zhangyong + * @Date 10:42 2020-05-20 + **/ + @Deprecated + @GetMapping(value = "custom/epdc-app/module/list", consumes = MediaType.APPLICATION_JSON_VALUE) + Result> selectListModule(); - /** - * - * 根据模块分类获取模块 - * - * @params [moduleCategory] - * @return com.elink.esua.epdc.commons.tools.utils.Result> - * @author liuchuang - * @since 2020/7/15 17:43 - */ - @GetMapping("custom/epdc-app/module/list/{moduleCategory}") - Result> listOfModuleByModuleCategory(@PathVariable("moduleCategory") String moduleCategory); + /** + * 根据模块分类获取模块 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @params [moduleCategory] + * @author liuchuang + * @since 2020/7/15 17:43 + */ + @GetMapping("custom/epdc-app/module/list/{moduleCategory}") + Result> listOfModuleByModuleCategory(@PathVariable("moduleCategory") String moduleCategory); - /** - * 移动端获取 了解锦水-硬核管理接口 - * @param formDTO - * @return com.elink.esua.epdc.commons.tools.utils.Result> - * @Author zhangyong - * @Date 13:41 2020-05-20 - **/ - @GetMapping(value = "custom/epdc-app/deptinfo/list", consumes = MediaType.APPLICATION_JSON_VALUE) - Result> selectListDeptInfo(EpdcDeptInfoFormDTO formDTO); + /** + * 移动端获取 了解锦水-硬核管理接口 + * + * @param formDTO + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @Author zhangyong + * @Date 13:41 2020-05-20 + **/ + @GetMapping(value = "custom/epdc-app/deptinfo/list", consumes = MediaType.APPLICATION_JSON_VALUE) + Result> selectListDeptInfo(EpdcDeptInfoFormDTO formDTO); @GetMapping(value = "custom/archive/depts", consumes = MediaType.APPLICATION_JSON_VALUE) Result> listArchiveDeptInfo(ArchiveDeptFormDTO formDTO); @@ -75,4 +74,55 @@ public interface CustomFeignClient { @GetMapping(value = "custom/archive/detail/{id}", consumes = MediaType.APPLICATION_JSON_VALUE) Result getArchiveDetail(@PathVariable("id") String id); + + + /** + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Description 特殊人群分析-人群分布接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [] + **/ + @PostMapping(value = "custom/screenSpecialUser/selectMonthlySubsidy", consumes = MediaType.APPLICATION_JSON_VALUE) + Result selectPopulationDistribution(); + + /** + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @Description 特殊人群分析-查人接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [specialUserFormDTO] + **/ + @PostMapping(value = "custom/screenSpecialUser/selectMonthlySubsidy", consumes = MediaType.APPLICATION_JSON_VALUE) + Result> selectPageSpecialUser(@RequestBody SpecialUserFormDTO dto); + + /** + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Description 特殊人群分析-详情接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [suId] + **/ + @PostMapping(value = "custom/screenSpecialUser/selectSpecialUserDetail/{suId}", consumes = MediaType.APPLICATION_JSON_VALUE) + Result selectSpecialUserDetail(@PathVariable String suId); + + /** + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Description 特殊人群分析-残疾类别分布接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [specialUserDisabilityTypeFormDTO] + **/ + @PostMapping(value = "custom/screenSpecialUser/selectDisabilityType", consumes = MediaType.APPLICATION_JSON_VALUE) + Result> selectDisabilityType(@RequestBody SpecialUserDisabilityTypeFormDTO dto); + + /** + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Description 特殊人群分析-月度补贴情况接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [specialUserDisabilityTypeFormDTO] + **/ + @PostMapping(value = "custom/screenSpecialUser/selectMonthlySubsidy", consumes = MediaType.APPLICATION_JSON_VALUE) + Result> selectMonthlySubsidy(@RequestBody SpecialUserMonthlySubsidyFormDTO dto); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/CustomFeignClientFallback.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/CustomFeignClientFallback.java index d7fad41a..678e8dfe 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/CustomFeignClientFallback.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/CustomFeignClientFallback.java @@ -1,12 +1,10 @@ package com.elink.esua.epdc.feign.fallback; import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; +import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; import com.elink.esua.epdc.commons.tools.utils.Result; -import com.elink.esua.epdc.dto.form.ArchiveDeptFormDTO; -import com.elink.esua.epdc.dto.form.ArchiveFormDTO; -import com.elink.esua.epdc.dto.form.EpdcDeptInfoFormDTO; -import com.elink.esua.epdc.dto.form.EpiDemicReportFormDTO; +import com.elink.esua.epdc.dto.form.*; import com.elink.esua.epdc.dto.result.*; import com.elink.esua.epdc.feign.CustomFeignClient; import org.springframework.stereotype.Component; @@ -55,4 +53,29 @@ public class CustomFeignClientFallback implements CustomFeignClient { public Result getArchiveDetail(String id) { return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "getArchiveDetail", id); } + + @Override + public Result selectPopulationDistribution() { + return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "selectPopulationDistribution"); + } + + @Override + public Result> selectPageSpecialUser(SpecialUserFormDTO dto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "selectPageSpecialUser", dto); + } + + @Override + public Result selectSpecialUserDetail(String suId) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "selectSpecialUserDetail", suId); + } + + @Override + public Result> selectDisabilityType(SpecialUserDisabilityTypeFormDTO dto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "selectDisabilityType", dto); + } + + @Override + public Result> selectMonthlySubsidy(SpecialUserMonthlySubsidyFormDTO dto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "selectMonthlySubsidy", dto); + } } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/CustomService.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/CustomService.java index 6c3eaf53..0ed38ba1 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/CustomService.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/CustomService.java @@ -1,11 +1,9 @@ package com.elink.esua.epdc.service; +import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.dto.DeptOption; -import com.elink.esua.epdc.dto.form.ArchiveDeptFormDTO; -import com.elink.esua.epdc.dto.form.ArchiveFormDTO; -import com.elink.esua.epdc.dto.form.EpdcDeptInfoFormDTO; -import com.elink.esua.epdc.dto.form.EpiDemicReportFormDTO; +import com.elink.esua.epdc.dto.form.*; import com.elink.esua.epdc.dto.result.*; import java.util.List; @@ -90,4 +88,45 @@ public interface CustomService { * @return com.elink.esua.epdc.commons.tools.utils.Result **/ Result getArchiveDetail(String id); + + /** + * @Description 特殊人群分析-人群分布接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + Result selectPopulationDistribution(); + /** + * @Description 特殊人群分析-查人接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @param specialUserFormDTO*/ + Result> selectPageSpecialUser(SpecialUserFormDTO specialUserFormDTO); + /** + * @Description 特殊人群分析-详情接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [suId] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + Result selectSpecialUserDetail(String suId); + /** + * @Description 特殊人群分析-残疾类别分布接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [specialUserDisabilityTypeFormDTO] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + Result> selectDisabilityType(SpecialUserDisabilityTypeFormDTO specialUserDisabilityTypeFormDTO); + /** + * @Description 特殊人群分析-月度补贴情况接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + **/ + Result> selectMonthlySubsidy(SpecialUserMonthlySubsidyFormDTO dto); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java index 9b319702..3728528c 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CustomServiceImpl.java @@ -1,13 +1,11 @@ package com.elink.esua.epdc.service.impl; import com.elink.esua.epdc.commons.tools.exception.RenException; +import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.dto.DeptOption; import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; -import com.elink.esua.epdc.dto.form.ArchiveDeptFormDTO; -import com.elink.esua.epdc.dto.form.ArchiveFormDTO; -import com.elink.esua.epdc.dto.form.EpdcDeptInfoFormDTO; -import com.elink.esua.epdc.dto.form.EpiDemicReportFormDTO; +import com.elink.esua.epdc.dto.form.*; import com.elink.esua.epdc.dto.result.*; import com.elink.esua.epdc.feign.AdminFeignClient; import com.elink.esua.epdc.feign.CustomFeignClient; @@ -113,4 +111,29 @@ public class CustomServiceImpl implements CustomService { public Result getArchiveDetail(String id) { return customFeignClient.getArchiveDetail(id); } + + @Override + public Result selectPopulationDistribution() { + return customFeignClient.selectPopulationDistribution(); + } + + @Override + public Result> selectPageSpecialUser(SpecialUserFormDTO specialUserFormDTO) { + return customFeignClient.selectPageSpecialUser(specialUserFormDTO); + } + + @Override + public Result selectSpecialUserDetail(String suId) { + return customFeignClient.selectSpecialUserDetail(suId); + } + + @Override + public Result> selectDisabilityType(SpecialUserDisabilityTypeFormDTO specialUserDisabilityTypeFormDTO) { + return customFeignClient.selectDisabilityType(specialUserDisabilityTypeFormDTO); + } + + @Override + public Result> selectMonthlySubsidy(SpecialUserMonthlySubsidyFormDTO dto) { + return customFeignClient.selectMonthlySubsidy(dto); + } } diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/SpecialUserDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/SpecialUserDTO.java new file mode 100644 index 00000000..07eee047 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/SpecialUserDTO.java @@ -0,0 +1,147 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * 特殊人群表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-11-03 + */ +@Data +public class SpecialUserDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 主键 + */ + private String id; + + /** + * 所属村庄 + */ + private String suVillage; + + /** + * 姓名 + */ + private String suName; + + /** + * 出生日期 + */ + private Date suBirthday; + + /** + * 残疾证号 + */ + private String suDisabilityNumber; + + /** + * 残疾类别及等级 + */ + private String suDisabilityType; + + /** + * 是否低保 0:否1:是 + */ + private String suIsLow; + + /** + * 保障人口 + */ + private Integer suGuaranteedPopulation; + + /** + * 关系 + */ + private String suRelationship; + + /** + * 低保金额 + */ + private BigDecimal suLowMoney; + + /** + * 困难残疾人生活补贴 + */ + private BigDecimal suLivingSubsidy; + + /** + * 重度残疾人护理补贴 + */ + private BigDecimal suCareSubsidy; + + /** + * 经济困难老年人补贴 + */ + private BigDecimal suElderlySubsidy; + + /** + * 孤困儿童补贴 + */ + private BigDecimal suChildSubsidy; + + /** + * 分散五保补贴 + */ + private BigDecimal suFiveGuaranteesSubsidy; + + /** + * 是否贫困户 0:否1:是 + */ + private String suIsPoor; + + /** + * 删除表示 0:否1:是 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/SpecialUserDisabilityTypeFormDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/SpecialUserDisabilityTypeFormDTO.java new file mode 100644 index 00000000..28f90931 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/SpecialUserDisabilityTypeFormDTO.java @@ -0,0 +1,29 @@ +package com.elink.esua.epdc.dto.form; + +import lombok.Data; + +import javax.validation.constraints.Min; +import java.io.Serializable; + +/** + * 残疾类别分布接口参数 + * + * @author songyunpeng + * @since v1.0.0 2020-05-20 + */ +@Data +public class SpecialUserDisabilityTypeFormDTO implements Serializable { + private static final long serialVersionUID = 2379520294973498819L; + + /** + * 页码 + */ + @Min(value = 1, message = "页码必须大于0") + private Integer pageIndex; + + /** + * 页容量 + */ + @Min(value = 1, message = "页容量必须大于0") + private Integer pageSize; +} diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/SpecialUserFormDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/SpecialUserFormDTO.java new file mode 100644 index 00000000..bd355aab --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/SpecialUserFormDTO.java @@ -0,0 +1,71 @@ +package com.elink.esua.epdc.dto.form; + +import lombok.Data; + +import javax.validation.constraints.Min; +import java.io.Serializable; + +/** + * 查询特殊人群 参数 + * + * @author songyunpeng + * @since v1.0.0 2020-05-20 + */ +@Data +public class SpecialUserFormDTO implements Serializable { + private static final long serialVersionUID = 2379520294973498819L; + + /** + * 页码 + */ + @Min(value = 1, message = "页码必须大于0") + private Integer pageIndex; + + /** + * 页容量 + */ + @Min(value = 1, message = "页容量必须大于0") + private Integer pageSize; + + + /** + * 姓名 + */ + private String suName; + /** + * 残疾类别及等级 + */ + private String suDisabilityType; + /** + * 所属村庄 + */ + private String suVillage; + /** + * 低保户 0:未选中 1:选中 + */ + private String suIsLow; + /** + * 贫困户 0:未选中 1:选中 + */ + private String suIsPoor; + /** + * 困难残疾人生活补贴 0:未选中 1:选中 + */ + private String suLivingSubsidy; + /** + * 重度残疾人护理补贴 0:未选中 1:选中 + */ + private String suCareSubsidy; + /** + * 经济困难老年人补贴 0:未选中 1:选中 + */ + private String suElderlySubsidy; + /** + * 孤困儿童补贴 0:未选中 1:选中 + */ + private String suChildSubsidy; + /** + * 分散五保补贴 0:未选中 1:选中 + */ + private String suFiveGuaranteesSubsidy; +} diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/SpecialUserMonthlySubsidyFormDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/SpecialUserMonthlySubsidyFormDTO.java new file mode 100644 index 00000000..b13de4c8 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/SpecialUserMonthlySubsidyFormDTO.java @@ -0,0 +1,29 @@ +package com.elink.esua.epdc.dto.form; + +import lombok.Data; + +import javax.validation.constraints.Min; +import java.io.Serializable; + +/** + * 月度补贴情况接口参数 + * + * @author songyunpeng + * @since v1.0.0 2020-05-20 + */ +@Data +public class SpecialUserMonthlySubsidyFormDTO implements Serializable { + private static final long serialVersionUID = 2379520294973498819L; + + /** + * 页码 + */ + @Min(value = 1, message = "页码必须大于0") + private Integer pageIndex; + + /** + * 页容量 + */ + @Min(value = 1, message = "页容量必须大于0") + private Integer pageSize; +} diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSpecialUserErrorResultDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSpecialUserErrorResultDTO.java new file mode 100644 index 00000000..99002e8a --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcSpecialUserErrorResultDTO.java @@ -0,0 +1,26 @@ +package com.elink.esua.epdc.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author: songyunpeng + * @Date: 2020/7/4 17:066 + * @Description: 批量导入特殊人群错误反馈 + */ +@Data +public class EpdcSpecialUserErrorResultDTO implements Serializable { + + private static final long serialVersionUID = 5643743407138967806L; + + /** + * 错误数据行数 + */ + private String erroLine; + + /** + * 错误数据信息 + */ + private String errorInfo; +} diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/SpecialPopulationDistributionResultDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/SpecialPopulationDistributionResultDTO.java new file mode 100644 index 00000000..1686e5a0 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/SpecialPopulationDistributionResultDTO.java @@ -0,0 +1,50 @@ +package com.elink.esua.epdc.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 特殊人群分布结果 + * + * @author songyunpeng + * @since v1.0.0 2020-05-20 + */ +@Data +public class SpecialPopulationDistributionResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + + /** + * 总人数 + */ + private Integer total; + + /** + * 20岁以下人数 + */ + private Integer ageLevel1; + + /** + * 20-30岁人数 + */ + private Integer ageLevel2; + + /** + * 30-40岁人数 + */ + private Integer ageLevel3; + + /** + * 40-50岁人数 + */ + private Integer ageLevel4; + + /** + * 50岁以上人数 + */ + private Integer ageLevel5; + + +} diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/SpecialUserDisabilityTypeResultDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/SpecialUserDisabilityTypeResultDTO.java new file mode 100644 index 00000000..21993016 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/SpecialUserDisabilityTypeResultDTO.java @@ -0,0 +1,26 @@ +package com.elink.esua.epdc.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 残疾类别分布接口参数 + * + * @author songyunpeng + * @since v1.0.0 2020-05-20 + */ +@Data +public class SpecialUserDisabilityTypeResultDTO implements Serializable { + private static final long serialVersionUID = 2379520294973498819L; + + /** + * 残疾类别及等级 + */ + private String suDisabilityType; + + /** + * 人数 + */ + private Integer userTotal; +} diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/SpecialUserMonthlySubsidyResultDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/SpecialUserMonthlySubsidyResultDTO.java new file mode 100644 index 00000000..b2a491ca --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/SpecialUserMonthlySubsidyResultDTO.java @@ -0,0 +1,32 @@ +package com.elink.esua.epdc.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 月度补贴情况接口参数 + * + * @author songyunpeng + * @since v1.0.0 2020-05-20 + */ +@Data +public class SpecialUserMonthlySubsidyResultDTO implements Serializable { + private static final long serialVersionUID = 2379520294973498819L; + + /** + * 村庄 + */ + private Integer suVillage; + + /** + * 人数 + */ + private Integer userTotal; + + /** + * 补贴金额 + */ + private BigDecimal subsidyMoney; +} diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/SpecialUserResultDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/SpecialUserResultDTO.java new file mode 100644 index 00000000..6109bc40 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/SpecialUserResultDTO.java @@ -0,0 +1,98 @@ +package com.elink.esua.epdc.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * 查询特殊人群结果 + * + * @author songyunpeng + * @since v1.0.0 2020-05-20 + */ +@Data +public class SpecialUserResultDTO implements Serializable { + private static final long serialVersionUID = 2379520294973498819L; + + /** + * ID 主键 + */ + private String suId; + + /** + * 所属村庄 + */ + private String suVillage; + + /** + * 姓名 + */ + private String suName; + + /** + * 出生日期 + */ + private Date suBirthday; + + /** + * 残疾证号 + */ + private String suDisabilityNumber; + + /** + * 残疾类别及等级 + */ + private String suDisabilityType; + + /** + * 是否低保 0:否1:是 + */ + private String suIsLow; + + /** + * 保障人口 + */ + private Integer suGuaranteedPopulation; + + /** + * 关系 + */ + private String suRelationship; + + /** + * 低保金额 + */ + private BigDecimal suLowMoney; + + /** + * 困难残疾人生活补贴 + */ + private BigDecimal suLivingSubsidy; + + /** + * 重度残疾人护理补贴 + */ + private BigDecimal suCareSubsidy; + + /** + * 经济困难老年人补贴 + */ + private BigDecimal suElderlySubsidy; + + /** + * 孤困儿童补贴 + */ + private BigDecimal suChildSubsidy; + + /** + * 分散五保补贴 + */ + private BigDecimal suFiveGuaranteesSubsidy; + + /** + * 是否贫困户 0:否1:是 + */ + private String suIsPoor; +} diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/controller/EpdcScreenSpecialUserController.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/controller/EpdcScreenSpecialUserController.java new file mode 100644 index 00000000..1e46a0e3 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/controller/EpdcScreenSpecialUserController.java @@ -0,0 +1,89 @@ +package com.elink.esua.epdc.modules.specialuser.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.form.SpecialUserDisabilityTypeFormDTO; +import com.elink.esua.epdc.dto.form.SpecialUserFormDTO; +import com.elink.esua.epdc.dto.form.SpecialUserMonthlySubsidyFormDTO; +import com.elink.esua.epdc.dto.result.SpecialPopulationDistributionResultDTO; +import com.elink.esua.epdc.dto.result.SpecialUserDisabilityTypeResultDTO; +import com.elink.esua.epdc.dto.result.SpecialUserMonthlySubsidyResultDTO; +import com.elink.esua.epdc.dto.result.SpecialUserResultDTO; +import com.elink.esua.epdc.modules.specialuser.service.SpecialUserService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author songyunpeng + * @Description + * @create 2020-11-04 + */ +@RestController("screenSpecialUser") +public class EpdcScreenSpecialUserController { + + + @Autowired + private SpecialUserService specialUserService; + + + /** + * @Description 特殊人群分析-人群分布接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + @PostMapping("selectMonthlySubsidy") + public Result selectPopulationDistribution(){ + return specialUserService.selectPopulationDistribution(); + } + /** + * @Description 特殊人群分析-查人接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [specialUserFormDTO] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + **/ + @PostMapping("selectMonthlySubsidy") + public Result> selectPageSpecialUser(@RequestBody SpecialUserFormDTO dto){ + return specialUserService.selectPageSpecialUser(dto); + } + /** + * @Description 特殊人群分析-详情接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [suId] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + @PostMapping("selectSpecialUserDetail/{suId}") + public Result selectSpecialUserDetail(@PathVariable String suId){ + return specialUserService.selectSpecialUserDetail(suId); + } + /** + * @Description 特殊人群分析-残疾类别分布接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [specialUserDisabilityTypeFormDTO] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + @PostMapping("selectDisabilityType") + public Result> selectDisabilityType(@RequestBody SpecialUserDisabilityTypeFormDTO dto){ + return specialUserService.selectDisabilityType(dto); + } + + /** + * @Description 特殊人群分析-月度补贴情况接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [specialUserDisabilityTypeFormDTO] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + @PostMapping("selectMonthlySubsidy") + public Result> selectMonthlySubsidy(@RequestBody SpecialUserMonthlySubsidyFormDTO dto){ + return specialUserService.selectMonthlySubsidy(dto); + } + +} diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/controller/SpecialUserController.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/controller/SpecialUserController.java new file mode 100644 index 00000000..c2d02b8d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/controller/SpecialUserController.java @@ -0,0 +1,135 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.specialuser.controller; + +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; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.dto.SpecialUserDTO; +import com.elink.esua.epdc.modules.specialuser.excel.SpecialUserExcel; +import com.elink.esua.epdc.modules.specialuser.service.SpecialUserService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.URLEncoder; +import java.util.List; +import java.util.Map; + + +/** + * 特殊人群表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-11-03 + */ +@RestController +@RequestMapping("specialuser") +public class SpecialUserController { + + @Autowired + private SpecialUserService specialUserService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = specialUserService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + SpecialUserDTO data = specialUserService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody SpecialUserDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + specialUserService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody SpecialUserDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + specialUserService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + specialUserService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = specialUserService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, SpecialUserExcel.class); + } + /** + * @Description 批量导入 + * @Author songyunpeng + * @Date 2020/8/31 + * @Param [file] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + @PostMapping("importExcel") + public Result importExcel(@RequestParam("file") MultipartFile file) { + return specialUserService.importSpecialUser(file); + } + + /** + * @Description 导出模板 + * @Author songyunpeng + * @Date 2020/8/27 + * @Param [params, response] + * @return void + **/ + @GetMapping("exportModule") + public void exportModule(HttpServletResponse res) throws Exception{ + //获取要下载的模板名称 + String fileName = "民政享受政策人员表 - 样表"; + //设置要下载的文件的名称 + res.setCharacterEncoding("UTF-8"); + res.setHeader("content-Type", "application/vnd.ms-excel"); + res.setHeader("Content-Disposition", + "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8") + ".xlsx"); + //获取文件的路径 + InputStream input = this.getClass().getResourceAsStream("/excel/民政享受政策人员表 - 样表.xlsx"); + OutputStream out = res.getOutputStream(); + byte[] b = new byte[2048]; + int len; + while ((len = input.read(b)) != -1) { + out.write(b, 0, len); + } + input.close(); + } +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/dao/SpecialUserDao.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/dao/SpecialUserDao.java new file mode 100644 index 00000000..2f7a41ce --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/dao/SpecialUserDao.java @@ -0,0 +1,97 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.specialuser.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.form.SpecialUserDisabilityTypeFormDTO; +import com.elink.esua.epdc.dto.form.SpecialUserFormDTO; +import com.elink.esua.epdc.dto.form.SpecialUserMonthlySubsidyFormDTO; +import com.elink.esua.epdc.dto.result.SpecialPopulationDistributionResultDTO; +import com.elink.esua.epdc.dto.result.SpecialUserDisabilityTypeResultDTO; +import com.elink.esua.epdc.dto.result.SpecialUserMonthlySubsidyResultDTO; +import com.elink.esua.epdc.dto.result.SpecialUserResultDTO; +import com.elink.esua.epdc.modules.specialuser.entity.SpecialUserEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 特殊人群表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-11-03 + */ +@Mapper +public interface SpecialUserDao extends BaseDao { + /** + * @Description 特殊人群分析-人群分布接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [] + * @return com.elink.esua.epdc.dto.result.SpecialPopulationDistributionResultDTO + **/ + SpecialPopulationDistributionResultDTO selectPopulationDistribution(); + /** + * @Description 特殊人群分析-查人接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [specialUserFormDTO] + * @return java.util.List + **/ + List selectPageSpecialUser(SpecialUserFormDTO specialUserFormDTO); + /** + * @Description 特殊人群分析-查人接口count + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [specialUserFormDTO] + * @return long + **/ + long selectCountSpecialUser(SpecialUserFormDTO specialUserFormDTO); + /** + * @Description 特殊人群分析-残疾类别分布接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [specialUserDisabilityTypeFormDTO] + * @return java.util.List + **/ + List selectDisabilityType(SpecialUserDisabilityTypeFormDTO specialUserDisabilityTypeFormDTO); + /** + * @Description 特殊人群分析-残疾类别分布接口 count + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [specialUserDisabilityTypeFormDTO] + * @return java.util.List + **/ + long selectCountDisabilityType(SpecialUserDisabilityTypeFormDTO specialUserDisabilityTypeFormDTO); + /** + * @Description 特殊人群分析-月度补贴情况接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [dto] + * @return java.util.List + **/ + List selectMonthlySubsidy(SpecialUserMonthlySubsidyFormDTO dto); + /** + * @Description 特殊人群分析-月度补贴情况接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [dto] + * @return java.util.List + **/ + Long selectCountMonthlySubsidy(SpecialUserMonthlySubsidyFormDTO dto); +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/entity/SpecialUserEntity.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/entity/SpecialUserEntity.java new file mode 100644 index 00000000..ffe93c31 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/entity/SpecialUserEntity.java @@ -0,0 +1,116 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.specialuser.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 特殊人群表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-11-03 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_special_user") +public class SpecialUserEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 所属村庄 + */ + private String suVillage; + + /** + * 姓名 + */ + private String suName; + + /** + * 出生日期 + */ + private Date suBirthday; + + /** + * 残疾证号 + */ + private String suDisabilityNumber; + + /** + * 残疾类别及等级 + */ + private String suDisabilityType; + + /** + * 是否低保 0:否1:是 + */ + private String suIsLow; + + /** + * 保障人口 + */ + private Integer suGuaranteedPopulation; + + /** + * 关系 + */ + private String suRelationship; + + /** + * 低保金额 + */ + private BigDecimal suLowMoney; + + /** + * 困难残疾人生活补贴 + */ + private BigDecimal suLivingSubsidy; + + /** + * 重度残疾人护理补贴 + */ + private BigDecimal suCareSubsidy; + + /** + * 经济困难老年人补贴 + */ + private BigDecimal suElderlySubsidy; + + /** + * 孤困儿童补贴 + */ + private BigDecimal suChildSubsidy; + + /** + * 分散五保补贴 + */ + private BigDecimal suFiveGuaranteesSubsidy; + + /** + * 是否贫困户 0:否1:是 + */ + private String suIsPoor; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/excel/SpecialUserExcel.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/excel/SpecialUserExcel.java new file mode 100644 index 00000000..5acd3c2f --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/excel/SpecialUserExcel.java @@ -0,0 +1,78 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.specialuser.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 特殊人群表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-11-03 + */ +@Data +public class SpecialUserExcel { + + @Excel(name = "所属村庄") + private String suVillage; + + @Excel(name = "姓名") + private String suName; + + @Excel(name = "出生日期") + private String suBirthday; + + @Excel(name = "残疾证号") + private String suDisabilityNumber; + + @Excel(name = "残疾类别及等级") + private String suDisabilityType; + + @Excel(name = "是否低保",replace = {"否_0","是_1"}) + private String suIsLow; + + @Excel(name = "保障人口") + private Integer suGuaranteedPopulation; + + @Excel(name = "关系") + private String suRelationship; + + @Excel(name = "低保金额") + private BigDecimal suLowMoney; + + @Excel(name = "困难残疾人生活补贴") + private BigDecimal suLivingSubsidy; + + @Excel(name = "重度残疾人护理补贴") + private BigDecimal suCareSubsidy; + + @Excel(name = "经济困难老年人补贴") + private BigDecimal suElderlySubsidy; + + @Excel(name = "孤困儿童补贴") + private BigDecimal suChildSubsidy; + + @Excel(name = "分散五保补贴") + private BigDecimal suFiveGuaranteesSubsidy; + + @Excel(name = "是否贫困户",replace = {"否_0","是_1"}) + private String suIsPoor; +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/service/SpecialUserService.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/service/SpecialUserService.java new file mode 100644 index 00000000..fda532b7 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/service/SpecialUserService.java @@ -0,0 +1,152 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.specialuser.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.SpecialUserDTO; +import com.elink.esua.epdc.dto.form.SpecialUserDisabilityTypeFormDTO; +import com.elink.esua.epdc.dto.form.SpecialUserFormDTO; +import com.elink.esua.epdc.dto.form.SpecialUserMonthlySubsidyFormDTO; +import com.elink.esua.epdc.dto.result.SpecialPopulationDistributionResultDTO; +import com.elink.esua.epdc.dto.result.SpecialUserDisabilityTypeResultDTO; +import com.elink.esua.epdc.dto.result.SpecialUserMonthlySubsidyResultDTO; +import com.elink.esua.epdc.dto.result.SpecialUserResultDTO; +import com.elink.esua.epdc.modules.specialuser.entity.SpecialUserEntity; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; + +/** + * 特殊人群表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-11-03 + */ +public interface SpecialUserService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-11-03 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-11-03 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return SpecialUserDTO + * @author generator + * @date 2020-11-03 + */ + SpecialUserDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-11-03 + */ + void save(SpecialUserDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-11-03 + */ + void update(SpecialUserDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-11-03 + */ + void delete(String[] ids); + /** + * @Description 批量导入 + * @Author songyunpeng + * @Date 2020/11/3 + * @Param [file] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + Result importSpecialUser(MultipartFile file); + /** + * @Description 特殊人群分析-人群分布接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + Result selectPopulationDistribution(); + /** + * @Description 特殊人群分析-查人接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @param specialUserFormDTO*/ + Result> selectPageSpecialUser(SpecialUserFormDTO specialUserFormDTO); + /** + * @Description 特殊人群分析-详情接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [suId] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + Result selectSpecialUserDetail(String suId); + /** + * @Description 特殊人群分析-残疾类别分布接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [specialUserDisabilityTypeFormDTO] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + Result> selectDisabilityType(SpecialUserDisabilityTypeFormDTO specialUserDisabilityTypeFormDTO); + /** + * @Description 特殊人群分析-月度补贴情况接口 + * @Author songyunpeng + * @Date 2020/11/4 + * @Param [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + **/ + Result> selectMonthlySubsidy(SpecialUserMonthlySubsidyFormDTO dto); +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/service/impl/SpecialUserServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/service/impl/SpecialUserServiceImpl.java new file mode 100644 index 00000000..b8945fc0 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/service/impl/SpecialUserServiceImpl.java @@ -0,0 +1,222 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.specialuser.service.impl; + +import cn.afterturn.easypoi.excel.ExcelImportUtil; +import cn.afterturn.easypoi.excel.entity.ImportParams; +import cn.hutool.core.date.DateUtil; +import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +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.ConvertUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.config.StreamUtils; +import com.elink.esua.epdc.dto.SpecialUserDTO; +import com.elink.esua.epdc.dto.form.SpecialUserDisabilityTypeFormDTO; +import com.elink.esua.epdc.dto.form.SpecialUserFormDTO; +import com.elink.esua.epdc.dto.form.SpecialUserMonthlySubsidyFormDTO; +import com.elink.esua.epdc.dto.result.*; +import com.elink.esua.epdc.modules.specialuser.dao.SpecialUserDao; +import com.elink.esua.epdc.modules.specialuser.entity.SpecialUserEntity; +import com.elink.esua.epdc.modules.specialuser.excel.SpecialUserExcel; +import com.elink.esua.epdc.modules.specialuser.service.SpecialUserService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.multipart.MultipartFile; + +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * 特殊人群表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-11-03 + */ +@Service +public class SpecialUserServiceImpl extends BaseServiceImpl implements SpecialUserService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, SpecialUserDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, SpecialUserDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + String suVillage = (String)params.get("suVillage"); + String suName = (String)params.get("suName"); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + wrapper.like(StringUtils.isNotBlank(suVillage), "SU_VILLAGE", suVillage); + wrapper.like(StringUtils.isNotBlank(suName), "SU_NAME", suName); + return wrapper; + } + + @Override + public SpecialUserDTO get(String id) { + SpecialUserEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, SpecialUserDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(SpecialUserDTO dto) { + SpecialUserEntity entity = ConvertUtils.sourceToTarget(dto, SpecialUserEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(SpecialUserDTO dto) { + SpecialUserEntity entity = ConvertUtils.sourceToTarget(dto, SpecialUserEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public Result importSpecialUser(MultipartFile file) { + File f = StreamUtils.conversionFile(file); + ImportParams importParams = new ImportParams(); + try { + List archivesExcelList = ExcelImportUtil.importExcel(f, SpecialUserExcel.class, importParams); + // 校验数据 + List epdcArchivesErrorResultDTOS = this.checkExcel(archivesExcelList); + if (epdcArchivesErrorResultDTOS.size() > 0) { + return new Result().ok(epdcArchivesErrorResultDTOS); + } + saveList(archivesExcelList); + for (SpecialUserExcel archivesExcel : archivesExcelList) { + System.out.println("从Excel导入数据到数据库的详细为 :{}" + JSON.toJSONString(archivesExcel)); + } + System.out.println("从Excel导入数据一共 {} 行 " + archivesExcelList.size()); + } catch (Exception e1) { + throw new RuntimeException("导入失败:{}" + e1.getMessage()); + } + return new Result(); + } + + @Override + public Result selectPopulationDistribution() { + return new Result().ok(baseDao.selectPopulationDistribution()); + } + + @Override + public Result> selectPageSpecialUser(SpecialUserFormDTO specialUserFormDTO) { + int pageIndex = (specialUserFormDTO.getPageIndex() - NumConstant.ONE) * specialUserFormDTO.getPageSize(); + specialUserFormDTO.setPageIndex(pageIndex); + List list = baseDao.selectPageSpecialUser(specialUserFormDTO); + PageData pageData = new PageData<>(list, baseDao.selectCountSpecialUser(specialUserFormDTO)); + return new Result>().ok(pageData); + } + + @Override + public Result selectSpecialUserDetail(String suId) { + SpecialUserEntity specialUserEntity = selectById(suId); + return new Result().ok(ConvertUtils.sourceToTarget(specialUserEntity,SpecialUserResultDTO.class)); + } + + @Override + public Result> selectDisabilityType(SpecialUserDisabilityTypeFormDTO specialUserDisabilityTypeFormDTO) { + int pageIndex = (specialUserDisabilityTypeFormDTO.getPageIndex() - NumConstant.ONE) * specialUserDisabilityTypeFormDTO.getPageSize(); + specialUserDisabilityTypeFormDTO.setPageIndex(pageIndex); + List list = baseDao.selectDisabilityType(specialUserDisabilityTypeFormDTO); + PageData pageData = new PageData<>(list, baseDao.selectCountDisabilityType(specialUserDisabilityTypeFormDTO)); + return new Result>().ok(pageData); + } + + @Override + public Result> selectMonthlySubsidy(SpecialUserMonthlySubsidyFormDTO dto) { + int pageIndex = (dto.getPageIndex() - NumConstant.ONE) * dto.getPageSize(); + dto.setPageIndex(pageIndex); + List list = baseDao.selectMonthlySubsidy(dto); + PageData pageData = new PageData<>(list, baseDao.selectCountMonthlySubsidy(dto)); + return new Result>().ok(pageData); + } + + /*** + * 校验excel表格数据 + * @return java.lang.String + * @author songyunpeng + * @date 2020/7/6 10:25 + */ + private List checkExcel(List specialUserExcels) { + List errorLineinfoList = new ArrayList<>(); + EpdcSpecialUserErrorResultDTO errorLineinfoDto; + for (int i = 0; i < specialUserExcels.size(); i++) { + SpecialUserExcel specialUserExcel = specialUserExcels.get(i); + //档号 + String suBirthday = specialUserExcel.getSuBirthday(); + if (StringUtils.isNotBlank(suBirthday)) { + String eL = "(([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})(((0[13578]|1[02])(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)(0[1-9]|[12][0-9]|30))|(02(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))0229)"; + Pattern pat = Pattern.compile(eL); + Matcher matcher = pat.matcher(suBirthday); + boolean boo = matcher.matches(); + if(!boo){ + errorLineinfoDto = new EpdcSpecialUserErrorResultDTO(); + errorLineinfoDto.setErroLine((i + 2) + ""); + errorLineinfoDto.setErrorInfo("请检查出生日期格式,例:2021228"); + errorLineinfoList.add(errorLineinfoDto); + } + } + } + return errorLineinfoList; + } + /*** + * 批量添加 + * @return java.lang.String + * @author songyunpeng + * @date 2020/7/6 10:25 + */ + private void saveList(List partyList) { + List specialUserExcels = new ArrayList<>(); + for (SpecialUserExcel archivesExcel : partyList) { + SpecialUserEntity archivesEntity = ConvertUtils.sourceToTarget(archivesExcel, SpecialUserEntity.class); + archivesEntity.setSuBirthday(DateUtil.parse(archivesExcel.getSuBirthday())); + specialUserExcels.add(archivesEntity); + } + insertBatch(specialUserExcels); + } +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/excel/民政享受政策人员表 - 样表.xlsx b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/excel/民政享受政策人员表 - 样表.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..b9f6c3ba4f2c4da9d45930e20aaeeccec5e1fb41 GIT binary patch literal 10467 zcmeHtg;!K-`}R=6kV8m!4&BlrATS`^0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