| | |
| | | package com.panzhihua.common.model.vos.community.screen.civil; |
| | | |
| | | 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; |
| | |
| | | private String villageImages; |
| | | |
| | | @ApiModelProperty("小区id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long villageId; |
| | | |
| | | @ApiModelProperty("总户数") |
| | |
| | | private Integer countPerson; |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | @ApiModelProperty(value = "分页-当前页数",example = "1") |
| | | private Long pageNum = 1L; |
| | | @ApiModelProperty(value = "分页-每页记录数",example = "10") |
| | | private Long pageSize = 10L; |
| | | } |
| | |
| | | * @return 党组织集合 |
| | | */ |
| | | @PostMapping("/partybuildIng/listpartyorganizationAll") |
| | | R listPartyOrganizationAll(@RequestParam("communityId") Long communityId); |
| | | R listPartyOrganizationAll(@RequestBody PartyOrganizationVO partyOrganizationVO); |
| | | |
| | | /** |
| | | * 新增党支部 |
| | |
| | | log.info("新增微心愿未通过审核通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); |
| | | } |
| | | } else if (type.intValue() == 5) { |
| | | if(comActMicroWishVO.getFeedback().length() > 200){ |
| | | return R.fail("反馈字数不得超过200字"); |
| | | } |
| | | sysUserNoticeVO.setTitle("微心愿已完成"); |
| | | sysUserNoticeVO.setBusinessContent(comActMicroWishVO.getFeedback()); |
| | | sysUserNoticeVO.setBusinessStatus(2); |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "社区所有党组织列表", response = PartyOrganizationVO.class) |
| | | @GetMapping("listpartyorganizationAll") |
| | | public R listPartyOrganizationAll() { |
| | | @PostMapping("listpartyorganizationAll") |
| | | public R listPartyOrganizationAll(@RequestBody PartyOrganizationVO partyOrganizationVO) { |
| | | Long communityId = this.getCommunityId(); |
| | | partyOrganizationVO.setCommunityId(communityId); |
| | | log.info("社区所有党组织社区id【{}】", communityId); |
| | | return partyBuildingService.listPartyOrganizationAll(communityId); |
| | | return partyBuildingService.listPartyOrganizationAll(partyOrganizationVO); |
| | | } |
| | | |
| | | |
| | |
| | | " AND a.community_id =#{communityId}") |
| | | CommunityActivitiesVO selectCommunityActivitiesVO(@Param("communityId") Long communityId, @Param("date")Date date); |
| | | |
| | | @Select("SELECT COUNT(id) AS totalNum," + |
| | | "(SELECT COUNT(id) FROM com_act_activity WHERE community_id = #{communityId} AND (status = 3 OR status = 4 OR status = 5) AND create_at LIKE CONCAT(#{nowDate},'%'))AS currentNum," + |
| | | "(SELECT COUNT(id) FROM com_act_activity WHERE community_id = #{communityId} AND (status = 3 OR status = 4 OR status = 5) AND volunteer_max = 0)AS commonNum," + |
| | | "(SELECT COUNT(aas.id) FROM com_act_activity a INNER JOIN com_act_act_sign aas ON a.id = aas.activity_id WHERE a.volunteer_max = 0 AND (a.status = 3 OR a.status = 4 OR a.status = 5) AND a.community_id=#{communityId})AS commonPeopleNum," + |
| | | "(SELECT COUNT(id) FROM com_act_activity WHERE community_id = #{communityId} AND (status = 3 OR status = 4 OR status = 5) AND participant_max = 0)AS volunteerNum," + |
| | | "(SELECT COUNT(aas.id) FROM com_act_activity a INNER JOIN com_act_act_sign aas ON a.id = aas.activity_id WHERE a.community_id=#{communityId} AND a.participant_max = 0 AND (a.status = 3 OR a.status = 4 OR a.status = 5))AS volunteerPeopleNum" + |
| | | " FROM com_act_activity where community_id=#{communityId} AND (status = 3 OR status = 4 OR status = 5)") |
| | | @Select("SELECT " + |
| | | " count( caa.id ) as totalNum, " + |
| | | " (select count(id) from com_act_activity where `status` IN (1,2,3,4,5) and volunteer_min = 0 and community_id = #{communityId}) as commonNum, " + |
| | | " (select count(id) from com_act_activity where `status` IN (1,2,3,4,5) and volunteer_min > 0 and community_id = #{communityId}) as volunteerNum, " + |
| | | " (select count(caas.user_id) from com_act_act_sign as caas left join com_act_activity as caa on caa.id = caas.activity_id where caa.`status` IN (1,2,3,4,5) and is_volunteer = 0 and caa.community_id = #{communityId}) as commonPeopleNum, " + |
| | | " (select count(caas.user_id) from com_act_act_sign as caas left join com_act_activity as caa on caa.id = caas.activity_id where caa.`status` IN (1,2,3,4,5) and is_volunteer = 1 and caa.community_id = #{communityId}) as volunteerPeopleNum, " + |
| | | " (select count(id) from com_act_activity where `status` IN (1,2,3,4,5) and community_id = #{communityId} and create_at between date_sub(curdate() - day(curdate()) +1,interval 1 month) and now()) as currentNum " + |
| | | "FROM " + |
| | | " com_act_activity AS caa " + |
| | | "WHERE " + |
| | | " caa.`status` IN (1,2,3,4,5) and community_id = #{communityId}") |
| | | Map<String, Long> countByCommunityId(@Param("communityId")Long communityId,@Param("nowDate")String nowDate); |
| | | |
| | | @Select("SELECT id,activity_name as content,IF(volunteer_max = 0,'居民活动','志愿者活动') AS typeName FROM com_act_activity " + |
| | |
| | | ComActDiscussVO selectHaveSignAndHaveVote(@Param("id") Long id, @Param("loginUserId")Long loginUserId); |
| | | |
| | | @Select(" SELECT COUNT(id) AS totalNum," + |
| | | "(SELECT COUNT(id) FROM com_act_discuss WHERE community_id = 2 AND create_at LIKE CONCAT('','%'))AS currentNum," + |
| | | "(SELECT COUNT(id) FROM com_act_discuss WHERE community_id = 2 AND TYPE = 1)AS imgNum," + |
| | | "(SELECT COUNT(id) FROM com_act_discuss WHERE community_id = #{communityId} AND create_at between date_sub(curdate() - day(curdate()) +1,interval 1 month) and now())AS currentNum," + |
| | | "(SELECT COUNT(id) FROM com_act_discuss WHERE community_id = #{communityId} AND TYPE = 1)AS imgNum," + |
| | | "(" + |
| | | "SELECT COUNT(DISTINCT(user_id)) FROM (" + |
| | | " SELECT c.user_id FROM com_act_discuss d INNER JOIN com_act_discuss_comment c ON d.id = c.discuss_id WHERE d.community_id = 2 AND d.type = 1 " + |
| | | " UNION ALL " + |
| | | " SELECT u.user_id FROM com_act_discuss d INNER JOIN com_act_discuss_comment c ON d.id = c.discuss_id INNER JOIN com_act_discuss_comment_user u ON c.id = u.disscuss_comment_id WHERE d.community_id = 2 AND d.type = 1 " + |
| | | "UNION ALL " + |
| | | " SELECT u.user_id FROM com_act_discuss d INNER JOIN com_act_discuss_option o ON d.id = o.discuss_id INNER JOIN com_act_discuss_option_user u ON o.id = u.discuss_option_id WHERE d.community_id = 2 AND d.type = 1 " + |
| | | " UNION ALL " + |
| | | " SELECT u.user_id FROM com_act_discuss d INNER JOIN com_act_discuss_user u ON d.id = u.discuss_id WHERE d.community_id = 2 AND d.type = 1 " + |
| | | ")d " + |
| | | ")AS commonPeopleNum," + |
| | | "SELECT " + |
| | | " count(distinct cadc.user_id) " + |
| | | "FROM " + |
| | | " com_act_discuss_comment AS cadc " + |
| | | " LEFT JOIN com_act_discuss AS cad ON cad.id = cadc.discuss_id " + |
| | | " where cad.type = 1 and cad.community_id = #{communityId} " + |
| | | ")AS imgPeopleNum," + |
| | | "(" + |
| | | "SELECT COUNT(DISTINCT(user_id)) FROM (" + |
| | | " SELECT c.user_id FROM com_act_discuss d INNER JOIN com_act_discuss_comment c ON d.id = c.discuss_id WHERE d.community_id = 2 AND d.type = 2 " + |
| | | " UNION ALL" + |
| | | " SELECT u.user_id FROM com_act_discuss d INNER JOIN com_act_discuss_comment c ON d.id = c.discuss_id INNER JOIN com_act_discuss_comment_user u ON c.id = u.disscuss_comment_id WHERE d.community_id = 2 AND d.type = 2 " + |
| | | "UNION ALL " + |
| | | " SELECT u.user_id FROM com_act_discuss d INNER JOIN com_act_discuss_option o ON d.id = o.discuss_id INNER JOIN com_act_discuss_option_user u ON o.id = u.discuss_option_id WHERE d.community_id = 2 AND d.type = 2 " + |
| | | " UNION ALL " + |
| | | " SELECT u.user_id FROM com_act_discuss d INNER JOIN com_act_discuss_user u ON d.id = u.discuss_id WHERE d.community_id = 2 AND d.type = 2 " + |
| | | ")d " + |
| | | ")AS volunteerPeopleNum " + |
| | | "select count(user_id) from ( " + |
| | | "SELECT " + |
| | | " distinct cadc.user_id " + |
| | | "FROM " + |
| | | " com_act_discuss_comment AS cadc " + |
| | | " LEFT JOIN com_act_discuss AS cad ON cad.id = cadc.discuss_id " + |
| | | " where cad.type = 2 and cad.community_id = #{communityId} " + |
| | | " union all " + |
| | | " SELECT DISTINCT cadou.user_id FROM com_act_discuss_option_user AS cadou LEFT JOIN com_act_discuss_option AS cado ON cado.id = cadou.discuss_option_id left join com_act_discuss as cad on cad.id = cado.discuss_id where cad.community_id = #{communityId}" + |
| | | ") t" + |
| | | ")AS votePeopleNum " + |
| | | " FROM com_act_discuss") |
| | | Map<String, Long> countByCommunityId(@Param("communityId")Long communityId, @Param("date")String date); |
| | | |
| | |
| | | if(comActEasyPhotoVO1.getActivityId() != null && comActEasyPhotoVO1.getStatus().equals(ComActEasyPhotoDO.status.ywc)){ |
| | | //查询随手拍活动 |
| | | ComActEasyPhotoActivityDO photoActivityDO = comActEasyPhotoActivityMapper.selectById(comActEasyPhotoVO1.getActivityId()); |
| | | if(comActEasyPhotoVO1.getActivityType() != null){ |
| | | if(comActEasyPhotoVO1.getActivityType().equals(ComActEasyPhotoDO.activityType.yz)){ |
| | | comActEasyPhotoVO1.setActivityMoney(photoActivityDO.getGoodReward()); |
| | | }else if(comActEasyPhotoVO1.getActivityType().equals(ComActEasyPhotoDO.activityType.jl)){ |
| | | comActEasyPhotoVO1.setActivityMoney(photoActivityDO.getExcellentReward()); |
| | | }else if(comActEasyPhotoVO1.getActivityType().equals(ComActEasyPhotoDO.activityType.pt)){ |
| | | comActEasyPhotoVO1.setActivityMoney(photoActivityDO.getOrdinaryReward()); |
| | | }else if(comActEasyPhotoVO1.getActivityType().equals(ComActEasyPhotoDO.activityType.yb)){ |
| | | comActEasyPhotoVO1.setActivityMoney(photoActivityDO.getCommonlyReward()); |
| | | if(photoActivityDO != null){ |
| | | if(comActEasyPhotoVO1.getActivityType() != null){ |
| | | if(comActEasyPhotoVO1.getActivityType().equals(ComActEasyPhotoDO.activityType.yz)){ |
| | | comActEasyPhotoVO1.setActivityMoney(photoActivityDO.getGoodReward()); |
| | | }else if(comActEasyPhotoVO1.getActivityType().equals(ComActEasyPhotoDO.activityType.jl)){ |
| | | comActEasyPhotoVO1.setActivityMoney(photoActivityDO.getExcellentReward()); |
| | | }else if(comActEasyPhotoVO1.getActivityType().equals(ComActEasyPhotoDO.activityType.pt)){ |
| | | comActEasyPhotoVO1.setActivityMoney(photoActivityDO.getOrdinaryReward()); |
| | | }else if(comActEasyPhotoVO1.getActivityType().equals(ComActEasyPhotoDO.activityType.yb)){ |
| | | comActEasyPhotoVO1.setActivityMoney(photoActivityDO.getCommonlyReward()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | comActMicroWishDO.setForm(2); |
| | | break; |
| | | case 5: |
| | | if(comActMicroWishVO.getFeedback().length() > 200){ |
| | | return R.fail("反馈字数不得超过200字"); |
| | | } |
| | | comActMicroWishDO.setFeedbackAt(date); |
| | | comActMicroWishDO.setStatus(5);//待确认 |
| | | comActMicroWishDO.setFeedback(feedback); |
| | |
| | | villageStatisticsList.forEach(village -> { |
| | | CivilVillageStatisticsVO villageStatisticsVO = this.baseMapper.getCivilScreenVillageStatistics(village.getVillageId()); |
| | | if(villageStatisticsVO != null){ |
| | | BeanUtils.copyProperties(villageStatisticsVO,village); |
| | | village.setPeopleNum(villageStatisticsVO.getPeopleNum()); |
| | | village.setHouseNum(villageStatisticsVO.getHouseNum()); |
| | | village.setRegisterNum(villageStatisticsVO.getRegisterNum()); |
| | | village.setFlowNum(villageStatisticsVO.getFlowNum()); |
| | | // BeanUtils.copyProperties(villageStatisticsVO,village); |
| | | } |
| | | }); |
| | | } |
| | |
| | | event_visiting_tasks |
| | | WHERE |
| | | event_status = 2 AND submit_date BETWEEN DATE_FORMAT( CURDATE(), '%Y-%m-%d %H:%i:%s' ) |
| | | AND NOW() |
| | | AND DATE_SUB( DATE_ADD(CURDATE(), INTERVAL 1 DAY),INTERVAL 1 SECOND) |
| | | <if test="gridId!=null"> |
| | | AND grid_id = #{gridId} |
| | | </if> |
| | |
| | | * @return 党组织集合 |
| | | */ |
| | | @PostMapping("listpartyorganizationAll") |
| | | public R listPartyOrganizationAll(@RequestParam("communityId") Long communityId){ |
| | | List<PartyOrganizationVO> partyOrganizationVOS=partyOrganizationService.listPartyOrganizationAll(communityId); |
| | | return R.ok(partyOrganizationVOS); |
| | | public R listPartyOrganizationAll(@RequestBody PartyOrganizationVO partyOrganizationVO){ |
| | | return partyOrganizationService.listPartyOrganizationAll(partyOrganizationVO); |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.panzhihua.service_dangjian.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyOrganizationVO; |
| | | import com.panzhihua.service_dangjian.model.dos.ComPbOrgDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 党组织 |
| | |
| | | **/ |
| | | @Mapper |
| | | public interface ComPbOrgDAO extends BaseMapper<ComPbOrgDO> { |
| | | |
| | | @Select("select id,`name`,`status` from com_pb_org where community_id = #{partyOrganizationVO.communityId}") |
| | | IPage<PartyOrganizationVO> listPartyOrganizationAll(Page page, @Param("partyOrganizationVO") PartyOrganizationVO partyOrganizationVO); |
| | | |
| | | } |
| | |
| | | * 平台所有的党组织 |
| | | * @return 党组织集合 |
| | | */ |
| | | List<PartyOrganizationVO> listPartyOrganizationAll(Long communityId); |
| | | R listPartyOrganizationAll(PartyOrganizationVO partyOrganizationVO); |
| | | /** |
| | | * 新增党支部 |
| | | * @param partyOrganizationVO 党支部基本信息 |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.partybuilding.ComListPartyDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyOrganizationVO; |
| | |
| | | * @return 党组织集合 |
| | | */ |
| | | @Override |
| | | public List<PartyOrganizationVO> listPartyOrganizationAll(Long communityId) { |
| | | List<PartyOrganizationVO> partyOrganizationVOS = new ArrayList<>(); |
| | | List<ComPbOrgDO> comPbOrgDOS = comPbOrgDAO |
| | | .selectList(new QueryWrapper<ComPbOrgDO>().lambda().eq(ComPbOrgDO::getCommunityId, communityId)); |
| | | if (!ObjectUtils.isEmpty(comPbOrgDOS)) { |
| | | comPbOrgDOS.forEach(comPbOrgDO -> { |
| | | PartyOrganizationVO partyOrganizationVO = new PartyOrganizationVO(); |
| | | public R listPartyOrganizationAll(PartyOrganizationVO partyOrganizationVO) { |
| | | IPage<PartyOrganizationVO> orgPgaeList = this.comPbOrgDAO.listPartyOrganizationAll(new Page(partyOrganizationVO.getPageNum(),partyOrganizationVO.getPageSize()),partyOrganizationVO); |
| | | if (!ObjectUtils.isEmpty(orgPgaeList.getRecords())) { |
| | | orgPgaeList.getRecords().forEach(comPbOrgDO -> { |
| | | List<ComPbMemberDO> comPbMemberDOs = comPbMemberDAO.selectList( |
| | | new QueryWrapper<ComPbMemberDO>().lambda().eq(ComPbMemberDO::getOrgId, comPbOrgDO.getId())); |
| | | partyOrganizationVO.setId(comPbOrgDO.getId()); |
| | | partyOrganizationVO.setName(comPbOrgDO.getName()); |
| | | partyOrganizationVO.setStatus(comPbOrgDO.getStatus()); |
| | | partyOrganizationVO.setCountPerson(comPbMemberDOs.size()); |
| | | partyOrganizationVOS.add(partyOrganizationVO); |
| | | comPbOrgDO.setCountPerson(comPbMemberDOs.size()); |
| | | }); |
| | | } |
| | | return partyOrganizationVOS; |
| | | return R.ok(orgPgaeList); |
| | | } |
| | | |
| | | /** |