| | |
| | | LoginReturnVO loginReturnVO = new LoginReturnVO(); |
| | | loginReturnVO.setToken(token); |
| | | loginReturnVO.setRefreshToken(refeshToken); |
| | | loginReturnVO.setCommunityId(loginUser.getCommunityId()); |
| | | return loginReturnVO; |
| | | } |
| | | |
| | |
| | | private String token; |
| | | @ApiModelProperty("刷新token有效期长") |
| | | private String refreshToken; |
| | | @ApiModelProperty("communityId") |
| | | private Long communityId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("大屏党建活动折线图") |
| | | public class BigScreenActivityLine { |
| | | @ApiModelProperty("月份") |
| | | private String x; |
| | | @ApiModelProperty("新增数") |
| | | private Integer y; |
| | | @ApiModelProperty("累计数") |
| | | private Integer countY; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("党员积分排名") |
| | | public class BigScreenActivityTop { |
| | | @ApiModelProperty("姓名") |
| | | private String name; |
| | | @ApiModelProperty("党组织名") |
| | | private String orgName; |
| | | @ApiModelProperty("党员分数") |
| | | private Integer score; |
| | | @ApiModelProperty("头像") |
| | | private String url; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("服务数据") |
| | | public class BigScreenServiceData { |
| | | @ApiModelProperty("办事指南") |
| | | private Integer guide; |
| | | @ApiModelProperty("通知公告") |
| | | private Integer announcement; |
| | | @ApiModelProperty("高龄认证") |
| | | private Integer eldersAuth; |
| | | @ApiModelProperty("便民商家") |
| | | private Integer convenient; |
| | | @ApiModelProperty("房屋租赁") |
| | | private Integer rentingHouse; |
| | | @ApiModelProperty("一键服务") |
| | | private Integer oneButton; |
| | | @ApiModelProperty("社区工作者") |
| | | private Integer socialWorker; |
| | | @ApiModelProperty("养老认证") |
| | | private Integer pensionAuth; |
| | | @ApiModelProperty("逝世申报") |
| | | private Integer death=0; |
| | | @ApiModelProperty("高龄补贴") |
| | | private Integer eldersAllowance=0; |
| | | @ApiModelProperty("服务咨询") |
| | | private Integer serviceConsultation=0; |
| | | @ApiModelProperty("政策文件") |
| | | private Integer partyDyn; |
| | | @ApiModelProperty("便民设施") |
| | | private Integer equipment=0; |
| | | @ApiModelProperty("物业公司") |
| | | private Integer property; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.bigscreen; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("服务居民") |
| | | public class BigScreenServiceUser { |
| | | @ApiModelProperty("小区名") |
| | | private String villageName; |
| | | @ApiModelProperty("人数") |
| | | private Integer num; |
| | | } |
| | |
| | | private Long communityId; |
| | | @ApiModelProperty(value = "社区名称") |
| | | private String name; |
| | | @ApiModelProperty("经度") |
| | | private String lng; |
| | | @ApiModelProperty("纬度") |
| | | private String lat; |
| | | } |
| | |
| | | @GetMapping("/rentingHourseRegister/updateAllHouseUnionAppCode") |
| | | @Async |
| | | void updateAllHouseUnionAppCode(); |
| | | |
| | | /** |
| | | * 党员活动折线图 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/bigscreen/party/partyActivityLine") |
| | | R partyActivityLine(@RequestParam("communityId")Long communityId); |
| | | |
| | | /** |
| | | * 党员积分前3 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/bigscreen/party/partyActivityTop") |
| | | R partyActivityTop(@RequestParam("communityId")Long communityId); |
| | | |
| | | /** |
| | | * 社区服务大屏数据分析接口 |
| | | */ |
| | | @GetMapping("/screen/serviceData") |
| | | R serviceData(@RequestParam("communityId")Long communityId); |
| | | |
| | | /** |
| | | * 服务居民接口 |
| | | */ |
| | | @GetMapping("/screen/serviceUser") |
| | | R serviceUser(@RequestParam("communityId") Long communityId); |
| | | } |
| | |
| | | pagePartyOrganizationVO.setCommunityId(id); |
| | | return partyBuildingService.pagePartyOrganization(pagePartyOrganizationVO); |
| | | } |
| | | |
| | | /** |
| | | * 党员活动折线图 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "党员活动折线图", response = BigScreenActivityLine.class) |
| | | @GetMapping("/partyActivityLine") |
| | | public R partyActivityLine(){ |
| | | return communityService.partyActivityLine(this.getCommunityId()); |
| | | } |
| | | |
| | | /** |
| | | * 党员积分前3 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "党员积分前3", response = BigScreenActivityTop.class) |
| | | @GetMapping("/partyActivityTop") |
| | | public R partyActivityTop(){ |
| | | return communityService.partyActivityTop(this.getCommunityId()); |
| | | } |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.constants.HttpConstant; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceData; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceUser; |
| | | import com.panzhihua.common.utlis.HttpClientUtil; |
| | | import com.panzhihua.common.utlis.HttpUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | return gridService.getGridsMemberTrajectory(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 社区服务大屏数据分析接口 |
| | | */ |
| | | @ApiOperation(value = "社区服务大屏数据分析接口", response = BigScreenServiceData.class) |
| | | @GetMapping("/serviceData") |
| | | public R serviceData(){ |
| | | return this.communityService.serviceData(this.getCommunityId()); |
| | | } |
| | | |
| | | /** |
| | | * 服务居民接口 |
| | | */ |
| | | @ApiOperation(value = "社区服务大屏服务居民接口", response = BigScreenServiceUser.class) |
| | | @GetMapping("/serviceUser") |
| | | public R serviceUser(){ |
| | | return this.communityService.serviceUser(this.getCommunityId()); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | @GetMapping("/partyActivityLine") |
| | | public R partyActivityLine(@RequestParam("communityId")Long communityId){ |
| | | return null; |
| | | return bigScreenService.partyActivityLine(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 党员积分前3 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/partyActivityTop") |
| | | public R partyActivityTop(@RequestParam("communityId")Long communityId){ |
| | | return bigScreenService.partyActivityTop(communityId); |
| | | } |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.service_community.service.BigScreenService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenEventDTO; |
| | |
| | | |
| | | @Resource |
| | | private ComMngPopulationService comMngPopulationService; |
| | | @Resource |
| | | private BigScreenService bigScreenService; |
| | | |
| | | /** |
| | | * 首页大屏统计接口 |
| | |
| | | return R.ok(comMngPopulationService.indexInfo(communityId)); |
| | | } |
| | | |
| | | /** |
| | | * 社区服务大屏数据分析接口 |
| | | */ |
| | | @GetMapping("/serviceData") |
| | | public R serviceData(@RequestParam("communityId")Long communityId){ |
| | | return this.bigScreenService.serviceData(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 服务居民接口 |
| | | */ |
| | | @GetMapping("/serviceUser") |
| | | public R serviceUser(@RequestParam("communityId") Long communityId){ |
| | | return this.bigScreenService.serviceUser(communityId); |
| | | } |
| | | |
| | | } |
| | |
| | | "HAVING distance >= 0 and distance <= #{communityDTO.distance} ORDER BY distance ASC") |
| | | List<CommunitySwitchAllAppletsVO> getCommunityListByNearby(@Param("communityDTO") SearchCommunityDTO communityDTO); |
| | | |
| | | @Select("select community_id,name from com_act where state = 0 and area_code = '510423' ") |
| | | @Select("select community_id,name,lng,lat from com_act where state = 0 and area_code = '510423' ") |
| | | List<EventGridCommunityAdminVO> getWestCommunityLists(); |
| | | } |
| | |
| | | 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.community.bigscreen.BigScreenActivityLine; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityTop; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceData; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceUser; |
| | | import com.panzhihua.common.model.vos.partybuilding.*; |
| | | import com.panzhihua.service_community.model.dos.ComPbMemberDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | * @return |
| | | */ |
| | | ComPbMemberVO selectById(String idCard); |
| | | |
| | | /** |
| | | *根据社区id日期查询活动数 |
| | | * @param communityId |
| | | * @param date |
| | | * @return |
| | | */ |
| | | BigScreenActivityLine selectActivityCountMonth(@Param("communityId")Long communityId, @Param("date")String date); |
| | | |
| | | /** |
| | | * 查询党员积分前3 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | List<BigScreenActivityTop> selectActivityTop(@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 服务数据查询 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | BigScreenServiceData bigScreenServiceData(@Param("communityId")Long communityId); |
| | | |
| | | /** |
| | | * 服务居民 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | BigScreenServiceUser bigScreenServiceUser(@Param("communityId")Long communityId); |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticPartyActivity; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticPartyBuild; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.PartyBuildingMemberVO; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | /** |
| | | * @ClasssName BigScreenService |
| | |
| | | */ |
| | | R<List<BigScreenStatisticPartyActivity>> |
| | | bigscreenPartyactivity(BigScreenStatisticPartyActivityDTO bigScreenStatisticPartyActivityDTO); |
| | | |
| | | /** |
| | | * 党员活动折线图 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R partyActivityLine(Long communityId); |
| | | |
| | | /** |
| | | *查询党员积分前3 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R partyActivityTop(Long communityId); |
| | | |
| | | /** |
| | | * 服务数据 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R serviceData(Long communityId); |
| | | |
| | | /** |
| | | * 服务用户 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R serviceUser(Long communityId); |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.service_community.dao.ComPbMemberDAO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | public class BigScreenServiceImpl implements BigScreenService { |
| | | @Resource |
| | | private BigScreenDAO bigScreenDAO; |
| | | @Resource |
| | | private ComPbMemberDAO comPbMemberDAO; |
| | | |
| | | @Override |
| | | public R partyOrgMembers(PageBigScreenStatisticPartyOrg pageBigScreenStatisticPartyOrg) { |
| | |
| | | return R.ok(listR); |
| | | } |
| | | |
| | | @Override |
| | | public R partyActivityLine(Long communityId) { |
| | | List<BigScreenActivityLine> bigScreenActivityLines=this.getPoints(); |
| | | bigScreenActivityLines.forEach(bigScreenActivityLine -> { |
| | | BigScreenActivityLine bigScreenActivityLine1=comPbMemberDAO.selectActivityCountMonth(communityId,bigScreenActivityLine.getX()); |
| | | bigScreenActivityLine.setY(bigScreenActivityLine1.getY()); |
| | | bigScreenActivityLine.setCountY(bigScreenActivityLine1.getCountY()); |
| | | }); |
| | | return R.ok(bigScreenActivityLines); |
| | | } |
| | | |
| | | @Override |
| | | public R partyActivityTop(Long communityId) { |
| | | return R.ok(this.comPbMemberDAO.selectActivityTop(communityId)); |
| | | } |
| | | |
| | | @Override |
| | | public R serviceData(Long communityId) { |
| | | return R.ok(this.comPbMemberDAO.bigScreenServiceData(communityId)); |
| | | } |
| | | |
| | | @Override |
| | | public R serviceUser(Long communityId) { |
| | | return R.ok(this.comPbMemberDAO.bigScreenServiceUser(communityId)); |
| | | } |
| | | |
| | | public List<BigScreenActivityLine> getPoints(){ |
| | | List<BigScreenActivityLine> bigScreenActivityLines=new ArrayList<>(); |
| | | for(int i=1;i<=12;i++){ |
| | | String aDate=""; |
| | | if(i<10){ |
| | | aDate = "0"+i; |
| | | } |
| | | else { |
| | | aDate=i+""; |
| | | } |
| | | BigScreenActivityLine bigScreenActivityLine=new BigScreenActivityLine(); |
| | | bigScreenActivityLine.setX(aDate); |
| | | bigScreenActivityLines.add(bigScreenActivityLine); |
| | | } |
| | | return bigScreenActivityLines; |
| | | } |
| | | |
| | | } |
| | |
| | | <select id="selectById" resultType="com.panzhihua.common.model.vos.partybuilding.ComPbMemberVO"> |
| | | select t.*,t2.name as orgName from com_pb_member t left join com_mng_population t1 on t.id_card = t1.card_no_str left join com_pb_org t2 on t.org_id = t2.id where t1.card_no_str =#{idCard} |
| | | </select> |
| | | |
| | | <select id="selectActivityCountMonth" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityLine"> |
| | | select ( select count(id) from com_pb_activity where status!=6 and community_id =#{communityId} and release_time >= DATE_FORMAT( CONCAT(year(now()),'-',#{date},'-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=release_time) y, |
| | | (select count(id) from com_pb_activity where status!=6 and community_id =#{communityId} and DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=release_time) countY |
| | | </select> |
| | | |
| | | <select id="selectActivityTop" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityTop"> |
| | | select t.name,t.photo_path as url,t1.name as orgName,t2.integral_available_party as score from com_pb_member t LEFT JOIN com_pb_org t1 on t.org_id= t1.id LEFT JOIN com_act_integral_user t2 on t.user_id = t2.user_id where t.community_id =#{communityId} and t2.status = 1 order by integral_available_party desc limit 3 |
| | | </select> |
| | | |
| | | <select id="bigScreenServiceData" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceData"> |
| | | select (select count(*) from com_act_work_guide ) guide,(select count(*) from com_act_announcement where community_id = #{communityId}) announcement,(select count(*) from com_elder_auth_elderlies where community_id = #{communityId}) eldersAuth,(select count(*) from com_convenient_merchants where community_id = #{communityId} and is_del =0) convenient, |
| | | (select count(*) from renting_hourse_register where community_id = #{communityId}) rentingHouse,(select count(*) from com_property_alarm where community_id = #{communityId}) oneButton,(select count(*) from com_act_social_worker where community_id = #{communityId}) socialWorker,(select count(*) from com_pension_auth_pensioners where community_id = #{communityId} ) pensionAuth,(select count(*) from com_pb_dyn where community_id = #{communityId} and type = 2) partyDyn,(select count(*) from com_property where community_id = #{communityId} ) property |
| | | </select> |
| | | |
| | | <select id="bigScreenServiceUser" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceUser"> |
| | | select t.name,t1.num from com_mng_village t left join (select count(*) num,village_id from com_mng_population where act_id = #{communityId} GROUP BY village_id) t1 on t.village_id = t1.village_id where t.community_id = #{communityId} |
| | | </select> |
| | | </mapper> |