huanghongfa
2021-06-23 b057f9985a360fcfeb3aa6e96eae99deccffa1d2
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java
@@ -1,5 +1,6 @@
package com.panzhihua.service_grid.service.impl;
import cn.hutool.core.util.IdcardUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -251,6 +252,11 @@
            //当事件为特殊人群上报时,需要查询事件与人口关联关系
            if(eventDetailsVO.getEventType().equals(6)){
                List<EventSpecialPopulationDetailsVO> specialPopulationList = eventSpecialCrowdRecordMapper.getSpecialPopulationIds(eventDetailsVO.getId());
                if(!specialPopulationList.isEmpty()){
                    specialPopulationList.forEach(special -> {
                        special.setAge(IdcardUtil.getAgeByIdCard(special.getIdCard()));
                    });
                }
                eventDetailsVO.setPopulationList(specialPopulationList);
            }
            return R.ok(eventDetailsVO);
@@ -276,7 +282,7 @@
        //检查特殊人群上报时参数
        if(commonEventAddDTO.getEventType().equals(6)){
            if(commonEventAddDTO.getPopulationIds().isEmpty()){
            if(commonEventAddDTO.getPopulationIds() == null || commonEventAddDTO.getPopulationIds().size() <= 0){
                return R.fail("上报人员为空");
            }
        }