From a7b550f95172e29d71aa38dca45cacf7f31949b8 Mon Sep 17 00:00:00 2001
From: 罗元桥 <2376770955@qq.com>
Date: 星期四, 17 六月 2021 14:44:50 +0800
Subject: [PATCH] Merge branch 'test_screen' into 'master'

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java |  133 +++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 123 insertions(+), 10 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 4630487..f95a52b 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
@@ -14,6 +14,7 @@
 import com.panzhihua.common.enums.PopulIsOksEnum;
 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.user.PageInputUserDTO;
 import com.panzhihua.common.model.helper.AESUtil;
 import com.panzhihua.common.model.vos.R;
@@ -856,11 +857,35 @@
                         Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName());
                         otherSpecialVO.setSum(otherSpecialVO.getSum() + count);
                     }else{
-                        IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO();
-                        specialStatisticsVO.setTitle(userTag.getTagName());
-                        Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName());
-                        specialStatisticsVO.setSum(count);
-                        specialStatisticsVOList.add(specialStatisticsVO);
+                        if(StringUtils.isNotEmpty(userTag.getTagName())){
+                            if(userTag.getTagName().equals("特扶家庭")){
+                                IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO();
+                                specialStatisticsVO.setTitle(userTag.getTagName());
+                                specialStatisticsVO.setSum(22);
+                                specialStatisticsVOList.add(specialStatisticsVO);
+                            }else if(userTag.getTagName().equals("低保户")){
+                                IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO();
+                                specialStatisticsVO.setTitle(userTag.getTagName());
+                                specialStatisticsVO.setSum(94);
+                                specialStatisticsVOList.add(specialStatisticsVO);
+                            }else if(userTag.getTagName().equals("低收入人群")){
+                                IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO();
+                                specialStatisticsVO.setTitle(userTag.getTagName());
+                                specialStatisticsVO.setSum(2);
+                                specialStatisticsVOList.add(specialStatisticsVO);
+                            }else if(userTag.getTagName().equals("退役军人")){
+                                IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO();
+                                specialStatisticsVO.setTitle(userTag.getTagName());
+                                specialStatisticsVO.setSum(264);
+                                specialStatisticsVOList.add(specialStatisticsVO);
+                            }else{
+                                IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO();
+                                specialStatisticsVO.setTitle(userTag.getTagName());
+                                Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName());
+                                specialStatisticsVO.setSum(count);
+                                specialStatisticsVOList.add(specialStatisticsVO);
+                            }
+                        }
                     }
                 }
             });
@@ -1007,11 +1032,35 @@
                         Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName());
                         otherSpecialVO.setSum(otherSpecialVO.getSum() + count);
                     }else{
-                        IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO();
-                        specialStatisticsVO.setTitle(userTag.getTagName());
-                        Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName());
-                        specialStatisticsVO.setSum(count);
-                        specialStatisticsVOList.add(specialStatisticsVO);
+                        if(StringUtils.isNotEmpty(userTag.getTagName())){
+                            if(userTag.getTagName().equals("特扶家庭")){
+                                IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO();
+                                specialStatisticsVO.setTitle(userTag.getTagName());
+                                specialStatisticsVO.setSum(22);
+                                specialStatisticsVOList.add(specialStatisticsVO);
+                            }else if(userTag.getTagName().equals("低保户")){
+                                IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO();
+                                specialStatisticsVO.setTitle(userTag.getTagName());
+                                specialStatisticsVO.setSum(94);
+                                specialStatisticsVOList.add(specialStatisticsVO);
+                            }else if(userTag.getTagName().equals("低收入人群")){
+                                IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO();
+                                specialStatisticsVO.setTitle(userTag.getTagName());
+                                specialStatisticsVO.setSum(2);
+                                specialStatisticsVOList.add(specialStatisticsVO);
+                            }else if(userTag.getTagName().equals("退役军人")){
+                                IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO();
+                                specialStatisticsVO.setTitle(userTag.getTagName());
+                                specialStatisticsVO.setSum(264);
+                                specialStatisticsVOList.add(specialStatisticsVO);
+                            }else{
+                                IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO();
+                                specialStatisticsVO.setTitle(userTag.getTagName());
+                                Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName());
+                                specialStatisticsVO.setSum(count);
+                                specialStatisticsVOList.add(specialStatisticsVO);
+                            }
+                        }
                     }
                 }
             });
