diff --git a/src/main/java/com/cm/population/controller/route/populationinfo/PopulationInfoBigdataRouteController.java b/src/main/java/com/cm/population/controller/route/populationinfo/PopulationInfoBigdataRouteController.java
index 3b6bb38..94c5ab6 100644
--- a/src/main/java/com/cm/population/controller/route/populationinfo/PopulationInfoBigdataRouteController.java
+++ b/src/main/java/com/cm/population/controller/route/populationinfo/PopulationInfoBigdataRouteController.java
@@ -33,6 +33,7 @@ public class PopulationInfoBigdataRouteController extends AbstractController {
organizationMap.put("党员", "中国共产党党员");
organizationMap.put("共青团员", "中国共产主义青年团团员");
organizationMap.put("预备党员", "中国共产党预备党员");
+ organizationMap.put("其他", "其他");
}
/**
@@ -58,7 +59,18 @@ public class PopulationInfoBigdataRouteController extends AbstractController {
}
/**
- * 高新区街道人口
+ * 年龄 name = [0-20岁 / 21-30岁 / 31-40岁 / 41-50岁 / 50岁以上]
+ * @return
+ */
+ @GetMapping("age")
+ public ModelAndView age(String name) {
+ ModelAndView mv = new ModelAndView("populationinfo/list-bigdata");
+ mv.addObject("params", "age=" + name);
+ return mv;
+ }
+
+ /**
+ * 街道人口 name = [稀土路街道 / 民馨路街道 / 万水泉镇]
* @return
*/
@GetMapping("jiedao")
@@ -114,7 +126,7 @@ public class PopulationInfoBigdataRouteController extends AbstractController {
/**
* 宗教信仰
- * @param religion
+ * @param name
* @return
*/
@GetMapping("religion")
diff --git a/src/main/java/com/cm/population/pojo/dtos/populationinfo/PopulationInfoBaseDTO.java b/src/main/java/com/cm/population/pojo/dtos/populationinfo/PopulationInfoBaseDTO.java
index 879aa3e..5091bcd 100644
--- a/src/main/java/com/cm/population/pojo/dtos/populationinfo/PopulationInfoBaseDTO.java
+++ b/src/main/java/com/cm/population/pojo/dtos/populationinfo/PopulationInfoBaseDTO.java
@@ -16,7 +16,7 @@ public class PopulationInfoBaseDTO {
@ApiModelProperty(name = "isCult", value = "是否为涉邪人员(是或否)")
private String isCult = "否";
@ApiModelProperty(name = "isMinority", value = "是否为未成年(是或否)")
- private String isMinority = "否";
+ private String isMinority = "";
@ApiModelProperty(name = "isSeriousIllness", value = "是否为重病(是或否)")
private String isSeriousIllness = "否";
@ApiModelProperty(name = "isDrug", value = "是否为吸毒人员(是或否)")
@@ -112,12 +112,12 @@ public class PopulationInfoBaseDTO {
this.healthStatus = healthStatus;
}
- /*public String getIsMinority() {
+ public String getIsMinority() {
if (getAge() < 18) {
return "是";
}
return "否";
- }*/
+ }
public void setIsMinority(String isMinority) {
this.isMinority = isMinority;
@@ -134,14 +134,17 @@ public class PopulationInfoBaseDTO {
this.isSeriousIllness = isSeriousIllness;
}
- /*public Integer getAge() {
- if (StringUtils.isBlank(this.getBirthday())) {
+ public Integer getAge() {
+ if (StringUtils.isBlank(this.getBirthday()) || this.getBirthday().contains("*")) {
+ return 0;
+ }
+ if (!StringUtils.isEmpty(isMinority)) {
return 0;
}
LocalDate birthDate = LocalDate.parse(this.birthday);
Period period = Period.between(birthDate, LocalDate.now());
return period.getYears();
- }*/
+ }
public void setAge(Integer age) {
this.age = age;
@@ -276,7 +279,7 @@ public class PopulationInfoBaseDTO {
}
public String getBirthday() {
- return birthday;
+ return birthday == null ? "" : birthday;
}
public void setBirthday(String birthday) {
diff --git a/src/main/resources/mybatis/mapper/populationinfo/population-info-mapper.xml b/src/main/resources/mybatis/mapper/populationinfo/population-info-mapper.xml
index c5c9550..40e59cd 100644
--- a/src/main/resources/mybatis/mapper/populationinfo/population-info-mapper.xml
+++ b/src/main/resources/mybatis/mapper/populationinfo/population-info-mapper.xml
@@ -1125,6 +1125,21 @@