springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/bigscreen/event/ScreenEventListDTO.java
@@ -5,6 +5,7 @@ import lombok.Data; import javax.validation.constraints.NotNull; import java.util.List; @Data @ApiModel("大屏事件列表请求参数") @@ -27,10 +28,10 @@ private String endTime; @ApiModelProperty(value="网格id") private Long gridId; private List<Long> gridIds; @ApiModelProperty(value="事件类型(1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件、6特殊人群信息上报 8宣传教育)") private Integer eventType; private List<Integer> eventTypes; @ApiModelProperty(value="事件分类(1、办件事件2、宣传事件3、阅读事件)",hidden = true) private Integer eventCategory = 1; springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/event/EventGridStatisticsVO.java
@@ -1,5 +1,7 @@ package com.panzhihua.common.model.vos.community.screen.event; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -11,6 +13,7 @@ public class EventGridStatisticsVO { @ApiModelProperty("网格id") @JsonSerialize(using = ToStringSerializer.class) private Long id; @ApiModelProperty("网格名称") springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/event/EventListVO.java
@@ -68,4 +68,13 @@ @ApiModelProperty("发生区域") private String gridName; @ApiModelProperty(value = "音频") private List<EventResourceVO> audios; @ApiModelProperty(value = "视频") private List<EventResourceVO> videos; @ApiModelProperty(value = "图片") private List<EventResourceVO> pics; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/event/EventTransferRecordDetailVO.java
New file @@ -0,0 +1,19 @@ package com.panzhihua.common.model.vos.community.screen.event; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data @ApiModel("大屏事件播报流转记录详情返回参数") public class EventTransferRecordDetailVO { @ApiModelProperty("街道名称") private String streetName; @ApiModelProperty("社区名称") private String communityName; @ApiModelProperty("网格名称") private String gridName; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/event/EventTransferRecordVO.java
@@ -17,4 +17,31 @@ @ApiModelProperty("事件处理结果") private String processResult; @ApiModelProperty("业务处理类型 1 网格员处理 2 派发到社区 3 社区处理 4 社区标为无效 5 标为无效后处理 6 验证 7 撤销 8 重新发布已撤销事件 9 社区重新发布已标为无效的事件") private Integer processType; @ApiModelProperty("事件处理人") private String fromName; @ApiModelProperty(value = "来源类型(1、网格员2、社区3、是街道)",hidden = true) private Integer fromType; @ApiModelProperty(value = "事件来源机构或网格员",hidden = true) private Long fromId; @ApiModelProperty("上级关系") private String superiorRelationship; @ApiModelProperty(value = "事件id",hidden = true) private Long eventId; /** * 来源类型(1、网格员2、社区3、是街道) */ public interface fromType{ int wgy = 1; int sq = 2; int jd = 3; } } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ComActNeighborCircleAdminVO.java
@@ -21,6 +21,9 @@ @ApiModelProperty("发布人id") private Long releaseId; @ApiModelProperty("发布人头像url") private String imageUrl; @ApiModelProperty("发布人") private String releaseName; springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ScreenWorkApi.java
@@ -9,6 +9,7 @@ import com.panzhihua.common.model.dtos.neighbor.DetailNeighborAllCommentByAdminDTO; import com.panzhihua.common.model.dtos.neighbor.DetailNeighborCommentReplyByAdminDTO; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.ComActDynVO; import com.panzhihua.common.model.vos.community.screen.work.ActActivityListVO; import com.panzhihua.common.model.vos.community.screen.work.ActActivityPeopleListVO; import com.panzhihua.common.model.vos.community.screen.work.DiscussListVO; @@ -20,6 +21,7 @@ import com.panzhihua.common.model.vos.screen.*; import com.panzhihua.common.service.community.CommunityService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.*; @@ -189,4 +191,19 @@ return communityService.detailNeighborCommentAllReply(dto); } @ApiOperation(value = "分页查询社区动态", response = ComActDynVO.class) @PostMapping("pagedynamic") public R pageDynamic(@RequestBody ComActDynVO comActDynVO) { Long communityId = this.getCommunityId(); comActDynVO.setCommunityId(communityId); return communityService.pageDynamicByAdmin(comActDynVO); } @ApiOperation(value = "社区动态详情", response = ComActDynVO.class) @GetMapping("detaildynamic") @ApiImplicitParam(name = "id", value = "社区动态主键", required = true) public R detailDynamic(@RequestParam("id") Long id) { return communityService.detailDynamic(id); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java
@@ -70,7 +70,7 @@ @Select("<script> \n"+ "SELECT\n" + "nc.*,\n" + "u.`nick_name` AS releaseName,u.`type` as userType\n" + "u.`nick_name` AS releaseName,u.`type` as userType,u.image_url\n" + ",u.name as communityName\n" + "FROM\n" + "com_act_neighbor_circle nc\n" + springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java
@@ -842,9 +842,25 @@ " e.id = #{eventId}") EventNewStatisticsVO getEventScreenEventDetail(@Param("eventId") Long eventId); @Select("select process_date,process_result from event_transfer_record where event_id = #{eventId}") @Select("select process_date,process_result,process_type,from_type,from_id,from_name,event_id from event_transfer_record where event_id = #{eventId}") List<EventTransferRecordVO> getEventScreenEventTransList(@Param("eventId") Long eventId); @Select("SELECT " + " cs.address AS streetName, " + " ca.`name` AS communityName, " + " egd.grid_name " + "FROM " + " `event` AS e " + " LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id " + " LEFT JOIN com_act AS ca ON egd.grid_community_id = ca.community_id " + " LEFT JOIN com_street AS cs ON cs.street_id = ca.street_id " + "WHERE " + " e.id = #{eventId}") EventTransferRecordDetailVO getEventScreenEventTransDetail(@Param("eventId") Long eventId); @Select("select ca.`name` AS communityName,cs.address AS streetName from com_act as ca LEFT JOIN com_street AS cs ON cs.street_id = ca.street_id where ca.community_id = #{communityId}") EventTransferRecordDetailVO getEventScreenEventTransDetailByCommunityId(@Param("communityId") Long communityId); @Select("select count(id) from com_elders_auth_elderly WHERE community_id = #{communityId}") Integer getStatisticsCount(@Param("communityId") Long communityId); springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -1415,6 +1415,21 @@ //查询事件流转记录 List<EventTransferRecordVO> transferRecordList = this.baseMapper.getEventScreenEventTransList(eventDetailDTO.getEventId()); if(!transferRecordList.isEmpty()){ transferRecordList.forEach(transfer -> { if(transfer.getFromType().equals(EventTransferRecordVO.fromType.wgy)){ //查询上级网格信息 EventTransferRecordDetailVO transferRecordDetailVO = this.baseMapper.getEventScreenEventTransDetail(transfer.getEventId()); transfer.setSuperiorRelationship(transferRecordDetailVO.getStreetName() + "-" + transferRecordDetailVO.getCommunityName() + "-" + transferRecordDetailVO.getGridName()); }else if(transfer.getFromType().equals(EventTransferRecordVO.fromType.sq)){ //查询上级社区信息 EventTransferRecordDetailVO transferRecordDetailVO = this.baseMapper.getEventScreenEventTransDetailByCommunityId(transfer.getFromId()); transfer.setSuperiorRelationship(transferRecordDetailVO.getStreetName() + "-" + transferRecordDetailVO.getCommunityName()); } }); } statisticsVO.setTransferRecordList(transferRecordList); } } springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java
@@ -2070,10 +2070,50 @@ */ @Override public R getScreenEventList(ScreenEventListDTO eventListDTO) { if (eventListDTO.getEventType() != null && eventListDTO.getEventType().equals(ScreenEventListDTO.eventType.xc)) { eventListDTO.setEventCategory(2); if (eventListDTO.getEventTypes() != null && !eventListDTO.getEventTypes().isEmpty()) { eventListDTO.getEventTypes().forEach(eventType -> { if(eventType.equals(ScreenEventListDTO.eventType.xc)){ eventListDTO.setEventCategory(null); } }); } IPage<EventListVO> eventPageList = this.baseMapper.getScreenEventList(new Page(eventListDTO.getPageNum(), eventListDTO.getPageSize()), eventListDTO); if(!eventPageList.getRecords().isEmpty()){ eventPageList.getRecords().forEach(event -> { //查询事件关联附件 List<EventResourceDO> eventResourceDOList = eventResourceService.getBaseMapper().selectList(new LambdaQueryWrapper<EventResourceDO>() .eq(EventResourceDO::getClassification, 1) .eq(EventResourceDO::getRefId, event.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; } }); event.setAudios(audioList); event.setPics(picList); event.setVideos(videoList); }); } return R.ok(eventPageList); } springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventMapper.xml
@@ -918,16 +918,22 @@ and e.create_at <![CDATA[<=]]> #{eventListDTO.endTime} </if> <if test='eventListDTO.gridId != null'> and e.grid_id = #{eventListDTO.gridId} <if test='eventListDTO.gridIds != null and eventListDTO.gridIds.size > 0'> and e.grid_id in <foreach collection='eventListDTO.gridIds' item='id' index='index' open='(' close=')' separator=',' > #{id} </foreach> </if> <if test='eventListDTO.eventCategory != null'> and e.event_category = #{eventListDTO.eventCategory} </if> <if test='eventListDTO.eventType != null'> and e.event_type = #{eventListDTO.eventType} <if test='eventListDTO.eventTypes != null and eventListDTO.eventTypes.size > 0'> and e.event_type in <foreach collection='eventListDTO.eventTypes' item='id' index='index' open='(' close=')' separator=',' > #{id} </foreach> </if> <if test='eventListDTO.eventDealStatus != null'>