From 02f18587bd8860b305e2c688e20465be166bb48c Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期四, 22 七月 2021 15:14:03 +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 |   13 +++++++------
 1 files changed, 7 insertions(+), 6 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 f37dfe6..f0db4da 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
@@ -298,14 +298,15 @@
                 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);
+        if (comMngPopulationVO.getAgeStartTime() !=null && !"".equals(comMngPopulationVO.getAgeStartTime()) && comMngPopulationVO.getAgeEndTime() !=null && !"".equals(comMngPopulationVO.getAgeEndTime())){
+            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()) {
             iPage.getRecords().forEach(populDO -> {

--
Gitblit v1.7.1