From 69d19f3a36a22bcb9412146bccdeafc5ed1efa57 Mon Sep 17 00:00:00 2001
From: 张天森 <1292933220@qq.com>
Date: 星期二, 18 十月 2022 20:16:14 +0800
Subject: [PATCH] 三说会堂事件操作权限处理

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java
index aa6f4cc..daec656 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java
@@ -28,6 +28,7 @@
 import com.panzhihua.service_community.api.ComSanShuoEventTransferRecordController;
 import com.panzhihua.service_community.dao.ComActDAO;
 import com.panzhihua.service_community.dao.ComEventMapper;
+import com.panzhihua.service_community.dao.ComSanshuoExpertDao;
 import com.panzhihua.service_community.dao.ComStreetDAO;
 import com.panzhihua.service_community.entity.*;
 import com.panzhihua.service_community.model.dos.ComActDO;
@@ -37,6 +38,7 @@
 import org.apache.commons.lang3.RandomUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.RequestParam;
 
 import javax.annotation.Resource;
 import java.util.*;
@@ -81,6 +83,9 @@
 
     @Resource
     private CommediateTypeService commediateTypeService;
+
+    @Resource
+    private ComSanshuoExpertDao comSanshuoExpertDao;
 
 
     @Override
@@ -794,15 +799,17 @@
         comEventDetailVO.setImages(comEventRequestImageVO);
         map.put("specter", specter);
         map.put("eventDetail", comEventDetailVO);
+        List<ComEventTransferRecord> archiveLog=new ArrayList<>();
         List<ComEventTransferRecord> transferRecord = comEventTransferRecordService.list(new QueryWrapper<ComEventTransferRecord>().lambda().eq(ComEventTransferRecord::getEventId, id).orderByDesc(ComEventTransferRecord::getCreateAt));
         transferRecord.forEach(comEventTransferRecord -> {
             List<ComEventResource> list = comEventResourceService.list(new QueryWrapper<ComEventResource>().lambda().eq(ComEventResource::getRefId, comEvent.getId()).notIn(ComEventResource::getStatus,(1)).eq(ComEventResource::getTransferId, comEventTransferRecord.getId()));
             List<ComEventRequestImageVO> ImageVO = CopyUtil.deepCopyListObject(list, ComEventRequestImageVO.class);
             comEventTransferRecord.setImages(ImageVO);
             if (comEventTransferRecord.getEventStatus().equals(7)){
-                map.put("archiveLog", comEventTransferRecord);
+                archiveLog.add(comEventTransferRecord);
             }
         });
+        map.put("archiveLog", archiveLog);
         //迭代器迭代删除归档记录
         Iterator<ComEventTransferRecord> iterator = transferRecord.iterator();
         while (iterator.hasNext()){
@@ -900,6 +907,7 @@
                 comEvent.setUserType(9);
             }
         }
+        log.info("当前userType===="+comEvent.getUserType());
         List<ComEventCalculateVO> calculateList = baseMapper.calculate(comEvent);
         ComEventCalculateVO comEventCalculateVO =new ComEventCalculateVO();
         comEventCalculateVO.setStatus("0");
@@ -959,6 +967,8 @@
                 vo.setSuccessRate(NumberUtil.div(vo.getSuccess(),vo.getAccepted(),2));
             }
         }
+        vo.setExpert(comSanshuoExpertDao.selectExpertCount(indexDataDTO));
+        //查询当前级别下的专家
         //折线图X轴
         List<Date> dates = pastTwelveMoth();
         vo.setX(getYAndM(dates));
@@ -983,7 +993,7 @@
             List<EventRateVO> eventRateVOS = comEventMapper.eventRate();
             for (EventRateVO eventRateVO : eventRateVOS) {
                 if (nonNull(eventRateVO)){
-                    eventRateVO.setName(typeToName(eventRateVO.getType()));
+                    eventRateVO.setName(typeToName(eventRateVO.getCurrentProcessType()));
                     if (nonNull(eventCount) && !eventCount.equals(0)){
                         //计算占比
                         eventRateVO.setRate(NumberUtil.div(eventRateVO.getCount(),eventCount,2));
@@ -1039,12 +1049,14 @@
         switch (type){
             case 1:
                 return "行业分中心受理";
-            case 2:
-                return "街道调解站受理";
             case 3:
+                return "街道调解站受理";
+            case 2:
                 return "社区调解站受理";
             case 4:
                 return "区三说会堂受理";
+            case 5:
+                return "专家受理";
         }
         return null;
     }

--
Gitblit v1.7.1