From 2bdd329d237fb47e083d243a6d9080848c76d597 Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期三, 23 六月 2021 16:18:05 +0800
Subject: [PATCH] 修改bug

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 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 1f0d48a..2ed92ca 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
@@ -1,5 +1,6 @@
 package com.panzhihua.service_community.service.impl;
 
+import cn.hutool.core.util.IdcardUtil;
 import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -14,6 +15,7 @@
 import com.panzhihua.common.exceptions.ServiceException;
 import com.panzhihua.common.model.dtos.community.*;
 import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenEventDetailDTO;
+import com.panzhihua.common.model.dtos.grid.PagePopulationListDTO;
 import com.panzhihua.common.model.dtos.user.PageInputUserDTO;
 import com.panzhihua.common.model.helper.AESUtil;
 import com.panzhihua.common.model.vos.R;
@@ -27,6 +29,7 @@
 import com.panzhihua.common.model.vos.community.screen.index.*;
 import com.panzhihua.common.model.vos.grid.EventGridDataVO;
 import com.panzhihua.common.model.vos.grid.EventResourceVO;
+import com.panzhihua.common.model.vos.grid.PopulationListVO;
 import com.panzhihua.common.model.vos.screen.ComActPopulationCultureVO;
 import com.panzhihua.common.model.vos.screen.ComActPopulationScreenVO;
 import com.panzhihua.common.model.vos.screen.ComMngPopulationAgeVO;
@@ -1415,11 +1418,37 @@
 
                 //查询事件流转记录
                 List<EventTransferRecordVO> transferRecordList = this.baseMapper.getEventScreenEventTransList(eventDetailDTO.getEventId());
+                if(!transferRecordList.isEmpty()){
+                    transferRecordList.forEach(transfer -> {
+                        if(transfer.getFromType().equals(EventTransferRecordVO.fromType.wgy)){
+                            //查询上级网格信息
+                            EventTransferRecordDetailVO transferRecordDetailVO = this.baseMapper.getEventScreenEventTransDetail(transfer.getEventId());
+                            transfer.setSuperiorRelationship(transferRecordDetailVO.getStreetName() + "-"
+                                    + transferRecordDetailVO.getCommunityName() + "-" + transferRecordDetailVO.getGridName());
+                        }else if(transfer.getFromType().equals(EventTransferRecordVO.fromType.sq)){
+                            //查询上级社区信息
+                            EventTransferRecordDetailVO transferRecordDetailVO = this.baseMapper.getEventScreenEventTransDetailByCommunityId(transfer.getFromId());
+                            transfer.setSuperiorRelationship(transferRecordDetailVO.getStreetName() + "-"
+                                    + transferRecordDetailVO.getCommunityName());
+                        }
+                    });
+                }
                 statisticsVO.setTransferRecordList(transferRecordList);
             }
         }
         return R.ok(statisticsVO);
     }
 
+    @Override
+    public R pagePopulationListApp(PagePopulationListDTO populationListDTO){
+        IPage<PopulationListVO> pagePopulationList = this.baseMapper.pagePopulationListApp(new Page(populationListDTO.getPageNum(),populationListDTO.getPageSize()),populationListDTO);
+        if(!pagePopulationList.getRecords().isEmpty()){
+            pagePopulationList.getRecords().forEach(population -> {
+                population.setAge(IdcardUtil.getAgeByIdCard(population.getCardNo()));
+            });
+        }
+        return R.ok(pagePopulationList);
+    }
+
 
 }
\ No newline at end of file

--
Gitblit v1.7.1