@@ -1206,10 +1255,74 @@
         comActPopulationScreenVO.setAgeGroup(ageList);
     }
 
+    @Override
     public R getScreenGirds(Long communityId){
         return R.ok(this.baseMapper.getEventScreenGridData(communityId));
     }
 
+    @Override
+    public R getScreenEventDetail(BigScreenEventDetailDTO eventDetailDTO){
+        EventNewStatisticsVO statisticsVO = new EventNewStatisticsVO();
+        if(eventDetailDTO.getType().equals(7)){//随手拍详情
+            statisticsVO = this.baseMapper.getEventScreenSSPDateil(eventDetailDTO.getEventId());
+            if(statisticsVO != null && StringUtils.isNotEmpty(statisticsVO.getPhotoPathList())){
+                statisticsVO.setDangerLevel("0");
+                statisticsVO.setMajor(false);
+                statisticsVO.setUrgent(false);
+                if(statisticsVO.getEventDealStatus().equals(2)){
+                    statisticsVO.setEventDealStatus(4);
+                }
+                List<EventResourceVO> picList = new ArrayList<>();
+                String [] pics = statisticsVO.getPhotoPathList().split(",");
+                if(pics.length > 0){
+                    for (int i = 0; i < pics.length; i++) {
+                        EventResourceVO resourceVO = new EventResourceVO();
+                        resourceVO.setType(1);
+                        resourceVO.setUrl(pics[i]);
+                        picList.add(resourceVO);
+                    }
+                }
+                statisticsVO.setPics(picList);
+            }
+        }else{//事件详情
+            statisticsVO = this.baseMapper.getEventScreenEventDetail(eventDetailDTO.getEventId());
+            if(statisticsVO != null){
+                //查询事件资源文件
+                List<EventResourceDO> eventResourceDOList =
+                        eventResourceService.getBaseMapper().selectList(new LambdaQueryWrapper<EventResourceDO>()
+                                .eq(EventResourceDO::getClassification, 1)
+                                .eq(EventResourceDO::getRefId, statisticsVO.getId())
+                        );
+                List<EventResourceVO> picList = new ArrayList<>();
+                List<EventResourceVO> audioList = new ArrayList<>();
+                List<EventResourceVO> videoList = new ArrayList<>();
+                eventResourceDOList.forEach(eventResourceDO -> {
+                    switch (eventResourceDO.getType()) {
+                        case 1:
+                            EventResourceVO picEventResourceVO = new EventResourceVO();
+                            BeanUtils.copyProperties(eventResourceDO, picEventResourceVO);
+                            picList.add(picEventResourceVO);
+                            break;
+                        case 2:
+                            EventResourceVO audioResourceVO = new EventResourceVO();
+                            BeanUtils.copyProperties(eventResourceDO, audioResourceVO);
+                            audioList.add(audioResourceVO);
+                            break;
+                        case 3:
+                            EventResourceVO videoResourceVO = new EventResourceVO();
+                            BeanUtils.copyProperties(eventResourceDO, videoResourceVO);
+                            videoList.add(videoResourceVO);
+                            break;
+                    }
+                });
+                statisticsVO.setAudios(audioList);
+                statisticsVO.setPics(picList);
+                statisticsVO.setVideos(videoList);
+            }
+        }
+        return R.ok(statisticsVO);
+    }
+
     public static void main(String[] args) {
 //        List<ComMngPopulationHouseUserDO> distinctClass = populationHouseUserDOList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(o -> o.getPopulId() + ";" + o.getHouseId() + ";" + o.getId() + ";" + o.getRelation()))), ArrayList::new));
     }

--
Gitblit v1.7.1