From b057f9985a360fcfeb3aa6e96eae99deccffa1d2 Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期三, 23 六月 2021 14:31:43 +0800 Subject: [PATCH] 特殊群人上报接口,获取系统配置接口 --- springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java index 37ae24a..501d79b 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java +++ b/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; @@ -54,6 +55,8 @@ private EventGridMemberRelationMapper eventGridMemberRelationMapper; @Resource private EventSpecialCrowdRecordService eventSpecialCrowdRecordService; + @Resource + private EventSpecialCrowdRecordMapper eventSpecialCrowdRecordMapper; /** * 分页查找事件 @@ -246,6 +249,16 @@ eventDetailsVO.setCreator(createUser.get("name") == null ? "" : createUser.get("name").toString()); } + //当事件为特殊人群上报时,需要查询事件与人口关联关系 + 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); } return R.fail("事件不存在"); @@ -269,7 +282,7 @@ //检查特殊人群上报时参数 if(commonEventAddDTO.getEventType().equals(6)){ - if(commonEventAddDTO.getPopulationIds().isEmpty()){ + if(commonEventAddDTO.getPopulationIds() == null || commonEventAddDTO.getPopulationIds().size() <= 0){ return R.fail("上报人员为空"); } } -- Gitblit v1.7.1