From e7f03acfa5ee4ad4fd6d1ee9e9ae9a5655488f6d Mon Sep 17 00:00:00 2001
From: 101captain <237651143@qq.com>
Date: 星期二, 09 十一月 2021 17:04:46 +0800
Subject: [PATCH] 1109修改

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java |   40 ++++++++++++++++++++--------------------
 1 files changed, 20 insertions(+), 20 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 27e3c7d..c3144e9 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
@@ -9,6 +9,7 @@
 
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.segments.MergeSegments;
+import com.panzhihua.common.utlis.*;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Bean;
@@ -54,10 +55,6 @@
 import com.panzhihua.common.model.vos.screen.ComActPopulationScreenVO;
 import com.panzhihua.common.model.vos.screen.ComMngPopulationAgeVO;
 import com.panzhihua.common.model.vos.user.*;
-import com.panzhihua.common.utlis.AgeUtils;
-import com.panzhihua.common.utlis.DateUtils;
-import com.panzhihua.common.utlis.Snowflake;
-import com.panzhihua.common.utlis.StringUtils;
 import com.panzhihua.service_community.dao.*;
 import com.panzhihua.service_community.model.dos.*;
 import com.panzhihua.service_community.service.*;
@@ -6313,23 +6310,14 @@
     /**
      * 批量删除实有人口
      *
-     * @param Ids
-     * @return
+     * @param ids 实有人口id集合
+     * @return  删除结果
      */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public R deletePopulations(List<Long> Ids) {
-        if (!Ids.isEmpty()) {
-            Ids.forEach(id -> {
-                // 清除用户房屋居住信息
-                comMngPopulationHouseUserDAO.deletePopulationHouseByUserId(id);
-            });
-        }
-        int delete = populationDAO.deleteBatchIds(Ids);
-        if (delete > 0) {
-            return R.ok();
-        }
-        return R.fail();
+    public R deletePopulations(List<Long> ids, Long communityId) {
+        comMngPopulationCommunityTagsDAO.deletePopulationRelation(ids,communityId);
+        return R.ok();
     }
 
     /**
@@ -7352,8 +7340,11 @@
                 statisticsVO.setDangerLevel("0");
                 statisticsVO.setMajor(false);
                 statisticsVO.setUrgent(false);
-                if (statisticsVO.getEventDealStatus().equals(2)) {
-                    statisticsVO.setEventDealStatus(4);
+                if (statisticsVO.getEventDealStatus().equals(2)||statisticsVO.getEventDealStatus().equals(1)) {
+                    statisticsVO.setEventDealStatus(1);
+                }
+                else {
+                    statisticsVO.setEventDealStatus(2);
                 }
                 List<EventResourceVO> picList = new ArrayList<>();
                 String[] pics = statisticsVO.getPhotoPathList().split(",");
@@ -7473,6 +7464,10 @@
             if (StringUtils.isNotEmpty(detail.getMarriage())) {
                 detail.setMarriage(PopulMarriageEnum.getCnDescByName(Integer.parseInt(detail.getMarriage())));
             }
+            //查询该人口的标签
+            List<ComMngPopulationCommunityTagsVo> communityTagsList = this.baseMapper.getCommunityTagList(populationId);
+            String label = LabelUtils.assembleLabel(communityTagsList);
+            detail.setLabel(label);
         }
         return R.ok(detail);
     }
@@ -7696,6 +7691,11 @@
             new Page(villagePopulationDTO.getPageNum(), villagePopulationDTO.getPageSize()), villagePopulationDTO));
     }
 
+    @Override
+    public R specialInputUserExport(PageInputUserDTO PageInputUserDTO) {
+        return R.ok(this.comMngPopulationDAO.specialInputUserExport(PageInputUserDTO));
+    }
+
     private void setMistake(ComMngPopulationMistakeExcelVO mvo, ComMngPopulationServeExcelVO vo) {
         mvo.setPoliticalOutlook(PopulPoliticalOutlookEnum.getCnDescByName(vo.getPoliticalOutlook()));
         mvo.setIsRent(PopulHouseUseEnum.getCnDescByName(vo.getIsRent()));

--
Gitblit v1.7.1