| | |
| | | * @return |
| | | */ |
| | | IPage<EventGridIncidentStatisticsVO> pageEventList(@Param("page") Page page, @Param("pageBaseDTO") PageBaseDTO pageBaseDTO); |
| | | |
| | | /** |
| | | * 大屏事件详情新处理方式 |
| | | * @param eventId |
| | | * @return |
| | | */ |
| | | EventNewStatisticsVO getEventScreenSSPDateilNew(@Param("eventId") Long eventId); |
| | | } |
| | |
| | | public R getScreenEventDetail(BigScreenEventDetailDTO eventDetailDTO) { |
| | | EventNewStatisticsVO statisticsVO = new EventNewStatisticsVO(); |
| | | Integer eventType = eventDetailDTO.getEventType(); |
| | | if (eventDetailDTO.getType().equals(7) || (nonNull(eventType) && eventType.equals(2))) {// 随手拍详情 |
| | | statisticsVO = this.baseMapper.getEventScreenSSPDateil(eventDetailDTO.getEventId()); |
| | | boolean isNewReq = nonNull(eventType) && eventType.equals(2); |
| | | if (eventDetailDTO.getType().equals(7) || isNewReq) {// 随手拍详情 |
| | | if (isNewReq) { |
| | | statisticsVO = this.baseMapper.getEventScreenSSPDateilNew(eventDetailDTO.getEventId()); |
| | | } else { |
| | | statisticsVO = this.baseMapper.getEventScreenSSPDateil(eventDetailDTO.getEventId()); |
| | | } |
| | | if (statisticsVO != null && StringUtils.isNotEmpty(statisticsVO.getPhotoPathList())) { |
| | | statisticsVO.setDangerLevel("0"); |
| | | statisticsVO.setMajor(false); |
| | |
| | | </if> |
| | | ) ORDER BY create_at DESC |
| | | </select> |
| | | <select id="getEventScreenSSPDateilNew" |
| | | resultType="com.panzhihua.common.model.vos.community.screen.event.EventNewStatisticsVO"> |
| | | SELECT id, su.nick_name AS userName, su.image_url, caep.create_at, caep.detail AS eventDes, |
| | | caep.happen_addr AS happenAddress, caep.lng_lat AS happentLatLng, caep.photo_path_list, |
| | | CASE |
| | | WHEN classify_id = 4 THEN 1 |
| | | WHEN classify_id = 6 THEN 2 |
| | | WHEN classify_id = 5 THEN 3 |
| | | WHEN classify_id = 7 THEN 5 |
| | | WHEN classify_id = 3 THEN 6 |
| | | WHEN classify_id = 8 THEN 9 |
| | | WHEN classify_id = 1 THEN 10 |
| | | END eventType, caep.status AS eventDealStatus |
| | | FROM com_act_easy_photo AS caep |
| | | LEFT JOIN sys_user AS su ON su.user_id = caep.sponsor_id |
| | | WHERE id = #{eventId} |
| | | </select> |
| | | </mapper> |
| | |
| | | <select id="getVillagePopulationTotalNew" |
| | | resultType="com.panzhihua.common.model.vos.screen.ScreenDrawEventPopulationTotalVO"> |
| | | SELECT |
| | | (SELECT count(id) FROM com_mng_population WHERE village_id = #{villageId}) as populationTotal, |
| | | (select count(id) from com_mng_building where village_id = #{villageId}) as buildTotal, |
| | | (SELECT COUNT(DISTINCT CONCAT(road,door_no,floor,unit_no,house_no)) FROM com_mng_population WHERE village_id = #{villageId}) as houseTotal, |
| | | (SELECT count(id) FROM com_mng_population WHERE road = ( SELECT alley FROM com_mng_village WHERE village_id = #{villageId} ) |
| | | AND door_no = ( SELECT house_num FROM com_mng_village WHERE village_id = #{villageId} )) as populationTotal, |
| | | (SELECT count(id) from com_mng_building where village_id = #{villageId}) as buildTotal, |
| | | (SELECT count(id) FROM com_mng_population_house WHERE village_id = #{villageId}) as houseTotal, |
| | | (select count(id) from com_mng_population where village_id = #{villageId} and out_or_local = 1) as localTotal, |
| | | (select count(id) from com_mng_population where village_id = #{villageId} and out_or_local = 2) as outTotal, |
| | | (SELECT COUNT(t1.id) FROM com_disability_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId}) as disabilityTotal, |
| | |
| | | <foreach collection="villageIds" index="index" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | ) temp GROUP BY filed |
| | | ) temp WHERE filed is not null GROUP BY filed |
| | | UNION ALL |
| | | (SELECT '0-18岁' AS filed, 0 AS num) |
| | | UNION ALL |