springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenDynStatisticsInfo.java
New file @@ -0,0 +1,33 @@ package com.panzhihua.common.model.vos.community.bigscreen; import java.util.List; import com.panzhihua.common.model.vos.community.StatisticsCommVO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * @title: BigScreenDynStatisticsInfo * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 * @description: 社区动态大屏统计数据 * @author: hans * @date: 2021/12/17 10:19 */ @Data @ApiModel("社区动态大屏统计数据") public class BigScreenDynStatisticsInfo { @ApiModelProperty("社区动态总数") private Integer dynNum = 0; @ApiModelProperty(value = "社区动态饼图数据") private List<StatisticsCommVO> dynCircleData; @ApiModelProperty(value = "社区动态新增折线数据") private List<StatisticsCommVO> dynAddPolylineData; @ApiModelProperty(value = "社区动态累计折线数据") private List<StatisticsCommVO> dynTotalPolylineData; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenEasyPhotoStatisticsInfo.java
New file @@ -0,0 +1,51 @@ package com.panzhihua.common.model.vos.community.bigscreen; import java.util.List; import com.panzhihua.common.model.vos.community.StatisticsCommVO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * @title: BigScreenEasyPhotoStatisticsInfo * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 * @description: 随手拍大屏统计数据 * @author: hans * @date: 2021/12/16 13:31 */ @Data @ApiModel("随手拍大屏统计数据") public class BigScreenEasyPhotoStatisticsInfo { @ApiModelProperty("随手拍累计解决数量") private Integer eventDealTotal = 0; @ApiModelProperty("突发事件报告解决数") private Integer eventTFDeal = 0; @ApiModelProperty("治安防控事件解决数") private Integer eventZADeal = 0; @ApiModelProperty("矛盾劝解事件解决数") private Integer eventMDDeal = 0; @ApiModelProperty("特殊人群服务事件解决数") private Integer eventTSDeal = 0; @ApiModelProperty("民生服务事件解决数") private Integer eventMSDeal = 0; @ApiModelProperty("防灾减灾事件解决数") private Integer eventFJDeal = 0; @ApiModelProperty("其他事件解决数") private Integer otherDeal = 0; @ApiModelProperty(value = "随手拍新增折线数据") private List<StatisticsCommVO> easyPhotoAddPolylineData; @ApiModelProperty(value = "随手拍累计折线数据") private List<StatisticsCommVO> easyPhotoTotalPolylineData; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenMerchantStatisticsInfo.java
New file @@ -0,0 +1,45 @@ package com.panzhihua.common.model.vos.community.bigscreen; import java.util.List; import com.panzhihua.common.model.vos.community.StatisticsCommVO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * @title: BigScreenMerchantStatisticsInfo * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 * @description: 便民商家大屏统计数据 * @author: hans * @date: 2021/12/17 15:05 */ @Data @ApiModel("便民商家大屏统计数据") public class BigScreenMerchantStatisticsInfo { @ApiModelProperty("资源类型数") private Integer resourceTypeNum = 0; @ApiModelProperty("服务类型数") private Integer serviceTypeNum = 0; @ApiModelProperty("商家数量") private Integer merchantNum = 0; @ApiModelProperty("已提供服务次数") private Integer serviceTimes = 0; @ApiModelProperty(value = "资源类型饼图数据") private List<StatisticsCommVO> resourceTypeCircleData; @ApiModelProperty(value = "服务类型饼图数据") private List<StatisticsCommVO> serviceTypeCircleData; @ApiModelProperty(value = "服务量新增折线数据") private List<StatisticsCommVO> serviceTimesAddPolylineData; @ApiModelProperty(value = "服务量累计折线数据") private List<StatisticsCommVO> serviceTimesTotalPolylineData; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenMicroWishStatisticsInfo.java
New file @@ -0,0 +1,40 @@ package com.panzhihua.common.model.vos.community.bigscreen; import java.util.List; import com.panzhihua.common.model.vos.community.ComActMicroWishVO; import com.panzhihua.common.model.vos.community.StatisticsCommVO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * @title: BigScreenMicroWishStatisticsInfo * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 * @description: 微心愿大屏统计数据 * @author: hans * @date: 2021/12/15 16:56 */ @Data @ApiModel("微心愿大屏统计数据") public class BigScreenMicroWishStatisticsInfo { @ApiModelProperty("心愿总数量") private Integer microWishTotal; @ApiModelProperty("心愿已实现数量") private Integer microWishRealized; @ApiModelProperty("心愿未实现数量") private Integer microWishUnrealized; @ApiModelProperty(value = "微心愿新增折线数据") private List<StatisticsCommVO> microWishAddPolylineData; @ApiModelProperty(value = "微心愿累计折线数据") private List<StatisticsCommVO> microWishTotalPolylineData; @ApiModelProperty(value = "微心愿展示列表") private List<ComActMicroWishVO> microWishDisplayList; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenNeighborStatisticsInfo.java
New file @@ -0,0 +1,36 @@ package com.panzhihua.common.model.vos.community.bigscreen; import java.util.List; import com.panzhihua.common.model.vos.community.StatisticsCommVO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * @title: BigScreenNeighborStatisticsInfo * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 * @description: 邻里圈大屏统计数据 * @author: hans * @date: 2021/12/17 13:19 */ @Data @ApiModel("邻里圈大屏统计数据") public class BigScreenNeighborStatisticsInfo { @ApiModelProperty("邻里圈发布内容数") private Integer publishContentNum = 0; @ApiModelProperty("邻里圈发布话题数") private Integer publishTopicNum = 0; @ApiModelProperty(value = "邻里圈饼图数据") private List<StatisticsCommVO> neighborCircleData; @ApiModelProperty(value = "邻里圈新增折线数据") private List<StatisticsCommVO> neighborAddPolylineData; @ApiModelProperty(value = "邻里圈累计折线数据") private List<StatisticsCommVO> neighborTotalPolylineData; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenQuestionnaireStatisticsInfo.java
New file @@ -0,0 +1,37 @@ package com.panzhihua.common.model.vos.community.bigscreen; import java.util.List; import com.panzhihua.common.model.vos.community.ComActQuestnaireVO; import com.panzhihua.common.model.vos.community.StatisticsCommVO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * @title: BigScreenQuestionnaireStatisticsInfo * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 * @description: 社区问卷大屏统计数据 * @author: hans * @date: 2021/12/16 16:11 */ @Data @ApiModel("社区问卷大屏统计数据") public class BigScreenQuestionnaireStatisticsInfo { @ApiModelProperty("社区问卷发起总数") private Integer questionnaireNum = 0; @ApiModelProperty("社区问卷参与人数") private Integer joinNum = 0; @ApiModelProperty(value = "社区问卷新增折线数据") private List<StatisticsCommVO> questionnaireAddPolylineData; @ApiModelProperty(value = "社区问卷累计折线数据") private List<StatisticsCommVO> questionnaireTotalPolylineData; @ApiModelProperty(value = "社区问卷展示列表") private List<ComActQuestnaireVO> questionnaireDisplayList; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -7488,4 +7488,88 @@ */ @GetMapping("/screen/indexInfo") R indexInfo(@RequestParam("communityId") Long communityId); /** * 首页二级页面-微心愿 * @param communityId * @return */ @GetMapping("/screen/index/microWish") R indexMicroWish(@RequestParam("communityId") Long communityId); /** * 首页二级页面-随手拍 * @param communityId * @return */ @GetMapping("/screen/index/easyPhoto") R indexEasyPhoto(@RequestParam("communityId") Long communityId); /** * 首页二级页面-随手拍展示列表 * @param communityId * @param classifyId * @return */ @GetMapping("/screen/index/easyPhotoList") R indexEasyPhotoList(@RequestParam("communityId") Long communityId, @RequestParam(value = "classifyId", required = false) Long classifyId); /** * 首页二级页面-社区问卷 * @param communityId * @return */ @GetMapping("/screen/index/questionnaire") R indexQuestionnaire(@RequestParam("communityId") Long communityId); /** * 首页二级页面-社区动态 * @param communityId * @return */ @GetMapping("/screen/index/dyn") R indexDyn(@RequestParam("communityId") Long communityId); /** * 首页二级页面-社区动态展示列表 * @param communityId * @param type * @return */ @GetMapping("/screen/index/dynList") R indexDynList(@RequestParam("communityId") Long communityId, @RequestParam(value = "type", required = false) Long type); /** * 首页二级页面-邻里圈 * @param communityId * @return */ @GetMapping("/screen/index/neighbor") R indexNeighbor(@RequestParam("communityId") Long communityId); /** * 首页二级页面-邻里圈展示列表 * @param communityId * @param topicId * @return */ @GetMapping("/screen/index/neighborList") R indexNeighborList(@RequestParam("communityId") Long communityId, @RequestParam(value = "topicId", required = false) Long topicId); /** * 首页二级页面-便民商家 * @param communityId * @return */ @GetMapping("/screen/index/merchant") R indexMerchant(@RequestParam("communityId") Long communityId); /** * 首页二级页面-商家展示列表 * @param communityId * @param categoryId * @return */ @GetMapping("/screen/index/merchantList") R indexMerchantList(@RequestParam("communityId") Long communityId, @RequestParam(value = "categoryId", required = false) Long categoryId); } springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/BigScreenStatisticsApi.java
@@ -9,10 +9,15 @@ import com.panzhihua.common.constants.HttpConstant; import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO; import com.panzhihua.common.model.dtos.property.CommonPage; import com.panzhihua.common.model.vos.community.ComActDynVO; import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; import com.panzhihua.common.model.vos.community.ComActQuestnaireVO; import com.panzhihua.common.model.vos.community.bigscreen.*; import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAdminVO; import com.panzhihua.common.utlis.HttpClientUtil; import com.panzhihua.common.utlis.HttpUtils; import io.swagger.annotations.ApiImplicitParam; import org.springframework.web.bind.annotation.*; import com.panzhihua.common.controller.BaseController; @@ -196,6 +201,100 @@ } /** * 首页二级页面-微心愿 */ @ApiOperation(value = "首页二级页面-微心愿", response = BigScreenMicroWishStatisticsInfo.class) @GetMapping("/index/microWish") public R indexMicroWish() { return communityService.indexMicroWish(this.getCommunityId()); } /** * 首页二级页面-随手拍 */ @ApiOperation(value = "首页二级页面-随手拍", response = BigScreenEasyPhotoStatisticsInfo.class) @GetMapping("/index/easyPhoto") public R indexEasyPhoto() { return communityService.indexEasyPhoto(this.getCommunityId()); } /** * 首页二级页面-随手拍展示列表 */ @ApiOperation(value = "首页二级页面-随手拍展示列表", response = ComActEasyPhotoVO.class) @ApiImplicitParam(name = "classifyId", value = "随手拍分类id(全部则不传)", required = false) @GetMapping("/index/easyPhotoList") public R indexEasyPhotoList(@RequestParam(value = "classifyId", required = false) Long classifyId) { return communityService.indexEasyPhotoList(this.getCommunityId(), classifyId); } /** * 首页二级页面-社区问卷 */ @ApiOperation(value = "首页二级页面-社区问卷", response = BigScreenQuestionnaireStatisticsInfo.class) @GetMapping("/index/questionnaire") public R indexQuestionnaire() { return communityService.indexQuestionnaire(this.getCommunityId()); } /** * 首页二级页面-社区动态 */ @ApiOperation(value = "首页二级页面-社区动态", response = BigScreenDynStatisticsInfo.class) @GetMapping("/index/dyn") public R indexDyn() { return communityService.indexDyn(this.getCommunityId()); } /** * 首页二级页面-社区动态展示列表 */ @ApiOperation(value = "首页二级页面-社区动态展示列表", response = ComActDynVO.class) @ApiImplicitParam(name = "type", value = "社区动态分类id(全部则不传)", required = false) @GetMapping("/index/dynList") public R indexDynList(@RequestParam(value = "type", required = false) Long type) { return communityService.indexDynList(this.getCommunityId(), type); } /** * 首页二级页面-邻里圈 */ @ApiOperation(value = "首页二级页面-邻里圈", response = BigScreenNeighborStatisticsInfo.class) @GetMapping("/index/neighbor") public R indexNeighbor() { return communityService.indexNeighbor(this.getCommunityId()); } /** * 首页二级页面-邻里圈展示列表 */ @ApiOperation(value = "首页二级页面-邻里圈展示列表", response = ComActNeighborCircleAdminVO.class) @ApiImplicitParam(name = "topicId", value = "邻里圈话题id(全部则不传)", required = false) @GetMapping("/index/neighborList") public R indexNeighborList(@RequestParam(value = "topicId", required = false) Long topicId) { return communityService.indexNeighborList(this.getCommunityId(), topicId); } /** * 首页二级页面-便民商家 */ @ApiOperation(value = "首页二级页面-便民商家", response = BigScreenMerchantStatisticsInfo.class) @GetMapping("/index/merchant") public R indexMerchant() { return communityService.indexMerchant(this.getCommunityId()); } /** * 首页二级页面-商家展示列表 */ @ApiOperation(value = "首页二级页面-商家展示列表", response = ConvenientMerchantVO.class) @ApiImplicitParam(name = "categoryId", value = "服务分类id(全部则不传)", required = false) @GetMapping("/index/merchantList") public R indexMerchantList(@RequestParam(value = "categoryId", required = false) Long categoryId) { return communityService.indexMerchantList(this.getCommunityId(), categoryId); } /** * 社区服务大屏数据分析接口 */ @ApiOperation(value = "社区服务大屏数据分析接口", response = BigScreenServiceData.class) springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/BigScreenStatisticsApi.java
@@ -95,6 +95,114 @@ } /** * 首页二级页面-微心愿 * @param communityId * @return */ @GetMapping("/index/microWish") public R indexMicroWish(@RequestParam("communityId") Long communityId) { return bigScreenStatisticsService.indexMicroWish(communityId); } /** * 首页二级页面-随手拍 * @param communityId * @return */ @GetMapping("/index/easyPhoto") public R indexEasyPhoto(@RequestParam("communityId") Long communityId) { return bigScreenStatisticsService.indexEasyPhoto(communityId); } /** * 首页二级页面-随手拍展示列表 * @param communityId * @param classifyId * @return */ @GetMapping("/index/easyPhotoList") public R indexEasyPhotoList(@RequestParam("communityId") Long communityId, @RequestParam(value = "classifyId", required = false) Long classifyId) { return bigScreenStatisticsService.indexEasyPhotoList(communityId, classifyId); } /** * 首页二级页面-社区问卷 * @param communityId * @return */ @GetMapping("/index/questionnaire") public R indexQuestionnaire(@RequestParam("communityId") Long communityId) { return bigScreenStatisticsService.indexQuestionnaire(communityId); } /** * 首页二级页面-社区动态 * @param communityId * @return */ @GetMapping("/index/dyn") public R indexDyn(@RequestParam("communityId") Long communityId) { return bigScreenStatisticsService.indexDyn(communityId); } /** * 首页二级页面-社区动态展示列表 * @param communityId * @param type * @return */ @GetMapping("/index/dynList") public R indexDynList(@RequestParam("communityId") Long communityId, @RequestParam(value = "type", required = false) Long type) { return bigScreenStatisticsService.indexDynList(communityId, type); } /** * 首页二级页面-邻里圈 * @param communityId * @return */ @GetMapping("/index/neighbor") public R indexNeighbor(@RequestParam("communityId") Long communityId) { return bigScreenStatisticsService.indexNeighbor(communityId); } /** * 首页二级页面-邻里圈展示列表 * @param communityId * @param topicId * @return */ @GetMapping("/index/neighborList") public R indexNeighborList(@RequestParam("communityId") Long communityId, @RequestParam(value = "topicId", required = false) Long topicId) { return bigScreenStatisticsService.indexNeighborList(communityId, topicId); } /** * 首页二级页面-便民商家 * @param communityId * @return */ @GetMapping("/index/merchant") public R indexMerchant(@RequestParam("communityId") Long communityId) { return bigScreenStatisticsService.indexMerchant(communityId); } /** * 首页二级页面-商家展示列表 * @param communityId * @param categoryId * @return */ @GetMapping("/index/merchantList") public R indexMerchantList(@RequestParam("communityId") Long communityId, @RequestParam(value = "categoryId", required = false) Long categoryId) { return bigScreenStatisticsService.indexMerchantList(communityId, categoryId); } /** * 社区服务大屏数据分析接口 */ @GetMapping("/serviceData") springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDynDAO.java
@@ -1,7 +1,9 @@ package com.panzhihua.service_community.dao; import java.util.List; import java.util.Map; import com.panzhihua.common.model.vos.community.StatisticsCommVO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; @@ -73,4 +75,12 @@ + " FROM DUAL") DynamicWorkVO countByTime(@Param("start") String start, @Param("end") String end, @Param("communityId") Long communityId); List<StatisticsCommVO> getIndexDynBaseData(@Param("communityId") Long communityId); List<StatisticsCommVO> getDynAddPolylineData(@Param("communityId") Long communityId); StatisticsCommVO getDynTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date); List<ComActDynVO> indexDynList(@Param("communityId") Long communityId, @Param("type") Long type, @Param("pageSize") Integer pageSize); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoDAO.java
@@ -5,7 +5,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.panzhihua.common.model.dtos.community.easyPhoto.ExportEasyPhotoDTO; import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; import com.panzhihua.common.model.vos.community.StatisticsCommVO; import com.panzhihua.common.model.vos.community.TodoEventsVO; import com.panzhihua.common.model.vos.community.bigscreen.BigScreenEasyPhotoStatisticsInfo; import com.panzhihua.common.model.vos.community.bigscreen.BigscreenGridsGovernanceStatisticsVO; import com.panzhihua.common.model.vos.community.bigscreen.GridsGovernanceStatisticsVO; import com.panzhihua.common.model.vos.community.bigscreen.ResidentAutonomyStatisticsVO; @@ -387,4 +389,24 @@ * 首页大屏获取网格统计数据 */ BigscreenGridsGovernanceStatisticsVO selectBigscreenGridsGovern(@Param("communityId")Long communityId); /** * 首页二级页面-随手拍基础数据查询 * @param communityId * @return */ BigScreenEasyPhotoStatisticsInfo selectIndexEasyPhotoBaseData(@Param("communityId") Long communityId); List<StatisticsCommVO> getEasyPhotoAddPolylineData(@Param("communityId") Long communityId); StatisticsCommVO getEasyPhotoTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date); /** * 首页二级页面-随手拍展示列表 * @param communityId * @param classifyId * @param pageSize * @return */ List<ComActEasyPhotoVO> indexEasyPhotoList(@Param("communityId") Long communityId, @Param("classifyId") Long classifyId, @Param("pageSize") Integer pageSize); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMicroWishDAO.java
@@ -7,6 +7,7 @@ import com.panzhihua.common.model.vos.community.ComActMicroWishVO; import com.panzhihua.common.model.vos.community.StatisticsCommVO; import com.panzhihua.common.model.vos.community.TodoEventsVO; import com.panzhihua.common.model.vos.community.bigscreen.BigScreenMicroWishStatisticsInfo; import com.panzhihua.common.model.vos.community.screen.work.MicroListVO; import com.panzhihua.common.model.vos.user.SysUserVO; import com.panzhihua.service_community.model.dos.ComActMicroWishDO; @@ -262,4 +263,23 @@ * @return */ List<String> getPassedAllImages(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize); /** * 首页二级页面-微心愿基础数据查询 * @param communityId * @return */ BigScreenMicroWishStatisticsInfo selectIndexMicroWishBaseData(@Param("communityId") Long communityId); List<StatisticsCommVO> getMicroWishAddPolylineData(@Param("communityId") Long communityId); StatisticsCommVO getMicroWishTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date); /** * 微心愿大屏展示列表 * @param communityId * @param pageSize * @return */ List<ComActMicroWishVO> selectScreenDisplayList(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java
@@ -3,6 +3,7 @@ import java.util.List; import java.util.Map; import com.panzhihua.common.model.vos.community.StatisticsCommVO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; @@ -132,4 +133,12 @@ * @return */ List<String> getContents(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize); List<StatisticsCommVO> getIndexNeighborBaseData(@Param("communityId") Long communityId); List<StatisticsCommVO> getNeighborAddPolylineData(@Param("communityId") Long communityId); StatisticsCommVO getNeighborTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date); List<ComActNeighborCircleAdminVO> indexNeighborList(@Param("communityId") Long communityId, @Param("topicId") Long topicId, @Param("pageSize") Integer pageSize); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActQuestnaireDAO.java
@@ -2,6 +2,9 @@ import java.util.List; import com.panzhihua.common.model.vos.community.ComActQuestnaireVO; import com.panzhihua.common.model.vos.community.StatisticsCommVO; import com.panzhihua.common.model.vos.community.bigscreen.BigScreenQuestionnaireStatisticsInfo; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; @@ -125,4 +128,23 @@ @Param("communityId") Long communityId); void addNoNotice(@Param("questId") Long questId, @Param("userId") Long userId); /** * 首页大屏二级页面-社区问卷基础数据 * @param communityId * @return */ BigScreenQuestionnaireStatisticsInfo getIndexQuestionnaireBaseData(@Param("communityId") Long communityId); List<StatisticsCommVO> getQuestionnaireAddPolylineData(@Param("communityId") Long communityId); StatisticsCommVO getQuestionnaireTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date); /** * 大屏问卷展示列表 * @param communityId * @param pageSize * @return */ List<ComActQuestnaireVO> selectQuestionnaireDisplayList(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ConvenientMerchantDAO.java
@@ -7,6 +7,8 @@ import com.panzhihua.common.model.dtos.community.convenient.PageConvenientMerchantDTO; import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO; import com.panzhihua.common.model.dtos.community.convenient.PageSearchDTO; import com.panzhihua.common.model.vos.community.StatisticsCommVO; import com.panzhihua.common.model.vos.community.bigscreen.BigScreenMerchantStatisticsInfo; import com.panzhihua.common.model.vos.community.convenient.ConvenientConsultationStatisticsVO; import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; import com.panzhihua.common.model.vos.community.convenient.ConvenientViewStatisticsVO; @@ -140,4 +142,14 @@ * @return */ List<ConvenientMerchantVO> getScreenPopularMerchants(@Param("page") Page page, @Param("pagePopularMerchantDTO") PagePopularMerchantDTO pagePopularMerchantDTO); BigScreenMerchantStatisticsInfo getIndexMerchantBaseData(@Param("communityId") Long communityId); List<StatisticsCommVO> selectServiceTypeCircleData(@Param("communityId") Long communityId); List<StatisticsCommVO> getServiceTimesAddPolylineData(@Param("communityId") Long communityId); StatisticsCommVO getServiceTimesTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date); List<ConvenientMerchantVO> indexMerchantList(@Param("communityId") Long communityId, @Param("categoryId") Long categoryId, @Param("pageSize") Integer pageSize); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/BigScreenStatisticsService.java
@@ -39,4 +39,78 @@ * @return */ R getScreenPopularMerchants(PagePopularMerchantDTO pagePopularMerchantDTO); /** * 首页二级页面-微心愿 * @param communityId * @return */ R indexMicroWish(Long communityId); /** * 首页二级页面-随手拍 * @param communityId * @return */ R indexEasyPhoto(Long communityId); /** * 首页二级页面-随手拍展示列表 * @param communityId * @param classifyId * @return */ R indexEasyPhotoList(Long communityId, Long classifyId); /** * 首页二级页面-社区问卷 * @param communityId * @return */ R indexQuestionnaire(Long communityId); /** * 首页二级页面-社区动态 * @param communityId * @return */ R indexDyn(Long communityId); /** * 首页二级页面-社区动态展示列表 * @param communityId * @param type * @return */ R indexDynList(Long communityId, Long type); /** * 首页二级页面-邻里圈 * @param communityId * @return */ R indexNeighbor(Long communityId); /** * 首页二级页面-邻里圈展示列表 * @param communityId * @param topicId * @return */ R indexNeighborList(Long communityId, Long topicId); /** * 首页二级页面-便民商家 * @param communityId * @return */ R indexMerchant(Long communityId); /** * 首页二级页面-商家展示列表 * @param communityId * @param categoryId * @return */ R indexMerchantList(Long communityId, Long categoryId); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BigScreenStatisticsServiceImpl.java
@@ -16,12 +16,24 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO; import com.panzhihua.common.model.vos.community.ComActDynVO; import com.panzhihua.common.model.vos.community.ComActMicroWishVO; import com.panzhihua.common.model.vos.community.ComActQuestnaireVO; import com.panzhihua.common.model.vos.community.bigscreen.BigScreenCommunityStatisticsVO; import com.panzhihua.common.model.vos.community.bigscreen.BigScreenDynStatisticsInfo; import com.panzhihua.common.model.vos.community.bigscreen.BigScreenEasyPhotoStatisticsInfo; import com.panzhihua.common.model.vos.community.bigscreen.BigScreenMerchantStatisticsInfo; import com.panzhihua.common.model.vos.community.bigscreen.BigScreenMicroWishStatisticsInfo; import com.panzhihua.common.model.vos.community.bigscreen.BigScreenNeighborStatisticsInfo; import com.panzhihua.common.model.vos.community.bigscreen.BigScreenQuestionnaireStatisticsInfo; import com.panzhihua.common.model.vos.community.bigscreen.GridsGovernanceStatisticsVO; import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; import com.panzhihua.common.model.vos.community.screen.civil.CivilVillageStatisticsVO; import com.panzhihua.common.model.vos.community.screen.event.EventGridIncidentStatisticsVO; import com.panzhihua.common.model.vos.community.screen.event.EventGridStatisticsVO; import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAdminVO; import com.panzhihua.service_community.dao.ComActDynDAO; import com.panzhihua.service_community.dao.ComActQuestnaireDAO; import com.panzhihua.service_community.dao.ComMngPopulationDAO; import com.panzhihua.service_community.dao.ConvenientMerchantDAO; import org.springframework.stereotype.Service; @@ -51,7 +63,7 @@ @Slf4j public class BigScreenStatisticsServiceImpl implements BigScreenStatisticsService { private static final Integer pageSize = 200; private static final Integer pageSize = 100; @Resource private ComActEasyPhotoDAO comActEasyPhotoDAO; @@ -76,6 +88,12 @@ @Resource private ConvenientMerchantDAO convenientMerchantDAO; @Resource private ComActQuestnaireDAO comActQuestnaireDAO; @Resource private ComActDynDAO comActDynDAO; /** * 大数据分析平台-居民自治 @@ -290,4 +308,336 @@ List<ConvenientMerchantVO> popularMerchants = convenientMerchantDAO.getScreenPopularMerchants(page, pagePopularMerchantDTO); return R.ok(popularMerchants); } /** * 首页二级页面-微心愿 * @param communityId * @return */ @Override public R indexMicroWish(Long communityId) { BigScreenMicroWishStatisticsInfo statisticsInfo = comActMicroWishDAO.selectIndexMicroWishBaseData(communityId); //微心愿新增折线数据 Date nowDate = new Date(); List<StatisticsCommVO> microWishAddPolylineData = comActMicroWishDAO.getMicroWishAddPolylineData(communityId); int currentMon = Integer.parseInt(new SimpleDateFormat("MM").format(nowDate)); for (int i = 1; i <= currentMon; i++) { String temp; if (i > 9) { temp = "" + i; } else { temp = "0" + i; } boolean isExist = microWishAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) && e.getFiled().endsWith(temp)); if (!isExist) { StatisticsCommVO other = new StatisticsCommVO(); other.setFiled(temp); other.setNum(0); microWishAddPolylineData.add(other); } } microWishAddPolylineData = microWishAddPolylineData.stream().filter(e -> nonNull(e.getFiled())) .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList()); statisticsInfo.setMicroWishAddPolylineData(microWishAddPolylineData); //微心愿累计折线数据 List<StatisticsCommVO> microWishTotalPolylineData = new ArrayList<>(); String year = new SimpleDateFormat("yyyy").format(nowDate); microWishAddPolylineData.forEach(e -> { StatisticsCommVO temp = comActMicroWishDAO.getMicroWishTotalPolylineDate(communityId, year + e.getFiled()); temp.setFiled(e.getFiled()); microWishTotalPolylineData.add(temp); }); statisticsInfo.setMicroWishTotalPolylineData(microWishTotalPolylineData); //微心愿展示列表 List<ComActMicroWishVO> microWishDisplayList = comActMicroWishDAO.selectScreenDisplayList(communityId, pageSize); statisticsInfo.setMicroWishDisplayList(microWishDisplayList); return R.ok(statisticsInfo); } /** * 首页二级页面-随手拍 * @param communityId * @return */ @Override public R indexEasyPhoto(Long communityId) { BigScreenEasyPhotoStatisticsInfo statisticsInfo = comActEasyPhotoDAO.selectIndexEasyPhotoBaseData(communityId); //随手拍新增折线数据 Date nowDate = new Date(); List<StatisticsCommVO> easyPhotoAddPolylineData = comActEasyPhotoDAO.getEasyPhotoAddPolylineData(communityId); int currentMon = Integer.parseInt(new SimpleDateFormat("MM").format(nowDate)); for (int i = 1; i <= currentMon; i++) { String temp; if (i > 9) { temp = "" + i; } else { temp = "0" + i; } boolean isExist = easyPhotoAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) && e.getFiled().endsWith(temp)); if (!isExist) { StatisticsCommVO other = new StatisticsCommVO(); other.setFiled(temp); other.setNum(0); easyPhotoAddPolylineData.add(other); } } easyPhotoAddPolylineData = easyPhotoAddPolylineData.stream().filter(e -> nonNull(e.getFiled())) .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList()); statisticsInfo.setEasyPhotoAddPolylineData(easyPhotoAddPolylineData); //随手拍累计折线数据 List<StatisticsCommVO> easyPhotoTotalPolylineData = new ArrayList<>(); String year = new SimpleDateFormat("yyyy").format(nowDate); easyPhotoAddPolylineData.forEach(e -> { StatisticsCommVO temp = comActEasyPhotoDAO.getEasyPhotoTotalPolylineDate(communityId, year + e.getFiled()); temp.setFiled(e.getFiled()); easyPhotoTotalPolylineData.add(temp); }); statisticsInfo.setEasyPhotoTotalPolylineData(easyPhotoTotalPolylineData); return R.ok(statisticsInfo); } /** * 首页二级页面-随手拍展示列表 * @param communityId * @param classifyId * @return */ @Override public R indexEasyPhotoList(Long communityId, Long classifyId) { List<ComActEasyPhotoVO> easyPhotoVOList = comActEasyPhotoDAO.indexEasyPhotoList(communityId, classifyId, pageSize); return R.ok(easyPhotoVOList); } /** * 首页二级页面-社区问卷 * @param communityId * @return */ @Override public R indexQuestionnaire(Long communityId) { BigScreenQuestionnaireStatisticsInfo statisticsInfo = comActQuestnaireDAO.getIndexQuestionnaireBaseData(communityId); //社区问卷新增折线数据 Date nowDate = new Date(); List<StatisticsCommVO> questionnaireAddPolylineData = comActQuestnaireDAO.getQuestionnaireAddPolylineData(communityId); int currentMon = Integer.parseInt(new SimpleDateFormat("MM").format(nowDate)); for (int i = 1; i <= currentMon; i++) { String temp; if (i > 9) { temp = "" + i; } else { temp = "0" + i; } boolean isExist = questionnaireAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) && e.getFiled().endsWith(temp)); if (!isExist) { StatisticsCommVO other = new StatisticsCommVO(); other.setFiled(temp); other.setNum(0); questionnaireAddPolylineData.add(other); } } questionnaireAddPolylineData = questionnaireAddPolylineData.stream().filter(e -> nonNull(e.getFiled())) .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList()); statisticsInfo.setQuestionnaireAddPolylineData(questionnaireAddPolylineData); //社区问卷累计折线数据 List<StatisticsCommVO> questionnaireTotalPolylineData = new ArrayList<>(); String year = new SimpleDateFormat("yyyy").format(nowDate); questionnaireAddPolylineData.forEach(e -> { StatisticsCommVO temp = comActQuestnaireDAO.getQuestionnaireTotalPolylineDate(communityId, year + e.getFiled()); temp.setFiled(e.getFiled()); questionnaireTotalPolylineData.add(temp); }); statisticsInfo.setQuestionnaireTotalPolylineData(questionnaireTotalPolylineData); //展示列表 List<ComActQuestnaireVO> displayList = comActQuestnaireDAO.selectQuestionnaireDisplayList(communityId, pageSize); statisticsInfo.setQuestionnaireDisplayList(displayList); return R.ok(statisticsInfo); } /** * 首页二级页面-社区动态 * @param communityId * @return */ @Override public R indexDyn(Long communityId) { BigScreenDynStatisticsInfo statisticsInfo = new BigScreenDynStatisticsInfo(); List<StatisticsCommVO> dynCircleData = comActDynDAO.getIndexDynBaseData(communityId); statisticsInfo.setDynCircleData(dynCircleData); if (!dynCircleData.isEmpty()) { statisticsInfo.setDynNum(dynCircleData.stream().map(StatisticsCommVO::getNum).mapToInt(Integer::intValue).sum()); } //社区动态新增折线数据 Date nowDate = new Date(); List<StatisticsCommVO> dynAddPolylineData = comActDynDAO.getDynAddPolylineData(communityId); int currentMon = Integer.parseInt(new SimpleDateFormat("MM").format(nowDate)); for (int i = 1; i <= currentMon; i++) { String temp; if (i > 9) { temp = "" + i; } else { temp = "0" + i; } boolean isExist = dynAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) && e.getFiled().endsWith(temp)); if (!isExist) { StatisticsCommVO other = new StatisticsCommVO(); other.setFiled(temp); other.setNum(0); dynAddPolylineData.add(other); } } dynAddPolylineData = dynAddPolylineData.stream().filter(e -> nonNull(e.getFiled())) .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList()); statisticsInfo.setDynAddPolylineData(dynAddPolylineData); //社区动态累计折线数据 List<StatisticsCommVO> dynTotalPolylineData = new ArrayList<>(); String year = new SimpleDateFormat("yyyy").format(nowDate); dynAddPolylineData.forEach(e -> { StatisticsCommVO temp = comActDynDAO.getDynTotalPolylineDate(communityId, year + e.getFiled()); temp.setFiled(e.getFiled()); dynTotalPolylineData.add(temp); }); statisticsInfo.setDynTotalPolylineData(dynTotalPolylineData); return R.ok(statisticsInfo); } /** * 首页二级页面-社区动态展示列表 * @param communityId * @param type * @return */ @Override public R indexDynList(Long communityId, Long type) { List<ComActDynVO> dynList = comActDynDAO.indexDynList(communityId, type, pageSize); return R.ok(dynList); } /** * 首页二级页面-邻里圈 * @param communityId * @return */ @Override public R indexNeighbor(Long communityId) { BigScreenNeighborStatisticsInfo statisticsInfo = new BigScreenNeighborStatisticsInfo(); List<StatisticsCommVO> neighborCircleData = comActNeighborCircleDAO.getIndexNeighborBaseData(communityId); statisticsInfo.setNeighborCircleData(neighborCircleData); if (!neighborCircleData.isEmpty()) { statisticsInfo.setPublishContentNum(neighborCircleData.stream().map(StatisticsCommVO::getNum).mapToInt(Integer::intValue).sum()); statisticsInfo.setPublishTopicNum(neighborCircleData.size()); } //邻里圈新增折线数据 Date nowDate = new Date(); List<StatisticsCommVO> neighborAddPolylineData = comActNeighborCircleDAO.getNeighborAddPolylineData(communityId); int currentMon = Integer.parseInt(new SimpleDateFormat("MM").format(nowDate)); for (int i = 1; i <= currentMon; i++) { String temp; if (i > 9) { temp = "" + i; } else { temp = "0" + i; } boolean isExist = neighborAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) && e.getFiled().endsWith(temp)); if (!isExist) { StatisticsCommVO other = new StatisticsCommVO(); other.setFiled(temp); other.setNum(0); neighborAddPolylineData.add(other); } } neighborAddPolylineData = neighborAddPolylineData.stream().filter(e -> nonNull(e.getFiled())) .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList()); statisticsInfo.setNeighborAddPolylineData(neighborAddPolylineData); //邻里圈累计折线数据 List<StatisticsCommVO> neighborTotalPolylineData = new ArrayList<>(); String year = new SimpleDateFormat("yyyy").format(nowDate); neighborAddPolylineData.forEach(e -> { StatisticsCommVO temp = comActNeighborCircleDAO.getNeighborTotalPolylineDate(communityId, year + e.getFiled()); temp.setFiled(e.getFiled()); neighborTotalPolylineData.add(temp); }); statisticsInfo.setNeighborTotalPolylineData(neighborTotalPolylineData); return R.ok(statisticsInfo); } /** * 首页二级页面-邻里圈展示列表 * @param communityId * @param topicId * @return */ @Override public R indexNeighborList(Long communityId, Long topicId) { List<ComActNeighborCircleAdminVO> neighborList = comActNeighborCircleDAO.indexNeighborList(communityId, topicId, pageSize); return R.ok(neighborList); } /** * 首页二级页面-便民商家 * @param communityId * @return */ @Override public R indexMerchant(Long communityId) { BigScreenMerchantStatisticsInfo statisticsInfo = convenientMerchantDAO.getIndexMerchantBaseData(communityId); //资源类型饼图数据(暂无) // List<StatisticsCommVO> resourceTypeCircleData; //服务类型饼图数据 List<StatisticsCommVO> serviceTypeCircleData = convenientMerchantDAO.selectServiceTypeCircleData(communityId); statisticsInfo.setServiceTypeCircleData(serviceTypeCircleData); if (!serviceTypeCircleData.isEmpty()) { //服务类型数 statisticsInfo.setServiceTypeNum(serviceTypeCircleData.size()); } //服务次数(目前暂时使用浏览量)新增折线数据 Date nowDate = new Date(); List<StatisticsCommVO> serviceTimesAddPolylineData = convenientMerchantDAO.getServiceTimesAddPolylineData(communityId); int currentMon = Integer.parseInt(new SimpleDateFormat("MM").format(nowDate)); for (int i = 1; i <= currentMon; i++) { String temp; if (i > 9) { temp = "" + i; } else { temp = "0" + i; } boolean isExist = serviceTimesAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) && e.getFiled().endsWith(temp)); if (!isExist) { StatisticsCommVO other = new StatisticsCommVO(); other.setFiled(temp); other.setNum(0); serviceTimesAddPolylineData.add(other); } } serviceTimesAddPolylineData = serviceTimesAddPolylineData.stream().filter(e -> nonNull(e.getFiled())) .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList()); statisticsInfo.setServiceTimesAddPolylineData(serviceTimesAddPolylineData); //服务次数(目前暂时使用浏览量)累计折线数据 List<StatisticsCommVO> serviceTimesTotalPolylineData = new ArrayList<>(); String year = new SimpleDateFormat("yyyy").format(nowDate); serviceTimesAddPolylineData.forEach(e -> { StatisticsCommVO temp = convenientMerchantDAO.getServiceTimesTotalPolylineDate(communityId, year + e.getFiled()); temp.setFiled(e.getFiled()); serviceTimesTotalPolylineData.add(temp); }); statisticsInfo.setServiceTimesTotalPolylineData(serviceTimesTotalPolylineData); return R.ok(statisticsInfo); } /** * 首页二级页面-商家展示列表 * @param communityId * @param categoryId * @return */ @Override public R indexMerchantList(Long communityId, Long categoryId) { List<ConvenientMerchantVO> merchantList = convenientMerchantDAO.indexMerchantList(communityId, categoryId, pageSize); return R.ok(merchantList); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDynDOMapper.xml
New file @@ -0,0 +1,57 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.panzhihua.service_community.dao.ComActDynDAO"> <!-- 通用查询映射结果 --> <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActDynDO"> <id column="id" property="id" /> <result column="title" property="title" /> <result column="status" property="status" /> <result column="is_topping" property="isTopping" /> <result column="publish_at" property="publishAt" /> <result column="create_at" property="createAt" /> <result column="update_at" property="updateAt" /> <result column="community_id" property="communityId" /> <result column="content" property="content" /> <result column="cover" property="cover" /> <result column="type" property="type" /> <result column="cover_mode" property="coverMode" /> <result column="jump_url" property="jumpUrl" /> <result column="jump_type" property="jumpType" /> </resultMap> <!-- 通用查询结果列 --> <sql id="Base_Column_List"> id </sql> <select id="getIndexDynBaseData" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> SELECT filed, num, ROUND(num/total,2) AS percent FROM (SELECT t2.`name` AS filed, COUNT(1) AS num FROM com_act_dyn t1 LEFT JOIN com_act_dyn_type t2 ON t1.type = t2.id WHERE t1.community_id = #{communityId} AND t1.`status` = 1 GROUP BY filed) temp1, (SELECT COUNT(t1.id) AS total FROM com_act_dyn t1 LEFT JOIN com_act_dyn_type t2 ON t1.type = t2.id WHERE t1.community_id = #{communityId} AND t1.`status` = 1) temp2 </select> <select id="getDynAddPolylineData" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> SELECT DATE_FORMAT( create_at, '%m' ) AS filed, COUNT(id) AS num FROM com_act_dyn WHERE community_id = #{communityId} AND `status` = 1 AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed </select> <select id="getDynTotalPolylineDate" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> SELECT COUNT(id) AS num FROM com_act_dyn WHERE community_id = #{communityId} AND `status` = 1 AND DATE_FORMAT( create_at, '%Y%m' ) <= #{date} </select> <select id="indexDynList" resultType="com.panzhihua.common.model.vos.community.ComActDynVO"> SELECT t1.id, t1.title, t1.cover, t2.`name` AS typeName FROM com_act_dyn t1 LEFT JOIN com_act_dyn_type t2 ON t1.type = t2.id WHERE t1.community_id = #{communityId} AND t1.`status` = 1 AND t2.is_del = 2 <if test="type != null"> AND t1.type = #{type} </if> ORDER BY t1.id DESC LIMIT #{pageSize} </select> </mapper> springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoDOMapper.xml
@@ -381,6 +381,41 @@ IFNULL((SELECT count(id) FROM event_grid_data WHERE grid_community_id = #{communityId}), 0) AS gridTotal, IFNULL((select count(egmr.id) from event_grid_member_relation as egmr left join event_grid_data as egd1 on egd1.id = egmr.grid_id where egd1.grid_community_id = #{communityId}), 0) AS gridMemberTotal </select> <select id="selectIndexEasyPhotoBaseData" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenEasyPhotoStatisticsInfo"> SELECT (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8)) AS eventDealTotal, (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 7) AS eventTFDeal, (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 4) AS eventZADeal, (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 5) AS eventMDDeal, (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 3) AS eventTSDeal, (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 6) AS eventMSDeal, (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 8) AS eventFJDeal, (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 1) AS otherDeal </select> <select id="getEasyPhotoAddPolylineData" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> SELECT DATE_FORMAT( create_at, '%m' ) AS filed, COUNT(id) AS num FROM com_act_easy_photo WHERE community_id = #{communityId} AND del_tag = 0 AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed </select> <select id="getEasyPhotoTotalPolylineDate" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> SELECT COUNT(id) AS num FROM com_act_easy_photo WHERE community_id = #{communityId} AND del_tag = 0 AND DATE_FORMAT( create_at, '%Y%m' ) <= #{date} </select> <select id="indexEasyPhotoList" resultType="com.panzhihua.common.model.vos.community.ComActEasyPhotoVO"> SELECT t1.id, t1.detail, t1.photo_path_list, t1.`status`, t2.`name` AS classifyName FROM com_act_easy_photo t1 LEFT JOIN com_act_easy_photo_classify t2 ON t1.classify_id = t2.id WHERE t1.community_id = #{communityId} AND t1.`status` = 4 AND t1.del_tag = 0 <if test="classifyId != null"> AND t1.classify_id = #{classifyId} </if> ORDER BY t1.id DESC LIMIT #{pageSize} </select> <select id="selectBigscreenGridsGovern" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigscreenGridsGovernanceStatisticsVO"> SELECT springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActMicroWishDOMapper.xml
@@ -167,9 +167,9 @@ <select id="selectRealizePercent" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> SELECT t1.filed, t1.num, ROUND( t1.num / t2.sum * 100, 2 ) AS percent FROM (SELECT IF(`status` IN(5,6),'已实现','待实现') AS filed, COUNT(`status`) AS num FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` != 4 GROUP BY filed) t1, (SELECT COUNT(id) AS sum FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` != 4) t2 (SELECT IF(`status` = 6,'已实现','待实现') AS filed, COUNT(`status`) AS num FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` NOT IN(1,4) GROUP BY filed) t1, (SELECT COUNT(id) AS sum FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` NOT IN(1,4)) t2 </select> <select id="getPassedAllImages" resultType="java.lang.String"> SELECT photo_path_list FROM com_act_micro_wish @@ -177,5 +177,28 @@ AND photo_path_list IS NOT NULL AND photo_path_list != '' ORDER BY create_at DESC limit #{pageSize} </select> <select id="selectIndexMicroWishBaseData" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenMicroWishStatisticsInfo"> SELECT (SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` NOT IN(1,4)) AS microWishTotal, (SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` = 6) AS microWishRealized, (SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` NOT IN(1,4,6)) AS microWishUnrealized </select> <select id="getMicroWishAddPolylineData" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> SELECT DATE_FORMAT( create_at, '%m' ) AS filed, COUNT(id) AS num FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` NOT IN(1,4) AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed </select> <select id="getMicroWishTotalPolylineDate" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> SELECT COUNT(id) AS num FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` NOT IN(1,4) AND DATE_FORMAT( create_at, '%Y%m' ) <= #{date} </select> <select id="selectScreenDisplayList" resultType="com.panzhihua.common.model.vos.community.ComActMicroWishVO"> SELECT id, `status`, detail, photo_path_list FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` NOT IN(1,4) ORDER BY create_at DESC LIMIT #{pageSize} </select> </mapper> springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleDOMapper.xml
@@ -125,5 +125,40 @@ WHERE community_id = #{communityId} AND `status` = 2 AND release_content IS NOT NULL AND release_content != '' ORDER BY create_at DESC limit #{pageSize} </select> <select id="getIndexNeighborBaseData" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> SELECT filed, sum, ROUND(sum/total,2) AS percent FROM (SELECT t2.`name` AS filed, COUNT(1) AS sum FROM com_act_neighbor_circle t1 LEFT JOIN com_act_neighbor_circle_topic t2 ON t1.topic_id = t2.id WHERE t1.community_id = #{communityId} AND t1.`status` IN (2,3) AND t1.is_del = 2 AND t2.`status` = 1 GROUP BY filed) temp1, (SELECT COUNT(t1.id) AS total FROM com_act_neighbor_circle t1 LEFT JOIN com_act_neighbor_circle_topic t2 ON t1.topic_id = t2.id WHERE t1.community_id = #{communityId} AND t1.`status` IN (2,3) AND t1.is_del = 2 AND t2.`status` = 1) temp2 </select> <select id="getNeighborAddPolylineData" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> SELECT DATE_FORMAT( t1.create_at, '%m' ) AS filed, COUNT(t1.id) AS num FROM com_act_neighbor_circle t1 LEFT JOIN com_act_neighbor_circle_topic t2 ON t1.topic_id = t2.id WHERE t1.community_id = #{communityId} AND t1.`status` IN (2,3) AND t1.is_del = 2 AND t2.`status` = 1 AND DATE_FORMAT( t1.create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed </select> <select id="getNeighborTotalPolylineDate" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> SELECT COUNT(t1.id) AS num FROM com_act_neighbor_circle t1 LEFT JOIN com_act_neighbor_circle_topic t2 ON t1.topic_id = t2.id WHERE t1.community_id = #{communityId} AND t1.`status` IN (2,3) AND t1.is_del = 2 AND t2.`status` = 1 AND DATE_FORMAT( t1.create_at, '%Y%m' ) <= #{date} </select> <select id="indexNeighborList" resultType="com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAdminVO"> SELECT t1.id, t1.release_content, t1.release_images, t1.comment_num, t1.fabulous_num, t2.`name` AS topicName FROM com_act_neighbor_circle t1 LEFT JOIN com_act_neighbor_circle_topic t2 ON t1.topic_id = t2.id WHERE t1.community_id = #{communityId} AND t1.`status` IN (2,3) AND t1.is_del = 2 AND t2.`status` = 1 <if test="topicId != null"> AND t1.topic_id = #{topicId} </if> ORDER BY t1.id DESC LIMIT #{pageSize} </select> </mapper> springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActQuestnaireDOMapper.xml
@@ -211,6 +211,43 @@ su.is_volunteer = 1 AND caqua.questnaire_id = #{questId} </select> <select id="getIndexQuestionnaireBaseData" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenQuestionnaireStatisticsInfo"> SELECT COUNT(id) AS questionnaireNum, SUM(join_count) AS joinNum FROM com_act_questnaire WHERE community_id = #{communityId} AND state IN (2,3) </select> <select id="getQuestionnaireAddPolylineData" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> SELECT DATE_FORMAT( create_at, '%m' ) AS filed, COUNT(id) AS num FROM com_act_questnaire WHERE community_id = #{communityId} AND state IN (2,3) AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed </select> <select id="getQuestionnaireTotalPolylineDate" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> SELECT COUNT(id) AS num FROM com_act_questnaire WHERE community_id = #{communityId} AND state IN (2,3) AND DATE_FORMAT( create_at, '%Y%m' ) <= #{date} </select> <select id="selectQuestionnaireDisplayList" resultType="com.panzhihua.common.model.vos.community.ComActQuestnaireVO"> SELECT id, title, `count`, view_num, join_count, is_cover, state FROM com_act_questnaire WHERE community_id = #{communityId} AND state IN (2,3) ORDER BY id DESC LIMIT #{pageSize} </select> <select id="getIndexQuestionnaireBaseData" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenQuestionnaireStatisticsInfo"> SELECT COUNT(id) AS questionnaireNum, SUM(join_count) AS joinNum FROM com_act_questnaire WHERE community_id = #{communityId} </select> <select id="getQuestionnaireAddPolylineData" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> SELECT DATE_FORMAT( create_at, '%m' ) AS filed, COUNT(id) AS num FROM com_act_questnaire WHERE community_id = #{communityId} AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed </select> <select id="getQuestionnaireTotalPolylineDate" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> SELECT COUNT(id) AS num FROM com_act_questnaire WHERE community_id = #{communityId} AND DATE_FORMAT( create_at, '%Y%m' ) <= #{date} </select> <insert id="addNoNotice"> insert into com_act_questnaire_user(questnaire_id,user_id,create_at) springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientMerchantMapper.xml
@@ -214,6 +214,49 @@ WHERE community_id = #{pagePopularMerchantDTO.communityId} AND is_del = 0 ORDER BY (consultation_volume + consultation_volume) DESC LIMIT 100 ) temp </select> <select id="getIndexMerchantBaseData" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenMerchantStatisticsInfo"> SELECT (SELECT 0) AS resourceTypeNum, (SELECT COUNT(id) FROM com_convenient_merchants WHERE community_id = #{communityId} AND is_del = 0) AS merchantNum, (SELECT SUM(t1.consultation_volume) FROM com_convenient_consultation_statistics t1 LEFT JOIN com_convenient_merchants t2 ON t1.merchant_id = t2.id WHERE t2.community_id = #{communityId}) AS serviceTimes </select> <select id="selectServiceTypeCircleData" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> SELECT t1.`name` AS filed, COUNT(t3.id) AS num FROM com_convenient_service_categories t1 LEFT JOIN com_convenient_service_scope t2 ON t1.id = t2.service_category_id LEFT JOIN com_convenient_merchants t3 ON t2.merchant_id = t3.id WHERE t3.community_id = #{communityId} AND t3.is_del = 0 GROUP BY t1.id </select> <select id="getServiceTimesAddPolylineData" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> SELECT DATE_FORMAT( t1.statistic_date, '%m' ) AS filed, SUM(t1.consultation_volume) AS num FROM com_convenient_consultation_statistics t1 LEFT JOIN com_convenient_merchants t2 ON t1.merchant_id = t2.id WHERE t2.community_id = #{communityId} AND DATE_FORMAT( t1.statistic_date, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed </select> <select id="getServiceTimesTotalPolylineDate" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> SELECT SUM(t1.consultation_volume) AS num FROM com_convenient_consultation_statistics t1 LEFT JOIN com_convenient_merchants t2 ON t1.merchant_id = t2.id WHERE t2.community_id = #{communityId} AND DATE_FORMAT( t1.statistic_date, '%Y%m' ) <= #{date} </select> <select id="indexMerchantList" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO"> SELECT t1.id, t1.`name`, t1.logo, t1.introduction, GROUP_CONCAT(t2.`service_name`) serviceScope FROM com_convenient_merchants t1 LEFT JOIN com_convenient_service_scope t2 ON t1.id = t2.merchant_id WHERE t1.community_id = #{communityId} <if test="categoryId != null"> AND t2.service_category_id = #{categoryId} </if> GROUP BY t1.id ORDER BY t1.id DESC LIMIT #{pageSize} </select> <update id="deleteMerchantById"> UPDATE com_convenient_merchants SET is_del = 1, updated_by = #{operator} WHERE id = #{merchantId} </update> springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventMapper.xml
@@ -1450,7 +1450,7 @@ END filed FROM com_mng_population WHERE village_id IN <foreach collection="villageIds" index="index" item="item" open="(" separator="," close=")"> item #{item} </foreach> ) temp GROUP BY filed UNION ALL