| | |
| | | @ApiModelProperty(value = "网格员id集合", hidden = false, example = "") |
| | | private List<Long> memberIds; |
| | | |
| | | @ApiModelProperty(value = "网格所属社区ID", hidden = true, example = "1") |
| | | @ApiModelProperty(value = "网格所属社区ID", hidden = false, example = "1") |
| | | private Long gridCommunityId; |
| | | |
| | | @ApiModelProperty(value = "市平台网格关联id", hidden = false, example = "") |
| | | private Long lcGridId; |
| | | |
| | | @ApiModelProperty(value = "当前登录用户id", hidden = true, example = "1") |
| | | private Long userId; |
| | | |
| | |
| | | @ApiModelProperty(value = "当前登录用户id", hidden = true, example = "1") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "市平台网格关联id", hidden = false, example = "") |
| | | private Long lcGridId; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("投票数量") |
| | | private Integer num; |
| | | |
| | | @ApiModelProperty("是否已经投票 1 是 0 否") |
| | | private Integer haveVote; |
| | | } |
| | |
| | | private String data; |
| | | @ApiModelProperty(value = "所在社区") |
| | | private String communityName; |
| | | @ApiModelProperty(value = "关联市平台网格") |
| | | private String lcGirdName; |
| | | } |
| | |
| | | @ApiOperation(value = "查询当前社区所有网格员", response = EventGridMemberAdminVO.class) |
| | | @PostMapping("/member/list") |
| | | public R getGridMemberLists(){ |
| | | Long communityId = this.getCommunityId(); |
| | | if(communityId == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | return gridService.getGridMemberLists(communityId); |
| | | // Long communityId = this.getCommunityId(); |
| | | // if(communityId == null){ |
| | | // return R.fail("请先登录"); |
| | | // } |
| | | return gridService.getGridMemberLists(null); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增网格") |
| | |
| | | if(loginUserInfo == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | eventGridDataDTO.setGridCommunityId(loginUserInfo.getCommunityId()); |
| | | // eventGridDataDTO.setGridCommunityId(loginUserInfo.getCommunityId()); |
| | | eventGridDataDTO.setUserId(loginUserInfo.getUserId()); |
| | | return gridService.addGridDataByAdmin(eventGridDataDTO); |
| | | } |
| | |
| | | "JOIN com_act_discuss_option o ON d.id = o.discuss_id and d.id=#{id}\n" + |
| | | "JOIN com_act_discuss_option_user ou ON o.id = ou.discuss_option_id and ou.user_id=#{loginUserId}") |
| | | int selectHaveVote(@Param("id") Long id, @Param("loginUserId") Long loginUserId); |
| | | |
| | | @Select("select count(id) from com_act_discuss_option_user where discuss_option_id = #{discussOptionId} and user_id = #{userId}") |
| | | int selectHaveVotes(@Param("discussOptionId") Long discussOptionId, @Param("userId") Long userId); |
| | | } |
| | |
| | | ComActDiscussOptionVO comActDiscussOptionVO=new ComActDiscussOptionVO(); |
| | | BeanUtils.copyProperties(comActDiscussOptionDO,comActDiscussOptionVO); |
| | | comActDiscussOptionVO.setNum(selectCount); |
| | | |
| | | //判断选项是否已投票 |
| | | int haveVote=comActDiscussOptionUserDAO.selectHaveVotes(comActDiscussOptionDO.getId(),loginUserId); |
| | | comActDiscussOptionVO.setHaveVote(haveVote>0?1:0); |
| | | comActDiscussOptionVOS.add(comActDiscussOptionVO); |
| | | }); |
| | | comActDiscussOptionVOS.sort(Comparator.comparing(ComActDiscussOptionVO::getNum).reversed()); |
| | |
| | | ComActDiscussOptionVO comActDiscussOptionVO=new ComActDiscussOptionVO(); |
| | | BeanUtils.copyProperties(comActDiscussOptionDO,comActDiscussOptionVO); |
| | | comActDiscussOptionVO.setNum(selectCount); |
| | | //判断选项是否已投票 |
| | | int haveVote=comActDiscussOptionUserDAO.selectHaveVotes(comActDiscussOptionDO.getId(),loginUserId); |
| | | comActDiscussOptionVO.setHaveVote(haveVote>0?1:0); |
| | | comActDiscussOptionVOS.add(comActDiscussOptionVO); |
| | | }); |
| | | comActDiscussOptionVOS.sort(Comparator.comparing(ComActDiscussOptionVO::getNum).reversed()); |
| | |
| | | private EventMapper eventMapper; |
| | | @Resource |
| | | private EventGridMemberRelationService eventGridMemberRelationService; |
| | | @Resource |
| | | private LcCompareCodeMapper lcCompareCodeMapper; |
| | | /** |
| | | * 新增区县/街道/社区/网格员网格数据管理 |
| | | * @param eventGridDataAddDTO |
| | |
| | | } |
| | | } |
| | | |
| | | if(eventGridDataDTO.getLcGridId() != null){ |
| | | //关联市平台网格 |
| | | LcCompareCodeDO compareCodeDO = lcCompareCodeMapper.selectById(eventGridDataDTO.getLcGridId()); |
| | | if(compareCodeDO != null){ |
| | | compareCodeDO.setLocalGridId(gridDataDO.getId().toString()); |
| | | compareCodeDO.setGridName(gridDataDO.getGridName()); |
| | | lcCompareCodeMapper.updateById(compareCodeDO); |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | egd.data, |
| | | egd.create_at, |
| | | egd.create_by, |
| | | (select lc_grid_name from lc_compare_code where local_grid_id = egd.id) as lcGirdName, |
| | | ca.`name` AS communityName |
| | | FROM |
| | | event_grid_data AS egd |