springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActActivityBigScreenVO.java
New file @@ -0,0 +1,59 @@ package com.panzhihua.common.model.vos.community; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.panzhihua.common.model.dtos.community.ActivityInviteDTO; import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleDetailAppVO; import com.panzhihua.common.validated.AddGroup; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import java.math.BigDecimal; import java.util.Date; import java.util.List; /** * @program: springcloud_k8s_panzhihuazhihuishequ * @description: 社区活动 * @author: huang.hongfa weixin hhf9596 qq 959656820 * @create: 2020-12-07 14:01 **/ @Data @ApiModel("大屏-社区活动") public class ComActActivityBigScreenVO { @ApiModelProperty("自增id") @JsonSerialize(using = ToStringSerializer.class) private Long id; @ApiModelProperty("活动封面") private String cover; @ApiModelProperty("活动类型") private String activityType; @ApiModelProperty("活动名称") private String activityName; @ApiModelProperty("活动状态 1 待发布 2 未开始 3 报名中 4 进行中 5 已结束 6 已取消") private Integer status; @ApiModelProperty("发布时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date publishAt; @ApiModelProperty("活动结束时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date endAt; @ApiModelProperty("活动开始时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date beginAt; @ApiModelProperty("参加人数") private Integer personNum; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComBasicDataVo.java
New file @@ -0,0 +1,30 @@ package com.panzhihua.common.model.vos.community; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * @author yh * 基础数据 */ @Data @ApiModel("统计-基础数据") public class ComBasicDataVo { @ApiModelProperty(value = "社区数") Integer community; @ApiModelProperty(value = "商家数") Integer merchants; @ApiModelProperty(value = "党员数") Integer pbMember; @ApiModelProperty(value = "报道单位") Integer pbUnit; @ApiModelProperty(value = "实有人口") Integer population; @ApiModelProperty(value = "实有房屋") Integer populationHouse; @ApiModelProperty(value = "社会组织") Integer socialOrg; @ApiModelProperty(value = "志愿者") Integer volunteer; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/ComPbMemberTypeVO.java
New file @@ -0,0 +1,27 @@ package com.panzhihua.common.model.vos.partybuilding; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * @auther yh * @create 2022-11-08 17:25:45 * @describe 统计党员类型VO */ @Data @ApiModel("统计党员类型VO") public class ComPbMemberTypeVO { /** * 人数 */ @ApiModelProperty("人数") private Integer countNum; /** * 类型 */ @ApiModelProperty("类型") private String countName; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/ComShopFlowerGoodsVO.java
@@ -154,6 +154,10 @@ @ApiModelProperty("商品分类") @NotEmpty(groups = {AddGroup.class}, message = "商品分类不能为空") private List<Long> categoryIds; @ApiModelProperty("商品描述") private String goodsDescribe; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -3521,6 +3521,15 @@ R pageNeighborByAdmin(@RequestBody ComActNeighborCircleAdminDTO comActNeighborCircleAdminDTO); /** * 统计大屏查询清单列表 * * @param comActNeighborCircleAdminDTO * 请求参数 * @return 邻里圈列表 */ @PostMapping("/neighbor/pageNeighborByAdmin") R pageNeighborByBigScreen(@RequestBody ComActNeighborCircleAdminDTO comActNeighborCircleAdminDTO); /** * 后台修改邻里圈 * * @param editNeighborCircleAdminVO @@ -11111,4 +11120,35 @@ */ @GetMapping("/shopFlower/countSaleByUserId") R countSaleByUserId(@RequestParam("userId") Long userId); /** * 查询统计基础数据 * @return */ @GetMapping("/selectBasicData") R selectBasicData(); /** * 统计在职干部特长 * @return */ @GetMapping("/statisticsPbMemberType") R statisticsPbMemberType(); /** * 统计单位 * @return */ @GetMapping("/selectUnitByNatureName") R selectUnitByNatureName(); /** * 大屏-社区活动分页 * @return */ @PostMapping("pageActivityBigScreen") R pageActivityBigScreen(@RequestBody CommonPage commonPage); } springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/BasicScreenApi.java
New file @@ -0,0 +1,113 @@ 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.dtos.neighbor.ComActNeighborCircleAdminDTO; import com.panzhihua.common.model.dtos.property.CommonPage; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.ComActActivityBigScreenVO; import com.panzhihua.common.model.vos.community.ComBasicDataVo; import com.panzhihua.common.model.vos.community.bigscreen.*; import com.panzhihua.common.model.vos.neighbor.ActivityAnalysisVO; import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAdminVO; 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 BasicScreenApi * @Description TODO * @Author yh * @Date 2022-11-08 17:25:45 * @Version 1.0 **/ @Slf4j @RestController @RequestMapping("/basicScreen") @Api(tags = {"攀枝花市可视化大屏"}) public class BasicScreenApi extends BaseController { @Resource private CommunityService communityService; /** * 查询统计基础数据 * @return */ @GetMapping("selectBasicData") @ApiOperation(value = "统计基础数据",response = ComBasicDataVo.class) public R selectBasicData(){ return communityService.selectBasicData(); } /** * 统计在职干部特长 * @return */ @GetMapping("statisticsPbMemberType") @ApiOperation(value = "在职干部特长") public R statisticsPbMemberType(){ return communityService.statisticsPbMemberType(); } /** * 统计大屏查询清单列表 * * @param comActNeighborCircleAdminDTO * 请求参数 * @return 邻里圈列表 */ @PostMapping("pageNeighborByAdmin") @ApiOperation(value = "清单列表分页",response = ComActNeighborCircleAdminVO.class) public R pageNeighborByBigScreen(@RequestBody ComActNeighborCircleAdminDTO comActNeighborCircleAdminDTO) { return communityService.pageNeighborByBigScreen(comActNeighborCircleAdminDTO); } /** * 单位统计 * @return */ @GetMapping("statisticsPbMemberType") @ApiOperation(value = "单位统计") public R selectUnitByNatureName(){ return communityService.selectUnitByNatureName(); } /** * 大屏-社区活动分页 * @return */ @PostMapping("pageActivityBigScreen") @ApiOperation(value = "大屏-社区活动分页",response = ComActActivityBigScreenVO.class) public R pageActivityBigScreen(@RequestBody CommonPage commonPage){ return communityService.pageActivityBigScreen(commonPage); } @ApiOperation(value = "单位活动统计 range,year", response = ActivityAnalysisVO.class) @GetMapping("activity/analysis") public R activityUnitAnalysis(@RequestParam(value = "year", required = false) Integer year, @RequestParam(value = "type", required = false) Integer type, @RequestParam(value = "range", required = false) Integer range, @RequestParam(value = "communityId", required = false) Long communityId, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, @RequestParam(value = "belongTo", required = false) String belongTo, @RequestParam(value = "unitId", required = false) Long unitId) { return communityService.institutionalUnitServiceAnalysis(year, type, range, communityId, page, size, belongTo, unitId, this.getLoginUserInfo().getAccount()); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java
@@ -2771,4 +2771,40 @@ return automessageSysUserService.selectAutomessageSysUserById(id); } /** * 根据id查询重复的社区id集合 * @return */ @GetMapping("selectBasicData") public R selectBasicData(){ return comActService.selectBasicData(); } /** * 统计在职干部特长 * @return */ @GetMapping("statisticsPbMemberType") public R statisticsPbMemberType(){ return comActService.statisticsPbMemberType(); } /** * 统计单位 * @return */ @GetMapping("selectUnitByNatureName") public R selectUnitByNatureName(){ return comActService.selectUnitByNatureName(); } /** * 大屏-社区活动分页 * @return */ @GetMapping("pageActivityBigScreen") public R pageActivityBigScreen(@RequestBody CommonPage commonPage){ return comActActivityService.pageActivityBigScreen(commonPage); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/NeighborApi.java
@@ -99,6 +99,17 @@ } /** * 统计大屏查询清单列表 * * @param comActNeighborCircleAdminDTO * 请求参数 * @return 邻里圈列表 */ @PostMapping("pageNeighborByAdmin") public R pageNeighborByBigScreen(@RequestBody ComActNeighborCircleAdminDTO comActNeighborCircleAdminDTO) { return comActNeighborCircleService.pageNeighborByBigScreen(comActNeighborCircleAdminDTO); } /** * 后台添加邻里圈 * * @param addNeighborCircleAdminVO springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java
@@ -362,4 +362,12 @@ IPage<ComActActivityVO> pageProjectActivity(@Param("page") Page page, @Param("comActActivityVO") ComActActivityVO comActActivityVO); List<String> selectOpenIdByActivityId(Long id); /** * 大屏社区活动列表 * @param page * @return */ IPage<ComActActivityBigScreenVO> pageActivityBigScreen(@Param("page") Page page); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDAO.java
@@ -4,6 +4,7 @@ import com.panzhihua.common.model.vos.community.ComActPasswordVo; import com.panzhihua.common.model.vos.community.DataCount; import com.panzhihua.common.model.vos.partybuilding.ComPbMemberTypeVO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; @@ -119,4 +120,60 @@ @Select("SELECT caa.community_id FROM com_act caa WHERE caa.`name` = ( select ca.`name` FROM com_act ca WHERE ca.community_id =#{id})") List<Long> selectIds(@Param("id") Long id); /** * 统计全部社区/村落数量 * @return */ @Select("SELECT count(1) FROM `com_act` WHERE app_id = 'wx118de8a734d269f0' and community_id not in ( 11 ,22)") Integer countCommunity(); /** * 统计实有人口数 * @return */ @Select(" SELECT count(1) FROM com_mng_population WHERE death = 0") Integer countPopulation(); /** * 统计实有房屋数 * @return */ @Select(" SELECT count(1) FROM com_mng_population_house") Integer countPopulationHouse(); /** * 统计报道在职干部 西区+花城 * @return */ @Select(" SELECT sum(a.member) FROM (SELECT count(1) member FROM com_pb_member union all SELECT count(1) member FROM com_pb_member_west) a") Integer countPbMember(); /** * 统计报到单位 * @return */ @Select(" SELECT count(1) FROM com_pb_check_unit") Integer countPbUnit(); /** * 统计商家 * @return */ @Select(" SELECT count(1) FROM com_convenient_merchants WHERE is_del = 0") Integer countMerchants(); /** * 统计自愿者 * @return */ @Select("SELECT count(1) FROM sys_user WHERE is_volunteer = 1") Integer countVolunteer(); /** * 统计社会组织 * @return */ @Select("SELECT count(1) FROM com_act_social_org") Integer countSocialOrg(); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java
@@ -47,6 +47,14 @@ IPage<ComActNeighborCircleAdminVO> pageNeighborByAdmin(Page page,@Param("neighborCircleAdminDTO") ComActNeighborCircleAdminDTO neighborCircleAdminDTO); /** * 大屏清单查询 * @param page * @param neighborCircleAdminDTO * @return */ IPage<ComActNeighborCircleAdminVO> pageNeighborByBigScreen(Page page,@Param("neighborCircleAdminDTO") ComActNeighborCircleAdminDTO neighborCircleAdminDTO); @Select("select * from sys_user where user_id=#{userId}") AdministratorsUserVO selectUserByUserId(@Param("userId") Long userId); springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComPbMemberDAO.java
@@ -73,4 +73,17 @@ * @return */ Integer checkIsVolunteer(@Param("userId") Long userId); /** * 统计在职干部特长 * @return */ List<ComPbMemberTypeVO> statisticsPbMemberType(); /** * 单位类型 * @return */ List<ComPbMemberTypeVO> selectUnitByNatureName(); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActActivityService.java
@@ -329,4 +329,11 @@ * @return */ R exportPartyMemberDetail(CommonPage commonPage); /** * 大屏-社区活动分页 * @param commonPage * @return */ R pageActivityBigScreen(CommonPage commonPage); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActNeighborCircleService.java
@@ -61,6 +61,13 @@ R pageNeighborByAdmin(ComActNeighborCircleAdminDTO comActNeighborCircleAdminDTO); /** * 统计大屏查询清单列表 * @param neighborCircleAdminDTO * @return */ R pageNeighborByBigScreen(ComActNeighborCircleAdminDTO neighborCircleAdminDTO); /** * 邻里圈_添加 * * @param addNeighborCircleAdminVO springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActService.java
@@ -115,4 +115,23 @@ R getCommunityPassword(Long communityId); R selectIds(Long id); /** * 统计大屏-基础数据 * @return */ R selectBasicData(); /** * 统计在职干部特长 * @return */ R statisticsPbMemberType(); /** * 单位统计 * @return */ R selectUnitByNatureName(); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java
@@ -1303,4 +1303,9 @@ } return partyActivityLines; } @Override public R pageActivityBigScreen(CommonPage commonPage) { return R.ok(comActActivityDAO.pageActivityBigScreen(new Page<>(commonPage.getPage(),commonPage.getSize()))); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
@@ -364,6 +364,12 @@ }); return R.ok(doPager); } @Override public R pageNeighborByBigScreen(ComActNeighborCircleAdminDTO neighborCircleAdminDTO) { Page page = new Page(neighborCircleAdminDTO.getPageNum(), neighborCircleAdminDTO.getPageSize()); IPage<ComActNeighborCircleAdminVO> doPager = this.baseMapper.pageNeighborByBigScreen(page, neighborCircleAdminDTO); return R.ok(doPager); } @Override public R addNeighborByAdmin(AddNeighborCircleAdminVO addVO) { springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java
@@ -3,11 +3,15 @@ import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import javax.annotation.Resource; import com.panzhihua.common.model.vos.community.ComActPasswordVo; import com.panzhihua.common.model.vos.community.ComBasicDataVo; import com.panzhihua.common.model.vos.partybuilding.ComPbMemberTypeVO; import com.panzhihua.service_community.dao.ComPbMemberDAO; import com.panzhihua.service_community.util.MyAESUtil; import org.springframework.beans.BeanUtils; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; @@ -41,6 +45,8 @@ private ComActDAO comActDAO; @Resource private ComStreetDAO comStreetDAO; @Resource private ComPbMemberDAO comPbMemberDAO; /** * 新增社区 @@ -291,8 +297,52 @@ } return R.ok(comActPasswordVo); } @Override public R selectIds(Long id){ return R.ok(this.comActDAO.selectIds(id)); } @Override public R selectBasicData(){ //社区数 Integer community = comActDAO.countCommunity(); //商家数 Integer merchants = comActDAO.countMerchants(); //党员数 Integer pbMember = comActDAO.countPbMember(); //报道单位 Integer pbUnit = comActDAO.countPbUnit(); //实有人口 Integer population = comActDAO.countPopulation(); //实有房屋 Integer populationHouse = comActDAO.countPopulationHouse(); //社会组织 Integer socialOrg = comActDAO.countSocialOrg(); //志愿者 Integer volunteer = comActDAO.countVolunteer(); ComBasicDataVo comBasicDataVo = new ComBasicDataVo(); comBasicDataVo.setCommunity(community); comBasicDataVo.setMerchants(merchants); comBasicDataVo.setPbMember(pbMember); comBasicDataVo.setPbUnit(pbUnit); comBasicDataVo.setPopulation(population); comBasicDataVo.setPopulationHouse(populationHouse); comBasicDataVo.setSocialOrg(socialOrg); comBasicDataVo.setVolunteer(volunteer); return R.ok(comBasicDataVo); } @Override public R statisticsPbMemberType(){ List<ComPbMemberTypeVO> comPbMemberTypeVOS = comPbMemberDAO.statisticsPbMemberType(); Map<String, Integer> retMap = comPbMemberTypeVOS.stream().collect(Collectors.toMap(ComPbMemberTypeVO::getCountName, ComPbMemberTypeVO::getCountNum)); return R.ok(retMap); } public R selectUnitByNatureName(){ List<ComPbMemberTypeVO> comPbMemberTypeVOS = comPbMemberDAO.selectUnitByNatureName(); Map<String, Integer> retMap = comPbMemberTypeVOS.stream().collect(Collectors.toMap(ComPbMemberTypeVO::getCountName, ComPbMemberTypeVO::getCountNum)); return R.ok(retMap); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActivityMapper.xml
@@ -443,4 +443,13 @@ <select id="selectOpenIdByActivityId" resultType="String"> select distinct openid from com_act_act_sign t LEFT JOIN sys_user t1 on t.user_id = t1.user_id where t.activity_id =#{id} and t.status = 1 </select> <select id="pageActivityBigScreen" resultType="com.panzhihua.common.model.vos.community.ComActActivityBigScreenVO"> SELECT a.id,a.cover,a.activity_type,a.activity_name,a.`status`,a.begin_at,a.end_at,a.publish_at, (SELECT count(1) FROM com_act_act_sign s WHERE s.activity_id = a.id) as person_num FROM com_act_activity a WHERE a.type = 1 ORDER BY a.create_at desc </select> </mapper> springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleDOMapper.xml
@@ -741,4 +741,44 @@ </if> order by canc.create_at desc </select> <select id="pageNeighborByBigScreen" parameterType="com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAdminDTO" resultType="com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAdminVO"> SELECT nc.*, u.`nick_name` AS releaseName,u.image_url,canct.`name` as topicName ,u.`type` as userType ,u.name as communityName,nc.solve_status FROM com_act_neighbor_circle nc LEFT JOIN sys_user u ON nc.release_id = u.user_id LEFT JOIN com_act_neighbor_circle_topic as canct ON canct.id = nc.topic_id <where> nc.belong_type in (2,3) and is_del = 2 <if test='neighborCircleAdminDTO.keyWord != null and neighborCircleAdminDTO.keyWord != ""'> and (canct.`name` like concat(#{neighborCircleAdminDTO.keyWord},'%') or u.`nick_name` like concat(#{neighborCircleAdminDTO.keyWord},'%') or nc.`release_content` like concat(#{neighborCircleAdminDTO.keyWord},'%') ) </if> <if test='neighborCircleAdminDTO.status != null '> and nc.status = #{neighborCircleAdminDTO.status} </if> <!-- <if test='neighborCircleAdminDTO.belongType != null '>--> <!-- and nc.belong_type = #{neighborCircleAdminDTO.belongType}--> <!-- </if>--> <if test="neighborCircleAdminDTO.solveStatus !=null"> <if test="neighborCircleAdminDTO.solveStatus ==1"> and nc.solve_status in (0,1) </if> <if test="neighborCircleAdminDTO.solveStatus ==2"> and nc.solve_status =2 </if> <if test="neighborCircleAdminDTO.solveStatus ==3"> and nc.solve_status in(3,4) </if> </if> </where> order by nc.create_at desc </select> </mapper> springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPbMemberMapper.xml
@@ -3,23 +3,32 @@ <mapper namespace="com.panzhihua.service_community.dao.ComPbMemberDAO"> <select id="selectById" resultType="com.panzhihua.common.model.vos.partybuilding.ComPbMemberVO"> select t.*,t2.name as orgName from com_pb_member t left join com_mng_population t1 on t.id_card = t1.card_no_str left join com_pb_org t2 on t.org_id = t2.id where t1.card_no_str =#{idCard} select t.*,t2.name as orgName from com_pb_member t left join com_mng_population t1 on t.id_card = t1.card_no_str left join com_pb_org t2 on t.org_id = t2.id where t1.card_no_str =#{idCard} </select> <select id="selectActivityCountMonth" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityLine"> select ( select count(id) from com_pb_activity where status!=6 and community_id = ${communityId} and release_time >= DATE_FORMAT( CONCAT(#{year},'-',#{date},'-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( LAST_DAY(CONCAT(#{year},'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=release_time) y, (select count(id) from com_pb_activity where status!=6 and community_id = ${communityId} and DATE_FORMAT( LAST_DAY(CONCAT(#{year},'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=release_time) countY <select id="selectActivityCountMonth" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityLine"> select ( select count(id) from com_pb_activity where status!=6 and community_id = ${communityId} and release_time >= DATE_FORMAT( CONCAT(#{year},'-',#{date},'-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( LAST_DAY(CONCAT(#{year},'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=release_time) y, (select count(id) from com_pb_activity where status!=6 and community_id = ${communityId} and DATE_FORMAT( LAST_DAY(CONCAT(#{year},'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=release_time) countY </select> <select id="selectActivityTop" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityTop"> select t.name,t.photo_path as url,t1.name as orgName,t2.integral_available_party as score from com_pb_member t LEFT JOIN com_pb_org t1 on t.org_id= t1.id LEFT JOIN com_act_integral_user t2 on t.user_id = t2.user_id where t.community_id = ${communityId} and t2.status = 1 order by integral_available_party desc select t.name,t.photo_path as url,t1.name as orgName,t2.integral_available_party as score from com_pb_member t LEFT JOIN com_pb_org t1 on t.org_id= t1.id LEFT JOIN com_act_integral_user t2 on t.user_id = t2.user_id where t.community_id = ${communityId} and t2.status = 1 order by integral_available_party desc </select> <select id="bigScreenServiceData" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceData"> <select id="bigScreenServiceData" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceData"> select (select count(*) from com_act_work_guide ) guide, (select count(*) from com_act_announcement where community_id = ${communityId}) announcement, (select count(*) from com_elder_auth_elderlies where community_id = ${communityId}) eldersAuth, (select count(*) from com_convenient_merchants where (community_id = ${communityId} OR community_id = 0) and is_del =0) convenient, (select count(*) from com_convenient_merchants where (community_id = ${communityId} OR community_id = 0) and is_del =0) convenient, (select count(*) from renting_hourse_register where community_id = ${communityId}) rentingHouse, (select count(*) from com_property_alarm where community_id = ${communityId}) oneButton, (select count(*) from com_pension_auth_pensioners where community_id = ${communityId} ) pensionAuth, @@ -27,21 +36,48 @@ (select count(*) from com_property where community_id = ${communityId} ) property </select> <select id="bigScreenServiceUser" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceUser"> <select id="bigScreenServiceUser" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceUser"> select t.name AS villageName, IF(t1.num IS NULL,0,t1.num) as num from com_mng_village t left join ( select count(*) num,village_id from com_mng_population where act_id = #{communityId} GROUP BY village_id select count(*) num,village_id from com_mng_population where act_id = #{communityId} GROUP BY village_id ) t1 on t.village_id = t1.village_id where t.community_id = ${communityId} </select> <select id="checkIsPbMember" resultType="java.lang.Integer"> SELECT (SELECT COUNT(id) FROM com_pb_member WHERE phone = (SELECT phone FROM sys_user WHERE user_id = #{userId}) AND audit_result = 1) (SELECT COUNT(id) FROM com_pb_member WHERE phone = (SELECT phone FROM sys_user WHERE user_id = #{userId}) AND audit_result = 1) + (SELECT COUNT(id) FROM com_pb_member_west WHERE phone = (SELECT phone FROM sys_user WHERE user_id = #{userId}) AND audit_result = 1) (SELECT COUNT(id) FROM com_pb_member_west WHERE phone = (SELECT phone FROM sys_user WHERE user_id = #{userId}) AND audit_result = 1) </select> <select id="checkIsVolunteer" resultType="java.lang.Integer"> SELECT COUNT(id) FROM com_mng_volunteer_mng WHERE state = 2 AND phone = (SELECT phone FROM sys_user WHERE user_id = #{userId}) SELECT COUNT(id) FROM com_mng_volunteer_mng WHERE state = 2 AND phone = (SELECT phone FROM sys_user WHERE user_id = #{userId}) </select> <select id="statisticsPbMemberType" resultType="com.panzhihua.common.model.vos.partybuilding.ComPbMemberTypeVO"> SELECT count(1) count_num, 'tjdc' as count_name FROM com_pb_member WHERE find_in_set('统计调查',specialty_name) UNION ALL SELECT count(1) count_num, 'flyz' as count_name FROM com_pb_member WHERE find_in_set('法律援助',specialty_name) UNION ALL SELECT count(1) count_num, 'zyhd' as count_name FROM com_pb_member WHERE find_in_set('志愿活动',specialty_name) UNION ALL SELECT count(1) count_num, 'zlay' as count_name FROM com_pb_member WHERE find_in_set('尊老爱幼',specialty_name) UNION ALL SELECT count(1) count_num, 'xjxj' as count_name FROM com_pb_member WHERE find_in_set('宣讲宣教',specialty_name) UNION ALL SELECT count(1) count_num, 'xlga' as count_name FROM com_pb_member WHERE find_in_set('心理关爱',specialty_name) UNION ALL SELECT count(1) count_num, 'sswx' as count_name FROM com_pb_member WHERE find_in_set('设施维修',specialty_name) UNION ALL SELECT count(1) count_num, 'qt' as count_name FROM com_pb_member WHERE find_in_set('其他',specialty_name) </select> <select id="selectUnitByNatureName" resultType="com.panzhihua.common.model.vos.partybuilding.ComPbMemberTypeVO"> SELECT count(1) count_num,'qsydw' as count_name FROM com_pb_check_unit WHERE nature_name = '企事业单位' UNION ALL SELECT count(1) count_num,'jgdw' as count_name FROM com_pb_check_unit WHERE nature_name = '机关单位' </select> </mapper>