| | |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridDataAreaVO; |
| | | import com.panzhihua.common.model.vos.grid.EventSpecialPopulationVO; |
| | | import com.panzhihua.common.utlis.ClazzUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | ClazzUtils.setIfStringIsEmpty(eventRevokeDTO); |
| | | LoginUserInfoVO loginUserInfoVO = getLoginUserInfo(); |
| | | eventRevokeDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | eventRevokeDTO.setUserName(loginUserInfoVO.getName()); |
| | | eventRevokeDTO.setUserName(loginUserInfoVO.getNickName()); |
| | | eventRevokeDTO.setRevokeType(1); |
| | | eventRevokeDTO.setRevokeId(loginUserInfoVO.getUserId()); |
| | | return gridService.emergenciesRevoke(eventRevokeDTO); |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param eventDeleteDTO 删除事件传递对象 |
| | | * @param commonEventDeleteDTO 删除事件传递对象 |
| | | * @return 删除结果 |
| | | */ |
| | | @DeleteMapping() |
| | | @ApiOperation(value = "删除事件", response = R.class) |
| | | R delete(@Validated @RequestBody EventDeleteDTO eventDeleteDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(eventDeleteDTO); |
| | | return gridService.delete(eventDeleteDTO); |
| | | R delete(@Validated @RequestBody CommonEventDeleteDTO commonEventDeleteDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(commonEventDeleteDTO); |
| | | return gridService.delete(commonEventDeleteDTO); |
| | | } |
| | | /** |
| | | * 重新发布事件 |
| | |
| | | ClazzUtils.setIfStringIsEmpty(commonEventRepublishDTO); |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | commonEventRepublishDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | commonEventRepublishDTO.setUserName(loginUserInfoVO.getName()); |
| | | commonEventRepublishDTO.setUserName(loginUserInfoVO.getNickName()); |
| | | return gridService.republishEvent(commonEventRepublishDTO); |
| | | } |
| | | |
| | |
| | | ClazzUtils.setIfStringIsEmpty(commonEventPublicDTO); |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | commonEventPublicDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | commonEventPublicDTO.setUserName(loginUserInfoVO.getName()); |
| | | commonEventPublicDTO.setUserName(loginUserInfoVO.getNickName()); |
| | | return gridService.draftRelease(commonEventPublicDTO); |
| | | } |
| | | |
| | |
| | | R actList(){ |
| | | return gridService.actList(); |
| | | } |
| | | |
| | | /** |
| | | * 查询距离当前事件最近的网格数据 |
| | | * @param pageEventGridNearbyDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/grid/nearby") |
| | | @ApiOperation(value = "查询经纬度所在的网格", response = EventGridDataAreaVO.class) |
| | | R getNearByGrid(@Validated @RequestBody PageEventGridNearbyDTO pageEventGridNearbyDTO){ |
| | | return gridService.getNearByGrid(pageEventGridNearbyDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询社区特殊人群列表", response = EventSpecialPopulationVO.class) |
| | | @PostMapping("/special/population/list") |
| | | public R specialPopulationList(@RequestBody PageEventSpecialPopulationDTO specialPopulationDTO){ |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | specialPopulationDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | return gridService.specialPopulationList(specialPopulationDTO); |
| | | } |
| | | |
| | | |
| | | } |