springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/constants/Constants.java
@@ -143,5 +143,5 @@ */ public static final String GRID_DEFAULT_ROLE_KEY="grid_member_default_role"; public static final String ZONG_ZHI_GRID_MEMBER_IMAGE_URL = "http://image.panzhihua.nhys.cdnhxx.com//idcard/15a0563a7a1d42768322c95e5cb022c4.jpg"; public static final String ZONG_ZHI_GRID_MEMBER_IMAGE_URL = "https://www.psciio.com//idcard/57bf4104a76741cfabfead0bb8218307.jpg"; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/bigscreen/BigScreenStatisticAgeGenderDTO.java
New file @@ -0,0 +1,23 @@ package com.panzhihua.common.model.dtos.community.bigscreen; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import javax.validation.constraints.NotNull; import javax.validation.constraints.Pattern; /** * @ClasssName PageBigScreenStatisticPartyOrg * @Description 党员党支部统计信息分页 * @Author cedoo * @Date 2021/6/16 * @Version 1.0 **/ @Data public class BigScreenStatisticAgeGenderDTO { @ApiModelProperty(value = "社区id", hidden = false, example = "2", required = true) @NotNull(message = "社区id不能为空") private Long communityId; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/bigscreen/BigScreenStatisticPartyActivityDTO.java
New file @@ -0,0 +1,33 @@ package com.panzhihua.common.model.dtos.community.bigscreen; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import javax.validation.constraints.NotNull; import javax.validation.constraints.Pattern; /** * @ClasssName PageBigScreenStatisticPartyOrg * @Description 党员活动统计 * @Author cedoo * @Date 2021/6/16 * @Version 1.0 **/ @Data public class BigScreenStatisticPartyActivityDTO { @ApiModelProperty(value = "社区id", hidden = true, example = "2", required = false) //@NotNull(message = "社区id不能为空") private Long communityId; @ApiModelProperty(value = "类型:3 按月;默认为3", hidden = false, example = "3", required = false) @NotNull(message = "类型不能为空") private Integer type = 3; @ApiModelProperty(value = "日期", hidden = false, example = "2021-06-01", required = true) @NotNull(message = "时间不能为空") @Pattern(regexp = "^\\d{4}-\\d{2}-\\d{2}$", message = "时间格式错误") private String date; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/bigscreen/PageBigScreenStatisticPartyOrg.java
New file @@ -0,0 +1,37 @@ package com.panzhihua.common.model.dtos.community.bigscreen; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import javax.validation.constraints.NotNull; import javax.validation.constraints.Pattern; /** * @ClasssName PageBigScreenStatisticPartyOrg * @Description 党员党支部统计信息分页 * @Author cedoo * @Date 2021/6/16 * @Version 1.0 **/ @Data public class PageBigScreenStatisticPartyOrg { @ApiModelProperty(value = "分页-当前页数,默认1", example = "1", required = true) @NotNull private Long pageNum = 1L; @ApiModelProperty(value = "分页-每页记录数,默认50", example = "10", required = true) @NotNull private Long pageSize = 50L; @ApiModelProperty(value = "排序字段, 默认id", hidden = true, example = "id") private String sortBy="id"; @ApiModelProperty(value = "排序方式: asc/desc(默认)", hidden = true, example = "desc") @Pattern(regexp = "asc|desc|ASC|DESC") private String order="desc"; @ApiModelProperty(value = "社区id", hidden = true, example = "2") //@NotNull(message = "社区id不能为空") private Long communityId; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenStatisticAgeGender.java
New file @@ -0,0 +1,41 @@ package com.panzhihua.common.model.vos.community.bigscreen; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * @ClasssName BigScreenStatisticParty * @Description 大屏数据党建统计信息 * @Author cedoo * @Date 2021/6/15 * @Version 1.0 **/ @Data public class BigScreenStatisticAgeGender { @ApiModelProperty(value = "男性占比") private Double manPer; @ApiModelProperty(value = "男性数量") private Integer manTotal; @ApiModelProperty(value = "女性占比") private Double womenPer; @ApiModelProperty(value = "女性数量") private Integer womeTotal; @ApiModelProperty(value = "年龄段总数 30以下") private Double thirtyPer; @ApiModelProperty(value = "年龄段占比 30以下") private Integer thirtyTotal; @ApiModelProperty(value = "年龄段总数 30-60") private Double sixtyPer; @ApiModelProperty(value = "年龄段占比 30-60") private Integer sixtyTotal; @ApiModelProperty(value = "年龄段总数 60以上") private Double biggerPer; @ApiModelProperty(value = "年龄段占比 60以上") private Integer biggerTotal; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenStatisticPartyActivity.java
New file @@ -0,0 +1,25 @@ package com.panzhihua.common.model.vos.community.bigscreen; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * @ClasssName BigScreenStatisticParty * @Description 大屏数据党建统计信息 * @Author cedoo * @Date 2021/6/15 * @Version 1.0 **/ @Data public class BigScreenStatisticPartyActivity { @ApiModelProperty(value = "顺序") private Integer idx; @ApiModelProperty(value = "显示名称") private String idxName; @ApiModelProperty(value = "党员数量") private Integer total; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenStatisticPartyActivityTopUser.java
New file @@ -0,0 +1,22 @@ package com.panzhihua.common.model.vos.community.bigscreen; import com.panzhihua.common.model.vos.partybuilding.PartyBuildingMemberVO; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.List; /** * @ClasssName BigScreenStatisticParty * @Description 大屏数据党建统计信息 * @Author cedoo * @Date 2021/6/15 * @Version 1.0 **/ @Data public class BigScreenStatisticPartyActivityTopUser { @ApiModelProperty(value = "党员活动排行榜") List<PartyBuildingMemberVO> topUser; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenStatisticPartyBuild.java
New file @@ -0,0 +1,25 @@ package com.panzhihua.common.model.vos.community.bigscreen; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * @ClasssName BigScreenStatisticParty * @Description 大屏数据党建统计信息 * @Author cedoo * @Date 2021/6/15 * @Version 1.0 **/ @Data public class BigScreenStatisticPartyBuild { @ApiModelProperty(value = "党组织数") private Integer orgCount; @ApiModelProperty(value = "党员数") private Integer memberCount; @ApiModelProperty(value = "党员活动数") private Integer activityCount; @ApiModelProperty(value = "党建宣传数") private Integer dynCount;//党建动态 } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenStatisticPartyDyn.java
New file @@ -0,0 +1,23 @@ package com.panzhihua.common.model.vos.community.bigscreen; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * @ClasssName BigScreenStatisticParty * @Description 大屏数据党建统计信息 * @Author cedoo * @Date 2021/6/15 * @Version 1.0 **/ @Data public class BigScreenStatisticPartyDyn { @ApiModelProperty(value = "党组织ID") private Long id; @ApiModelProperty(value = "党组织名称") private String name; @ApiModelProperty(value = "党员数量") private Integer total; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenStatisticPartyMemeber.java
New file @@ -0,0 +1,23 @@ package com.panzhihua.common.model.vos.community.bigscreen; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * @ClasssName BigScreenStatisticParty * @Description 大屏数据党建统计信息 * @Author cedoo * @Date 2021/6/15 * @Version 1.0 **/ @Data public class BigScreenStatisticPartyMemeber { @ApiModelProperty(value = "党组织ID") private Long id; @ApiModelProperty(value = "党组织名称") private String name; @ApiModelProperty(value = "党员数量") private Integer total; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenStatisticPartyOrg.java
New file @@ -0,0 +1,25 @@ package com.panzhihua.common.model.vos.community.bigscreen; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.List; /** * @ClasssName BigScreenStatisticParty * @Description 大屏数据党建统计信息 * @Author cedoo * @Date 2021/6/15 * @Version 1.0 **/ @Data public class BigScreenStatisticPartyOrg { @ApiModelProperty(value = "党组织ID") private Long id; @ApiModelProperty(value = "党组织名称") private String name; @ApiModelProperty(value = "党员数量") private Integer total; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/PagePartyOrganizationMemberVO.java
New file @@ -0,0 +1,27 @@ package com.panzhihua.common.model.vos.community.bigscreen; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import javax.validation.constraints.NotNull; /** * @program: springcloud_k8s_panzhihuazhihuishequ * @description: 分页党员 * @author: huang.hongfa weixin hhf9596 qq 959656820 * @create: 2020-11-30 16:10 **/ @Data @ApiModel(value = "分页查询党员") public class PagePartyOrganizationMemberVO { @ApiModelProperty(value ="组织ID") private Long orgId; @ApiModelProperty(value ="当前页数,默认1") private Long pageNum = 1L; @ApiModelProperty(value ="每页记录数,默认10") private Long pageSize = 10L; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/PartyBuildingMemberVO.java
New file @@ -0,0 +1,44 @@ package com.panzhihua.common.model.vos.community.bigscreen; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.Date; /** * @program: springcloud_k8s_panzhihuazhihuishequ * @description: 党建 * @author: huang.hongfa weixin hhf9596 qq 959656820 * @create: 2020-11-30 10:03 **/ @Data @ApiModel("党员活动参加用户排行榜") public class PartyBuildingMemberVO { @ApiModelProperty(value = "党员唯一标识id") private Long id; @ApiModelProperty(value = "党员活动id") private Long activityId; @ApiModelProperty(value = "党员id") private Long memberId; @ApiModelProperty(value = "用户ID") private Long userId; @ApiModelProperty(value = "姓名") private String name; @ApiModelProperty(value = "头像图片路径") private String photoPath; @ApiModelProperty(value = "报名时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date createAt; @ApiModelProperty(value = "参与活动数量") private Integer total; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/civil/CivilPopulationStatisticsVO.java
New file @@ -0,0 +1,17 @@ package com.panzhihua.common.model.vos.community.screen.civil; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data @ApiModel("民生统计返回参数") public class CivilPopulationStatisticsVO { @ApiModelProperty("本月特殊人群数量") private Integer specialTotal; @ApiModelProperty("上月特殊人群数量") private Integer toMonthSpecialTotal; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/civil/CivilStatisticsVO.java
New file @@ -0,0 +1,31 @@ package com.panzhihua.common.model.vos.community.screen.civil; import com.panzhihua.common.model.vos.community.screen.event.EventGridStatisticsVO; import com.panzhihua.common.model.vos.community.screen.index.IndexSpecialStatisticsVO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.math.BigDecimal; import java.util.List; @Data @ApiModel("民生统计返回参数") public class CivilStatisticsVO { @ApiModelProperty("大屏网格数据") private List<EventGridStatisticsVO> gridStatisticsList; @ApiModelProperty("特殊人群统计模块数据") private List<IndexSpecialStatisticsVO> specialStatisticsList; @ApiModelProperty("小区列表数据") private List<CivilVillageStatisticsVO> villageStatisticsList; @ApiModelProperty("特殊人群总数") private Integer specialNum; @ApiModelProperty("环比上月增长率") private BigDecimal rate; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/civil/CivilVillageStatisticsVO.java
New file @@ -0,0 +1,29 @@ package com.panzhihua.common.model.vos.community.screen.civil; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data @ApiModel("民生统计小区列表返回参数") public class CivilVillageStatisticsVO { @ApiModelProperty("小区名字") private String name; @ApiModelProperty("小区居住人数") private Integer userSum; @ApiModelProperty("经度") private String lng; @ApiModelProperty("纬度") private String lat; @ApiModelProperty("小区图片") private String villageImages; @ApiModelProperty("小区id") private String villageId; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/event/EventGridIncidentStatisticsVO.java
New file @@ -0,0 +1,17 @@ package com.panzhihua.common.model.vos.community.screen.event; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data @ApiModel("大屏网格下事件统计返回参数") public class EventGridIncidentStatisticsVO { @ApiModelProperty("事件状态(1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件、6特殊人群上报、7随手拍处理)") private Integer type; @ApiModelProperty("事件发生经纬度") private String latLng; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/event/EventGridStatisticsVO.java
New file @@ -0,0 +1,31 @@ package com.panzhihua.common.model.vos.community.screen.event; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.List; @Data @ApiModel("大屏事件网格统计返回参数") public class EventGridStatisticsVO { @ApiModelProperty("网格id") private Long id; @ApiModelProperty("网格名称") private String gridName; @ApiModelProperty("网格围栏数据") private String data; @ApiModelProperty("网格线条颜色") private String lineColor; @ApiModelProperty("网格线条宽度") private String lineBroadband; @ApiModelProperty("网格填充颜色") private String fillColor; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/event/EventLeftDownStatisticsVO.java
New file @@ -0,0 +1,56 @@ package com.panzhihua.common.model.vos.community.screen.event; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.List; @Data @ApiModel("大屏事件左下统计返回参数") public class EventLeftDownStatisticsVO { @ApiModelProperty("治安隐患事件总数") private Integer eventZATotal; @ApiModelProperty("治安隐患已完成事件总数") private Integer yesEventZATotal; @ApiModelProperty("突发事件总数") private Integer eventTFTotal; @ApiModelProperty("突发事件已完成总数") private Integer yesEventTFTotal; @ApiModelProperty("特殊人群信息上报总数") private Integer eventTSTotal; @ApiModelProperty("特殊人群信息上报已完成事件总数") private Integer yesEventTSTotal; @ApiModelProperty("矛盾纠纷事件总数") private Integer eventMDTotal; @ApiModelProperty("矛盾纠纷已完成事件总数") private Integer yesEventMDTotal; @ApiModelProperty("不稳定因素事件总数") private Integer eventBWDTotal; @ApiModelProperty("不稳定因素已完成事件总数") private Integer yesEventBWDTotal; @ApiModelProperty("公共服务事件总数") private Integer eventGGTotal; @ApiModelProperty("公共服务已完成事件总数") private Integer yesEventGGTotal; @ApiModelProperty("随手拍总数") private Integer eventSSPTotal; @ApiModelProperty("随手拍已完成总数") private Integer yesEventSSPTotal; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/event/EventLeftStatisticsVO.java
New file @@ -0,0 +1,19 @@ package com.panzhihua.common.model.vos.community.screen.event; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.List; @Data @ApiModel("大屏事件左边统计返回参数") public class EventLeftStatisticsVO { @ApiModelProperty("大屏事件左上统计返回参数") private EventLeftTopStatisticsVO leftTopStatisticsVO; @ApiModelProperty("大屏事件左下统计返回参数") private EventLeftDownStatisticsVO leftDownStatisticsVO; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/event/EventLeftTopStatisticsVO.java
New file @@ -0,0 +1,32 @@ package com.panzhihua.common.model.vos.community.screen.event; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.List; @Data @ApiModel("大屏事件左上统计返回参数") public class EventLeftTopStatisticsVO { @ApiModelProperty("网格数") private Integer gridTotal; @ApiModelProperty("网格员数") private Integer gridMemberTotal; @ApiModelProperty("事件数") private Integer eventTotal; @ApiModelProperty("未解决事件数") private Integer noSolveEventTotal; @ApiModelProperty("累计解决事件数") private Integer solveEventTotal; @ApiModelProperty("频发月份") private List<Integer> oftenMonth; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/event/EventNewStatisticsVO.java
New file @@ -0,0 +1,62 @@ package com.panzhihua.common.model.vos.community.screen.event; import com.fasterxml.jackson.annotation.JsonFormat; import com.panzhihua.common.model.vos.grid.EventResourceVO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.Date; import java.util.List; @Data @ApiModel("大屏事件播报统计返回参数") public class EventNewStatisticsVO { @ApiModelProperty("事件id") private Long id; @ApiModelProperty("发布人昵称") private String userName; @ApiModelProperty("发布人头像") private String imageUrl; @ApiModelProperty("发布时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date createAt; @ApiModelProperty("事件描述") private String eventDes; @ApiModelProperty("危险级别:0 (无) 1(特别重大)、2(重大)、3(较大)、4(一般)") private String dangerLevel; @ApiModelProperty("是否紧急") private Boolean urgent; @ApiModelProperty("是否重大") private Boolean major; @ApiModelProperty("事件发生地点") private String happenAddress; @ApiModelProperty("事件发生经纬度(长在前短在后)") private String happentLatLng; @ApiModelProperty("事件分类1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件、6特殊人群信息上报") private Integer eventType; @ApiModelProperty("事件处理状态(1待处理、4已解决)") private Integer eventDealStatus; @ApiModelProperty(value = "音频") private List<EventResourceVO> audios; @ApiModelProperty(value = "视频") private List<EventResourceVO> videos; @ApiModelProperty(value = "图片") private List<EventResourceVO> pics; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/event/EventStatisticsVO.java
New file @@ -0,0 +1,25 @@ package com.panzhihua.common.model.vos.community.screen.event; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.List; @Data @ApiModel("大屏事件统计返回参数") public class EventStatisticsVO { @ApiModelProperty("大屏网格数据") private List<EventGridStatisticsVO> gridStatisticsList; @ApiModelProperty("大屏左边数据") private EventLeftStatisticsVO leftStatisticsVO; @ApiModelProperty("事件播报数据") private EventNewStatisticsVO newStatisticsVO; @ApiModelProperty("社区事件数据") private List<EventGridIncidentStatisticsVO> gridIncidentList; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexBasicsStatisticsVO.java
New file @@ -0,0 +1,22 @@ package com.panzhihua.common.model.vos.community.screen.index; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data @ApiModel("大屏首页基础数据统计返回参数") public class IndexBasicsStatisticsVO { @ApiModelProperty("人口数量") private Integer populationTotal; @ApiModelProperty("房屋数量") private Integer houseTotal; @ApiModelProperty("单位数量") private Integer companyTotal; @ApiModelProperty("小区数量") private Integer villageTotal; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexDynamicStatisticsVO.java
New file @@ -0,0 +1,37 @@ package com.panzhihua.common.model.vos.community.screen.index; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data @ApiModel("大屏首页社区治理动态数据统计返回参数") public class IndexDynamicStatisticsVO { @ApiModelProperty("微心愿") private Integer microWishTotal; @ApiModelProperty("随手拍") private Integer easyPhotoTotal; @ApiModelProperty("回复留言数量") private Integer replyTotal; @ApiModelProperty("开展文化活动") private Integer cultureActivityTotal; @ApiModelProperty(value = "党员活动数量",hidden = true) private Integer pbTotal; @ApiModelProperty(value = "社区活动数量",hidden = true) private Integer actTotal; @ApiModelProperty("发起民意调查") private Integer investigationTotal; @ApiModelProperty("社区宣传") private Integer propagandaTotal; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexEventGridStatisticsVO.java
New file @@ -0,0 +1,22 @@ package com.panzhihua.common.model.vos.community.screen.index; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.List; @Data @ApiModel("大屏首页网格化治理数据统计返回参数") public class IndexEventGridStatisticsVO { @ApiModelProperty("网格化治理事件数据") private IndexGridEventStatisticsVO gridEventStatisticsList; @ApiModelProperty("网格化治理事件总和") private Integer gridEventTotal = 0; @ApiModelProperty("网格化治理网格数据") private List<IndexGridStatisticsVO> gridStatisticsList; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexEventListStatisticsVO.java
New file @@ -0,0 +1,24 @@ package com.panzhihua.common.model.vos.community.screen.index; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.Date; @Data @ApiModel("大屏首页实时治理信息数据统计返回参数") public class IndexEventListStatisticsVO { @ApiModelProperty("事件上报时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date createAt; @ApiModelProperty("事件状态(1.待处理 4.已处理)") private Integer eventDealStatus; @ApiModelProperty("事件描述") private String eventDes; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexGridEventStatisticsVO.java
New file @@ -0,0 +1,29 @@ package com.panzhihua.common.model.vos.community.screen.index; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data @ApiModel("大屏首页网格化治理事件数据统计返回参数") public class IndexGridEventStatisticsVO { @ApiModelProperty("突发事件数量") private Integer eventTFTotal; @ApiModelProperty("治安隐患事件数量") private Integer eventZATotal; @ApiModelProperty("矛盾纠纷事件数量") private Integer eventMDTotal; @ApiModelProperty("特殊人员上报数量") private Integer eventTSTotal; @ApiModelProperty("不稳定因素事件数量") private Integer eventBWDTotal; @ApiModelProperty("公共服务数量") private Integer eventGGTotal; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexGridStatisticsVO.java
New file @@ -0,0 +1,19 @@ package com.panzhihua.common.model.vos.community.screen.index; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.List; @Data @ApiModel("大屏首页网格化治理事件数据统计返回参数") public class IndexGridStatisticsVO { @ApiModelProperty("网格名称") private String eventData; @ApiModelProperty("网格事件数据") private IndexGridEventStatisticsVO gridEventStatisticsList; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexPopulationAgeStatisticsVO.java
New file @@ -0,0 +1,17 @@ package com.panzhihua.common.model.vos.community.screen.index; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data @ApiModel("大屏首页实有人口年龄段数据统计返回参数") public class IndexPopulationAgeStatisticsVO { @ApiModelProperty("年龄段(1、0-16 2、16-27 3、27-35 4、35-45 5、45-55 6、55以上)") private Integer type; @ApiModelProperty("数量") private Integer sum = 0; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexPopulationSexStatisticsVO.java
New file @@ -0,0 +1,17 @@ package com.panzhihua.common.model.vos.community.screen.index; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data @ApiModel("大屏首页实有人口性别数据统计返回参数") public class IndexPopulationSexStatisticsVO { @ApiModelProperty("性别(1.男 2.女)") private Integer type; @ApiModelProperty("数量") private Integer sum; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexPopulationStatisticsVO.java
New file @@ -0,0 +1,22 @@ package com.panzhihua.common.model.vos.community.screen.index; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.List; @Data @ApiModel("大屏首页实有人口数据统计返回参数") public class IndexPopulationStatisticsVO { @ApiModelProperty("人口总数量") private Integer populationTotal = 0; @ApiModelProperty("大屏首页实有人口性别数据统计返回参数") private List<IndexPopulationSexStatisticsVO> sexPopulationList; @ApiModelProperty("大屏首页实有人口年龄段数据统计返回参数") private List<IndexPopulationAgeStatisticsVO> agePopulationList; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexSpecialStatisticsVO.java
New file @@ -0,0 +1,17 @@ package com.panzhihua.common.model.vos.community.screen.index; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data @ApiModel("大屏首页特殊人群统计数据返回参数") public class IndexSpecialStatisticsVO { @ApiModelProperty("特殊人群标签") private String title; @ApiModelProperty("人口数量") private Integer sum; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexStatisticsVO.java
New file @@ -0,0 +1,34 @@ package com.panzhihua.common.model.vos.community.screen.index; import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticPartyBuild; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.List; @Data @ApiModel("大屏首页统计返回参数") public class IndexStatisticsVO { @ApiModelProperty("基础模块数据") private IndexBasicsStatisticsVO basicsStatistics; @ApiModelProperty("实有人口统计模块数据") private IndexPopulationStatisticsVO populationStatisticsVO; @ApiModelProperty("实时治理信息统计模块数据") private List<IndexEventListStatisticsVO> eventListStatisticsList; @ApiModelProperty("社区治理动态模块数据") private IndexDynamicStatisticsVO dynamicStatisticsVO; @ApiModelProperty("网格化治理模块数据") private IndexEventGridStatisticsVO eventGridStatisticsVO; @ApiModelProperty("特殊人群统计模块数据") private List<IndexSpecialStatisticsVO> specialStatisticsVOList; @ApiModelProperty("党建模块数据") private BigScreenStatisticPartyBuild statisticPartyBuild; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PagePartyOrganizationVO.java
@@ -17,6 +17,9 @@ @ApiModelProperty(value ="组织名字") private String orgName; @ApiModelProperty(value ="组织ID") private Long orgId; @ApiModelProperty(value ="账户") private String account; @@ -31,4 +34,5 @@ @ApiModelProperty(value ="社区id",hidden = true) private Long communityId; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/ComMngUserTagVO.java
@@ -22,4 +22,7 @@ @ApiModelProperty(value = "社区id",hidden = true) private Long communityId; @ApiModelProperty("系统预置:1-是 0-否") private Integer sysFlag; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -5,6 +5,9 @@ import com.panzhihua.common.model.dtos.advertisement.ComOpsAdvDTO; import com.panzhihua.common.model.dtos.advertisement.PageComOpsAdvDTO; import com.panzhihua.common.model.dtos.community.*; import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenStatisticAgeGenderDTO; import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenStatisticPartyActivityDTO; import com.panzhihua.common.model.dtos.community.bigscreen.PageBigScreenStatisticPartyOrg; import com.panzhihua.common.model.dtos.elders.ComEldersAuthGetResultDTO; import com.panzhihua.common.model.dtos.elders.ComEldersAuthPageDTO; import com.panzhihua.common.model.dtos.elders.ComEldersAuthUserAddAppDTO; @@ -24,6 +27,7 @@ import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.SystemmanagementConfigVO; import com.panzhihua.common.model.vos.community.*; import com.panzhihua.common.model.vos.community.bigscreen.*; import com.panzhihua.common.model.vos.community.questnaire.EditComActQuestnaireVo; import com.panzhihua.common.model.vos.community.questnaire.QuestnaireVO; import com.panzhihua.common.model.vos.community.questnaire.UsersAnswerQuestnaireVO; @@ -2859,4 +2863,64 @@ @PostMapping("/elders/getAuthHistoryExport") R getAuthHistoryExport(@RequestBody PageEldersAuthHistoryDTO pageEldersAuthElderlyDTO); /** * 党员党支部统计信息 * @return */ @PostMapping("/bigscreen/party/orgmembers") R bigscreenPartyOrgmembers(@RequestBody PageBigScreenStatisticPartyOrg pageBigScreenStatisticPartyOrg); /** * 党员年龄占比、男女占比 * @return */ @PostMapping("/bigscreen/party/ageGender") R<BigScreenStatisticAgeGender> ageGender(@RequestBody BigScreenStatisticAgeGenderDTO bigScreenStatisticAgeGenderDTO); /** * 党建数据概览 * @return */ @PostMapping("/bigscreen/party/partybuild/{communityId}") R<BigScreenStatisticPartyBuild> bigscreenPartybuild(@PathVariable("communityId") Long communityId); /** * 党员活动参加用户排行榜-TOP3 * @return */ @PostMapping("/bigscreen/party/activitytopuser/{communityId}") R<List<PartyBuildingMemberVO>> bigscreenPartyactivitytopuser(@PathVariable("communityId") Long communityId); /** * 党员活动 * @return */ @PostMapping("/bigscreen/party/bigscreenPartyactivity") R<List<BigScreenStatisticPartyActivity>> bigscreenPartyactivity(BigScreenStatisticPartyActivityDTO bigScreenStatisticPartyActivityDTO); /** * 首页大屏统计接口 * @param communityId 社区id * @return 统计结果 */ @GetMapping("/screen/getScreenIndex") R getScreenIndex(@RequestParam("communityId")Long communityId); /** * 事件大屏统计接口 * @param communityId 社区id * @return 统计结果 */ @GetMapping("/screen/getScreenEvent") R getScreenEvent(@RequestParam("communityId")Long communityId); /** * 民生大屏统计接口 * @param communityId 社区id * @return 统计结果 */ @GetMapping("/screen/getScreenCivil") R getScreenCivil(@RequestParam("communityId")Long communityId); } springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/BigScreenApi.java
New file @@ -0,0 +1,101 @@ package com.panzhihua.community_backstage.api; import com.panzhihua.common.controller.BaseController; import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenStatisticAgeGenderDTO; import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenStatisticPartyActivityDTO; import com.panzhihua.common.model.dtos.community.bigscreen.PageBigScreenStatisticPartyOrg; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.bigscreen.*; import com.panzhihua.common.model.vos.partybuilding.PagePartyOrganizationVO; import com.panzhihua.common.model.vos.partybuilding.PartyBuildingComPbDynVO; import com.panzhihua.common.model.vos.partybuilding.PartyCommitteeVO; import com.panzhihua.common.service.community.CommunityService; import com.panzhihua.common.service.partybuilding.PartyBuildingService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.util.List; /** * @ClasssName BigScreenApi * @Description TODO * @Author cedoo * @Date 2021/6/15 * @Version 1.0 **/ @Slf4j @RestController @RequestMapping("/bigscreen/party") @Api(tags = {"网格大屏/党建"}) public class BigScreenApi extends BaseController { @Resource private PartyBuildingService partyBuildingService; @Resource private CommunityService communityService; @ApiOperation(value = "党员党支部统计信息", response = BigScreenStatisticPartyOrg.class) @PostMapping("/orgmembers") public R<BigScreenStatisticPartyOrg> orgmembers(@Validated @RequestBody PageBigScreenStatisticPartyOrg pageBigScreenStatisticPartyOrg){ pageBigScreenStatisticPartyOrg.setCommunityId(2L); return communityService.bigscreenPartyOrgmembers(pageBigScreenStatisticPartyOrg); } @ApiOperation(value = "党员年龄占比、男女占比", response = BigScreenStatisticAgeGender.class) @GetMapping("/agegender") public R<BigScreenStatisticAgeGender> agegender(){ BigScreenStatisticAgeGenderDTO bigScreenStatisticAgeGenderDTO = new BigScreenStatisticAgeGenderDTO(); bigScreenStatisticAgeGenderDTO.setCommunityId(2L); return communityService.ageGender(bigScreenStatisticAgeGenderDTO); } @ApiOperation(value = "党建数据概览", response = BigScreenStatisticPartyBuild.class) @GetMapping("/partybuild") public R<BigScreenStatisticPartyBuild> partybuild(){ return communityService.bigscreenPartybuild(2L); } @ApiOperation(value = "党员活动(按月-最近12个月)",response = BigScreenStatisticPartyActivity.class) @PostMapping("/partyactivity") public R<List<BigScreenStatisticPartyActivity>> partyactivity(@Validated @RequestBody BigScreenStatisticPartyActivityDTO bigScreenStatisticPartyActivityDTO){ bigScreenStatisticPartyActivityDTO.setCommunityId(2L); return communityService.bigscreenPartyactivity(bigScreenStatisticPartyActivityDTO); } @ApiOperation(value = "党员活动参加用户排行榜-TOP3", response = PartyBuildingMemberVO.class) @GetMapping("/partyactivitytopuser") public R<List<PartyBuildingMemberVO>> partyactivitytopuser(){ return communityService.bigscreenPartyactivitytopuser(2L); } @ApiOperation(value = "党建动态", response = BigScreenStatisticPartyOrg.class) @GetMapping("/partydyn") public R<BigScreenStatisticPartyOrg> partydyn(@RequestBody PartyBuildingComPbDynVO partyBuildingComPbDynVO) { Integer type = 1; Long communityId = 2L; partyBuildingComPbDynVO.setType(1); partyBuildingComPbDynVO.setCommunityId(communityId); return partyBuildingService.pageYnamic(partyBuildingComPbDynVO); } @ApiOperation(value = "社区党委", response = BigScreenStatisticPartyMemeber.class) @PostMapping("/pagePartyCommittee") public R<BigScreenStatisticPartyMemeber> pagePartyCommittee(@RequestBody PartyCommitteeVO partyCommitteeVO) { partyCommitteeVO.setCommunityId(2L); return partyBuildingService.pagePartyCommittee(partyCommitteeVO); } @ApiOperation(value = "党员分页查询", response = com.panzhihua.common.model.vos.partybuilding.PartyBuildingMemberVO.class) @PostMapping("/pagepartyorganization") public R pagePartyOrganization(@RequestBody PagePartyOrganizationMemberVO pagePartyOrganizationMemberVO) { PagePartyOrganizationVO pagePartyOrganizationVO = new PagePartyOrganizationVO(); BeanUtils.copyProperties(pagePartyOrganizationMemberVO, pagePartyOrganizationVO); pagePartyOrganizationVO.setCommunityId(2L); return partyBuildingService.pagePartyOrganization(pagePartyOrganizationVO); } } springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/BigScreenStatisticsApi.java
New file @@ -0,0 +1,59 @@ package com.panzhihua.community_backstage.api; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.screen.civil.CivilStatisticsVO; import com.panzhihua.common.model.vos.community.screen.event.EventStatisticsVO; import com.panzhihua.common.model.vos.community.screen.index.IndexStatisticsVO; import com.panzhihua.common.service.community.CommunityService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; @Slf4j @Api(tags = {"大屏统计数据模块"}) @RestController @RequestMapping("/screen/") public class BigScreenStatisticsApi { @Resource private CommunityService communityService; @ApiOperation(value = "大屏测试接口") @GetMapping("/test/noToken") public R test(@RequestParam("communityId") Long communityId) { return R.ok("测试,测试社区id" + communityId); } @ApiOperation(value = "首页大屏统计接口@lyq",response = IndexStatisticsVO.class) @GetMapping("/index/noToken") public R index(@RequestParam("communityId") Long communityId) { if(communityId == null){ return R.fail("参数错误"); } return communityService.getScreenIndex(communityId); } @ApiOperation(value = "事件大屏统计接口@lyq",response = EventStatisticsVO.class) @GetMapping("/event/noToken") public R event(@RequestParam("communityId") Long communityId) { if(communityId == null){ return R.fail("参数错误"); } return communityService.getScreenEvent(communityId); } @ApiOperation(value = "民生大屏统计接口@lyq",response = CivilStatisticsVO.class) @GetMapping("/civil/noToken") public R civil(@RequestParam("communityId") Long communityId) { if(communityId == null){ return R.fail("参数错误"); } return communityService.getScreenCivil(communityId); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/BigScreenApi.java
New file @@ -0,0 +1,84 @@ package com.panzhihua.service_community.api; import com.panzhihua.common.controller.BaseController; import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenStatisticAgeGenderDTO; import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenStatisticPartyActivityDTO; import com.panzhihua.common.model.dtos.community.bigscreen.PageBigScreenStatisticPartyOrg; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.bigscreen.*; import com.panzhihua.common.model.vos.partybuilding.PartyBuildingComPbDynVO; import com.panzhihua.common.model.vos.partybuilding.PartyCommitteeVO; import com.panzhihua.common.service.partybuilding.PartyBuildingService; import com.panzhihua.service_community.service.BigScreenService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.util.List; /** * @ClasssName BigScreenApi * @Description 网格大屏/党建 * @Author cedoo * @Date 2021/6/15 * @Version 1.0 **/ @Slf4j @RestController @RequestMapping("/bigscreen/party") public class BigScreenApi extends BaseController { @Resource private BigScreenService bigScreenService; /** * 党员党支部统计信息 * @return */ @PostMapping("/orgmembers") R orgmembers(@RequestBody PageBigScreenStatisticPartyOrg pageBigScreenStatisticPartyOrg){ return bigScreenService.partyOrgMembers(pageBigScreenStatisticPartyOrg); } /** * 党员年龄占比、男女占比 * @return */ @PostMapping("/ageGender") R<BigScreenStatisticAgeGender> ageGender(@RequestBody BigScreenStatisticAgeGenderDTO bigScreenStatisticAgeGenderDTO){ return bigScreenService.ageGender(bigScreenStatisticAgeGenderDTO); } /** * 党建数据概览 * @return */ @PostMapping("/partybuild/{communityId}") R<BigScreenStatisticPartyBuild> bigscreenPartybuild(@PathVariable("communityId") Long communityId){ return bigScreenService.bigscreenPartybuild(communityId); } /** * 党员活动参加用户排行榜-TOP3 * @return */ @PostMapping("/activitytopuser/{communityId}") R<List<PartyBuildingMemberVO>> bigscreenPartyactivitytopuser(@PathVariable("communityId") Long communityId){ return bigScreenService.bigscreenPartyactivitytopuser(communityId); } /** * 党员活动 * @return */ @PostMapping("/bigscreenPartyactivity") R<List<BigScreenStatisticPartyActivity>> bigscreenPartyactivity(@RequestBody BigScreenStatisticPartyActivityDTO bigScreenStatisticPartyActivityDTO){ return bigScreenService.bigscreenPartyactivity(bigScreenStatisticPartyActivityDTO); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/BigScreenStatisticsApi.java
New file @@ -0,0 +1,52 @@ package com.panzhihua.service_community.api; import com.panzhihua.common.model.vos.R; import com.panzhihua.service_community.service.ComMngPopulationService; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; @Slf4j @RestController @RequestMapping("/screen/") public class BigScreenStatisticsApi { @Resource private ComMngPopulationService comMngPopulationService; /** * 首页大屏统计接口 * @param communityId 社区id * @return 统计结果 */ @GetMapping("/getScreenIndex") public R index(@RequestParam("communityId") Long communityId) { return R.ok(comMngPopulationService.getScreenIndex(communityId)); } /** * 事件大屏统计接口 * @param communityId 社区id * @return 统计结果 */ @GetMapping("/getScreenEvent") public R event(@RequestParam("communityId") Long communityId) { return R.ok(comMngPopulationService.getScreenEvent(communityId)); } /** * 民生大屏统计接口 * @param communityId 社区id * @return 统计结果 */ @GetMapping("/getScreenCivil") public R civil(@RequestParam("communityId") Long communityId) { return R.ok(comMngPopulationService.getScreenCivil(communityId)); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/BigScreenDAO.java
New file @@ -0,0 +1,167 @@ package com.panzhihua.service_community.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.dtos.community.bigscreen.BigScreenStatisticAgeGenderDTO; import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenStatisticPartyActivityDTO; import com.panzhihua.common.model.dtos.community.bigscreen.PageBigScreenStatisticPartyOrg; import com.panzhihua.common.model.vos.community.bigscreen.*; import com.panzhihua.service_community.model.dos.EldersAuthDO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import java.util.List; /** * DAO * * @author cedoo email:cedoo(a)qq.com * @version 1.0 * @since 1.0 * */ @Mapper public interface BigScreenDAO extends BaseMapper<EldersAuthDO> { @Select("<script> " + " SELECT org.id, org.name, COUNT(pm.id) as total " + " FROM com_pb_org org " + " LEFT JOIN com_pb_member pm ON org.id = pm.org_id " + " <where> " + " org.status = 1 " + "<if test='pageDTO.communityId != null'>" + " AND org.community_id = #{pageDTO.communityId} " + "</if> " + " </where>" + " GROUP BY org.id " + " ORDER BY org.${pageDTO.sortBy} ${pageDTO.order} " + "</script>") IPage<BigScreenStatisticPartyOrg> partyOrgMembers(Page page, @Param("pageDTO") PageBigScreenStatisticPartyOrg pageBigScreenStatisticPartyOrg); @Select("<script> " + " SELECT " + " SUM(CASE lev WHEN '30以内' THEN total ELSE 0 END) as 'thirtyTotal', " + " SUM(CASE lev WHEN '31-60' THEN total ELSE 0 END) as 'sixtyTotal', " + " SUM(CASE lev WHEN '60以上' THEN total ELSE 0 END) as 'biggerTotal' " + " FROM ( " + " SELECT " + " abt.lev, COUNT(abt.id) AS total " + " FROM ( " + " SELECT id_card, id,age, " + " case when age <= 30 then '30以内' " + " when age > 30 and age <= 60 then '31-60' " + " when age > 60 then '60以上' " + " ELSE '' " + " END AS lev " + " FROM ( " + " SELECT id, id_card, ROUND(DATEDIFF(CURDATE(), STR_TO_DATE(SUBSTRING(id_card,7,15), '%Y%m%d'))/365.2422) AS age " + " FROM com_pb_member " + " <where> " + "<if test='queryDTO.communityId != null'> " + " community_id = #{queryDTO.communityId} " + "</if> " + " </where>" + " ) t " + " )abt " + " GROUP BY abt.lev " + " ) t2 " + "</script>") BigScreenStatisticAgeGender age(@Param("queryDTO") BigScreenStatisticAgeGenderDTO bigScreenStatisticAgeGenderDTO); @Select("<script> " + " SELECT " + " SUM(CASE gender WHEN '男' THEN total ELSE 0 END) as 'manTotal', " + " SUM(CASE gender WHEN '女' THEN total ELSE 0 END) as 'womeTotal' " + " FROM ( " + " SELECT CASE WHEN t.sxi = 0 THEN '女' WHEN t.sxi = 1 THEN '男' ELSE '未知' END AS gender, t.total " + " FROM ( " + " SELECT CONVERT(SUBSTRING(id_card,'17',1), UNSIGNED INTEGER)%2 AS sxi, COUNT(id_card) AS total " + " FROM com_pb_member " + " <where> " + "<if test='queryDTO.communityId != null'>" + " community_id = #{queryDTO.communityId} " + "</if> " + " </where>" + " GROUP BY sxi " + " )t " + " ) t2 " + "</script>") BigScreenStatisticAgeGender gender(@Param("queryDTO") BigScreenStatisticAgeGenderDTO bigScreenStatisticAgeGenderDTO); @Select("<script> " + " SELECT \n" + " SUM(CASE TYPE WHEN 1 THEN total ELSE 0 END) as 'orgCount',\n" + " SUM(CASE TYPE WHEN 2 THEN total ELSE 0 END) as 'memberCount',\n" + " SUM(CASE TYPE WHEN 3 THEN total ELSE 0 END) as 'activityCount',\n" + " SUM(CASE TYPE WHEN 4 THEN total ELSE 0 END) as 'dynCount'\n" + " FROM (\n" + " SELECT 1 AS TYPE , COUNT(id) total\n" + " FROM com_pb_org org \n" + " WHERE org.community_id = #{communityId} AND STATUS=1\n" + " UNION ALL \n" + " SELECT 2 AS TYPE , COUNT(id) total\n" + " FROM com_pb_member \n" + " WHERE community_id = #{communityId} AND audit_result = 1\n" + " UNION ALL \n" + " SELECT 3 AS TYPE , COUNT(id) total\n" + " FROM com_pb_activity\n" + " WHERE community_id = #{communityId} AND STATUS IN (2,3,4,5)\n" + " UNION ALL \n" + " SELECT 4 AS TYPE , COUNT(id) total\n" + " FROM com_pb_dyn \n" + " WHERE community_id = #{communityId} AND STATUS = 2\n" + ") t" + "</script>") BigScreenStatisticPartyBuild partybuild(@Param("communityId") Long communityId); @Select("<script> " + " SELECT pm.id, pm.member_id, pm.user_id, pm.name, pm.photo_path, COUNT(pa.id) AS total \n" + " FROM com_pb_activity_member pm LEFT JOIN com_pb_activity pa ON pm.activity_id = pa.id \n" + " WHERE pa.community_id = #{communityId} \n" + " GROUP BY pm.member_id\n" + " ORDER BY total DESC\n" + " LIMIT 3 " + "</script>") List<PartyBuildingMemberVO> bigscreenPartyactivitytopuser(@Param("communityId")Long communityId); @Select("<script> " + " SELECT id AS member_id, user_id, NAME, photo_path, 0 AS total\n" + " FROM com_pb_member\n" + " WHERE community_id=#{communityId}\n" + " ORDER BY join_time DESC \n" + " LIMIT 3 " + "</script>") List<PartyBuildingMemberVO> defaultPartyactivity(@Param("communityId")Long communityId); @Select("<script> " + " SELECT m.idxName, case when d.total IS NOT NULL then d.total ELSE 0 END AS total\n" + " FROM \n" + " (\n" + " SELECT\n" + " DATE_FORMAT(@cdate := date_add( @cdate, INTERVAL - 1 MONTH ),'%Y-%m') as idxName\n" + "FROM\n" + " ( \n" + " SELECT @cdate := date_add(now(), INTERVAL 1 MONTH )\n" + " FROM com_pb_activity LIMIT 12\n" + " )d\n" + " ORDER BY idxName\n" + ")m LEFT JOIN \n" + "(\n" + "SELECT \n" + " date_format(activity_time_begin, '%Y-%m') AS idxName,\n" + " COUNT(id) AS total\n" + " FROM com_pb_activity \n" + " WHERE \n" + " community_id=#{queryDTO.communityId} AND STATUS IN ( 3, 4, 5 ) AND \n" + " activity_time_begin < DATE_FORMAT( DATE_ADD( STR_TO_DATE(#{queryDTO.date}, '%Y-%m-%d'), INTERVAL 1 MONTH ), '%Y-%m-%d' ) AND\n" + " activity_time_begin > DATE_FORMAT( DATE_ADD( STR_TO_DATE(#{queryDTO.date}, '%Y-%m-%d'), INTERVAL - 12 MONTH ), '%Y-%m-%d') \n" + " GROUP BY idxName\n" + " ORDER BY idxName ASC \n" + " ) d ON m.idxName = d.idxName\n" + " ORDER BY m.idxName " + "</script>") List<BigScreenStatisticPartyActivity> partyactivity(@Param("queryDTO")BigScreenStatisticPartyActivityDTO bigScreenStatisticPartyActivityDTO); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java
@@ -6,19 +6,20 @@ import com.panzhihua.common.model.dtos.community.ComMngPopulationDTO; import com.panzhihua.common.model.dtos.user.PageInputUserDTO; import com.panzhihua.common.model.vos.area.AreaAddressVO; import com.panzhihua.common.model.vos.community.ComActMessageVO; import com.panzhihua.common.model.vos.community.ComMngPopulationTotalVO; import com.panzhihua.common.model.vos.community.ComMngPopulationVO; import com.panzhihua.common.model.vos.community.PageComActMessageVO; import com.panzhihua.common.model.vos.user.ComHouseMemberVo; import com.panzhihua.common.model.vos.user.ComMngFamilyInfoVO; import com.panzhihua.common.model.vos.user.InputUserInfoVO; import com.panzhihua.common.model.vos.user.UserElectronicFileVO; import com.panzhihua.common.model.vos.community.screen.civil.CivilPopulationStatisticsVO; import com.panzhihua.common.model.vos.community.screen.civil.CivilVillageStatisticsVO; import com.panzhihua.common.model.vos.community.screen.event.*; import com.panzhihua.common.model.vos.community.screen.index.*; import com.panzhihua.common.model.vos.grid.EventGridDataVO; import com.panzhihua.common.model.vos.user.*; import com.panzhihua.service_community.model.dos.ComMngPopulationDO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import java.util.Date; import java.util.List; /** @@ -28,29 +29,29 @@ public interface ComMngPopulationDAO extends BaseMapper<ComMngPopulationDO> { @Select("<script> " + "SELECT\n" + "cmp.`name`,\n" + "cmp.id,\n" + "cmp.street_id,\n" + "cmp.act_id,\n" + "cmp.village_id,\n" + "cmp.sex,\n" + "cmp.age,\n" + "cmp.card_no,\n" + "cmp.road,\n" + "cmp.door_no,\n" + "cmp.floor,\n" + "cmp.unit_no,\n" + "cmp.house_no,\n" + "cmp.political_outlook,\n" + "cmp.work_company,\n" + "cmp.special_situation,\n" + "cmp.phone,\n" + "cmp.remark,\n" + "cmv.alley,\n" + "cmp.native_place,\n" + "cmp.nation \n" + "FROM \n" + "SELECT " + "cmp.`name`, " + "cmp.id, " + "cmp.street_id, " + "cmp.act_id, " + "cmp.village_id, " + "cmp.sex, " + "cmp.age, " + "cmp.card_no, " + "cmp.road, " + "cmp.door_no, " + "cmp.floor, " + "cmp.unit_no, " + "cmp.house_no, " + "cmp.political_outlook, " + "cmp.work_company, " + "cmp.special_situation, " + "cmp.phone, " + "cmp.remark, " + "cmv.alley, " + "cmp.native_place, " + "cmp.nation " + "FROM " + "com_mng_population AS cmp " + "LEFT JOIN com_mng_village AS cmv ON cmv.village_id = cmp.village_id " + "<where>" + @@ -105,39 +106,39 @@ List<ComHouseMemberVo> listHouseMermberByUserId(@Param("houseId") Long houseId, @Param("populId") Long populId); @Select("<script> " + "SELECT\n" + "cmp.`name`,\n" + "cmp.id,\n" + "cmp.street_id,\n" + "cmp.act_id,\n" + "cmp.village_id,\n" + "cmp.sex,\n" + "cmp.age,\n" + "cmp.card_no,\n" + "cmp.road,\n" + "cmp.door_no,\n" + "cmp.floor,\n" + "cmp.unit_no,\n" + "cmp.house_no,\n" + "cmp.political_outlook,\n" + "cmp.work_company,\n" + "cmp.special_situation,\n" + "cmp.phone,\n" + "cmp.remark,\n" + "cmv.alley,\n" + "cmp.native_place,\n" + "cmp.nation, \n" + "cmp.label, \n" + "cmp.relation, \n" + "cmp.marriage, \n" + "cmp.culture_level, \n" + "cmp.out_or_local, \n" + "cmp.census_register, \n" + "cmp.healthy, \n" + "cmp.birthday, \n" + "cmp.update_at, \n" + "cmp.is_rent \n" + "FROM \n" + "SELECT " + "cmp.`name`, " + "cmp.id, " + "cmp.street_id, " + "cmp.act_id, " + "cmp.village_id, " + "cmp.sex, " + "cmp.age, " + "cmp.card_no, " + "cmp.road, " + "cmp.door_no, " + "cmp.floor, " + "cmp.unit_no, " + "cmp.house_no, " + "cmp.political_outlook, " + "cmp.work_company, " + "cmp.special_situation, " + "cmp.phone, " + "cmp.remark, " + "cmv.alley, " + "cmp.native_place, " + "cmp.nation, " + "cmp.label, " + "cmp.relation, " + "cmp.marriage, " + "cmp.culture_level, " + "cmp.out_or_local, " + "cmp.census_register, " + "cmp.healthy, " + "cmp.birthday, " + "cmp.update_at, " + "cmp.is_rent " + "FROM " + "com_mng_population AS cmp " + "LEFT JOIN com_mng_village AS cmv ON cmv.village_id = cmp.village_id " + "<where>" + @@ -238,4 +239,426 @@ ",(select count(id) from com_mng_population where act_id = #{communityId} and label is not null) as specialTotal " + " from com_mng_population as cmp where act_id = #{communityId}") ComMngPopulationTotalVO getPopulationTotalByAdmin(@Param("communityId") Long communityId); @Select("select count(id) as populationTotal," + "IFNULL((select count(id) from com_mng_population_house where community_id = cmp.act_id),0) as houseTotal, " + "IFNULL((select count(id) from com_mng_real_company where community_id = cmp.act_id),0) as companyTotal, " + "IFNULL((select count(village_id) from com_mng_village where community_id = cmp.act_id),0) as villageTotal " + " from com_mng_population as cmp " + " where act_id = #{communityId}") IndexBasicsStatisticsVO getScreenIndexByBasics(@Param("communityId") Long communityId); @Select("SELECT " + " IFNULL( NULL, 1 ) AS type, " + " count( id ) AS sum " + "FROM " + " com_mng_population " + "WHERE " + " sex = 1 " + " AND act_id = #{communityId} UNION ALL " + "SELECT " + " IFNULL( NULL, 2 ) AS type, " + " count( id ) AS sum " + "FROM " + " com_mng_population " + "WHERE " + " sex = 2 " + " AND act_id = #{communityId}") List<IndexPopulationSexStatisticsVO> getScreenIndexByPopulationSex(@Param("communityId") Long communityId); @Select("SELECT " + " e.create_at, " + " e.event_des, " + " e.event_deal_status " + "FROM " + " `event` AS e " + " LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id " + "WHERE " + " egd.grid_community_id = #{communityId} " + " AND e.event_deal_status IN ( 1, 4 ) " + "ORDER BY " + " e.create_at DESC " + " LIMIT 8") List<IndexEventListStatisticsVO> getScreenIndexByEventList(@Param("communityId") Long communityId); @Select("SELECT " + " count( id ) AS microWishTotal, " + " IFNULL(( SELECT count( id ) FROM com_act_easy_photo WHERE handle_status = 2 AND community_id = camw.community_id ),0) AS easyPhotoTotal, " + " IFNULL(( SELECT count( id ) FROM com_act_message WHERE STATUS = 2 AND community_id = camw.community_id ),0) AS replyTotal, " + " IFNULL(( SELECT count( id ) FROM com_act_activity WHERE STATUS = 5 AND community_id = camw.community_id ),0) AS actTotal, " + " IFNULL(( SELECT count( id ) FROM com_pb_activity WHERE STATUS = 5 AND community_id = camw.community_id ),0) AS pbTotal, " + " IFNULL(( SELECT count( id ) FROM com_act_questnaire WHERE community_id = camw.community_id ),0) AS investigationTotal, " + " IFNULL(( SELECT count( id ) FROM com_act_dyn WHERE community_id = camw.community_id AND STATUS = 1 ),0) AS propagandaTotal " + "FROM " + " com_act_micro_wish AS camw " + "WHERE " + " camw.STATUS = 6 " + " AND camw.community_id = #{communityId}") IndexDynamicStatisticsVO getScreenIndexByDynamic(@Param("communityId") Long communityId); @Select("SELECT " + " count( e.id ) AS eventTFTotal, " + " IFNULL(( SELECT count( id ) FROM `event` WHERE event_category = 1 AND event_type = 1 AND event_deal_status = 4 AND grid_id = egd.id ),0) AS eventZATotal, " + " IFNULL(( SELECT count( id ) FROM `event` WHERE event_category = 1 AND event_type = 3 AND event_deal_status = 4 AND grid_id = egd.id ),0) AS eventMDTotal, " + " IFNULL(( SELECT count( id ) FROM `event` WHERE event_category = 1 AND event_type = 6 AND event_deal_status = 4 AND grid_id = egd.id ),0) AS eventTSTotal, " + " IFNULL(( SELECT count( id ) FROM `event` WHERE event_category = 1 AND event_type = 4 AND event_deal_status = 4 AND grid_id = egd.id ),0) AS eventBWDTotal, " + " IFNULL(( SELECT count( id ) FROM `event` WHERE event_category = 1 AND event_type = 2 AND event_deal_status = 4 AND grid_id = egd.id ),0) AS eventGGTotal " + "FROM " + " `event` AS e " + " LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id " + "WHERE " + " e.event_category = 1 " + " AND e.event_type = 5 " + " AND e.event_deal_status = 4 " + " AND egd.grid_community_id = #{communityId}") IndexGridEventStatisticsVO getGridEventStatisticsList(@Param("communityId") Long communityId); @Select("select id,grid_name from event_grid_data where grid_community_id = #{communityId}") List<EventGridDataVO> getGridDataListByCommunityId(@Param("communityId") Long communityId); @Select("SELECT " + " count( e.id ) AS eventTFTotal, " + " IFNULL(( SELECT count( id ) FROM `event` WHERE event_category = 1 AND event_type = 1 AND event_deal_status = 4 AND grid_id = e.grid_id ),0) AS eventZATotal, " + " IFNULL(( SELECT count( id ) FROM `event` WHERE event_category = 1 AND event_type = 3 AND event_deal_status = 4 AND grid_id = e.grid_id) ,0) AS eventMDTotal, " + " IFNULL(( SELECT count( id ) FROM `event` WHERE event_category = 1 AND event_type = 6 AND event_deal_status = 4 AND grid_id = e.grid_id ),0) AS eventTSTotal, " + " IFNULL(( SELECT count( id ) FROM `event` WHERE event_category = 1 AND event_type = 4 AND event_deal_status = 4 AND grid_id = e.grid_id ),0) AS eventBWDTotal, " + " IFNULL(( SELECT count( id ) FROM `event` WHERE event_category = 1 AND event_type = 2 AND event_deal_status = 4 AND grid_id = e.grid_id ),0) AS eventGGTotal " + "FROM " + " `event` AS e " + "WHERE " + " e.event_category = 1 " + " AND e.event_type = 5 " + " AND e.event_deal_status = 4 " + " AND e.grid_id = #{gridId}") IndexGridEventStatisticsVO getGridEventByGirdId(@Param("gridId") Long gridId); @Select("SELECT " + " tag_name, " + " sys_flag " + "FROM " + " com_mng_user_tag " + "WHERE " + " sys_flag = 1 " + " OR community_id = #{communityId}") List<ComMngUserTagVO> getUserTagListByCommunityId(@Param("communityId") Long communityId); @Select("SELECT " + " count( id ) " + "FROM " + " com_mng_population " + "WHERE " + " label like concat('%',#{label},'%')") Integer getSpecialStatisticsByLabel(@Param("label") String label); @Select("SELECT " + " count( egd.id ) AS gridTotal, " + " ( SELECT count( user_id ) FROM sys_user WHERE community_id = egd.grid_community_id AND type = 6 ) AS gridMemberTotal, " + " ( " + " SELECT " + " count( e.id ) " + " FROM " + " `event` AS e " + " LEFT JOIN event_grid_data AS egd1 ON e.grid_id = egd1.id " + " WHERE " + " egd1.grid_community_id = egd.grid_community_id " + " AND event_status = 2 " + " ) AS eventTotal, " + " ( " + " SELECT " + " count( e1.id ) " + " FROM " + " `event` AS e1 " + " LEFT JOIN event_grid_data AS egd2 ON e1.grid_id = egd2.id " + " WHERE " + " egd2.grid_community_id = egd.grid_community_id " + " AND event_status = 2 " + " AND event_deal_status IN ( 1, 2, 3 )) AS noSolveEventTotal, " + " ( " + " SELECT " + " count( e1.id ) " + " FROM " + " `event` AS e1 " + " LEFT JOIN event_grid_data AS egd2 ON e1.grid_id = egd2.id " + " WHERE " + " egd2.grid_community_id = egd.grid_community_id " + " AND event_status = 2 " + " AND event_deal_status = 4 " + " ) AS solveEventTotal " + "FROM " + " event_grid_data AS egd " + "WHERE " + " egd.grid_community_id = #{communityId}") EventLeftTopStatisticsVO getEventScreenLeftTop(@Param("communityId") Long communityId); @Select("SELECT " + " DATE_FORMAT( e.create_at, '%m' ) months " + "FROM " + " `event` AS e " + " LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id " + "WHERE " + " e.create_at BETWEEN concat( YEAR ( now()), '-01-01 00:00:00' ) " + " AND concat( YEAR ( now()), '-12-31 23:59:59' ) " + " AND egd.grid_community_id = #{communityId} " + "GROUP BY " + " months " + "ORDER BY " + " count( e.id ) DESC " + " LIMIT 3") List<Integer> getFrequentlyEventMonth(@Param("communityId") Long communityId); @Select("SELECT " + " count( e.id ) AS eventZATotal, " + " IFNULL(( " + " SELECT " + " count( e1.id ) " + " FROM " + " `event` AS e1 " + " LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id " + " WHERE " + " egd1.grid_community_id = #{communityId} " + " AND event_category = 1 " + " AND event_type = 1 " + " AND event_deal_status = 4 " + " ), " + " 0 " + " ) AS yesEventZATotal, " + " IFNULL(( " + " SELECT " + " count( e2.id ) " + " FROM " + " `event` AS e2 " + " LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id " + " WHERE " + " egd2.grid_community_id = #{communityId} " + " AND event_category = 1 " + " AND event_type = 5 " + " AND event_status = 2 " + " ), " + " 0 " + " ) AS eventTFTotal, " + " IFNULL(( " + " SELECT " + " count( e3.id ) " + " FROM " + " `event` AS e3 " + " LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id " + " WHERE " + " egd3.grid_community_id = #{communityId} " + " AND event_category = 1 " + " AND event_type = 5 " + " AND event_deal_status = 4 " + " ), " + " 0 " + " ) AS yesEventTFTotal, " + " IFNULL(( " + " SELECT " + " count( e4.id ) " + " FROM " + " `event` AS e4 " + " LEFT JOIN event_grid_data AS egd4 ON egd4.id = e4.grid_id " + " WHERE " + " egd4.grid_community_id = #{communityId} " + " AND event_category = 1 " + " AND event_type = 6 " + " AND event_status = 2 " + " ), " + " 0 " + " ) AS eventTSTotal, " + " IFNULL(( " + " SELECT " + " count( e5.id ) " + " FROM " + " `event` AS e5 " + " LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id " + " WHERE " + " egd5.grid_community_id = #{communityId} " + " AND event_category = 1 " + " AND event_type = 6 " + " AND event_deal_status = 4 " + " ), " + " 0 " + " ) AS yesEventTSTotal, " + " IFNULL(( " + " SELECT " + " count( e6.id ) " + " FROM " + " `event` AS e6 " + " LEFT JOIN event_grid_data AS egd6 ON egd6.id = e6.grid_id " + " WHERE " + " egd6.grid_community_id = #{communityId} " + " AND event_category = 1 " + " AND event_type = 3 " + " AND event_status = 2 " + " ), " + " 0 " + " ) AS eventMDTotal, " + " IFNULL(( " + " SELECT " + " count( e7.id ) " + " FROM " + " `event` AS e7 " + " LEFT JOIN event_grid_data AS egd7 ON egd7.id = e7.grid_id " + " WHERE " + " egd7.grid_community_id = #{communityId} " + " AND event_category = 1 " + " AND event_type = 3 " + " AND event_deal_status = 4 " + " ), " + " 0 " + " ) AS yesEventMDTotal, " + " IFNULL(( " + " SELECT " + " count( e8.id ) " + " FROM " + " `event` AS e8 " + " LEFT JOIN event_grid_data AS egd8 ON egd8.id = e8.grid_id " + " WHERE " + " egd8.grid_community_id = #{communityId} " + " AND event_category = 1 " + " AND event_type = 4 " + " AND event_status = 2 " + " ), " + " 0 " + " ) AS eventBWDTotal, " + " IFNULL(( " + " SELECT " + " count( e9.id ) " + " FROM " + " `event` AS e9 " + " LEFT JOIN event_grid_data AS egd9 ON egd9.id = e9.grid_id " + " WHERE " + " egd9.grid_community_id = #{communityId} " + " AND event_category = 1 " + " AND event_type = 4 " + " AND event_deal_status = 4 " + " ), " + " 0 " + " ) AS yesEventBWDTotal, " + " IFNULL(( " + " SELECT " + " count( e10.id ) " + " FROM " + " `event` AS e10 " + " LEFT JOIN event_grid_data AS egd10 ON egd10.id = e10.grid_id " + " WHERE " + " egd10.grid_community_id = #{communityId} " + " AND event_category = 1 " + " AND event_type = 2 " + " AND event_status = 2 " + " ), " + " 0 " + " ) AS eventGGTotal, " + " IFNULL(( " + " SELECT " + " count( e11.id ) " + " FROM " + " `event` AS e11 " + " LEFT JOIN event_grid_data AS egd11 ON egd11.id = e11.grid_id " + " WHERE " + " egd11.grid_community_id = #{communityId} " + " AND event_category = 1 " + " AND event_type = 2 " + " AND event_deal_status = 4 " + " ), " + " 0 " + " ) AS yesEventGGTotal, " + " IFNULL(( SELECT count( id ) FROM com_act_easy_photo WHERE del_tag = 0 AND handle_status IS NOT NULL AND community_id = #{communityId} ), 0 ) AS eventSSPTotal, " + " IFNULL(( SELECT count( id ) FROM com_act_easy_photo WHERE del_tag = 0 AND handle_status = 2 AND community_id = #{communityId} ), 0 ) AS yesEventSSPTotal " + "FROM " + " `event` AS e " + " LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id " + "WHERE " + " egd.grid_community_id = #{communityId} " + " AND event_category = 1 " + " AND event_type = 1 " + " AND event_status = 2") EventLeftDownStatisticsVO getEventScreenLeftDown(@Param("communityId") Long communityId); @Select("SELECT " + " su.nick_name AS userName, " + " su.image_url AS imageUrl, " + " e.create_at, " + " e.event_des, " + " e.danger_level, " + " e.urgent, " + " e.major, " + " e.happen_address, " + " e.happent_lat_lng, " + " e.event_type, " + " e.id, " + " e.event_deal_status " + "FROM " + " `event` AS e " + " LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id " + " LEFT JOIN sys_user AS su ON su.user_id = e.grid_member_id " + "WHERE " + " egd.grid_community_id = #{communityId} " + " AND e.event_status = 2 " + " AND e.event_deal_status = 1 " + " AND e.event_category = 1 " + "ORDER BY " + " e.create_at DESC " + " LIMIT 1") EventNewStatisticsVO getEventScreenRightTop(@Param("communityId") Long communityId); @Select("SELECT " + " grid_name, " + " `data`, " + " line_color, " + " line_broadband, " + " id, " + " fill_color " + "FROM " + " event_grid_data AS egd " + "WHERE " + " egd.grid_community_id = #{communityId}") List<EventGridStatisticsVO> getEventScreenGridData(@Param("communityId") Long communityId); @Select("SELECT " + " event_type as type, " + " happent_lat_lng as latLng " + "FROM " + " `event` AS e " + " LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id " + "WHERE " + " e.event_category = 1 " + " AND e.event_type IN ( 1, 2, 3, 4, 5, 6 ) " + " AND e.event_status = 2 " + " AND e.event_deal_status = 1 " + " AND egd.grid_community_id = #{communityId} UNION ALL " + "SELECT " + " IFNULL( NULL, 7 ) AS type, " + " lng_lat AS latLng " + "FROM " + " com_act_easy_photo " + "WHERE " + " community_id = #{communityId} " + " AND handle_status = 1 " + " AND del_tag = 0 " + " AND lng_lat IS NOT NULL") List<EventGridIncidentStatisticsVO> getEventScreenEventList(@Param("communityId") Long communityId); @Select("SELECT " + " count( id ) AS specialTotal, " + " ( SELECT count( id ) FROM com_mng_population WHERE label IS NOT NULL AND act_id = #{communityId} AND create_at < #{lastMonth} ) AS toMonthSpecialTotal " + "FROM " + " com_mng_population AS cmp " + "WHERE " + " label IS NOT NULL " + " AND act_id = #{communityId}") CivilPopulationStatisticsVO getCivilScreenPopulation(@Param("communityId") Long communityId,@Param("lastMonth") Date lastMonth); @Select("SELECT `NAME`, " + " user_sum, " + " lng, " + " lat, " + " village_images, " + " village_id " + "FROM " + " com_mng_village AS cmv " + "WHERE " + " community_id = #{communityId}") List<CivilVillageStatisticsVO> getCivilScreenVillageList(@Param("communityId") Long communityId); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/EventResourceMapper.java
New file @@ -0,0 +1,19 @@ package com.panzhihua.service_community.dao; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.panzhihua.service_community.model.dos.EventResourceDO; import org.apache.ibatis.annotations.Mapper; /** * DAO * * @author cedoo email:cedoo(a)qq.com * @version 1.0 * @since 1.0 * @date 2021-05-26 * */ @Mapper public interface EventResourceMapper extends BaseMapper<EventResourceDO> { } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngPopulationDO.java
@@ -17,7 +17,7 @@ /** * 自增 id */ @TableId(type = IdType.AUTO) @TableId(type = IdType.INPUT) private Long id; /** * 街道id @@ -42,12 +42,18 @@ /** * 年龄 */ @TableField(exist = false) private Integer age; /** * 身份证号码 */ @EncryptDecryptField private String cardNo; /** * 临时用 */ private String cardNoStr; /** * 街路巷 */ @@ -132,7 +138,10 @@ /** * 与户主关系(1.户主 2.配偶 3.子女 4.孙女 5.父母 6.其他) */ @TableField(exist = false) private Integer relation; // // private String relationStr; /** * 文化程度(1.小学 2.初中 3.高中 4.中专 5.大专 6.本科 7.硕士 8.博士 9.其他) @@ -144,6 +153,7 @@ */ private Integer marriage; /** * 健康状况 */ @@ -152,6 +162,7 @@ /** * 房屋地址 */ @TableField(exist = false) private String houseAddress; /** @@ -162,6 +173,7 @@ /** * 居住地房屋id */ @TableField(exist = false) private Long houseId; /** @@ -200,4 +212,4 @@ int wd = 2; } } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/EventResourceDO.java
New file @@ -0,0 +1,66 @@ package com.panzhihua.service_community.model.dos; import com.baomidou.mybatisplus.annotation.*; import lombok.Data; import java.io.Serializable; import java.util.Date; /** * 事件或者走访中关联的图片音频和视频文件实体类 * * @author cedoo email:cedoo(a)qq.com * @version 1.0 * @since 1.0 * @date 2021-05-26 * */ @Data @TableName("event_resource") public class EventResourceDO implements Serializable { private static final long serialVersionUID = 1L; /** * 分类(1、事件 2、走访 3、事件流转) 列: classification */ private Integer classification; /** * ID 列: id */ @TableId(type = IdType.ASSIGN_ID) private Long id; /** * 事件或者走访任务关联ID 列: id */ private Long refId; /** * 事件上传的资源类型(1是图片2是音频3是是视频) 列: type */ private Integer type; /** * 资源名称 列: resource_name */ private String resourceName; /** * 资源大小 列: resource_size */ private String resourceSize; /** * 视频或音频时长 列: resource_time */ private Integer resourceTime; /** * 事件上传的资源URL地址 列: url */ private String url; /** * 创建人 列: create_by */ private Long createBy; /** * 创建时间 列: create_at */ @TableField(fill = FieldFill.INSERT) private Date createAt; } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/BigScreenService.java
New file @@ -0,0 +1,50 @@ package com.panzhihua.service_community.service; import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenStatisticAgeGenderDTO; import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenStatisticPartyActivityDTO; import com.panzhihua.common.model.dtos.community.bigscreen.PageBigScreenStatisticPartyOrg; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.bigscreen.*; import java.util.List; /** * @ClasssName BigScreenService * @Description TODO * @Author cedoo * @Date 2021/6/16 * @Version 1.0 **/ public interface BigScreenService { /** * 党员党支部统计信息 * @param pageBigScreenStatisticPartyOrg * @return */ R partyOrgMembers(PageBigScreenStatisticPartyOrg pageBigScreenStatisticPartyOrg); /** * 党员年龄占比、男女占比 * @param bigScreenStatisticAgeGenderDTO * @return */ R<BigScreenStatisticAgeGender> ageGender(BigScreenStatisticAgeGenderDTO bigScreenStatisticAgeGenderDTO); /** * 党建数据概览 * @return */ R<BigScreenStatisticPartyBuild> bigscreenPartybuild(Long communityId); /** * 党员活动参加用户排行榜-TOP3 * @return */ R<List<PartyBuildingMemberVO>> bigscreenPartyactivitytopuser(Long communityId); /** * 党员活动 * @return */ R<List<BigScreenStatisticPartyActivity>> bigscreenPartyactivity(BigScreenStatisticPartyActivityDTO bigScreenStatisticPartyActivityDTO); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngPopulationService.java
@@ -144,4 +144,25 @@ * @return 统计结果 */ R getPopulationTotalByAdmin(Long communityId); /** * 首页大屏统计接口 * @param communityId 社区id * @return 统计结果 */ R getScreenIndex(Long communityId); /** * 事件大屏统计接口 * @param communityId 社区id * @return 统计结果 */ R getScreenEvent(Long communityId); /** * 民生大屏统计接口 * @param communityId 社区id * @return 统计结果 */ R getScreenCivil(Long communityId); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/EventResourceService.java
New file @@ -0,0 +1,17 @@ package com.panzhihua.service_community.service; import com.baomidou.mybatisplus.extension.service.IService; import com.panzhihua.service_community.model.dos.EventResourceDO; /** * 事件或者走访中关联的图片音频和视频文件 service * * @author cedoo email:cedoo(a)qq.com * @version 1.0 * @since 1.0 * @date 2021-05-26 * */ public interface EventResourceService extends IService<EventResourceDO> { } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BigScreenServiceImpl.java
New file @@ -0,0 +1,96 @@ package com.panzhihua.service_community.service.impl; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenStatisticAgeGenderDTO; import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenStatisticPartyActivityDTO; import com.panzhihua.common.model.dtos.community.bigscreen.PageBigScreenStatisticPartyOrg; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.EldersAuthVO; import com.panzhihua.common.model.vos.community.bigscreen.*; import com.panzhihua.service_community.dao.BigScreenDAO; import com.panzhihua.service_community.service.BigScreenService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.List; /** * @ClasssName BigScreenService * @Description TODO * @Author cedoo * @Date 2021/6/16 * @Version 1.0 **/ @Slf4j @Service public class BigScreenServiceImpl implements BigScreenService { @Resource private BigScreenDAO bigScreenDAO; @Override public R partyOrgMembers(PageBigScreenStatisticPartyOrg pageBigScreenStatisticPartyOrg) { Page page=new Page<>(); page.setSize(pageBigScreenStatisticPartyOrg.getPageSize()); page.setCurrent(pageBigScreenStatisticPartyOrg.getPageNum()); IPage<BigScreenStatisticPartyOrg> rPage = bigScreenDAO.partyOrgMembers(page, pageBigScreenStatisticPartyOrg); return R.ok(rPage); } @Override public R<BigScreenStatisticAgeGender> ageGender(BigScreenStatisticAgeGenderDTO bigScreenStatisticAgeGenderDTO) { BigScreenStatisticAgeGender gender = bigScreenDAO.gender(bigScreenStatisticAgeGenderDTO); BigScreenStatisticAgeGender age = bigScreenDAO.age(bigScreenStatisticAgeGenderDTO); BigScreenStatisticAgeGender ageGender = new BigScreenStatisticAgeGender(); BeanUtils.copyProperties(age, ageGender); ageGender.setManTotal(gender.getManTotal()); ageGender.setWomeTotal(gender.getWomeTotal()); /** * 计算百分比 */ Double manPer = 1.0*ageGender.getManTotal() / (ageGender.getManTotal()+ageGender.getWomeTotal()); Double womenPer = 1.0*ageGender.getWomeTotal() / (ageGender.getManTotal()+ageGender.getWomeTotal()); ageGender.setManPer(manPer); ageGender.setWomenPer(womenPer); Integer memTotal = ageGender.getThirtyTotal() +ageGender.getSixtyTotal()+ ageGender.getBiggerTotal(); Double thrPer = 1.0*ageGender.getThirtyTotal() / memTotal; Double sixPer = 1.0*ageGender.getSixtyTotal() / memTotal; Double biggerPer = 1.0*ageGender.getBiggerTotal() / memTotal; ageGender.setThirtyPer(thrPer); ageGender.setSixtyPer(sixPer); ageGender.setBiggerPer(biggerPer); return R.ok(ageGender); } @Override public R<BigScreenStatisticPartyBuild> bigscreenPartybuild(Long communityId) { return R.ok(bigScreenDAO.partybuild(communityId)); } @Override public R<List<PartyBuildingMemberVO>> bigscreenPartyactivitytopuser(Long communityId) { List<PartyBuildingMemberVO> listRt = bigScreenDAO.bigscreenPartyactivitytopuser(communityId); if(listRt==null || listRt.size()< 0){ //选择默认的党员列表 List<PartyBuildingMemberVO> defaultPartyactivity = bigScreenDAO.defaultPartyactivity(communityId); listRt.addAll(defaultPartyactivity); if(listRt.size()>=3) { listRt = listRt.subList(0, 3); } } return R.ok(listRt); } @Override public R<List<BigScreenStatisticPartyActivity>> bigscreenPartyactivity(BigScreenStatisticPartyActivityDTO bigScreenStatisticPartyActivityDTO) { List<BigScreenStatisticPartyActivity> listR = bigScreenDAO.partyactivity(bigScreenStatisticPartyActivityDTO); return R.ok(listR); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -1,6 +1,8 @@ package com.panzhihua.service_community.service.impl; import cn.hutool.core.util.IdcardUtil; import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -12,31 +14,32 @@ import com.panzhihua.common.model.dtos.community.*; import com.panzhihua.common.model.dtos.user.PageInputUserDTO; import com.panzhihua.common.model.helper.AESUtil; import com.panzhihua.common.model.helper.AESUtil; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.area.AreaAddressVO; import com.panzhihua.common.model.vos.community.*; import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticPartyBuild; import com.panzhihua.common.model.vos.community.screen.civil.CivilPopulationStatisticsVO; import com.panzhihua.common.model.vos.community.screen.civil.CivilStatisticsVO; import com.panzhihua.common.model.vos.community.screen.civil.CivilVillageStatisticsVO; import com.panzhihua.common.model.vos.community.screen.event.*; import com.panzhihua.common.model.vos.community.screen.index.*; import com.panzhihua.common.model.vos.grid.EventGridDataVO; import com.panzhihua.common.model.vos.grid.EventResourceVO; import com.panzhihua.common.model.vos.user.*; import com.panzhihua.common.utlis.*; import com.panzhihua.service_community.dao.*; import com.panzhihua.service_community.model.dos.*; import com.panzhihua.service_community.service.ComMngPopulationHouseUserService; import com.panzhihua.service_community.service.ComMngPopulationService; import com.panzhihua.service_community.service.EventResourceService; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.ObjectUtils; import javax.annotation.Resource; import javax.crypto.BadPaddingException; import javax.crypto.IllegalBlockSizeException; import javax.crypto.NoSuchPaddingException; import java.io.UnsupportedEncodingException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.math.BigDecimal; import java.util.*; import java.util.stream.Collectors; @@ -60,7 +63,13 @@ @Resource private ComMngPopulationHouseUserDAO comMngPopulationHouseUserDAO; @Resource private ComMngPopulationDAO comMngPopulationDAO; @Resource private ComMngPopulationHouseUserService comMngPopulationHouseUserService; @Resource private EventResourceService eventResourceService; @Resource private BigScreenDAO bigScreenDAO; @Value("${domain.aesKey:}") private String aesKey; @@ -786,6 +795,283 @@ return R.ok(this.baseMapper.getPopulationTotalByAdmin(communityId)); } /** * 首页大屏统计接口 * @param communityId 社区id * @return 统计结果 */ @Override public R getScreenIndex(Long communityId){ //创建统计返回参数 IndexStatisticsVO statisticsVO = new IndexStatisticsVO(); //查询基础数据模块 IndexBasicsStatisticsVO basicsStatisticsVO = comMngPopulationDAO.getScreenIndexByBasics(communityId); statisticsVO.setBasicsStatistics(basicsStatisticsVO); //查询实有人口统计模块 IndexPopulationStatisticsVO populationStatisticsVO = new IndexPopulationStatisticsVO(); //查询实有人口性别统计 List<IndexPopulationSexStatisticsVO> sexPopulationList = comMngPopulationDAO.getScreenIndexByPopulationSex(communityId); populationStatisticsVO.setSexPopulationList(sexPopulationList); //查询实有人口年龄统计 List<ComMngPopulationDO> populationDOList = comMngPopulationDAO.selectList(new QueryWrapper<ComMngPopulationDO>().lambda() .eq(ComMngPopulationDO::getActId,communityId)); List<IndexPopulationAgeStatisticsVO> agePopulationList = statisticsAge(populationDOList); populationStatisticsVO.setAgePopulationList(agePopulationList); statisticsVO.setPopulationStatisticsVO(populationStatisticsVO); //查询实有人口实时治理信息 List<IndexEventListStatisticsVO> eventListStatisticsList = comMngPopulationDAO.getScreenIndexByEventList(communityId); statisticsVO.setEventListStatisticsList(eventListStatisticsList); //查询社区治理动态信息 IndexDynamicStatisticsVO dynamicStatisticsVO = comMngPopulationDAO.getScreenIndexByDynamic(communityId); dynamicStatisticsVO.setCultureActivityTotal(dynamicStatisticsVO.getPbTotal() + dynamicStatisticsVO.getActTotal()); statisticsVO.setDynamicStatisticsVO(dynamicStatisticsVO); //查询网格化治理 IndexEventGridStatisticsVO eventGridStatisticsVO = new IndexEventGridStatisticsVO(); List<IndexGridStatisticsVO> gridStatisticsList = new ArrayList<>(); //查询网格化事件数据 IndexGridEventStatisticsVO gridEventStatistics = comMngPopulationDAO.getGridEventStatisticsList(communityId); eventGridStatisticsVO.setGridEventStatisticsList(gridEventStatistics); //查询网格数据 List<EventGridDataVO> gridDataList = comMngPopulationDAO.getGridDataListByCommunityId(communityId); if(!gridDataList.isEmpty()){ gridDataList.forEach(gridData -> { if(gridData != null){ IndexGridStatisticsVO gridStatisticsVO = new IndexGridStatisticsVO(); gridStatisticsVO.setEventData(gridData.getGridName()); //根据网格id查询网格事件列表 IndexGridEventStatisticsVO gridEventList = comMngPopulationDAO.getGridEventByGirdId(gridData.getId()); gridStatisticsVO.setGridEventStatisticsList(gridEventList); gridStatisticsList.add(gridStatisticsVO); } }); } eventGridStatisticsVO.setGridStatisticsList(gridStatisticsList); statisticsVO.setEventGridStatisticsVO(eventGridStatisticsVO); //查询党建数据 BigScreenStatisticPartyBuild statisticPartyBuild = bigScreenDAO.partybuild(communityId); statisticsVO.setStatisticPartyBuild(statisticPartyBuild); //查询特殊人群统计 List<IndexSpecialStatisticsVO> specialStatisticsVOList = new ArrayList<>(); //查询特殊人群标签列表 List<ComMngUserTagVO> userTagList = comMngPopulationDAO.getUserTagListByCommunityId(communityId); IndexSpecialStatisticsVO otherSpecialVO = new IndexSpecialStatisticsVO(); otherSpecialVO.setTitle("其他"); otherSpecialVO.setSum(0); if(!userTagList.isEmpty()){ userTagList.forEach(userTag -> { if(userTag != null){ if(userTag.getSysFlag().equals(0)){ Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName()); otherSpecialVO.setSum(otherSpecialVO.getSum() + count); }else{ IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO(); specialStatisticsVO.setTitle(userTag.getTagName()); Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName()); specialStatisticsVO.setSum(count); specialStatisticsVOList.add(specialStatisticsVO); } } }); } specialStatisticsVOList.add(otherSpecialVO); statisticsVO.setSpecialStatisticsVOList(specialStatisticsVOList); return R.ok(statisticsVO); } private List<IndexPopulationAgeStatisticsVO> statisticsAge(List<ComMngPopulationDO> populationDOList){ List<IndexPopulationAgeStatisticsVO> agePopulationList = new ArrayList<>(); IndexPopulationAgeStatisticsVO ageStatisticsVO1 = new IndexPopulationAgeStatisticsVO(); IndexPopulationAgeStatisticsVO ageStatisticsVO2 = new IndexPopulationAgeStatisticsVO(); IndexPopulationAgeStatisticsVO ageStatisticsVO3 = new IndexPopulationAgeStatisticsVO(); IndexPopulationAgeStatisticsVO ageStatisticsVO4 = new IndexPopulationAgeStatisticsVO(); IndexPopulationAgeStatisticsVO ageStatisticsVO5 = new IndexPopulationAgeStatisticsVO(); IndexPopulationAgeStatisticsVO ageStatisticsVO6 = new IndexPopulationAgeStatisticsVO(); ageStatisticsVO1.setType(1); ageStatisticsVO2.setType(2); ageStatisticsVO3.setType(3); ageStatisticsVO4.setType(4); ageStatisticsVO5.setType(5); ageStatisticsVO6.setType(6); if(populationDOList.isEmpty()){ ageStatisticsVO1.setSum(0); ageStatisticsVO2.setSum(0); ageStatisticsVO3.setSum(0); ageStatisticsVO4.setSum(0); ageStatisticsVO5.setSum(0); ageStatisticsVO6.setSum(0); }else{ populationDOList.forEach(population -> { Integer age = IdcardUtil.getAgeByIdCard(population.getCardNoStr()); if(age >= 0 && age < 16){ ageStatisticsVO1.setSum(ageStatisticsVO1.getSum() + 1); }else if(age >= 16 && age < 27){ ageStatisticsVO2.setSum(ageStatisticsVO2.getSum() + 1); }else if(age >= 27 && age < 35){ ageStatisticsVO3.setSum(ageStatisticsVO3.getSum() + 1); }else if(age >= 35 && age < 45){ ageStatisticsVO4.setSum(ageStatisticsVO4.getSum() + 1); }else if(age >= 45 && age < 55){ ageStatisticsVO5.setSum(ageStatisticsVO5.getSum() + 1); }else if(age >= 55){ ageStatisticsVO6.setSum(ageStatisticsVO6.getSum() + 1); } }); } agePopulationList.add(ageStatisticsVO1); agePopulationList.add(ageStatisticsVO2); agePopulationList.add(ageStatisticsVO3); agePopulationList.add(ageStatisticsVO4); agePopulationList.add(ageStatisticsVO5); agePopulationList.add(ageStatisticsVO6); return agePopulationList; } /** * 事件大屏统计接口 * @param communityId 社区id * @return 统计结果 */ @Override public R getScreenEvent(Long communityId){ //创建统计返回参数 EventStatisticsVO statisticsVO = new EventStatisticsVO(); //查询页面左边数据 EventLeftStatisticsVO leftStatisticsVO = new EventLeftStatisticsVO(); //查询左上数据 EventLeftTopStatisticsVO leftTopStatisticsVO = this.baseMapper.getEventScreenLeftTop(communityId); //查询时间频发月份 List<Integer> monthList = this.baseMapper.getFrequentlyEventMonth(communityId); leftTopStatisticsVO.setOftenMonth(monthList); leftStatisticsVO.setLeftTopStatisticsVO(leftTopStatisticsVO); //查询左下数据 EventLeftDownStatisticsVO leftDownStatisticsVO = this.baseMapper.getEventScreenLeftDown(communityId); leftStatisticsVO.setLeftDownStatisticsVO(leftDownStatisticsVO); statisticsVO.setLeftStatisticsVO(leftStatisticsVO); //查询事件播报模块数据 EventNewStatisticsVO newStatisticsVO = this.baseMapper.getEventScreenRightTop(communityId); //查询事件资源文件 List<EventResourceDO> eventResourceDOList = eventResourceService.getBaseMapper().selectList(new LambdaQueryWrapper<EventResourceDO>() .eq(EventResourceDO::getClassification, 1) .eq(EventResourceDO::getRefId, newStatisticsVO.getId()) ); List<EventResourceVO> picList = new ArrayList<>(); List<EventResourceVO> audioList = new ArrayList<>(); List<EventResourceVO> videoList = new ArrayList<>(); eventResourceDOList.forEach(eventResourceDO -> { switch (eventResourceDO.getType()) { case 1: EventResourceVO picEventResourceVO = new EventResourceVO(); BeanUtils.copyProperties(eventResourceDO, picEventResourceVO); picList.add(picEventResourceVO); break; case 2: EventResourceVO audioResourceVO = new EventResourceVO(); BeanUtils.copyProperties(eventResourceDO, audioResourceVO); audioList.add(audioResourceVO); break; case 3: EventResourceVO videoResourceVO = new EventResourceVO(); BeanUtils.copyProperties(eventResourceDO, videoResourceVO); videoList.add(videoResourceVO); break; } }); newStatisticsVO.setAudios(audioList); newStatisticsVO.setPics(picList); newStatisticsVO.setVideos(videoList); statisticsVO.setNewStatisticsVO(newStatisticsVO); //查询网格数据 List<EventGridStatisticsVO> gridStatisticsList = this.baseMapper.getEventScreenGridData(communityId); statisticsVO.setGridStatisticsList(gridStatisticsList); //查询社区事件列表 List<EventGridIncidentStatisticsVO> gridIncidentList = this.baseMapper.getEventScreenEventList(communityId); statisticsVO.setGridIncidentList(gridIncidentList); return R.ok(statisticsVO); } /** * 民生大屏统计接口 * @param communityId 社区id * @return 统计结果 */ @Override public R getScreenCivil(Long communityId){ //创建统计返回参数 CivilStatisticsVO civilStatisticsVO = new CivilStatisticsVO(); //查询特殊人群统计 List<IndexSpecialStatisticsVO> specialStatisticsVOList = new ArrayList<>(); //查询特殊人群标签列表 List<ComMngUserTagVO> userTagList = comMngPopulationDAO.getUserTagListByCommunityId(communityId); IndexSpecialStatisticsVO otherSpecialVO = new IndexSpecialStatisticsVO(); otherSpecialVO.setTitle("其他"); otherSpecialVO.setSum(0); if(!userTagList.isEmpty()){ userTagList.forEach(userTag -> { if(userTag != null){ if(userTag.getSysFlag().equals(0)){ Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName()); otherSpecialVO.setSum(otherSpecialVO.getSum() + count); }else{ IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO(); specialStatisticsVO.setTitle(userTag.getTagName()); Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName()); specialStatisticsVO.setSum(count); specialStatisticsVOList.add(specialStatisticsVO); } } }); } //计算特殊人群总数 specialStatisticsVOList.add(otherSpecialVO); Integer specialNum = 0; if(!specialStatisticsVOList.isEmpty()){ for (IndexSpecialStatisticsVO special:specialStatisticsVOList) { specialNum += special.getSum(); } } civilStatisticsVO.setSpecialNum(specialNum); civilStatisticsVO.setSpecialStatisticsList(specialStatisticsVOList); //计算环比上月增长率 BigDecimal rate = BigDecimal.ZERO; CivilPopulationStatisticsVO populationStatisticsVO = this.baseMapper.getCivilScreenPopulation(communityId,DateUtils.getFirstDayOfMonth()); if(populationStatisticsVO != null){ if(populationStatisticsVO.getToMonthSpecialTotal().equals(0)){ rate = BigDecimal.valueOf(100); }else{ rate = BigDecimal.valueOf(populationStatisticsVO.getSpecialTotal() - populationStatisticsVO.getToMonthSpecialTotal()).divide(BigDecimal.valueOf(populationStatisticsVO.getToMonthSpecialTotal()),3,BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100)); } } civilStatisticsVO.setRate(rate); //查询网格数据 List<EventGridStatisticsVO> gridStatisticsList = this.baseMapper.getEventScreenGridData(communityId); civilStatisticsVO.setGridStatisticsList(gridStatisticsList); //查询小区列表 List<CivilVillageStatisticsVO> villageStatisticsList = this.baseMapper.getCivilScreenVillageList(communityId); civilStatisticsVO.setVillageStatisticsList(villageStatisticsList); return R.ok(civilStatisticsVO); } public static void main(String[] args) { // List<ComMngPopulationHouseUserDO> distinctClass = populationHouseUserDOList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(o -> o.getPopulId() + ";" + o.getHouseId() + ";" + o.getId() + ";" + o.getRelation()))), ArrayList::new)); springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/EventResourceServiceImpl.java
New file @@ -0,0 +1,21 @@ package com.panzhihua.service_community.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.panzhihua.service_community.dao.EventResourceMapper; import com.panzhihua.service_community.model.dos.EventResourceDO; import com.panzhihua.service_community.service.EventResourceService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; /** * @auther lyq * @create 2021-04-14 15:03:01 * @describe 订单表服务实现类 */ @Slf4j @Service public class EventResourceServiceImpl extends ServiceImpl<EventResourceMapper, EventResourceDO> implements EventResourceService { } springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbMemberDAO.java
@@ -62,6 +62,9 @@ "<if test='pagePartyOrganizationVO.orgName != null and pagePartyOrganizationVO.orgName != ""'>" + "and o.name like concat(#{pagePartyOrganizationVO.orgName},'%') "+ " </if> " + "<if test='pagePartyOrganizationVO.orgId != null'>" + " and o.id = #{pagePartyOrganizationVO.orgId} "+ " </if> " + "<if test='pagePartyOrganizationVO.account != null and pagePartyOrganizationVO.account != ""'>" + "and u.phone like concat (#{pagePartyOrganizationVO.account},'%')"+ " </if> " + springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.java
@@ -79,6 +79,7 @@ boolean wxPay = requestURI.contains("wxNotify"); boolean wxCgi = requestURI.contains("cgi"); boolean isShop = requestURI.contains("isShop"); boolean noToken = requestURI.contains("noToken"); boolean listadvertisement = requestURI.contains("listadvertisement"); // boolean pageworkguide = !requestURI.contains("workguide/pageworkguide"); // boolean detailworkguide = !requestURI.contains("workguide/detailworkguide"); @@ -86,7 +87,7 @@ // boolean infodynamic = !requestURI.contains("partybuilding/infodynamic"); SafeboxRequestWrapper safeboxRequestWrapper = new SafeboxRequestWrapper(request); if (login||doc||css||js||ui||swagger||ico||docs||error||refreshToken||useragreement||wxPay ||wxCgi||isShop||listadvertisement) { ||wxCgi||isShop||listadvertisement||noToken) { //什么也不做 } else { // 获取请求头中JWT的Token springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/SercuritFilter.java
@@ -79,13 +79,14 @@ boolean wxCgi = !requestUrl.contains("cgi"); boolean isShop = !requestUrl.contains("isShop"); boolean refreshToken = !requestUrl.contains("refreshToken"); boolean noToken = !requestUrl.contains("noToken"); boolean useragreement = !requestUrl.contains("useragreement"); boolean listadvertisement = !requestUrl.contains("listadvertisement"); // boolean pageworkguide = !requestUrl.contains("applets/workguide/pageworkguide"); // boolean detailworkguide = !requestUrl.contains("applets/workguide/detailworkguide"); // boolean pagedynamic = !requestUrl.contains("applets/partybuilding/pagedynamic"); // boolean infodynamic = !requestUrl.contains("applets/partybuilding/infodynamic"); if (contains&&docs&&login&&refreshToken&&useragreement&&wxNotify&&wxCgi&&isShop&&listadvertisement if (contains&&docs&&login&&refreshToken&&useragreement&&wxNotify&&wxCgi&&isShop&&listadvertisement&&noToken ) { configAttributes.add(new SecurityConfig(SecurityConstants.ROLE_APPLETS)); }