From 3197770b87a7046e02655bea51034abdfa09ed6d Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期四, 22 七月 2021 12:13:22 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/test' into test

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java |    8 ++++++++
 1 files changed, 8 insertions(+), 0 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 f41c96d..f37dfe6 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
@@ -64,6 +64,7 @@
 
 import javax.annotation.Resource;
 import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -297,6 +298,13 @@
                 comMngPopulationVO.setAgeEndTime(ageEndTime);
             }
         }
+        if (comMngPopulationVO.getAgeStartTime().equals(comMngPopulationVO.getAgeEndTime())) {
+            Date endAge = DateUtils.stringToDate(comMngPopulationVO.getAgeEndTime(),new SimpleDateFormat("yyyy-MM-dd"));
+            String ageStartTime = DateUtils.getDateFormatString(DateUtils.yearAddNum(endAge, -1),"yyyy-MM-dd");
+            if (StringUtils.isNotEmpty(ageStartTime)) {
+                comMngPopulationVO.setAgeStartTimeEnd(ageStartTime);
+            }
+        }
 
         IPage<ComMngPopulationVO> iPage = populationDAO.pagePopulation(page, comMngPopulationVO);
         if (!iPage.getRecords().isEmpty()) {

--
Gitblit v1.7.1