New file |
| | |
| | | package com.panzhihua.common.model.dtos.partybuilding; |
| | | |
| | | import com.panzhihua.common.model.vos.partybuilding.PhotoMicroWishData; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class AllData |
| | | { |
| | | @ApiModelProperty(value = "议事投票数量") |
| | | int discussNum=0; |
| | | |
| | | @ApiModelProperty(value = "问卷调查数量") |
| | | int questnaireNum=0; |
| | | |
| | | @ApiModelProperty(value = "社区动态数量") |
| | | int nommunityDynNum=0; |
| | | |
| | | @ApiModelProperty(value = "社区活动数量") |
| | | int nommunityActNum=0; |
| | | |
| | | //议事投票 |
| | | @ApiModelProperty(value = "议事投票") |
| | | List<PhotoMicroWishData> discussList; |
| | | //问卷调查 |
| | | @ApiModelProperty(value = "问卷调查") |
| | | List<PhotoMicroWishData> questnaireNumList; |
| | | //社区动态 |
| | | @ApiModelProperty(value = "社区动态") |
| | | List<PhotoMicroWishData> nommunityDynNumList; |
| | | //社区活动 |
| | | @ApiModelProperty(value = "社区活动") |
| | | List<PhotoMicroWishData> nommunityActNumList; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.partybuilding; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 社区表 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-12-07 14:12 |
| | | **/ |
| | | @Data |
| | | public class ComActDTO implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * community_id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private String communityId; |
| | | |
| | | /** |
| | | * 社区名字 |
| | | */ |
| | | @ApiModelProperty(value = "社区名字") |
| | | private String name; |
| | | |
| | | /** |
| | | * 社区地址 |
| | | */ |
| | | @ApiModelProperty(value = "社区地址") |
| | | private String address; |
| | | |
| | | /** |
| | | * 经度 |
| | | */ |
| | | @ApiModelProperty(value = "经度") |
| | | private String lng; |
| | | |
| | | /** |
| | | * 维度 |
| | | */ |
| | | @ApiModelProperty(value = "维度") |
| | | private String lat; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 省份地址编码 |
| | | */ |
| | | @ApiModelProperty(value = "省份地址编码") |
| | | private String provinceCode; |
| | | |
| | | /** |
| | | * 市级地址编码 |
| | | */ |
| | | @ApiModelProperty(value = "经度") |
| | | private String cityCode; |
| | | |
| | | /** |
| | | * 区级地址编码 |
| | | */ |
| | | @ApiModelProperty(value = "区级地址编码") |
| | | private String areaCode; |
| | | |
| | | /** |
| | | * 社区面积 |
| | | */ |
| | | @ApiModelProperty(value = "社区面积") |
| | | private String square; |
| | | |
| | | /** |
| | | * 联系人 |
| | | */ |
| | | @ApiModelProperty(value = "联系人") |
| | | private String contacts; |
| | | |
| | | /** |
| | | * 联系人电话 |
| | | */ |
| | | @ApiModelProperty(value = "联系人电话") |
| | | private String contactsPhone; |
| | | |
| | | /** 社区总人口 */ |
| | | @ApiModelProperty(value = "社区总人口") |
| | | private String totalUser; |
| | | /** 社区书记-用户ID */ |
| | | @ApiModelProperty(value = "社区书记-用户ID") |
| | | private String managerId; |
| | | /** 社区书记_名称 */ |
| | | @ApiModelProperty(value = "社区书记_名称") |
| | | private String managerName; |
| | | /** 社区介绍 */ |
| | | @ApiModelProperty(value = "社区介绍") |
| | | private String introduce; |
| | | /** 层次递归字段(省>市>区县>街道>社区) */ |
| | | @ApiModelProperty(value = "层次递归字段(省>市>区县>街道>社区)") |
| | | private String path; |
| | | /** |
| | | * 超管账号 |
| | | */ |
| | | @ApiModelProperty(value = "超管账号") |
| | | private String account; |
| | | |
| | | /** |
| | | * 账号密码 |
| | | */ |
| | | @ApiModelProperty(value = "账号密码") |
| | | private String password; |
| | | |
| | | /** |
| | | * 状态 0 启用 1 禁用 |
| | | */ |
| | | @ApiModelProperty(value = "状态 0 启用 1 禁用") |
| | | private String state; |
| | | |
| | | /** |
| | | * 街道ID |
| | | */ |
| | | @ApiModelProperty(value = "街道ID") |
| | | private String streetId; |
| | | |
| | | /** |
| | | * 明文密码 |
| | | */ |
| | | @ApiModelProperty(value = "明文密码") |
| | | private String plaintextPassword; |
| | | |
| | | |
| | | @ApiModelProperty(value = "经度") |
| | | private String appId; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.partybuilding; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | public class DoubleRegistrationData implements Serializable |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | //报道需求统计数 |
| | | @ApiModelProperty(value = "报道需求") |
| | | private Integer NeedNum=0; |
| | | |
| | | //报道问题 |
| | | @ApiModelProperty(value = "报道问题") |
| | | private Integer ProblemNum=0; |
| | | |
| | | //获取旧双报道服务时间 |
| | | @ApiModelProperty(value = "报道服务时间") |
| | | private Double times=0.0; |
| | | |
| | | //党建动态数据 |
| | | @ApiModelProperty(value = "党建动态数据") |
| | | private Integer PartyBuildingNum=0; |
| | | |
| | | //报到单位总计数据 |
| | | @ApiModelProperty(value = "报到单位总计数据") |
| | | private Integer UnitNum=0; |
| | | |
| | | //报到党员总计数据 |
| | | @ApiModelProperty(value = "报到党员总计数据") |
| | | private Integer MemberNum=0; |
| | | |
| | | @ApiModelProperty(value = "报到服务次数") |
| | | private Integer allNum=0; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.partybuilding; |
| | | |
| | | import com.panzhihua.common.model.vos.partybuilding.PhotoMicroWishData; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("街道大屏随手拍-微心愿") |
| | | public class PhotoMicroWish |
| | | { |
| | | |
| | | @ApiModelProperty(value = "随手拍数量") |
| | | int photoNum=0; |
| | | |
| | | @ApiModelProperty(value = "微心愿数量") |
| | | int microWishNum=0; |
| | | |
| | | @ApiModelProperty(value = "随手拍") |
| | | List<PhotoMicroWishData> photoList; |
| | | |
| | | @ApiModelProperty(value = "微心愿") |
| | | List<PhotoMicroWishData> microWishList; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.partybuilding; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * |
| | | * 街道大屏核心数据 |
| | | */ |
| | | @Data |
| | | public class StreetCoreData implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "小程序用户") |
| | | private int userNum=0; |
| | | |
| | | @ApiModelProperty(value = "实有人口总数") |
| | | private int ActualPopNum=0; |
| | | |
| | | @ApiModelProperty(value = "小区总数") |
| | | private int VillageNum=0; |
| | | |
| | | @ApiModelProperty(value = "志愿者总数") |
| | | private int VolunteerNum=0; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.partybuilding; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * 街道大屏三资三务数据 |
| | | */ |
| | | @Data |
| | | public class ThreeNumData implements Serializable |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "党务公开") |
| | | private int partyAffairsNum=0; |
| | | |
| | | @ApiModelProperty(value = "服务公开") |
| | | private int serviceNum=0; |
| | | |
| | | @ApiModelProperty(value = "财务公开") |
| | | private int financeNum=0; |
| | | |
| | | @ApiModelProperty(value = "资金公开") |
| | | private int fundNum=0; |
| | | |
| | | @ApiModelProperty(value = "资产公开") |
| | | private int propertyNum=0; |
| | | |
| | | |
| | | @ApiModelProperty(value = "资源公开") |
| | | private int naturalResourcesNum=0; |
| | | |
| | | @ApiModelProperty(value = "村集体经济组织项目") |
| | | private int villageEconomyNum=0; |
| | | |
| | | |
| | | @ApiModelProperty(value = "三务总数量") |
| | | private int threeServiceNum=0; |
| | | |
| | | |
| | | @ApiModelProperty(value = "三资总数量") |
| | | private int threeFundNum=0; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.partybuilding; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @ApiModel("街道大屏子类") |
| | | @Data |
| | | public class PhotoMicroWishData |
| | | { |
| | | @ApiModelProperty(value = "数量") |
| | | Integer num=0; |
| | | |
| | | |
| | | @ApiModelProperty(value = "时间") |
| | | String tiems; |
| | | |
| | | @ApiModelProperty(value = "排序时间") |
| | | Date createAt; |
| | | } |
| | |
| | | public R taskTimedGetListTime(); |
| | | |
| | | |
| | | /****************************************************************************************************************** |
| | | * |
| | | * 街道大屏 |
| | | * |
| | | *****************************************************************************************************************/ |
| | | |
| | | |
| | | @GetMapping("/StreetBigScreen/getCommunityId") |
| | | public R getCommunityId(@RequestParam("streetId") String streetId); |
| | | |
| | | |
| | | /** |
| | | * 获取核心指标数据 |
| | | * @param streetId |
| | | * @return |
| | | */ |
| | | @GetMapping("/StreetBigScreen/getCoreData") |
| | | public R getCoreData(@RequestParam(value = "streetId", required = false) String streetId, |
| | | @RequestParam(value = "communityId", required = false)String communityId, |
| | | @RequestParam(value = "type", required = false)String type, |
| | | @RequestParam(value = "starTime", required = false)String starTime, |
| | | @RequestParam(value = "endTime", required = false)String endTime); |
| | | |
| | | |
| | | /** |
| | | * 获取三务三资数据 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param type |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | @GetMapping("/StreetBigScreen/getThreeNum") |
| | | public R getThreeNum(@RequestParam(value = "streetId", required = false) String streetId, |
| | | @RequestParam(value = "communityId", required = false)String communityId, |
| | | @RequestParam(value = "type", required = false)String type, |
| | | @RequestParam(value = "starTime", required = false)String starTime, |
| | | @RequestParam(value = "endTime", required = false)String endTime); |
| | | |
| | | |
| | | |
| | | /** |
| | | * 双报到双服务 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param type |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | @GetMapping("/StreetBigScreen/getDoubleRegistration") |
| | | public R getDoubleRegistration(@RequestParam(value = "streetId", required = false) String streetId, |
| | | @RequestParam(value = "communityId", required = false)String communityId, |
| | | @RequestParam(value = "type", required = false)String type, |
| | | @RequestParam(value = "starTime", required = false)String starTime, |
| | | @RequestParam(value = "endTime", required = false)String endTime); |
| | | |
| | | /** |
| | | * 随手拍 微心愿 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param type |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | @GetMapping("/StreetBigScreen/getPhotoMicroWish") |
| | | public R getPhotoMicroWish(@RequestParam(value = "streetId", required = false) String streetId, |
| | | @RequestParam(value = "communityId", required = false)String communityId, |
| | | @RequestParam(value = "type", required = false)String type, |
| | | @RequestParam(value = "starTime", required = false)String starTime, |
| | | @RequestParam(value = "endTime", required = false)String endTime); |
| | | |
| | | |
| | | |
| | | /** |
| | | * 社区活动、议事投票、问卷调查、社区动态发布趋势 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param type |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | @GetMapping("/StreetBigScreen/getAllData") |
| | | public R getAllData(@RequestParam(value = "streetId", required = false) String streetId, |
| | | @RequestParam(value = "communityId", required = false)String communityId, |
| | | @RequestParam(value = "type", required = false)String type, |
| | | @RequestParam(value = "starTime", required = false)String starTime, |
| | | @RequestParam(value = "endTime", required = false)String endTime); |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.partybuilding.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.partybuilding.NewStriveForFeign; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | 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; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 街道大屏 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-12-24 09:19 |
| | | **/ |
| | | @Api(tags = {"街道大屏"}) |
| | | @RestController |
| | | @RequestMapping("/StreetBig/") |
| | | public class StreetBigApi |
| | | { |
| | | @Resource |
| | | private NewStriveForFeign newStriveForFeign; |
| | | |
| | | |
| | | @GetMapping("/getCommunityId") |
| | | public R getCommunityId(@RequestParam("streetId") String streetId) |
| | | { |
| | | return newStriveForFeign.getCommunityId(streetId); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取核心指标数据 |
| | | * @param streetId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "获取核心指标数据", response = StreetCoreData.class) |
| | | @GetMapping("/getCoreData") |
| | | public R getCoreData(@RequestParam(value = "streetId", required = false) String streetId, |
| | | @RequestParam(value = "communityId", required = false)String communityId, |
| | | @RequestParam(value = "type", required = false)String type, |
| | | @RequestParam(value = "starTime", required = false)String starTime, |
| | | @RequestParam(value = "endTime", required = false)String endTime) |
| | | { |
| | | return newStriveForFeign.getCoreData(streetId,communityId,type,starTime,endTime); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取三务三资数据 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param type |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "获取三务三资数据", response = ThreeNumData.class) |
| | | @GetMapping("/getThreeNum") |
| | | public R getThreeNum(@RequestParam(value = "streetId", required = false) String streetId, |
| | | @RequestParam(value = "communityId", required = false)String communityId, |
| | | @RequestParam(value = "type", required = false)String type, |
| | | @RequestParam(value = "starTime", required = false)String starTime, |
| | | @RequestParam(value = "endTime", required = false)String endTime) |
| | | { |
| | | return newStriveForFeign.getThreeNum(streetId,communityId,type,starTime,endTime); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 双报到双服务 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param type |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "双报到双服务", response = DoubleRegistrationData.class) |
| | | @GetMapping("/getDoubleRegistration") |
| | | public R getDoubleRegistration(@RequestParam(value = "streetId", required = false) String streetId, |
| | | @RequestParam(value = "communityId", required = false)String communityId, |
| | | @RequestParam(value = "type", required = false)String type, |
| | | @RequestParam(value = "starTime", required = false)String starTime, |
| | | @RequestParam(value = "endTime", required = false)String endTime) |
| | | { |
| | | return newStriveForFeign.getDoubleRegistration(streetId,communityId,type,starTime,endTime); |
| | | } |
| | | |
| | | /** |
| | | * 随手拍 微心愿 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param type |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "随手拍 微心愿", response = PhotoMicroWish.class) |
| | | @GetMapping("/getPhotoMicroWish") |
| | | public R getPhotoMicroWish(@RequestParam(value = "streetId", required = false) String streetId, |
| | | @RequestParam(value = "communityId", required = false)String communityId, |
| | | @RequestParam(value = "type", required = false)String type, |
| | | @RequestParam(value = "starTime", required = false)String starTime, |
| | | @RequestParam(value = "endTime", required = false)String endTime) |
| | | { |
| | | return newStriveForFeign.getPhotoMicroWish(streetId,communityId,type,starTime,endTime); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 社区活动、议事投票、问卷调查、社区动态发布趋势 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param type |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "随手拍 微心愿", response = AllData.class) |
| | | @GetMapping("/getAllData") |
| | | public R getAllData(@RequestParam(value = "streetId", required = false) String streetId, |
| | | @RequestParam(value = "communityId", required = false)String communityId, |
| | | @RequestParam(value = "type", required = false)String type, |
| | | @RequestParam(value = "starTime", required = false)String starTime, |
| | | @RequestParam(value = "endTime", required = false)String endTime) |
| | | { |
| | | return newStriveForFeign.getAllData(streetId,communityId,type,starTime,endTime); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_dangjian.api; |
| | | |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_dangjian.service.NewStriveForService; |
| | | import com.panzhihua.service_dangjian.service.StreetBigScreenService; |
| | | 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("/StreetBigScreen") |
| | | public class StreetBigScreenApi |
| | | { |
| | | |
| | | @Resource |
| | | private StreetBigScreenService streetBigScreenService; |
| | | |
| | | @GetMapping("/getCommunityId") |
| | | public R getCommunityId(@RequestParam("streetId") String streetId) |
| | | { |
| | | return R.ok(streetBigScreenService.getCommunityId(streetId)); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getCoreData") |
| | | public R getCoreData(@RequestParam(value = "streetId", required = false) String streetId, |
| | | @RequestParam(value = "communityId", required = false)String communityId, |
| | | @RequestParam(value = "type", required = false)String type, |
| | | @RequestParam(value = "starTime", required = false)String starTime, |
| | | @RequestParam(value = "endTime", required = false)String endTime) |
| | | { |
| | | return R.ok(streetBigScreenService.getCoreData(streetId,communityId,type,starTime,endTime)); |
| | | } |
| | | |
| | | @GetMapping("/getThreeNum") |
| | | public R getThreeNum(@RequestParam(value = "streetId", required = false) String streetId, |
| | | @RequestParam(value = "communityId", required = false)String communityId, |
| | | @RequestParam(value = "type", required = false)String type, |
| | | @RequestParam(value = "starTime", required = false)String starTime, |
| | | @RequestParam(value = "endTime", required = false)String endTime) |
| | | { |
| | | return R.ok(streetBigScreenService.getThreeNum(streetId,communityId,type,starTime,endTime)); |
| | | } |
| | | |
| | | |
| | | |
| | | @GetMapping("/getDoubleRegistration") |
| | | public R getDoubleRegistration(@RequestParam(value = "streetId", required = false) String streetId, |
| | | @RequestParam(value = "communityId", required = false)String communityId, |
| | | @RequestParam(value = "type", required = false)String type, |
| | | @RequestParam(value = "starTime", required = false)String starTime, |
| | | @RequestParam(value = "endTime", required = false)String endTime) |
| | | { |
| | | return R.ok(streetBigScreenService.getDoubleRegistration(streetId,communityId,type,starTime,endTime)); |
| | | } |
| | | |
| | | @GetMapping("/getPhotoMicroWish") |
| | | public R getPhotoMicroWish(@RequestParam(value = "streetId", required = false) String streetId, |
| | | @RequestParam(value = "communityId", required = false)String communityId, |
| | | @RequestParam(value = "type", required = false)String type, |
| | | @RequestParam(value = "starTime", required = false)String starTime, |
| | | @RequestParam(value = "endTime", required = false)String endTime) |
| | | { |
| | | return R.ok(streetBigScreenService.getPhotoMicroWish(streetId,communityId,type,starTime,endTime)); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getAllData") |
| | | public R getAllData(@RequestParam(value = "streetId", required = false) String streetId, |
| | | @RequestParam(value = "communityId", required = false)String communityId, |
| | | @RequestParam(value = "type", required = false)String type, |
| | | @RequestParam(value = "starTime", required = false)String starTime, |
| | | @RequestParam(value = "endTime", required = false)String endTime) |
| | | { |
| | | return R.ok(streetBigScreenService.getAllData(streetId,communityId,type,starTime,endTime)); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_dangjian.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.common.model.dtos.partybuilding.ComActDTO; |
| | | import com.panzhihua.common.model.vos.partybuilding.PhotoMicroWishData; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 党员双争双评排序 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2021-01-21 17:37 |
| | | **/ |
| | | @Mapper |
| | | public interface StreetBigScreenDAO extends BaseMapper<ComActDTO> |
| | | { |
| | | //获取街道下社区内容 |
| | | List<ComActDTO> getCommunityId(@Param("streetId") String streetId); |
| | | |
| | | /** |
| | | * 获取小程序用户数量 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | Integer getUserNum(@Param("streetId") String streetId, |
| | | @Param("communityId") String communityId, |
| | | @Param("starTime") String starTime, |
| | | @Param("endTime") String endTime); |
| | | |
| | | /** |
| | | * 获取实有人口总数 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | Integer getActualPopNum(@Param("streetId") String streetId, |
| | | @Param("communityId") String communityId, |
| | | @Param("starTime") String starTime, |
| | | @Param("endTime") String endTime); |
| | | |
| | | |
| | | /** |
| | | * 获取小区总数 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | Integer getVillageNum(@Param("streetId") String streetId, |
| | | @Param("communityId") String communityId, |
| | | @Param("starTime") String starTime, |
| | | @Param("endTime") String endTime); |
| | | |
| | | |
| | | /** |
| | | * 获取志愿者总数 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | Integer getVolunteerNum(@Param("streetId") String streetId, |
| | | @Param("communityId") String communityId, |
| | | @Param("starTime") String starTime, |
| | | @Param("endTime") String endTime); |
| | | |
| | | |
| | | /** |
| | | * 获取三资三务数据 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | Integer getThreeNum(@Param("streetId") String streetId, |
| | | @Param("communityId") String communityId, |
| | | @Param("name") String name, |
| | | @Param("starTime") String starTime, |
| | | @Param("endTime") String endTime); |
| | | |
| | | |
| | | /** |
| | | * 旧的报道需求问题统计数 |
| | | * @param belongType |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | Integer getOleNeedProblemNum(@Param("belongType") String belongType, |
| | | @Param("streetId") String streetId, |
| | | @Param("communityId") String communityId, |
| | | @Param("starTime") String starTime, |
| | | @Param("endTime") String endTime); |
| | | |
| | | |
| | | /** |
| | | * 旧的报道需求问题统计数 |
| | | * @param kind |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | Integer getNewNeedProblemNum(@Param("kind") String kind, |
| | | @Param("streetId") String streetId, |
| | | @Param("communityId") String communityId, |
| | | @Param("starTime") String starTime, |
| | | @Param("endTime") String endTime); |
| | | |
| | | |
| | | /** |
| | | * 获取旧双报道服务时间 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | Double getOldTime(@Param("streetId") String streetId, |
| | | @Param("communityId") String communityId, |
| | | @Param("starTime") String starTime, |
| | | @Param("endTime") String endTime); |
| | | |
| | | |
| | | /** |
| | | * 获取新双报道服务时间 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | Double getNewTime(@Param("streetId") String streetId, |
| | | @Param("communityId") String communityId, |
| | | @Param("starTime") String starTime, |
| | | @Param("endTime") String endTime); |
| | | |
| | | |
| | | /** |
| | | * 党建动态数据 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | Integer getPartyBuildingNum(@Param("streetId") String streetId, |
| | | @Param("communityId") String communityId, |
| | | @Param("starTime") String starTime, |
| | | @Param("endTime") String endTime); |
| | | |
| | | |
| | | /** |
| | | * 报到单位总计数据 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | Integer getUnitNum(@Param("streetId") String streetId, |
| | | @Param("communityId") String communityId, |
| | | @Param("starTime") String starTime, |
| | | @Param("endTime") String endTime); |
| | | |
| | | /** |
| | | * 报到党员总计数据 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | Integer getMemberNum(@Param("streetId") String streetId, |
| | | @Param("communityId") String communityId, |
| | | @Param("starTime") String starTime, |
| | | @Param("endTime") String endTime); |
| | | |
| | | |
| | | /** |
| | | * 街道大屏随手拍-微心愿 1随手拍 2微心愿 |
| | | * @param timeType |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | List<PhotoMicroWishData> getPhotoMicroWishData(@Param("type") String type, |
| | | @Param("timeType") String timeType, |
| | | @Param("streetId") String streetId, |
| | | @Param("communityId") String communityId, |
| | | @Param("starTime") String starTime, |
| | | @Param("endTime") String endTime); |
| | | |
| | | /** |
| | | * 街道大屏随手拍 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | Integer getPhotoAllNum(@Param("streetId") String streetId, |
| | | @Param("communityId") String communityId, |
| | | @Param("starTime") String starTime, |
| | | @Param("endTime") String endTime); |
| | | |
| | | |
| | | /** |
| | | * 街道大屏微心愿 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | Integer getMicroWishAllNum(@Param("streetId") String streetId, |
| | | @Param("communityId") String communityId, |
| | | @Param("starTime") String starTime, |
| | | @Param("endTime") String endTime); |
| | | |
| | | |
| | | |
| | | /** |
| | | * 社区活动统计 |
| | | * @param timeType |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | List<PhotoMicroWishData> getNommunityActNumList(@Param("timeType") String timeType, |
| | | @Param("streetId") String streetId, |
| | | @Param("communityId") String communityId, |
| | | @Param("starTime") String starTime, |
| | | @Param("endTime") String endTime); |
| | | |
| | | |
| | | /** |
| | | * 社区动态 |
| | | * @param timeType |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | List<PhotoMicroWishData> getNommunityDynNumList(@Param("timeType") String timeType, |
| | | @Param("streetId") String streetId, |
| | | @Param("communityId") String communityId, |
| | | @Param("starTime") String starTime, |
| | | @Param("endTime") String endTime); |
| | | |
| | | /** |
| | | * 问卷调查 |
| | | * @param timeType |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | List<PhotoMicroWishData> getQuestnaireNumList(@Param("timeType") String timeType, |
| | | @Param("streetId") String streetId, |
| | | @Param("communityId") String communityId, |
| | | @Param("starTime") String starTime, |
| | | @Param("endTime") String endTime); |
| | | |
| | | /** |
| | | * 议事投票 |
| | | * @param timeType |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | List<PhotoMicroWishData> getDiscussNumList(@Param("timeType") String timeType, |
| | | @Param("streetId") String streetId, |
| | | @Param("communityId") String communityId, |
| | | @Param("starTime") String starTime, |
| | | @Param("endTime") String endTime); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 社区活动统计 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | Integer getNommunityActNum(@Param("streetId") String streetId, |
| | | @Param("communityId") String communityId, |
| | | @Param("starTime") String starTime, |
| | | @Param("endTime") String endTime); |
| | | |
| | | |
| | | /** |
| | | * 社区动态 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | Integer getNommunityDynNum(@Param("streetId") String streetId, |
| | | @Param("communityId") String communityId, |
| | | @Param("starTime") String starTime, |
| | | @Param("endTime") String endTime); |
| | | |
| | | /** |
| | | * 问卷调查 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | Integer getQuestnaireNum(@Param("streetId") String streetId, |
| | | @Param("communityId") String communityId, |
| | | @Param("starTime") String starTime, |
| | | @Param("endTime") String endTime); |
| | | |
| | | /** |
| | | * 议事投票 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | Integer getDiscussNum(@Param("streetId") String streetId, |
| | | @Param("communityId") String communityId, |
| | | @Param("starTime") String starTime, |
| | | @Param("endTime") String endTime); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_dangjian.service; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 党组织 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-11-30 11:39 |
| | | **/ |
| | | public interface StreetBigScreenService |
| | | { |
| | | //获取街道下社区内容 |
| | | R getCommunityId(String streetId); |
| | | |
| | | R getCoreData(String streetId,String communityId,String type,String starTime,String endTime); |
| | | |
| | | R getThreeNum(String streetId,String communityId,String type,String starTime,String endTime); |
| | | |
| | | R getDoubleRegistration(String streetId,String communityId,String type,String starTime,String endTime); |
| | | |
| | | R getPhotoMicroWish(String streetId,String communityId,String type,String starTime,String endTime); |
| | | |
| | | R getAllData(String streetId,String communityId,String type,String starTime,String endTime); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_dangjian.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.partybuilding.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.partybuilding.PhotoMicroWishData; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_dangjian.dao.StreetBigScreenDAO; |
| | | import com.panzhihua.service_dangjian.service.StreetBigScreenService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.time.temporal.TemporalAdjusters; |
| | | import java.util.ArrayList; |
| | | import java.util.Calendar; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 党组织 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-11-30 11:40 |
| | | **/ |
| | | @Service |
| | | public class StreetBigScreenServiceImpl extends ServiceImpl<StreetBigScreenDAO, ComActDTO> |
| | | implements StreetBigScreenService |
| | | { |
| | | |
| | | |
| | | @Override |
| | | public R getCommunityId(String streetId) |
| | | { |
| | | if(StringUtils.isEmpty(streetId)) |
| | | { |
| | | return R.fail("街道id不能为空"); |
| | | } |
| | | return R.ok(baseMapper.getCommunityId(streetId)); |
| | | } |
| | | |
| | | /** |
| | | * 获取核心指标数据 |
| | | * @param streetId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getCoreData(String streetId,String communityId,String type,String starTime,String endTime) |
| | | { |
| | | if(StringUtils.isEmpty(streetId) && StringUtils.isEmpty(communityId) ) |
| | | { |
| | | return R.fail("街道id或社区id不能为空"); |
| | | } |
| | | |
| | | //获取小程序用户数量 |
| | | int userNum=0; |
| | | //获取实有人口总数 |
| | | int ActualPopNum=0; |
| | | //获取小区总数 |
| | | int VillageNum=0; |
| | | //获取志愿者总数 |
| | | int VolunteerNum=0; |
| | | |
| | | if(StringUtils.equals(type,"1")) |
| | | { |
| | | //按年份 |
| | | int year=Calendar.getInstance().get(Calendar.YEAR); |
| | | //获取小程序用户数量 |
| | | userNum= baseMapper.getUserNum(streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | //获取实有人口总数 |
| | | ActualPopNum= baseMapper.getActualPopNum(streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | //获取小区总数 |
| | | VillageNum= baseMapper.getVillageNum(streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | //获取志愿者总数 |
| | | VolunteerNum= baseMapper.getVolunteerNum(streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | } |
| | | else if(StringUtils.equals(type,"2")) |
| | | { |
| | | //按月份 |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | // 获取当前月份的第一天 |
| | | String firstDayOfMonth = LocalDate.now().with(TemporalAdjusters.firstDayOfMonth()).format(formatter); |
| | | // 获取当前月份的最后一天 |
| | | String lastDayOfMonth = LocalDate.now().with(TemporalAdjusters.lastDayOfMonth()).format(formatter); |
| | | |
| | | //获取小程序用户数量 |
| | | userNum= baseMapper.getUserNum(streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | //获取实有人口总数 |
| | | ActualPopNum= baseMapper.getActualPopNum(streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | //获取小区总数 |
| | | VillageNum= baseMapper.getVillageNum(streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | //获取志愿者总数 |
| | | VolunteerNum= baseMapper.getVolunteerNum(streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | } |
| | | else if(StringUtils.equals(type,"3")) |
| | | { |
| | | //按天份 |
| | | DateTimeFormatter newformatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | String data=LocalDate.now().format(newformatter); |
| | | userNum= baseMapper.getUserNum(streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | //获取实有人口总数 |
| | | ActualPopNum= baseMapper.getActualPopNum(streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | //获取小区总数 |
| | | VillageNum= baseMapper.getVillageNum(streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | //获取志愿者总数 |
| | | VolunteerNum= baseMapper.getVolunteerNum(streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | } |
| | | else if(StringUtils.equals(type,"4")) |
| | | { |
| | | //按时间范围 |
| | | userNum= baseMapper.getUserNum(streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | //获取实有人口总数 |
| | | ActualPopNum= baseMapper.getActualPopNum(streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | //获取小区总数 |
| | | VillageNum= baseMapper.getVillageNum(streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | //获取志愿者总数 |
| | | VolunteerNum= baseMapper.getVolunteerNum(streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | } |
| | | else |
| | | { |
| | | //type为空 查全部 |
| | | userNum= baseMapper.getUserNum(streetId,communityId,null,null); |
| | | //获取实有人口总数 |
| | | ActualPopNum= baseMapper.getActualPopNum(streetId,communityId,null,null); |
| | | //获取小区总数 |
| | | VillageNum= baseMapper.getVillageNum(streetId,communityId,null,null); |
| | | //获取志愿者总数 |
| | | VolunteerNum= baseMapper.getVolunteerNum(streetId,communityId,null,null); |
| | | } |
| | | |
| | | StreetCoreData streetCoreData=new StreetCoreData(); |
| | | streetCoreData.setUserNum(userNum); |
| | | streetCoreData.setVillageNum(VillageNum); |
| | | streetCoreData.setActualPopNum(ActualPopNum); |
| | | streetCoreData.setVolunteerNum(VolunteerNum); |
| | | |
| | | return R.ok(streetCoreData); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取三务三资数据 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param type |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getThreeNum(String streetId, String communityId,String type,String starTime, String endTime) |
| | | { |
| | | if(StringUtils.isEmpty(streetId) && StringUtils.isEmpty(communityId) ) |
| | | { |
| | | return R.fail("街道id或社区id不能为空"); |
| | | } |
| | | |
| | | int partyAffairsNum=0; |
| | | int serviceNum=0; |
| | | int financeNum=0; |
| | | int fundNum=0; |
| | | int propertyNum=0; |
| | | int naturalResourcesNum=0; |
| | | int villageEconomyNum=0; |
| | | |
| | | if(StringUtils.equals(type,"1")) |
| | | { |
| | | //按年份 |
| | | int year=Calendar.getInstance().get(Calendar.YEAR); |
| | | partyAffairsNum=baseMapper.getThreeNum(streetId,communityId,"党务公开",year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | serviceNum=baseMapper.getThreeNum(streetId,communityId,"服务公开",year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | financeNum=baseMapper.getThreeNum(streetId,communityId,"财务公开",year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | fundNum=baseMapper.getThreeNum(streetId,communityId,"资金公开",year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | propertyNum=baseMapper.getThreeNum(streetId,communityId,"资产公开",year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | naturalResourcesNum=baseMapper.getThreeNum(streetId,communityId,"资源公开",year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | villageEconomyNum=baseMapper.getThreeNum(streetId,communityId,"村集体经济组织项目",year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | } |
| | | else if(StringUtils.equals(type,"2")) |
| | | { |
| | | //按月份 |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | // 获取当前月份的第一天 |
| | | String firstDayOfMonth = LocalDate.now().with(TemporalAdjusters.firstDayOfMonth()).format(formatter); |
| | | // 获取当前月份的最后一天 |
| | | String lastDayOfMonth = LocalDate.now().with(TemporalAdjusters.lastDayOfMonth()).format(formatter); |
| | | |
| | | partyAffairsNum=baseMapper.getThreeNum(streetId,communityId,"党务公开",firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | serviceNum=baseMapper.getThreeNum(streetId,communityId,"服务公开",firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | financeNum=baseMapper.getThreeNum(streetId,communityId,"财务公开",firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | fundNum=baseMapper.getThreeNum(streetId,communityId,"资金公开",firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | propertyNum=baseMapper.getThreeNum(streetId,communityId,"资产公开",firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | naturalResourcesNum=baseMapper.getThreeNum(streetId,communityId,"资源公开",firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | villageEconomyNum=baseMapper.getThreeNum(streetId,communityId,"村集体经济组织项目",firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | } |
| | | else if(StringUtils.equals(type,"3")) |
| | | { |
| | | //按天份 |
| | | DateTimeFormatter newformatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | String data=LocalDate.now().format(newformatter); |
| | | |
| | | partyAffairsNum=baseMapper.getThreeNum(streetId,communityId,"党务公开",data+" 00:00:00",data+" 23:59:59"); |
| | | serviceNum=baseMapper.getThreeNum(streetId,communityId,"服务公开",data+" 00:00:00",data+" 23:59:59"); |
| | | financeNum=baseMapper.getThreeNum(streetId,communityId,"财务公开",data+" 00:00:00",data+" 23:59:59"); |
| | | fundNum=baseMapper.getThreeNum(streetId,communityId,"资金公开",data+" 00:00:00",data+" 23:59:59"); |
| | | propertyNum=baseMapper.getThreeNum(streetId,communityId,"资产公开",data+" 00:00:00",data+" 23:59:59"); |
| | | naturalResourcesNum=baseMapper.getThreeNum(streetId,communityId,"资源公开",data+" 00:00:00",data+" 23:59:59"); |
| | | villageEconomyNum=baseMapper.getThreeNum(streetId,communityId,"村集体经济组织项目",data+" 00:00:00",data+" 23:59:59"); |
| | | } |
| | | else if(StringUtils.equals(type,"4")) |
| | | { |
| | | //按时间范围 |
| | | partyAffairsNum=baseMapper.getThreeNum(streetId,communityId,"党务公开",starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | serviceNum=baseMapper.getThreeNum(streetId,communityId,"服务公开",starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | financeNum=baseMapper.getThreeNum(streetId,communityId,"财务公开",starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | fundNum=baseMapper.getThreeNum(streetId,communityId,"资金公开",starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | propertyNum=baseMapper.getThreeNum(streetId,communityId,"资产公开",starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | naturalResourcesNum=baseMapper.getThreeNum(streetId,communityId,"资源公开",starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | villageEconomyNum=baseMapper.getThreeNum(streetId,communityId,"村集体经济组织项目",starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | |
| | | } |
| | | else |
| | | { |
| | | partyAffairsNum=baseMapper.getThreeNum(streetId,communityId,"党务公开",null,null); |
| | | serviceNum=baseMapper.getThreeNum(streetId,communityId,"服务公开",null,null); |
| | | financeNum=baseMapper.getThreeNum(streetId,communityId,"财务公开",null,null); |
| | | fundNum=baseMapper.getThreeNum(streetId,communityId,"资金公开",null,null); |
| | | propertyNum=baseMapper.getThreeNum(streetId,communityId,"资产公开",null,null); |
| | | naturalResourcesNum=baseMapper.getThreeNum(streetId,communityId,"资源公开",null,null); |
| | | villageEconomyNum=baseMapper.getThreeNum(streetId,communityId,"村集体经济组织项目",null,null); |
| | | } |
| | | |
| | | ThreeNumData threeNumData=new ThreeNumData(); |
| | | threeNumData.setPartyAffairsNum(partyAffairsNum); |
| | | threeNumData.setServiceNum(serviceNum); |
| | | threeNumData.setFinanceNum(financeNum); |
| | | threeNumData.setFundNum(fundNum); |
| | | threeNumData.setPropertyNum(propertyNum); |
| | | threeNumData.setNaturalResourcesNum(naturalResourcesNum); |
| | | threeNumData.setVillageEconomyNum(villageEconomyNum); |
| | | |
| | | threeNumData.setThreeFundNum(partyAffairsNum+serviceNum+financeNum); |
| | | threeNumData.setThreeServiceNum(fundNum+propertyNum+naturalResourcesNum); |
| | | |
| | | |
| | | return R.ok(threeNumData); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 双报到双服务 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param type |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getDoubleRegistration(String streetId, String communityId, String type, String starTime, String endTime) |
| | | { |
| | | if(StringUtils.isEmpty(streetId) && StringUtils.isEmpty(communityId) ) |
| | | { |
| | | return R.fail("街道id或社区id不能为空"); |
| | | } |
| | | |
| | | //旧的报道需求问题统计数 2.问题清单 3.需求清单 |
| | | Integer OleProblemNum=0; |
| | | Integer OleNeedNum=0; |
| | | //旧的报道需求问题统计数 1问题清单 2需求清单 |
| | | Integer NewProblemNum=0; |
| | | Integer NewNeedNum=0; |
| | | //获取旧双报道服务时间 |
| | | Double OldTime=0.0; |
| | | //获取新双报道服务时间 |
| | | Double NewTime=0.0; |
| | | //党建动态数据 |
| | | Integer PartyBuildingNum=0; |
| | | //报到单位总计数据 |
| | | Integer UnitNum=0; |
| | | //报到党员总计数据 |
| | | Integer MemberNum=0; |
| | | |
| | | if(StringUtils.equals(type,"1")) |
| | | { |
| | | //按年份 |
| | | int year=Calendar.getInstance().get(Calendar.YEAR); |
| | | //旧的报道需求问题统计数 2.问题清单 3.需求清单 |
| | | OleProblemNum=baseMapper.getOleNeedProblemNum("2",streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | OleNeedNum=baseMapper.getOleNeedProblemNum("3",streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | //旧的报道需求问题统计数 1问题清单 2需求清单 |
| | | NewProblemNum=baseMapper.getNewNeedProblemNum("1",streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | NewNeedNum=baseMapper.getNewNeedProblemNum("2",streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | //获取旧双报道服务时间 |
| | | OldTime=baseMapper.getOldTime(streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | //获取新双报道服务时间 |
| | | NewTime=baseMapper.getNewTime(streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | //党建动态数据 |
| | | PartyBuildingNum=baseMapper.getPartyBuildingNum(streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | //报到单位总计数据 |
| | | UnitNum=baseMapper.getUnitNum(streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | //报到党员总计数据 |
| | | MemberNum=baseMapper.getMemberNum(streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | } |
| | | else if(StringUtils.equals(type,"2")) |
| | | { |
| | | //按月份 |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | // 获取当前月份的第一天 |
| | | String firstDayOfMonth = LocalDate.now().with(TemporalAdjusters.firstDayOfMonth()).format(formatter); |
| | | // 获取当前月份的最后一天 |
| | | String lastDayOfMonth = LocalDate.now().with(TemporalAdjusters.lastDayOfMonth()).format(formatter); |
| | | |
| | | //旧的报道需求问题统计数 2.问题清单 3.需求清单 |
| | | OleProblemNum=baseMapper.getOleNeedProblemNum("2",streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | OleNeedNum=baseMapper.getOleNeedProblemNum("3",streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | //旧的报道需求问题统计数 1问题清单 2需求清单 |
| | | NewProblemNum=baseMapper.getNewNeedProblemNum("1",streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | NewNeedNum=baseMapper.getNewNeedProblemNum("2",streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | //获取旧双报道服务时间 |
| | | OldTime=baseMapper.getOldTime(streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | //获取新双报道服务时间 |
| | | NewTime=baseMapper.getNewTime(streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | //党建动态数据 |
| | | PartyBuildingNum=baseMapper.getPartyBuildingNum(streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | //报到单位总计数据 |
| | | UnitNum=baseMapper.getUnitNum(streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | //报到党员总计数据 |
| | | MemberNum=baseMapper.getMemberNum(streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | } |
| | | else if(StringUtils.equals(type,"3")) |
| | | { |
| | | //按天份 |
| | | DateTimeFormatter newformatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | String data=LocalDate.now().format(newformatter); |
| | | |
| | | //旧的报道需求问题统计数 2.问题清单 3.需求清单 |
| | | OleProblemNum=baseMapper.getOleNeedProblemNum("2",streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | OleNeedNum=baseMapper.getOleNeedProblemNum("3",streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | //旧的报道需求问题统计数 1问题清单 2需求清单 |
| | | NewProblemNum=baseMapper.getNewNeedProblemNum("1",streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | NewNeedNum=baseMapper.getNewNeedProblemNum("2",streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | //获取旧双报道服务时间 |
| | | OldTime=baseMapper.getOldTime(streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | //获取新双报道服务时间 |
| | | NewTime=baseMapper.getNewTime(streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | //党建动态数据 |
| | | PartyBuildingNum=baseMapper.getPartyBuildingNum(streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | //报到单位总计数据 |
| | | UnitNum=baseMapper.getUnitNum(streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | //报到党员总计数据 |
| | | MemberNum=baseMapper.getMemberNum(streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | } |
| | | else if(StringUtils.equals(type,"4")) |
| | | { |
| | | //按时间范围 |
| | | //旧的报道需求问题统计数 2.问题清单 3.需求清单 |
| | | OleProblemNum=baseMapper.getOleNeedProblemNum("2",streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | OleNeedNum=baseMapper.getOleNeedProblemNum("3",streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | //旧的报道需求问题统计数 1问题清单 2需求清单 |
| | | NewProblemNum=baseMapper.getNewNeedProblemNum("1",streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | NewNeedNum=baseMapper.getNewNeedProblemNum("2",streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | //获取旧双报道服务时间 |
| | | OldTime=baseMapper.getOldTime(streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | //获取新双报道服务时间 |
| | | NewTime=baseMapper.getNewTime(streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | //党建动态数据 |
| | | PartyBuildingNum=baseMapper.getPartyBuildingNum(streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | //报到单位总计数据 |
| | | UnitNum=baseMapper.getUnitNum(streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | //报到党员总计数据 |
| | | MemberNum=baseMapper.getMemberNum(streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | |
| | | } |
| | | else |
| | | { |
| | | //旧的报道需求问题统计数 2.问题清单 3.需求清单 |
| | | OleProblemNum=baseMapper.getOleNeedProblemNum("2",streetId,communityId,null,null); |
| | | OleNeedNum=baseMapper.getOleNeedProblemNum("3",streetId,communityId,null,null); |
| | | //旧的报道需求问题统计数 1问题清单 2需求清单 |
| | | NewProblemNum=baseMapper.getNewNeedProblemNum("1",streetId,communityId,null,null); |
| | | NewNeedNum=baseMapper.getNewNeedProblemNum("2",streetId,communityId,null,null); |
| | | //获取旧双报道服务时间 |
| | | OldTime=baseMapper.getOldTime(streetId,communityId,null,null); |
| | | //获取新双报道服务时间 |
| | | NewTime=baseMapper.getNewTime(streetId,communityId,null,null); |
| | | //党建动态数据 |
| | | PartyBuildingNum=baseMapper.getPartyBuildingNum(streetId,communityId,null,null); |
| | | //报到单位总计数据 |
| | | UnitNum=baseMapper.getUnitNum(streetId,communityId,null,null); |
| | | //报到党员总计数据 |
| | | MemberNum=baseMapper.getMemberNum(streetId,communityId,null,null); |
| | | } |
| | | |
| | | |
| | | DoubleRegistrationData doubleRegistrationData=new DoubleRegistrationData(); |
| | | //报道需求统计数 |
| | | doubleRegistrationData.setNeedNum(NewNeedNum+OleNeedNum); |
| | | //报道问题 |
| | | doubleRegistrationData.setProblemNum(OleProblemNum+NewProblemNum); |
| | | //获取旧双报道服务时间 |
| | | doubleRegistrationData.setTimes(OldTime+NewTime); |
| | | //党建动态数据 |
| | | doubleRegistrationData.setPartyBuildingNum(PartyBuildingNum); |
| | | //报到单位总计数据 |
| | | doubleRegistrationData.setUnitNum(UnitNum); |
| | | //报到党员总计数据 |
| | | doubleRegistrationData.setMemberNum(MemberNum); |
| | | |
| | | doubleRegistrationData.setAllNum(NewNeedNum+OleNeedNum+OleProblemNum+NewProblemNum); |
| | | |
| | | |
| | | return R.ok(doubleRegistrationData); |
| | | } |
| | | |
| | | /** |
| | | * 随手拍 微心愿 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param type |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getPhotoMicroWish(String streetId, String communityId, String type, String starTime, String endTime) |
| | | { |
| | | |
| | | //随手拍 |
| | | List<PhotoMicroWishData> photoList=new ArrayList<>(); |
| | | //微心愿 |
| | | List<PhotoMicroWishData> microWishList=new ArrayList<>(); |
| | | |
| | | // List<PhotoMicroWishData> list=new ArrayList<>(); |
| | | |
| | | |
| | | int photoNum=0; |
| | | |
| | | int microWishNum=0; |
| | | |
| | | if(StringUtils.equals(type,"1")) |
| | | { |
| | | //按年份 |
| | | int year=Calendar.getInstance().get(Calendar.YEAR); |
| | | |
| | | //随手拍 |
| | | photoList=baseMapper.getPhotoMicroWishData("1","%Y",streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | //微心愿 |
| | | microWishList=baseMapper.getPhotoMicroWishData("2","%Y",streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | |
| | | photoNum=baseMapper.getPhotoAllNum(streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | microWishNum=baseMapper.getMicroWishAllNum(streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | } |
| | | else if(StringUtils.equals(type,"2")) |
| | | { |
| | | //按月份 |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | // 获取当前月份的第一天 |
| | | String firstDayOfMonth = LocalDate.now().with(TemporalAdjusters.firstDayOfMonth()).format(formatter); |
| | | // 获取当前月份的最后一天 |
| | | String lastDayOfMonth = LocalDate.now().with(TemporalAdjusters.lastDayOfMonth()).format(formatter); |
| | | |
| | | photoList=baseMapper.getPhotoMicroWishData("1","%Y-%m",streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | microWishList=baseMapper.getPhotoMicroWishData("2","%Y-%m",streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | |
| | | |
| | | photoNum=baseMapper.getPhotoAllNum(streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | microWishNum=baseMapper.getMicroWishAllNum(streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | |
| | | } |
| | | else if(StringUtils.equals(type,"3")) |
| | | { |
| | | //按天份 |
| | | DateTimeFormatter newformatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | String data=LocalDate.now().format(newformatter); |
| | | |
| | | photoList=baseMapper.getPhotoMicroWishData("1","%Y-%m-%d",streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | microWishList=baseMapper.getPhotoMicroWishData("2","%Y-%m-%d",streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | |
| | | photoNum=baseMapper.getPhotoAllNum(streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | microWishNum=baseMapper.getMicroWishAllNum(streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | } |
| | | else if(StringUtils.equals(type,"4")) |
| | | { |
| | | photoList=baseMapper.getPhotoMicroWishData("1","%Y-%m-%d",streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | microWishList=baseMapper.getPhotoMicroWishData("2","%Y-%m-%d",streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | |
| | | photoNum=baseMapper.getPhotoAllNum(streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | microWishNum=baseMapper.getMicroWishAllNum(streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | } |
| | | else |
| | | { |
| | | photoList=baseMapper.getPhotoMicroWishData("1","%Y-%m",streetId,communityId,null,null); |
| | | microWishList=baseMapper.getPhotoMicroWishData("2","%Y-%m",streetId,communityId,null,null); |
| | | |
| | | photoNum=baseMapper.getPhotoAllNum(streetId,communityId,null,null); |
| | | microWishNum=baseMapper.getMicroWishAllNum(streetId,communityId,null,null); |
| | | } |
| | | |
| | | // for (int a=0;a<microWishList.size();a++) |
| | | // { |
| | | // int num=0; |
| | | // for (int b=0;b<photoList.size();b++) |
| | | // { |
| | | // if(photoList.get(b).getTiems().equals(microWishList.get(a).getTiems())) |
| | | // { |
| | | // photoList.get(b).setMicroNum(microWishList.get(a).getPhotoNum()); |
| | | // } |
| | | // else |
| | | // { |
| | | // num++; |
| | | // } |
| | | // } |
| | | // |
| | | // if(num>=photoList.size()) |
| | | // { |
| | | // PhotoMicroWishData data=new PhotoMicroWishData(); |
| | | // data.setMicroNum(microWishList.get(a).getPhotoNum()); |
| | | // data.setCreateAt(microWishList.get(a).getCreateAt()); |
| | | // data.setTiems(microWishList.get(a).getTiems()); |
| | | // data.setPhotoNum("0"); |
| | | // list.add(data); |
| | | // } |
| | | // |
| | | // } |
| | | // |
| | | // photoList.addAll(list); |
| | | // |
| | | // if(photoList!=null && photoList.size()>1) |
| | | // { |
| | | // Collections.sort(photoList, new Comparator<PhotoMicroWishData>() { |
| | | // @Override |
| | | // public int compare(PhotoMicroWishData o1, PhotoMicroWishData o2) { |
| | | // return o1.getCreateAt().compareTo(o2.getCreateAt()); |
| | | // } |
| | | // }); |
| | | // } |
| | | |
| | | |
| | | PhotoMicroWish photoMicroWish=new PhotoMicroWish(); |
| | | photoMicroWish.setPhotoList(photoList); |
| | | photoMicroWish.setMicroWishList(microWishList); |
| | | photoMicroWish.setPhotoNum(photoNum); |
| | | photoMicroWish.setMicroWishNum(microWishNum); |
| | | return R.ok(photoMicroWish); |
| | | } |
| | | |
| | | /** |
| | | * 社区活动、议事投票、问卷调查、社区动态发布趋势 |
| | | * @param streetId |
| | | * @param communityId |
| | | * @param type |
| | | * @param starTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getAllData(String streetId, String communityId, String type, String starTime, String endTime) |
| | | { |
| | | //议事投票 |
| | | List<PhotoMicroWishData> discussList=new ArrayList<>(); |
| | | //问卷调查 |
| | | List<PhotoMicroWishData> questnaireNumList=new ArrayList<>(); |
| | | //社区动态 |
| | | List<PhotoMicroWishData> nommunityDynNumList=new ArrayList<>(); |
| | | //社区活动 |
| | | List<PhotoMicroWishData> nommunityActNumList=new ArrayList<>(); |
| | | |
| | | |
| | | //议事投票数量") |
| | | int discussNum=0; |
| | | |
| | | //问卷调查数量") |
| | | int questnaireNum=0; |
| | | |
| | | //社区动态数量") |
| | | int nommunityDynNum=0; |
| | | |
| | | //社区活动数量") |
| | | int nommunityActNum=0; |
| | | |
| | | if(StringUtils.equals(type,"1")) |
| | | { |
| | | //按年份 |
| | | int year=Calendar.getInstance().get(Calendar.YEAR); |
| | | |
| | | //* 社区活动统计 |
| | | nommunityActNumList=baseMapper.getNommunityActNumList("%Y",streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | //社区动态 |
| | | nommunityDynNumList=baseMapper.getNommunityDynNumList("%Y",streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | //问卷调查 |
| | | questnaireNumList=baseMapper.getQuestnaireNumList("%Y",streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | //议事投票 |
| | | discussList=baseMapper.getDiscussNumList("%Y",streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | |
| | | |
| | | //议事投票数量") |
| | | discussNum=baseMapper.getDiscussNum(streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | |
| | | //问卷调查数量") |
| | | questnaireNum=baseMapper.getQuestnaireNum(streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | |
| | | //社区动态数量") |
| | | nommunityDynNum=baseMapper.getNommunityDynNum(streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | |
| | | //社区活动数量") |
| | | nommunityActNum=baseMapper.getNommunityActNum(streetId,communityId,year+"-01-01 00:00:00",year+"-12-31 23:59:59"); |
| | | |
| | | |
| | | } |
| | | else if(StringUtils.equals(type,"2")) |
| | | { |
| | | //按月份 |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | // 获取当前月份的第一天 |
| | | String firstDayOfMonth = LocalDate.now().with(TemporalAdjusters.firstDayOfMonth()).format(formatter); |
| | | // 获取当前月份的最后一天 |
| | | String lastDayOfMonth = LocalDate.now().with(TemporalAdjusters.lastDayOfMonth()).format(formatter); |
| | | |
| | | //* 社区活动统计 |
| | | nommunityActNumList=baseMapper.getNommunityActNumList("%Y-%m",streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | //社区动态 |
| | | nommunityDynNumList=baseMapper.getNommunityDynNumList("%Y-%m",streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | //问卷调查 |
| | | questnaireNumList=baseMapper.getQuestnaireNumList("%Y-%m",streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | //议事投票 |
| | | discussList=baseMapper.getDiscussNumList("%Y-%m",streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | |
| | | } |
| | | else if(StringUtils.equals(type,"3")) |
| | | { |
| | | //按天份 |
| | | DateTimeFormatter newformatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | String data=LocalDate.now().format(newformatter); |
| | | |
| | | //* 社区活动统计 |
| | | nommunityActNumList=baseMapper.getNommunityActNumList("%Y-%m-%d",streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | //社区动态 |
| | | nommunityDynNumList=baseMapper.getNommunityDynNumList("%Y-%m-%d",streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | //问卷调查 |
| | | questnaireNumList=baseMapper.getQuestnaireNumList("%Y-%m-%d",streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | //议事投票 |
| | | discussList=baseMapper.getDiscussNumList("%Y-%m-%d",streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | |
| | | |
| | | |
| | | |
| | | //议事投票数量") |
| | | discussNum=baseMapper.getDiscussNum(streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | |
| | | //问卷调查数量") |
| | | questnaireNum=baseMapper.getQuestnaireNum(streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | |
| | | //社区动态数量") |
| | | nommunityDynNum=baseMapper.getNommunityDynNum(streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | |
| | | //社区活动数量") |
| | | nommunityActNum=baseMapper.getNommunityActNum(streetId,communityId,data+" 00:00:00",data+" 23:59:59"); |
| | | |
| | | |
| | | |
| | | } |
| | | else if(StringUtils.equals(type,"4")) |
| | | { |
| | | //* 社区活动统计 |
| | | nommunityActNumList=baseMapper.getNommunityActNumList("%Y-%m-%d",streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | //社区动态 |
| | | nommunityDynNumList=baseMapper.getNommunityDynNumList("%Y-%m-%d",streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | //问卷调查 |
| | | questnaireNumList=baseMapper.getQuestnaireNumList("%Y-%m-%d",streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | //议事投票 |
| | | discussList=baseMapper.getDiscussNumList("%Y-%m-%d",streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | |
| | | |
| | | //议事投票数量") |
| | | discussNum=baseMapper.getDiscussNum(streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | |
| | | //问卷调查数量") |
| | | questnaireNum=baseMapper.getQuestnaireNum(streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | |
| | | //社区动态数量") |
| | | nommunityDynNum=baseMapper.getNommunityDynNum(streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | |
| | | //社区活动数量") |
| | | nommunityActNum=baseMapper.getNommunityActNum(streetId,communityId,starTime+" 00:00:00",endTime+" 23:59:59"); |
| | | } |
| | | else |
| | | { |
| | | //* 社区活动统计 |
| | | nommunityActNumList=baseMapper.getNommunityActNumList("%Y-%m",streetId,communityId,null,null); |
| | | //社区动态 |
| | | nommunityDynNumList=baseMapper.getNommunityDynNumList("%Y-%m",streetId,communityId,null,null); |
| | | //问卷调查 |
| | | questnaireNumList=baseMapper.getQuestnaireNumList("%Y-%m",streetId,communityId,null,null); |
| | | //议事投票 |
| | | discussList=baseMapper.getDiscussNumList("%Y-%m",streetId,communityId,null,null); |
| | | |
| | | |
| | | |
| | | //议事投票数量") |
| | | discussNum=baseMapper.getDiscussNum(streetId,communityId,null,null); |
| | | |
| | | //问卷调查数量") |
| | | questnaireNum=baseMapper.getQuestnaireNum(streetId,communityId,null,null); |
| | | |
| | | //社区动态数量") |
| | | nommunityDynNum=baseMapper.getNommunityDynNum(streetId,communityId,null,null); |
| | | |
| | | //社区活动数量") |
| | | nommunityActNum=baseMapper.getNommunityActNum(streetId,communityId,null,null); |
| | | |
| | | } |
| | | |
| | | AllData allData=new AllData(); |
| | | allData.setDiscussList(discussList); |
| | | allData.setNommunityActNumList(nommunityActNumList); |
| | | allData.setNommunityDynNumList(nommunityDynNumList); |
| | | allData.setQuestnaireNumList(questnaireNumList); |
| | | allData.setQuestnaireNum(questnaireNum); |
| | | allData.setNommunityDynNum(nommunityDynNum); |
| | | allData.setNommunityActNum(nommunityActNum); |
| | | allData.setDiscussNum(discussNum); |
| | | |
| | | return R.ok(allData); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_dangjian.dao.StreetBigScreenDAO"> |
| | | |
| | | <!-- 获取街道下社区内容 --> |
| | | <select id="getCommunityId" resultType="com.panzhihua.common.model.dtos.partybuilding.ComActDTO"> |
| | | select name,community_id from com_act where street_id=#{streetId} and app_id="wx118de8a734d269f0" |
| | | </select> |
| | | |
| | | <!-- 获取小程序用户数量 --> |
| | | <select id="getUserNum" resultType="Integer"> |
| | | select count(user_id) |
| | | from sys_user |
| | | where |
| | | type=1 |
| | | <if test=" communityId !=null and communityId != '' "> |
| | | and community_id = #{communityId} |
| | | </if> |
| | | <if test=" communityId == null and streetId !=null and streetId != '' "> |
| | | and community_id in (select community_id from com_act where street_id=#{streetId} and app_id="wx118de8a734d269f0") |
| | | </if> |
| | | <if test="starTime != null and starTime == '' "> |
| | | and create_at BETWEEN #{starTime} AND #{endTime} |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 获取实有人口总数 --> |
| | | <select id="getActualPopNum" resultType="Integer"> |
| | | select count(id) from com_mng_population |
| | | where |
| | | 1=1 |
| | | <if test=" communityId !=null and communityId != '' "> |
| | | and act_id = #{communityId} |
| | | </if> |
| | | <if test=" communityId == null and streetId !=null and streetId != '' "> |
| | | and act_id in (select community_id from com_act where street_id=#{streetId} and app_id="wx118de8a734d269f0") |
| | | </if> |
| | | <if test="starTime != null and starTime == '' "> |
| | | and create_at BETWEEN #{starTime} AND #{endTime} |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 获取小区总数 --> |
| | | <select id="getVillageNum" resultType="Integer"> |
| | | select count(village_id) from com_mng_village |
| | | where |
| | | 1=1 |
| | | <if test=" communityId !=null and communityId != '' "> |
| | | and community_id in = #{communityId} |
| | | </if> |
| | | <if test=" communityId == null and streetId !=null and streetId != '' "> |
| | | and community_id in (select community_id from com_act where street_id=#{streetId} and app_id="wx118de8a734d269f0") |
| | | </if> |
| | | <if test="starTime != null and starTime == '' "> |
| | | and create_at BETWEEN #{starTime} AND #{endTime} |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 获取志愿者总数 --> |
| | | <select id="getVolunteerNum" resultType="Integer"> |
| | | select count(id) from com_mng_volunteer_mng |
| | | where |
| | | 1=1 |
| | | <if test=" communityId !=null and communityId != '' "> |
| | | and community_id in = #{communityId} |
| | | </if> |
| | | <if test=" communityId == null and streetId !=null and streetId != '' "> |
| | | and community_id in (select community_id from com_act where street_id=#{streetId} and app_id="wx118de8a734d269f0") |
| | | </if> |
| | | <if test="starTime != null and starTime == '' "> |
| | | and create_at BETWEEN #{starTime} AND #{endTime} |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 三资三务数据 --> |
| | | <select id="getThreeNum" resultType="Integer"> |
| | | select count(id) from com_act_dyn |
| | | where |
| | | `type` in ( |
| | | select id from com_act_dyn_type |
| | | where |
| | | 1=1 |
| | | <if test=" communityId !=null and communityId != '' "> |
| | | and community_id in = #{communityId} |
| | | </if> |
| | | <if test=" communityId == null and streetId !=null and streetId != '' "> |
| | | and community_id in (select community_id from com_act where street_id=#{streetId} and app_id="wx118de8a734d269f0") |
| | | </if> |
| | | <if test=" name != null and name != '' "> |
| | | and `name`= #{name} |
| | | </if> |
| | | |
| | | ) |
| | | <if test="starTime != null and starTime != '' "> |
| | | and create_at BETWEEN #{starTime} AND #{endTime} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!-- 旧的报道需求问题统计数 --> |
| | | <select id="getOleNeedProblemNum" resultType="Integer"> |
| | | select count(id) from com_act_neighbor_circle |
| | | where |
| | | 1=1 |
| | | <if test=" belongType !=null and belongType != '' "> |
| | | and belong_type = #{belongType} |
| | | </if> |
| | | <if test=" communityId !=null and communityId != '' "> |
| | | and community_id in = #{communityId} |
| | | </if> |
| | | <if test=" communityId == null and streetId !=null and streetId != '' "> |
| | | and community_id in (select community_id from com_act where street_id=#{streetId} and app_id="wx118de8a734d269f0") |
| | | </if> |
| | | <if test="starTime != null and starTime != '' "> |
| | | and create_at BETWEEN #{starTime} AND #{endTime} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!-- 旧的报道需求问题统计数 --> |
| | | <select id="getNewNeedProblemNum" resultType="Integer"> |
| | | select count(id) from new_fight_need_problem_inventory |
| | | where |
| | | 1=1 |
| | | <if test=" kind !=null and kind != '' "> |
| | | and kind = #{kind} |
| | | </if> |
| | | <if test=" communityId !=null and communityId != '' "> |
| | | and community_id in = #{communityId} |
| | | </if> |
| | | <if test=" communityId == null and streetId !=null and streetId != '' "> |
| | | and community_id in (select community_id from com_act where street_id=#{streetId} and app_id="wx118de8a734d269f0") |
| | | </if> |
| | | <if test="starTime != null and starTime != '' "> |
| | | and creation_time BETWEEN #{starTime} AND #{endTime} |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 获取旧双报道服务时间 --> |
| | | <select id="getOldTime" resultType="Double"> |
| | | select SUM(ROUND((TIMESTAMPDIFF(SECOND,order_time, solve_time) / 3600), 2)) from com_act_neighbor_circle |
| | | where |
| | | order_time is not null and solve_time is not null and belong_type in (2,3) |
| | | <if test=" communityId !=null and communityId != '' "> |
| | | and community_id in = #{communityId} |
| | | </if> |
| | | <if test=" communityId == null and streetId !=null and streetId != '' "> |
| | | and community_id in (select community_id from com_act where street_id=#{streetId} and app_id="wx118de8a734d269f0") |
| | | </if> |
| | | <if test="starTime != null and starTime != '' "> |
| | | and create_at BETWEEN #{starTime} AND #{endTime} |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 获取新双报道服务时间 --> |
| | | <select id="getNewTime" resultType="Double"> |
| | | select SUM(ROUND((service_time / 3600), 2)) from new_fight_need_problem_claim |
| | | where |
| | | service_time is not null and |
| | | task_id in ( |
| | | select id from new_fight_need_problem_inventory where |
| | | <if test=" communityId !=null and communityId != '' "> |
| | | and community_id in = #{communityId} |
| | | </if> |
| | | <if test=" communityId == null and streetId !=null and streetId != '' "> |
| | | and community_id in (select community_id from com_act where street_id=#{streetId} and app_id="wx118de8a734d269f0") |
| | | </if> |
| | | <if test="starTime != null and starTime != '' "> |
| | | and creation_time BETWEEN #{starTime} AND #{endTime} |
| | | </if> |
| | | ) |
| | | |
| | | </select> |
| | | |
| | | <!-- 党建动态数据 --> |
| | | <select id="getPartyBuildingNum" resultType="Integer"> |
| | | select count(id) from com_pb_dyn |
| | | where |
| | | dyn_type =1 |
| | | <if test=" communityId !=null and communityId != '' "> |
| | | and community_id in = #{communityId} |
| | | </if> |
| | | <if test=" communityId == null and streetId !=null and streetId != '' "> |
| | | and community_id in (select community_id from com_act where street_id=#{streetId} and app_id="wx118de8a734d269f0") |
| | | </if> |
| | | <if test="starTime != null and starTime != '' "> |
| | | and creation_time BETWEEN #{starTime} AND #{endTime} |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 报到单位总计数据 --> |
| | | <select id="getUnitNum" resultType="Integer"> |
| | | SELECT COUNT( id ) FROM com_pb_check_unit |
| | | WHERE 1=1 |
| | | <if test=" communityId !=null and communityId != '' "> |
| | | and community_id in = #{communityId} |
| | | </if> |
| | | <if test=" communityId == null and streetId !=null and streetId != '' "> |
| | | and community_id in (select community_id from com_act where street_id=#{streetId} and app_id="wx118de8a734d269f0") |
| | | </if> |
| | | <if test="starTime != null and starTime != '' "> |
| | | and creation_time BETWEEN #{starTime} AND #{endTime} |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 报到党员总计数据 --> |
| | | <select id="getMemberNum" resultType="Integer"> |
| | | SELECT COUNT( m.id ) |
| | | FROM com_pb_member m |
| | | LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id |
| | | WHERE m.audit_result = 1 |
| | | <if test=" communityId !=null and communityId != '' "> |
| | | and community_id in = #{communityId} |
| | | </if> |
| | | <if test=" communityId == null and streetId !=null and streetId != '' "> |
| | | and community_id in (select community_id from com_act where street_id=#{streetId} and app_id="wx118de8a734d269f0") |
| | | </if> |
| | | <if test="starTime != null and starTime != '' "> |
| | | and creation_time BETWEEN #{starTime} AND #{endTime} |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 街道大屏随手拍-微心愿 1随手拍 2微心愿 --> |
| | | <select id="getPhotoMicroWishData" resultType="com.panzhihua.common.model.vos.partybuilding.PhotoMicroWishData"> |
| | | select count(t1.id) as num,t1.tiems,t1.create_at |
| | | from |
| | | ( |
| | | select id,community_id,create_at,1 as type,DATE_FORMAT(create_at,#{timeType}) as tiems |
| | | from com_act_easy_photo |
| | | where add_type = 1 |
| | | |
| | | UNION all |
| | | |
| | | select id,community_id,create_at,2 as type,DATE_FORMAT(create_at,#{timeType}) as tiems |
| | | from com_act_micro_wish |
| | | |
| | | ) t1 |
| | | <where> |
| | | t1.type=#{type} |
| | | <if test=" communityId !=null and communityId != '' "> |
| | | and community_id in = #{communityId} |
| | | </if> |
| | | <if test=" communityId == null and streetId !=null and streetId != '' "> |
| | | and community_id in (select community_id from com_act where street_id=#{streetId} and app_id="wx118de8a734d269f0") |
| | | </if> |
| | | <if test=" starTime != null and starTime != '' "> |
| | | and t1.tiems BETWEEN #{starTime} AND #{endTime} |
| | | </if> |
| | | </where> |
| | | group by t1.tiems |
| | | order by t1.tiems asc |
| | | </select> |
| | | |
| | | <!-- 街道大屏随手拍-1随手拍 --> |
| | | <select id="getPhotoAllNum" resultType="Integer"> |
| | | select count(id) |
| | | from com_act_easy_photo |
| | | <where> add_type = 1 |
| | | <if test=" communityId !=null and communityId != '' "> |
| | | and community_id in = #{communityId} |
| | | </if> |
| | | <if test=" communityId == null and streetId !=null and streetId != '' "> |
| | | and community_id in (select community_id from com_act where street_id=#{streetId} and app_id="wx118de8a734d269f0") |
| | | </if> |
| | | <if test=" starTime != null and starTime != '' "> |
| | | and create_at BETWEEN #{starTime} AND #{endTime} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!-- 街道大屏微心愿 --> |
| | | <select id="getMicroWishAllNum" resultType="Integer"> |
| | | select count(id) |
| | | from com_act_micro_wish |
| | | <where> |
| | | <if test=" communityId !=null and communityId != '' "> |
| | | and community_id in = #{communityId} |
| | | </if> |
| | | <if test=" communityId == null and streetId !=null and streetId != '' "> |
| | | and community_id in (select community_id from com_act where street_id=#{streetId} and app_id="wx118de8a734d269f0") |
| | | </if> |
| | | <if test=" starTime != null and starTime != '' "> |
| | | and create_at BETWEEN #{starTime} AND #{endTime} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 社区活动统计 --> |
| | | <select id="getNommunityActNumList" resultType="com.panzhihua.common.model.vos.partybuilding.PhotoMicroWishData"> |
| | | select count(id) as num, DATE_FORMAT(create_at,#{timeType}) as tiems,create_at |
| | | from com_act_activity |
| | | <where> |
| | | 1=1 |
| | | <if test=" communityId !=null and communityId != '' "> |
| | | and community_id in = #{communityId} |
| | | </if> |
| | | <if test=" communityId == null and streetId !=null and streetId != '' "> |
| | | and community_id in (select community_id from com_act where street_id=#{streetId} and app_id="wx118de8a734d269f0") |
| | | </if> |
| | | <if test=" starTime != null and starTime != '' "> |
| | | and tiems BETWEEN #{starTime} AND #{endTime} |
| | | </if> |
| | | </where> |
| | | group by tiems |
| | | </select> |
| | | |
| | | |
| | | <!-- 社区动态 --> |
| | | <select id="getNommunityDynNumList" resultType="com.panzhihua.common.model.vos.partybuilding.PhotoMicroWishData"> |
| | | select count(id) as num, DATE_FORMAT(create_at,#{timeType}) as tiems,create_at |
| | | from com_act_dyn |
| | | <where> |
| | | 1=1 |
| | | <if test=" communityId !=null and communityId != '' "> |
| | | and community_id in = #{communityId} |
| | | </if> |
| | | <if test=" communityId == null and streetId !=null and streetId != '' "> |
| | | and community_id in (select community_id from com_act where street_id=#{streetId} and app_id="wx118de8a734d269f0") |
| | | </if> |
| | | <if test=" starTime != null and starTime != '' "> |
| | | and tiems BETWEEN #{starTime} AND #{endTime} |
| | | </if> |
| | | </where> |
| | | group by tiems |
| | | </select> |
| | | |
| | | <!-- 问卷调查 --> |
| | | <select id="getQuestnaireNumList" resultType="com.panzhihua.common.model.vos.partybuilding.PhotoMicroWishData"> |
| | | select count(id) as num, DATE_FORMAT(create_at,#{timeType}) as tiems,create_at |
| | | from com_act_questnaire |
| | | <where> |
| | | 1=1 |
| | | <if test=" communityId !=null and communityId != '' "> |
| | | and community_id in = #{communityId} |
| | | </if> |
| | | <if test=" communityId == null and streetId !=null and streetId != '' "> |
| | | and community_id in (select community_id from com_act where street_id=#{streetId} and app_id="wx118de8a734d269f0") |
| | | </if> |
| | | <if test=" starTime != null and starTime != '' "> |
| | | and tiems BETWEEN #{starTime} AND #{endTime} |
| | | </if> |
| | | </where> |
| | | group by tiems |
| | | </select> |
| | | |
| | | <!-- 议事投票 --> |
| | | <select id="getDiscussNumList" resultType="com.panzhihua.common.model.vos.partybuilding.PhotoMicroWishData"> |
| | | select count(id) as num, DATE_FORMAT(create_at,#{timeType}) as tiems,create_at from com_act_discuss |
| | | <where> |
| | | 1=1 |
| | | <if test=" communityId !=null and communityId != '' "> |
| | | and community_id in = #{communityId} |
| | | </if> |
| | | <if test=" communityId == null and streetId !=null and streetId != '' "> |
| | | and community_id in (select community_id from com_act where street_id=#{streetId} and app_id="wx118de8a734d269f0") |
| | | </if> |
| | | <if test=" starTime != null and starTime != '' "> |
| | | and tiems BETWEEN #{starTime} AND #{endTime} |
| | | </if> |
| | | </where> |
| | | group by tiems |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 社区活动统计 --> |
| | | <select id="getNommunityActNum" resultType="Integer"> |
| | | select count(id) |
| | | from com_act_activity |
| | | <where> |
| | | 1=1 |
| | | <if test=" communityId !=null and communityId != '' "> |
| | | and community_id in = #{communityId} |
| | | </if> |
| | | <if test=" communityId == null and streetId !=null and streetId != '' "> |
| | | and community_id in (select community_id from com_act where street_id=#{streetId} and app_id="wx118de8a734d269f0") |
| | | </if> |
| | | <if test=" starTime != null and starTime != '' "> |
| | | and create_at BETWEEN #{starTime} AND #{endTime} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <!-- 社区动态 --> |
| | | <select id="getNommunityDynNum" resultType="Integer"> |
| | | select count(id) |
| | | from com_act_dyn |
| | | <where> |
| | | 1=1 |
| | | <if test=" communityId !=null and communityId != '' "> |
| | | and community_id in = #{communityId} |
| | | </if> |
| | | <if test=" communityId == null and streetId !=null and streetId != '' "> |
| | | and community_id in (select community_id from com_act where street_id=#{streetId} and app_id="wx118de8a734d269f0") |
| | | </if> |
| | | <if test=" starTime != null and starTime != '' "> |
| | | and create_at BETWEEN #{starTime} AND #{endTime} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!-- 问卷调查 --> |
| | | <select id="getQuestnaireNum" resultType="Integer"> |
| | | select count(id) |
| | | from com_act_questnaire |
| | | <where> |
| | | 1=1 |
| | | <if test=" communityId !=null and communityId != '' "> |
| | | and community_id in = #{communityId} |
| | | </if> |
| | | <if test=" communityId == null and streetId !=null and streetId != '' "> |
| | | and community_id in (select community_id from com_act where street_id=#{streetId} and app_id="wx118de8a734d269f0") |
| | | </if> |
| | | <if test=" starTime != null and starTime != '' "> |
| | | and create_at BETWEEN #{starTime} AND #{endTime} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!-- 议事投票 --> |
| | | <select id="getDiscussNum" resultType="Integer"> |
| | | select count(id) |
| | | from com_act_discuss |
| | | <where> |
| | | 1=1 |
| | | <if test=" communityId !=null and communityId != '' "> |
| | | and community_id in = #{communityId} |
| | | </if> |
| | | <if test=" communityId == null and streetId !=null and streetId != '' "> |
| | | and community_id in (select community_id from com_act where street_id=#{streetId} and app_id="wx118de8a734d269f0") |
| | | </if> |
| | | <if test=" starTime != null and starTime != '' "> |
| | | and create_at BETWEEN #{starTime} AND #{endTime} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </mapper> |
| | | |