| | |
| | | " where cmpct.community_id = #{communityId}") |
| | | IndexBasicsStatisticsVO getScreenIndexByBasics(@Param("communityId") Long communityId); |
| | | |
| | | @Select("SELECT " + " IFNULL( NULL, 1 ) AS type, " + " count( cmpct.id ) AS sum " + "FROM " |
| | | + " com_mng_population_community_tags as cmpct " |
| | | + " left join com_mng_population as cmp on cmpct.population_id = cmp.id " + "WHERE " + " cmp.sex = 1 " |
| | | + " AND cmpct.community_id = #{communityId} UNION ALL " + "SELECT " + " IFNULL( NULL, 2 ) AS type, " |
| | | + " count( cmpct.id ) AS sum " + "FROM " + " com_mng_population_community_tags as cmpct " |
| | | + " left join com_mng_population as cmp on cmpct.population_id = cmp.id " + "WHERE " + " cmp.sex = 2 " |
| | | + " AND cmpct.community_id = #{communityId}") |
| | | @Select("SELECT cmp.sex, count( cmpct.id ) AS sum, count( cmpct.id )/(select count(*) from com_mng_population_community_tags as cmpct \n" + |
| | | " left join com_mng_population as cmp on cmpct.population_id = cmp.id WHERE cmpct.community_id = #{communityId} ) as percent FROM \n" + |
| | | " com_mng_population_community_tags as cmpct \n" + |
| | | " left join com_mng_population as cmp on cmpct.population_id = cmp.id WHERE cmp.sex is not null and cmpct.community_id = #{communityId} GROUP BY cmp.sex") |
| | | List<IndexPopulationSexStatisticsVO> getScreenIndexByPopulationSex(@Param("communityId") Long communityId); |
| | | |
| | | @Select("SELECT " + " e.happen_time as createAt, " + " e.event_des, " + " e.event_deal_status " + "FROM " |
| | |
| | | + " community_id = #{communityId} and label like concat('%',#{label},'%')") |
| | | Integer getSpecialStatisticsByLabel(@Param("label") String label,@Param("communityId") Long communityId); |
| | | |
| | | @Select("SELECT " + " count( id ) " + "FROM " + " com_mng_population_community_tags " + "WHERE " |
| | | + " community_id = #{communityId} ") |
| | | Integer getSpecialStatisticsByLabel(@Param("communityId") Long communityId); |
| | | |
| | | @Select("<script> " + "SELECT " + " count( egd.id ) AS gridTotal, " |
| | | + " ( select count(egmr.id) from event_grid_member_relation as egmr" |
| | | + " left join event_grid_data as egd1 on egd1.id = egmr.grid_id where egd1.grid_community_id = egd.grid_community_id ) AS gridMemberTotal, " |