From 7a300e0aca361fde7888e88df8863e4bcf699fe8 Mon Sep 17 00:00:00 2001 From: "java_cuibaocheng@163.com" Date: Sun, 26 Nov 2023 21:50:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=8F=A3=E5=9F=BA=E6=9C=AC=E4=BF=A1?= =?UTF-8?q?=E6=81=AF-=20=E5=A2=9E=E5=8A=A0=E4=BA=86=E4=BA=BA=E5=8F=A3?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E8=B7=B3=E8=BD=AC=E9=A1=B5=E9=9D=A2=20?= =?UTF-8?q?=E4=BA=BA=E5=8F=A3=E5=9F=BA=E6=9C=AC=E4=BF=A1=E6=81=AF-=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86creator=5Farea1=E5=AD=97=E6=AE=B5(?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E4=BA=BA=E6=89=80=E5=9C=A8=E8=A1=97=E9=81=93?= =?UTF-8?q?)=20=E4=BA=BA=E5=8F=A3=E5=9F=BA=E6=9C=AC=E4=BF=A1=E6=81=AF-=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E6=9F=A5=E7=9C=8B=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E5=8D=A1=E7=89=87=E6=8C=89=E9=92=AE=E9=A1=B5=E9=9D=A2=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PopulationInfoBigdataRouteController.java | 16 ++++++++++++++-- .../populationinfo/PopulationInfoBaseDTO.java | 17 ++++++++++------- .../populationinfo/population-info-mapper.xml | 15 +++++++++++++++ src/main/resources/templates/house/save.html | 4 ++-- src/main/resources/templates/house/update.html | 4 ++-- .../templates/populationinfo/list.html | 9 ++++----- 6 files changed, 47 insertions(+), 18 deletions(-) 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 @@ AND EXISTS (SELECT 1 FROM population_release temp WHERE temp.is_delete = 0 AND temp.population_info_id = t1.population_info_id) + + AND TIMESTAMPDIFF(YEAR,DATE(t1.birthday),CURDATE()) < 21 + + + AND TIMESTAMPDIFF(YEAR,DATE(t1.birthday),CURDATE()) >= 21 AND TIMESTAMPDIFF(YEAR,DATE(t1.birthday),CURDATE()) <= 30 + + + AND TIMESTAMPDIFF(YEAR,DATE(t1.birthday),CURDATE()) >= 31 AND TIMESTAMPDIFF(YEAR,DATE(t1.birthday),CURDATE()) <= 40 + + + AND TIMESTAMPDIFF(YEAR,DATE(t1.birthday),CURDATE()) >= 41 AND TIMESTAMPDIFF(YEAR,DATE(t1.birthday),CURDATE()) <= 50 + + + AND TIMESTAMPDIFF(YEAR,DATE(t1.birthday),CURDATE()) > 50 + AND t1.creator_area1 = #{jiedao} diff --git a/src/main/resources/templates/house/save.html b/src/main/resources/templates/house/save.html index 241eb45..5ac6ba2 100644 --- a/src/main/resources/templates/house/save.html +++ b/src/main/resources/templates/house/save.html @@ -403,7 +403,7 @@ -
+
@@ -415,7 +415,7 @@
-
+
diff --git a/src/main/resources/templates/house/update.html b/src/main/resources/templates/house/update.html index f5695ce..8370134 100644 --- a/src/main/resources/templates/house/update.html +++ b/src/main/resources/templates/house/update.html @@ -405,7 +405,7 @@
-
+
@@ -417,7 +417,7 @@
-
+
{{# if(item.populationId != '') { }} diff --git a/src/main/resources/templates/populationinfo/list.html b/src/main/resources/templates/populationinfo/list.html index b11fae7..149a8ef 100644 --- a/src/main/resources/templates/populationinfo/list.html +++ b/src/main/resources/templates/populationinfo/list.html @@ -79,9 +79,9 @@ - - - +
@@ -525,7 +525,6 @@ }); } }else if(layEvent === 'tiaoshiEvent') { - top.layer.open({ type: 2, title: "调试", @@ -533,7 +532,7 @@ area: ['95%', '95%'], shadeClose: true, anim: 2, - content: top.restAjax.path('route/populationinfo-data/organization?organization=党员', []), + content: top.restAjax.path('route/populationinfo-data/age?name=未填写', []), end: function() { reloadTable(); }