From 8788a78ad30c1bb9d50d91b10e76d3ae47ed8da2 Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期一, 07 六月 2021 09:28:23 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/test_future_wangge' into test_future_wangge

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java |   27 ++++++++++++++++++++++-----
 1 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
index b7abff9..62a9965 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -17,9 +17,7 @@
 import com.panzhihua.common.model.vos.area.AreaAddressVO;
 import com.panzhihua.common.model.vos.community.*;
 import com.panzhihua.common.model.vos.user.*;
-import com.panzhihua.common.utlis.AgeUtils;
-import com.panzhihua.common.utlis.IdCard;
-import com.panzhihua.common.utlis.PayUtil;
+import com.panzhihua.common.utlis.*;
 import com.panzhihua.service_community.dao.*;
 import com.panzhihua.service_community.model.dos.*;
 import com.panzhihua.service_community.service.ComMngPopulationHouseUserService;
@@ -31,7 +29,6 @@
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.ObjectUtils;
-import com.panzhihua.common.utlis.StringUtils;
 
 import javax.annotation.Resource;
 import javax.crypto.BadPaddingException;
@@ -234,6 +231,20 @@
             }
         }
 
+        if(StringUtils.isNotEmpty(comMngPopulationVO.getAgeStart())){
+            String ageStartTime = DateUtils.getDateFormatString(DateUtils.yearAddNum(new Date(),-(Integer.parseInt(comMngPopulationVO.getAgeStart()) + 1)),"yyyy-MM-dd");
+            if(StringUtils.isNotEmpty(ageStartTime)){
+                comMngPopulationVO.setAgeStartTime(ageStartTime);
+            }
+        }
+
+        if(StringUtils.isNotEmpty(comMngPopulationVO.getAgeEnd())){
+            String ageEndTime = DateUtils.getDateFormatString(DateUtils.yearAddNum(new Date(),-(Integer.parseInt(comMngPopulationVO.getAgeEnd()) + 1)),"yyyy-MM-dd");
+            if(StringUtils.isNotEmpty(ageEndTime)){
+                comMngPopulationVO.setAgeEndTime(ageEndTime);
+            }
+        }
+
         IPage<ComMngPopulationVO> iPage = populationDAO.pagePopulation(page, comMngPopulationVO);
         if(!iPage.getRecords().isEmpty()){
             iPage.getRecords().forEach(populDO -> {
@@ -312,8 +323,12 @@
                 continue;
             }
 
+            if(!comMngVillageDO.getHouseNum().contains("号")){
+                comMngVillageDO.setHouseNum(comMngVillageDO.getHouseNum() + "号");
+            }
+
             address = areaAddressVO.getProvince() + areaAddressVO.getCity()
-                    + areaAddressVO.getDistrict() + street + comMngVillageDO.getAlley() + comMngVillageDO.getHouseNum() + "号"
+                    + areaAddressVO.getDistrict() + street + comMngVillageDO.getAlley() + comMngVillageDO.getHouseNum()
                     + vo.getFloor() + vo.getUnitNo() + vo.getHouseNo();
             vo.setAddress(address);
 
@@ -406,6 +421,7 @@
                         populationDO.setVillageName(comMngVillageDO.getGroupAt());
                         populationDO.setHouseAddress(address);
                         populationDO.setHouseId(populationHouseDO.getId());
+                        populationDO.setUpdateAt(new Date());
                         this.baseMapper.insert(populationDO);
                         savePopulList.add(populationDO);
                         index++;
@@ -422,6 +438,7 @@
                     populationDO.setVillageName(comMngVillageDO.getGroupAt());
                     populationDO.setHouseAddress(address);
                     populationDO.setHouseId(populationHouseDO.getId());
+                    populationDO.setUpdateAt(new Date());
                     this.baseMapper.insert(populationDO);
                     savePopulList.add(populationDO);
                     index++;

--
Gitblit v1.7.1