Browse Source

特殊人群功能自测bug提交

feature/syp_points
songyunpeng 5 years ago
parent
commit
afa7928c47
  1. 4
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiScreenSpecialUserController.java
  2. 12
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/CustomFeignClient.java
  3. 2
      esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/SpecialUserMonthlySubsidyResultDTO.java
  4. 5
      esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/result/SpecialUserResultDTO.java
  5. 12
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/controller/EpdcScreenSpecialUserController.java
  6. 6
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/specialuser/service/impl/SpecialUserServiceImpl.java
  7. 11
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/logback-spring.xml
  8. 46
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/SpecialUserDao.xml

4
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<com.elink.esua.epdc.dto.result.SpecialPopulationDistributionResultDTO>
**/
@ReportData
@PostMapping("selectMonthlySubsidy")
@PostMapping("selectPopulationDistribution")
public Result<SpecialPopulationDistributionResultDTO> selectPopulationDistribution(){
return customService.selectPopulationDistribution();
}
@ -49,7 +49,7 @@ public class ApiScreenSpecialUserController {
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.result.SpecialUserResultDTO>>
**/
@ReportData
@PostMapping("selectMonthlySubsidy")
@PostMapping("selectSpecialUser")
public Result<PageData<SpecialUserResultDTO>> selectPageSpecialUser(@RequestBody SpecialUserFormDTO dto){
return customService.selectPageSpecialUser(dto);
}

12
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<SpecialPopulationDistributionResultDTO> 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<PageData<SpecialUserResultDTO>> 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<SpecialUserResultDTO> 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<PageData<SpecialUserDisabilityTypeResultDTO>> 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<PageData<SpecialUserMonthlySubsidyResultDTO>> selectMonthlySubsidy(@RequestBody SpecialUserMonthlySubsidyFormDTO dto);
/**

2
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;
/**
* 人数

5
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;
/**
* 残疾证号

12
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<com.elink.esua.epdc.dto.result.SpecialPopulationDistributionResultDTO>
**/
@PostMapping("selectMonthlySubsidy")
@PostMapping("selectPopulationDistribution")
public Result<SpecialPopulationDistributionResultDTO> selectPopulationDistribution(){
return specialUserService.selectPopulationDistribution();
}
@ -47,7 +45,7 @@ public class EpdcScreenSpecialUserController {
* @Param [specialUserFormDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.result.SpecialUserResultDTO>>
**/
@PostMapping("selectMonthlySubsidy")
@PostMapping("selectSpecialUser")
public Result<PageData<SpecialUserResultDTO>> selectPageSpecialUser(@RequestBody SpecialUserFormDTO dto){
return specialUserService.selectPageSpecialUser(dto);
}

6
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<SpecialUserDao, Spec
@Override
public Result<SpecialUserResultDTO> selectSpecialUserDetail(String suId) {
SpecialUserEntity specialUserEntity = selectById(suId);
return new Result<SpecialUserResultDTO>().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<SpecialUserResultDTO>().ok(specialUserResultDTO);
}
@Override

11
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/logback-spring.xml

@ -133,10 +133,13 @@
<logger name="org.springframework.web" level="INFO"/>
<logger name="org.springboot.sample" level="INFO"/>
<logger name="com.elink.esua.epdc" level="INFO"/>
<logger name="com.elink.esua.epdc.modules.item.dao" level="DEBUG"/>
<logger name="com.elink.esua.epdc.modules.comment.dao" level="DEBUG"/>
<logger name="com.elink.esua.epdc.modules.events.dao" level="DEBUG"/>
<logger name="com.elink.esua.epdc.modules.issue.dao" level="DEBUG"/>
<logger name="com.elink.esua.epdc.modules.archives.dao" level="DEBUG"/>
<logger name="com.elink.esua.epdc.modules.archivesdept.dao" level="DEBUG"/>
<logger name="com.elink.esua.epdc.modules.dept.dao" level="DEBUG"/>
<logger name="com.elink.esua.epdc.modules.epidemic.dao" level="DEBUG"/>
<logger name="com.elink.esua.epdc.modules.feign.dao" level="DEBUG"/>
<logger name="com.elink.esua.epdc.modules.module.dao" level="DEBUG"/>
<logger name="com.elink.esua.epdc.modules.specialuser.dao" level="DEBUG"/>
<root level="INFO">
<appender-ref ref="DEBUG_FILE"/>
<appender-ref ref="INFO_FILE"/>

46
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/SpecialUserDao.xml

@ -29,7 +29,7 @@
</resultMap>
<select id="selectPopulationDistribution"
resultType="com.elink.esua.epdc.dto.result.SpecialPopulationDistributionResultDTO">
select count(ID),
select count(ID) as total,
count(if(TIMESTAMPDIFF(YEAR ,SU_BIRTHDAY,curdate())&lt;=20,1,null)) as ageLevel1,
count(if(TIMESTAMPDIFF(YEAR ,SU_BIRTHDAY,curdate())>=20 and TIMESTAMPDIFF(YEAR ,SU_BIRTHDAY,curdate())&lt;30,1,null)) as ageLevel2,
count(if(TIMESTAMPDIFF(YEAR ,SU_BIRTHDAY,curdate())>=30 and TIMESTAMPDIFF(YEAR ,SU_BIRTHDAY,curdate())&lt;40,1,null)) as ageLevel3,
@ -42,10 +42,10 @@
select ID as suId,
SU_VILLAGE,
SU_NAME,
SU_BIRTHDAY,
TIMESTAMPDIFF(YEAR ,SU_BIRTHDAY,curdate()) as suAge,
SU_DISABILITY_NUMBER,
SU_DISABILITY_TYPE,
SU_IS_LOW,
if(SU_IS_LOW = '1','是','否') as SU_IS_LOW,
SU_GUARANTEED_POPULATION,
SU_RELATIONSHIP,
SU_LOW_MONEY,
@ -54,33 +54,37 @@
SU_ELDERLY_SUBSIDY,
SU_CHILD_SUBSIDY,
SU_FIVE_GUARANTEES_SUBSIDY,
SU_IS_POOR
if(SU_IS_POOR = '1','是','否') as SU_IS_POOR
from epdc_special_user
where DEL_FLAG = '0'
<if test="suName!=null and suName!=''">
and SU_NAME like concat('%', #{suName}, '%')
</if>
<if test="suDisabilityType!=null and suDisabilityType!=''">
and SU_DISABILITY_TYPE = #{suName}
and SU_DISABILITY_TYPE = #{suDisabilityType}
</if>
<if test="suVillage!=null and suVillage!=''">
and SU_VILLAGE = #{suVillage}
</if>
and SU_IS_LOW = #{suIsLow}
and SU_IS_POOR #{suIsPoor}
<if test="suLivingSubsidy!=null and suLivingSubsidy == '1'">
<if test="suIsLow == 1">
and SU_IS_LOW = '1'
</if>
<if test="suIsPoor == 1">
and SU_IS_POOR = '1'
</if>
<if test="suLivingSubsidy == 1">
and SU_LIVING_SUBSIDY > 0
</if>
<if test="suCareSubsidy!=null and suCareSubsidy == '1'">
<if test="suCareSubsidy == 1">
and SU_CARE_SUBSIDY > 0
</if>
<if test="suElderlySubsidy!=null and suElderlySubsidy == '1'">
<if test="suElderlySubsidy == 1">
and SU_ELDERLY_SUBSIDY > 0
</if>
<if test="suChildSubsidy!=null and suChildSubsidy == '1'">
<if test="suChildSubsidy == 1">
and SU_CHILD_SUBSIDY > 0
</if>
<if test="suFiveGuaranteesSubsidy!=null and suFiveGuaranteesSubsidy == '1'">
<if test="suFiveGuaranteesSubsidy == 1">
and SU_FIVE_GUARANTEES_SUBSIDY > 0
</if>
order by CREATED_TIME desc
@ -99,21 +103,25 @@
<if test="suVillage!=null and suVillage!=''">
and SU_VILLAGE = #{suVillage}
</if>
and SU_IS_LOW = #{suIsLow}
and SU_IS_POOR #{suIsPoor}
<if test="suLivingSubsidy!=null and suLivingSubsidy == '1'">
<if test="suIsLow == 1">
and SU_IS_LOW = '1'
</if>
<if test="suIsPoor == 1">
and SU_IS_POOR = '1'
</if>
<if test="suLivingSubsidy == 1">
and SU_LIVING_SUBSIDY > 0
</if>
<if test="suCareSubsidy!=null and suCareSubsidy == '1'">
<if test="suCareSubsidy == 1">
and SU_CARE_SUBSIDY > 0
</if>
<if test="suElderlySubsidy!=null and suElderlySubsidy == '1'">
<if test="suElderlySubsidy == 1">
and SU_ELDERLY_SUBSIDY > 0
</if>
<if test="suChildSubsidy!=null and suChildSubsidy == '1'">
<if test="suChildSubsidy == 1">
and SU_CHILD_SUBSIDY > 0
</if>
<if test="suFiveGuaranteesSubsidy!=null and suFiveGuaranteesSubsidy == '1'">
<if test="suFiveGuaranteesSubsidy == 1">
and SU_FIVE_GUARANTEES_SUBSIDY > 0
</if>
order by CREATED_TIME desc

Loading…
Cancel
Save