From afa7928c47d45b6e1d0711a091820817f50282a8 Mon Sep 17 00:00:00 2001 From: songyunpeng Date: Thu, 5 Nov 2020 13:38:18 +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=E8=87=AA=E6=B5=8Bbug=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ApiScreenSpecialUserController.java | 4 +- .../esua/epdc/feign/CustomFeignClient.java | 12 ++--- .../SpecialUserMonthlySubsidyResultDTO.java | 2 +- .../epdc/dto/result/SpecialUserResultDTO.java | 5 +- .../EpdcScreenSpecialUserController.java | 12 ++--- .../service/impl/SpecialUserServiceImpl.java | 6 ++- .../src/main/resources/logback-spring.xml | 11 +++-- .../main/resources/mapper/SpecialUserDao.xml | 46 +++++++++++-------- 8 files changed, 54 insertions(+), 44 deletions(-) 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 index 49369213..1b7db539 100644 --- 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 @@ -37,7 +37,7 @@ public class ApiScreenSpecialUserController { * @return com.elink.esua.epdc.commons.tools.utils.Result **/ @ReportData - @PostMapping("selectMonthlySubsidy") + @PostMapping("selectPopulationDistribution") public Result selectPopulationDistribution(){ return customService.selectPopulationDistribution(); } @@ -49,7 +49,7 @@ public class ApiScreenSpecialUserController { * @return com.elink.esua.epdc.commons.tools.utils.Result> **/ @ReportData - @PostMapping("selectMonthlySubsidy") + @PostMapping("selectSpecialUser") public Result> selectPageSpecialUser(@RequestBody SpecialUserFormDTO dto){ return customService.selectPageSpecialUser(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 8bc22d70..66ec4da1 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,7 +1,5 @@ package com.elink.esua.epdc.feign; -import com.elink.esua.epdc.common.token.dto.TokenDto; -import com.elink.esua.epdc.commons.tools.annotation.LoginUser; 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; @@ -85,7 +83,7 @@ public interface CustomFeignClient { * @Date 2020/11/4 * @Param [] **/ - @PostMapping(value = "custom/screenSpecialUser/selectMonthlySubsidy", consumes = MediaType.APPLICATION_JSON_VALUE) + @PostMapping(value = "custom/epdcScreenSpecialUser/selectPopulationDistribution", consumes = MediaType.APPLICATION_JSON_VALUE) Result selectPopulationDistribution(); /** @@ -95,7 +93,7 @@ public interface CustomFeignClient { * @Date 2020/11/4 * @Param [specialUserFormDTO] **/ - @PostMapping(value = "custom/screenSpecialUser/selectMonthlySubsidy", consumes = MediaType.APPLICATION_JSON_VALUE) + @PostMapping(value = "custom/epdcScreenSpecialUser/selectSpecialUser", consumes = MediaType.APPLICATION_JSON_VALUE) Result> selectPageSpecialUser(@RequestBody SpecialUserFormDTO dto); /** @@ -105,7 +103,7 @@ public interface CustomFeignClient { * @Date 2020/11/4 * @Param [suId] **/ - @PostMapping(value = "custom/screenSpecialUser/selectSpecialUserDetail/{suId}", consumes = MediaType.APPLICATION_JSON_VALUE) + @PostMapping(value = "custom/epdcScreenSpecialUser/selectSpecialUserDetail/{suId}", consumes = MediaType.APPLICATION_JSON_VALUE) Result selectSpecialUserDetail(@PathVariable String suId); /** @@ -115,7 +113,7 @@ public interface CustomFeignClient { * @Date 2020/11/4 * @Param [specialUserDisabilityTypeFormDTO] **/ - @PostMapping(value = "custom/screenSpecialUser/selectDisabilityType", consumes = MediaType.APPLICATION_JSON_VALUE) + @PostMapping(value = "custom/epdcScreenSpecialUser/selectDisabilityType", consumes = MediaType.APPLICATION_JSON_VALUE) Result> selectDisabilityType(@RequestBody SpecialUserDisabilityTypeFormDTO dto); /** @@ -125,7 +123,7 @@ public interface CustomFeignClient { * @Date 2020/11/4 * @Param [specialUserDisabilityTypeFormDTO] **/ - @PostMapping(value = "custom/screenSpecialUser/selectMonthlySubsidy", consumes = MediaType.APPLICATION_JSON_VALUE) + @PostMapping(value = "custom/epdcScreenSpecialUser/selectMonthlySubsidy", consumes = MediaType.APPLICATION_JSON_VALUE) Result> selectMonthlySubsidy(@RequestBody SpecialUserMonthlySubsidyFormDTO dto); /** 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 index b2a491ca..9c59bad7 100644 --- 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 @@ -18,7 +18,7 @@ public class SpecialUserMonthlySubsidyResultDTO implements Serializable { /** * 村庄 */ - private Integer suVillage; + private String suVillage; /** * 人数 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 index 6109bc40..ac6b5455 100644 --- 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 @@ -4,7 +4,6 @@ import lombok.Data; import java.io.Serializable; import java.math.BigDecimal; -import java.util.Date; /** * 查询特殊人群结果 @@ -32,9 +31,9 @@ public class SpecialUserResultDTO implements Serializable { private String suName; /** - * 出生日期 + * 年龄 */ - private Date suBirthday; + private Integer suAge; /** * 残疾证号 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 index 1e46a0e3..796ac51e 100644 --- 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 @@ -11,17 +11,15 @@ 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; +import org.springframework.web.bind.annotation.*; /** * @author songyunpeng * @Description * @create 2020-11-04 */ -@RestController("screenSpecialUser") +@RestController +@RequestMapping("epdcScreenSpecialUser") public class EpdcScreenSpecialUserController { @@ -36,7 +34,7 @@ public class EpdcScreenSpecialUserController { * @Param [] * @return com.elink.esua.epdc.commons.tools.utils.Result **/ - @PostMapping("selectMonthlySubsidy") + @PostMapping("selectPopulationDistribution") public Result selectPopulationDistribution(){ return specialUserService.selectPopulationDistribution(); } @@ -47,7 +45,7 @@ public class EpdcScreenSpecialUserController { * @Param [specialUserFormDTO] * @return com.elink.esua.epdc.commons.tools.utils.Result> **/ - @PostMapping("selectMonthlySubsidy") + @PostMapping("selectSpecialUser") public Result> selectPageSpecialUser(@RequestBody SpecialUserFormDTO dto){ return specialUserService.selectPageSpecialUser(dto); } 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 index b8945fc0..715ad4cb 100644 --- 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 @@ -155,7 +155,11 @@ public class SpecialUserServiceImpl extends BaseServiceImpl selectSpecialUserDetail(String suId) { SpecialUserEntity specialUserEntity = selectById(suId); - return new Result().ok(ConvertUtils.sourceToTarget(specialUserEntity,SpecialUserResultDTO.class)); + SpecialUserResultDTO specialUserResultDTO = ConvertUtils.sourceToTarget(specialUserEntity, SpecialUserResultDTO.class); + specialUserResultDTO.setSuIsLow("1".equals(specialUserResultDTO.getSuIsLow())?"是":"否"); + specialUserResultDTO.setSuIsPoor("1".equals(specialUserResultDTO.getSuIsPoor())?"是":"否"); + specialUserResultDTO.setSuAge(DateUtil.ageOfNow(specialUserEntity.getSuBirthday())); + return new Result().ok(specialUserResultDTO); } @Override diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/logback-spring.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/logback-spring.xml index ede9e630..9e571f7e 100644 --- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/logback-spring.xml +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/logback-spring.xml @@ -133,10 +133,13 @@ - - - - + + + + + + + diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/SpecialUserDao.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/SpecialUserDao.xml index 2103aa22..365bde93 100644 --- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/SpecialUserDao.xml +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/SpecialUserDao.xml @@ -29,7 +29,7 @@