| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | @ApiModelProperty(value = "报道单位id集合") |
| | | private Long[] unitIds; |
| | | |
| | | @ApiModelProperty("年份 例子 2024") |
| | | private String yearTime; |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.large; |
| | | |
| | | import com.panzhihua.common.model.vos.community.screen.event.EventPopulationSpecialStatisticsVO; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class AreaStreetDetail { |
| | | |
| | | |
| | | @ApiModelProperty("街道相关信息") |
| | | private AreaStreetDetailResp areaStreetDetailResp; |
| | | |
| | | @ApiModelProperty("特殊人口数据") |
| | | private EventPopulationSpecialStatisticsVO eventPopulationVO; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.large; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class AreaStreetDetailResp { |
| | | |
| | | @ApiModelProperty("街道 总和") |
| | | private Integer streetCount; |
| | | |
| | | @ApiModelProperty("社区 总和") |
| | | private Integer actCount; |
| | | |
| | | @ApiModelProperty("人口 总和") |
| | | private Integer populationCount; |
| | | |
| | | @ApiModelProperty("小区 总和") |
| | | private Integer villageCount; |
| | | |
| | | @ApiModelProperty("房屋 总和") |
| | | private Integer houseCount; |
| | | |
| | | @ApiModelProperty("城市小区 总和") |
| | | private Integer cityVillageCount; |
| | | |
| | | @ApiModelProperty("农村小区 总和") |
| | | private Integer countryVillageCount; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.large; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class SumAreaStreetResp { |
| | | |
| | | @ApiModelProperty("区 总和") |
| | | private Integer areaCount; |
| | | |
| | | @ApiModelProperty("街道 总和") |
| | | private Integer streetCount; |
| | | |
| | | @ApiModelProperty("社区 总和") |
| | | private Integer actCount; |
| | | |
| | | @ApiModelProperty("人口 总和") |
| | | private Integer populationCount; |
| | | |
| | | @ApiModelProperty("小区 总和") |
| | | private Integer villageCount; |
| | | |
| | | @ApiModelProperty("房屋 总和") |
| | | private Integer houseCount; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private String communityId; |
| | | /** |
| | | * 社区名称 |
| | | */ |
| | | private String name; |
| | |
| | | |
| | | @ApiModelProperty(value = "已报到党员") |
| | | private Integer partyMemberTotal; |
| | | |
| | | @ApiModelProperty(value = "机关单位累计总积分") |
| | | private Integer organSumIntegral; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("低保户") |
| | | private Integer dbTotal = 0; |
| | | |
| | | @ApiModelProperty("高龄老人") |
| | | @ApiModelProperty("高龄老人 》=80") |
| | | private Integer glTotal = 0; |
| | | |
| | | @ApiModelProperty("特殊情况") |
| | |
| | | @ApiModelProperty("退役军人") |
| | | private Integer tyTotal = 0; |
| | | |
| | | @ApiModelProperty("留守儿童") |
| | | private Integer lsTotal = 0; |
| | | |
| | | @ApiModelProperty(value = "吸毒人员",hidden = true) |
| | | private Integer xdTotal = 0; |
| | | |
| | |
| | | import com.panzhihua.common.model.dtos.community.dpc.EditDpcDTO; |
| | | import com.panzhihua.common.model.dtos.community.dpc.PageDpcDTO; |
| | | import com.panzhihua.common.model.dtos.community.enterprise.*; |
| | | import com.panzhihua.common.model.dtos.community.large.AreaStreetDetail; |
| | | import com.panzhihua.common.model.dtos.community.large.SumAreaStreetResp; |
| | | import com.panzhihua.common.model.dtos.community.reserve.*; |
| | | import com.panzhihua.common.model.dtos.community.sanshuo.*; |
| | | import com.panzhihua.common.model.dtos.community.warehouse.ComActWarehouseApplyDTO; |
| | |
| | | |
| | | @GetMapping("/largeScreen/probably") |
| | | public R probably(@RequestParam("year") Integer year,@RequestParam("belongTo") String belongTo); |
| | | /** |
| | | * 查询 一标三实 数据 |
| | | */ |
| | | @GetMapping("/largeScreen/sumAreaStreet") |
| | | R<SumAreaStreetResp> sumAreaStreet(); |
| | | |
| | | |
| | | /** |
| | | * 下拉 明细 |
| | | */ |
| | | @GetMapping(("/largeScreen/areaStreetDetail")) |
| | | R<AreaStreetDetail> areaStreetDetail(@RequestParam("code") String code, |
| | | @RequestParam("type") String type); |
| | | |
| | | } |
| | |
| | | R unitStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, |
| | | @RequestParam(value = "belongTo") String belongTo, |
| | | @RequestParam(value = "choice", required = false) String choice, |
| | | @RequestParam(value = "unitIds", required = false) Long[] unitIds); |
| | | @RequestParam(value = "unitIds", required = false) Long[] unitIds, |
| | | @RequestParam(value = "yearTime",required = false) String yearTime); |
| | | |
| | | /** |
| | | * 报到单位统计 |
| | |
| | | @RequestParam(value = "belongTo") String belongTo, |
| | | @RequestParam(value = "choice", required = false) String choice, |
| | | @RequestParam(value = "checkUnitId", required = false) Long checkUnitId, |
| | | @RequestParam(value = "unitIds", required = false) Long[] unitIds); |
| | | @RequestParam(value = "unitIds", required = false) Long[] unitIds, |
| | | @RequestParam(value = "yearTime",required = false) String yearTime); |
| | | |
| | | /** |
| | | * 报到党员统计-按单位归属统计 |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.building.BuildingDto; |
| | | import com.panzhihua.common.model.dtos.community.large.AreaStreetDetail; |
| | | import com.panzhihua.common.model.dtos.community.large.SumAreaStreetResp; |
| | | import com.panzhihua.common.model.vos.community.ComActSocialOrgVO; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenCourtyardStatisticsInfo; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenDpcStatisticsInfo; |
| | |
| | | public R probably(@RequestParam("year") Integer year,@RequestParam("belongTo") String belongTo){ |
| | | return communityService.probably(year,belongTo); |
| | | } |
| | | /** |
| | | * 查询 一标三实 数据 |
| | | */ |
| | | @GetMapping("/sumAreaStreet") |
| | | public R<SumAreaStreetResp> sumAreaStreet(){ |
| | | return communityService.sumAreaStreet(); |
| | | } |
| | | |
| | | /** |
| | | * 下拉 明细 |
| | | */ |
| | | @GetMapping(("/areaStreetDetail")) |
| | | private R<AreaStreetDetail> areaStreetDetail(@RequestParam("code") String code, |
| | | @RequestParam("type") String type){ |
| | | return communityService.areaStreetDetail(code, type); |
| | | } |
| | | } |
| | |
| | | }) |
| | | @GetMapping("/statistics/top") |
| | | public R unitStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, |
| | | @RequestParam(value = "belongTo", required = false) String choice) { |
| | | @RequestParam(value = "belongTo", required = false) String choice, |
| | | @RequestParam(value = "yearTime",required = false) String yearTime) { |
| | | String belongTo = ""; |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区","钒钛高新区"}; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | |
| | | if ("PZHZGNYYH".equals(loginUserInfo.getAccount())){ |
| | | unitIds = ids; |
| | | } |
| | | return this.comPbCheckUnitService.unitStatisticsTop(communityId, belongTo, choice,unitIds); |
| | | return this.comPbCheckUnitService.unitStatisticsTop(communityId, belongTo, choice,unitIds,yearTime); |
| | | } |
| | | |
| | | @ApiOperation(value = "报到单位统计", response = PbCheckUnitStatisticsVo.class) |
| | |
| | | @GetMapping("/pbStatistics/top") |
| | | public R pbStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, |
| | | @RequestParam(value = "choice", required = false) String choice, |
| | | @RequestParam(value = "checkUnitId", required = false) Long checkUnitId) { |
| | | @RequestParam(value = "checkUnitId", required = false) Long checkUnitId, |
| | | @RequestParam(value = "yearTime",required = false) String yearTime) { |
| | | String belongTo = ""; |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区","钒钛高新区"}; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | |
| | | if ("PZHZGNYYH".equals(loginUserInfo.getAccount())){ |
| | | unitIds = ids; |
| | | } |
| | | return this.comPbCheckUnitService.pbStatisticsTop(communityId, belongTo, choice, checkUnitId,unitIds); |
| | | return this.comPbCheckUnitService.pbStatisticsTop(communityId, belongTo, choice, checkUnitId,unitIds,yearTime); |
| | | } |
| | | |
| | | @ApiOperation(value = "报到党员统计-按单位归属统计", response = PbCheckUnitStatisticsVo.class) |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.building.BuildingDto; |
| | | import com.panzhihua.common.model.dtos.community.large.AreaStreetDetail; |
| | | import com.panzhihua.common.model.dtos.community.large.AreaStreetDetailResp; |
| | | import com.panzhihua.common.model.dtos.community.large.SumAreaStreetResp; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActDynVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | |
| | | import com.panzhihua.service_community.service.ComStreetService; |
| | | import lombok.Data; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | return comStreetService.panzhihuaMap(areaCode); |
| | | } |
| | | |
| | | /** |
| | | * 根据 街道 查询 社区 |
| | | * @param streetId |
| | | * @return |
| | | */ |
| | | @GetMapping("/oneTagThreeReal") |
| | | public R oneTagThreeReal(@RequestParam("streetId") Long streetId){ |
| | | return comStreetService.oneTagThreeReal(streetId); |
| | |
| | | return comStreetService.probably(year, belongTo); |
| | | } |
| | | |
| | | /** |
| | | * 查询 一标三实 数据 |
| | | */ |
| | | @GetMapping("/sumAreaStreet") |
| | | public R<SumAreaStreetResp> sumAreaStreet(){ |
| | | return R.ok(comStreetService.sumAreaStreet()); |
| | | } |
| | | |
| | | /** |
| | | * 下拉 明细 |
| | | */ |
| | | @GetMapping(("/areaStreetDetail")) |
| | | private R<AreaStreetDetail> areaStreetDetail(@RequestParam("code") String code, |
| | | @RequestParam("type") String type){ |
| | | return R.ok(comStreetService.areaStreetDetail(code, type)); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import java.util.List; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.building.BuildingDto; |
| | | import com.panzhihua.common.model.dtos.community.large.AreaStreetDetailResp; |
| | | import com.panzhihua.common.model.dtos.community.large.SumAreaStreetResp; |
| | | import com.panzhihua.common.model.vos.area.StreetAndBuildVO; |
| | | import com.panzhihua.common.model.vos.community.ComActPasswordVo; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.ScreenStatics; |
| | |
| | | |
| | | @Select("select * from com_act where area_code = #{areaCode}") |
| | | List<ComActVO> panzhihuaMap(@Param("areaCode")String areaCode); |
| | | |
| | | List<StreetAndBuildVO> oneTagThreeReal(@Param("streetId") Long streetId); |
| | | |
| | | ScreenStatics getScreenStatics(); |
| | |
| | | |
| | | @Select("SELECT count(1) FROM com_pb_check_unit WHERE belong_to = #{belongTo}") |
| | | Integer arriveUnit(@Param("belongTo") String belongTo); |
| | | |
| | | SumAreaStreetResp sumAreaStreet(); |
| | | |
| | | AreaStreetDetailResp selectVillage(@Param("ids") List<Long> ids,@Param("type") String type); |
| | | |
| | | EventPopulationSpecialStatisticsVO selectEvent(@Param("ids") List<Long> ids); |
| | | } |
| | |
| | | |
| | | import com.panzhihua.common.model.dtos.community.PageComStreetDTO; |
| | | import com.panzhihua.common.model.dtos.community.building.BuildingDto; |
| | | import com.panzhihua.common.model.dtos.community.large.AreaStreetDetail; |
| | | import com.panzhihua.common.model.dtos.community.large.AreaStreetDetailResp; |
| | | import com.panzhihua.common.model.dtos.community.large.SumAreaStreetResp; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.community.ComStreetVO; |
| | |
| | | R populationStatics(Long streetId); |
| | | |
| | | R probably(Integer year,String belongTo); |
| | | |
| | | SumAreaStreetResp sumAreaStreet(); |
| | | |
| | | AreaStreetDetail areaStreetDetail(String code, String type); |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.model.dtos.community.building.BuildingDto; |
| | | import com.panzhihua.common.model.dtos.community.large.AreaStreetDetail; |
| | | import com.panzhihua.common.model.dtos.community.large.AreaStreetDetailResp; |
| | | import com.panzhihua.common.model.dtos.community.large.SumAreaStreetResp; |
| | | import com.panzhihua.common.model.vos.StreetVO; |
| | | import com.panzhihua.common.model.vos.area.StreetAndBuildVO; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.ScreenStatics; |
| | |
| | | import com.panzhihua.service_community.model.dos.ComActDO; |
| | | import com.panzhihua.service_community.model.dos.ComStreetDO; |
| | | import com.panzhihua.service_community.service.ComStreetService; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | /** |
| | | * @author: llming |
| | |
| | | return R.ok(activityVO); |
| | | } |
| | | |
| | | @Override |
| | | public SumAreaStreetResp sumAreaStreet() { |
| | | SumAreaStreetResp resp = comActDAO.sumAreaStreet(); |
| | | return resp; |
| | | } |
| | | |
| | | @Override |
| | | public AreaStreetDetail areaStreetDetail(String code, String type) { |
| | | //根据层级 查询 社区id |
| | | LambdaQueryWrapper<ComActDO> qry = new LambdaQueryWrapper<>(); |
| | | if(type.equals("1")){// 1 查询 大区 |
| | | qry.eq( !StringUtils.isEmpty(code),ComActDO::getAreaCode,code); |
| | | } |
| | | if(type.equals("2")){// 2 查询 街道 |
| | | qry.eq( !StringUtils.isEmpty(code),ComActDO::getStreetId,code); |
| | | } |
| | | if(type.equals("3")){// 3 查询 小区 |
| | | qry.eq( !StringUtils.isEmpty(code),ComActDO::getCommunityId,code); |
| | | } |
| | | qry.eq(ComActDO::getAppId,"wx118de8a734d269f0"); |
| | | List<ComActDO> doList = comActDAO.selectList(qry); |
| | | //解析 社区id |
| | | List<Long> ids = doList.stream().map(ComActDO::getCommunityId).collect(Collectors.toList()); |
| | | |
| | | AreaStreetDetail result = new AreaStreetDetail(); |
| | | //查询 街道相关信息 |
| | | AreaStreetDetailResp village = comActDAO.selectVillage(ids,type); |
| | | result.setAreaStreetDetailResp(village); |
| | | //查询 人口相关数据 |
| | | EventPopulationSpecialStatisticsVO eventResult = comActDAO.selectEvent(ids); |
| | | result.setEventPopulationVO(eventResult); |
| | | return result; |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | <select id="oneTagThreeReal" resultType="com.panzhihua.common.model.vos.area.StreetAndBuildVO"> |
| | | select ca.name name, |
| | | select ca.name name,ca.community_id as communityId, |
| | | (select |
| | | count( cmpct.id ) |
| | | from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmp.id = cmpct.population_id where cmpct.community_id = ca.community_id )peopleNum, |
| | |
| | | resultType="com.panzhihua.common.model.vos.neighbor.UnitActivityAnalysisVO"> |
| | | |
| | | </select> |
| | | <select id="sumAreaStreet" resultType="com.panzhihua.common.model.dtos.community.large.SumAreaStreetResp"> |
| | | SELECT |
| | | ( select count(*) FROM ( |
| | | SELECT cs.street_id,cs.area_code FROM ( SELECT street_id from com_act where app_id = 'wx118de8a734d269f0' GROUP BY street_id ) as ca INNER JOIN com_street cs on cs.street_id = ca.street_id |
| | | GROUP BY area_code) as gr ) as areaCount , |
| | | |
| | | ( SELECT count(*) FROM ( SELECT street_id from com_act where app_id = 'wx118de8a734d269f0' GROUP BY street_id ) as dd )as streetCount , |
| | | |
| | | ( SELECT count(*) FROM ( SELECT street_id from com_act where app_id = 'wx118de8a734d269f0' GROUP BY community_id ) as adfd )as actCount , |
| | | |
| | | ( SELECT count(*) from `com_mng_population` cmp RIGHT JOIN ( SELECT street_id from com_act where app_id = 'wx118de8a734d269f0' GROUP BY street_id) cs on cs.street_id = cmp.street_id where cmp.death = '0' ) as populationCount , |
| | | |
| | | ( SELECT count(*) from `com_mng_village` cmv RIGHT JOIN ( SELECT street_id from com_act where app_id = 'wx118de8a734d269f0' GROUP BY street_id) cs on cs.street_id = cmv.street_id ) as villageCount , |
| | | |
| | | ( SELECT count(*) from `com_mng_population_house` cmph RIGHT JOIN ( SELECT street_id from com_act where app_id = 'wx118de8a734d269f0' GROUP BY street_id) cs on cmph.street_id = cs.street_id ) as houseCount |
| | | </select> |
| | | <select id="selectVillage" resultType="com.panzhihua.common.model.dtos.community.large.AreaStreetDetailResp"> |
| | | select |
| | | <if test="type = '1'.toString() " > |
| | | ( SELECT count(*) from (SELECT 1 from com_act WHERE community_id in ( |
| | | <foreach collection="ids" item="id" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | ) GROUP BY street_id ) as countAS ) as streetCount , |
| | | </if> |
| | | <if test="type = '2'.toString() or type = '1'.toString()" > |
| | | ( SELECT count(*) from com_act WHERE community_id in ( |
| | | <foreach collection="ids" item="id" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | ) ) as actCount , |
| | | </if> |
| | | ( SELECT count(*) FROM com_mng_population WHERE act_id in( |
| | | <foreach collection="ids" item="id" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | ) and death = '0' ) as populationCount , |
| | | |
| | | ( SELECT count( * ) FROM com_mng_village WHERE community_id IN ( |
| | | <foreach collection="ids" item="id" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | ) ) AS villageCount, |
| | | |
| | | ( SELECT count( * ) FROM com_mng_village WHERE community_id IN ( |
| | | <foreach collection="ids" item="id" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | ) and type = '1' ) as cityVillageCount, |
| | | |
| | | ( SELECT count( * ) FROM com_mng_village WHERE community_id IN ( |
| | | <foreach collection="ids" item="id" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | ) and type = '2' ) as countryVillageCount |
| | | |
| | | |
| | | </select> |
| | | <select id="selectEvent" resultType="com.panzhihua.common.model.vos.community.screen.event.EventPopulationSpecialStatisticsVO"> |
| | | SELECT |
| | | ( SELECT count(*) FROM com_mng_population_community_tags WHERE community_id IN ( |
| | | <foreach collection="ids" item="id" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | ) and label like concat('%','残疾','%') ) as cjTotal, |
| | | ( SELECT count(*) FROM com_mng_population_community_tags WHERE community_id IN ( |
| | | <foreach collection="ids" item="id" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | ) and label like concat('%','低保','%') ) as dbTotal, |
| | | ( SELECT count(*) FROM com_mng_population_community_tags WHERE community_id IN ( |
| | | <foreach collection="ids" item="id" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | ) and label like concat('%','养老金','%') ) as lnTotal, |
| | | ( SELECT count(*) FROM com_mng_population_community_tags WHERE community_id IN ( |
| | | <foreach collection="ids" item="id" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | ) and label like concat('%','高龄','%') ) as glTotal, |
| | | ( SELECT count(*) FROM com_mng_population_community_tags WHERE community_id IN ( |
| | | <foreach collection="ids" item="id" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | ) and label like concat('%','退役','%') ) as tyTotal, |
| | | ( SELECT count(*) FROM com_mng_population_community_tags WHERE community_id IN ( |
| | | <foreach collection="ids" item="id" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | ) and label like concat('%','留守','%') ) as lsTotal |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | public R unitStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, |
| | | @RequestParam(value = "belongTo") String belongTo, |
| | | @RequestParam(value = "belongTo", required = false) String choice, |
| | | @RequestParam(value = "unitIds", required = false) Long[] unitIds) { |
| | | return comPbCheckUnitService.unitStatisticsTop(communityId, belongTo, choice,unitIds); |
| | | @RequestParam(value = "unitIds", required = false) Long[] unitIds, |
| | | @RequestParam(value = "yearTime",required = false) String yearTime) { |
| | | return comPbCheckUnitService.unitStatisticsTop(communityId, belongTo, choice,unitIds,yearTime); |
| | | } |
| | | |
| | | /** |
| | |
| | | @RequestParam(value = "belongTo") String belongTo, |
| | | @RequestParam(value = "choice", required = false) String choice, |
| | | @RequestParam(value = "checkUnitId", required = false) Long checkUnitId, |
| | | @RequestParam(value = "unitIds", required = false) Long[] unitIds) { |
| | | return comPbCheckUnitService.pbStatisticsTop(communityId, belongTo, choice, checkUnitId,unitIds); |
| | | @RequestParam(value = "unitIds", required = false) Long[] unitIds, |
| | | @RequestParam(value = "yearTime",required = false) String yearTime) { |
| | | return comPbCheckUnitService.pbStatisticsTop(communityId, belongTo, choice, checkUnitId,unitIds,yearTime); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param choice |
| | | * @return |
| | | */ |
| | | PbCheckUnitStatisticsVo unitStatisticsTop(@Param("communityIds") List<Long> communityIds, @Param("belongTo") String belongTo, @Param("choice") String choice, @Param("unitIds") Long[] unitIds); |
| | | PbCheckUnitStatisticsVo unitStatisticsTop(@Param("communityIds") List<Long> communityIds, @Param("belongTo") String belongTo, |
| | | @Param("choice") String choice, @Param("unitIds") Long[] unitIds, |
| | | @Param("yearTime") String yearTime); |
| | | |
| | | /** |
| | | * 报到单位统计 |
| | |
| | | * @return |
| | | */ |
| | | IPage<ComPbCheckUnitVo> pbStatisticsUnit(@Param("commonDto") PagePbCheckUnitCommonDto commonDto, @Param("page") Page page); |
| | | |
| | | Integer organSumIntegral(@Param("communityIds") List<Long> communityIds,@Param("yearTime") String yearTime); |
| | | |
| | | Integer pbOrganSumIntegral(@Param("communityIds") List<Long> communityIds,@Param("yearTime") String yearTime); |
| | | } |
| | | |
| | |
| | | * @param choice |
| | | * @return |
| | | */ |
| | | R unitStatisticsTop(Long communityId, String belongTo, String choice,Long[] unitIds); |
| | | R unitStatisticsTop(Long communityId, String belongTo, String choice,Long[] unitIds,String yearTime); |
| | | |
| | | /** |
| | | * 报到单位统计 |
| | |
| | | * @param checkUnitId |
| | | * @return |
| | | */ |
| | | R pbStatisticsTop(Long communityId, String belongTo, String choice, Long checkUnitId,Long[] unitIds); |
| | | R pbStatisticsTop(Long communityId, String belongTo, String choice, Long checkUnitId,Long[] unitIds ,String yearTime); |
| | | |
| | | /** |
| | | * 报到党员统计-按单位归属统计 |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.TreeListVO; |
| | | import com.panzhihua.common.model.vos.common.ComPbCheckUnitVo; |
| | | import com.panzhihua.common.model.vos.common.PbCheckUnitStatisticsVo; |
| | | import com.panzhihua.common.model.vos.partybuilding.excel.ComPbCheckUnitErrorExcelVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.excel.ComPbCheckUnitExcelVO; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R unitStatisticsTop(Long communityId, String belongTo, String choice,Long[] unitIds) { |
| | | public R unitStatisticsTop(Long communityId, String belongTo, String choice,Long[] unitIds,String yearTime) { |
| | | List<Long> communityIds = new ArrayList<>(); |
| | | if (null != communityId){ |
| | | communityIds = comPbMemberDAO.selectIds(communityId); |
| | |
| | | communityIds.add(communityId); |
| | | } |
| | | } |
| | | |
| | | return R.ok(this.baseMapper.unitStatisticsTop(communityIds, belongTo, choice,unitIds)); |
| | | //查询 活动总积分 |
| | | PbCheckUnitStatisticsVo vo = this.baseMapper.unitStatisticsTop(communityIds, belongTo, choice,unitIds,yearTime); |
| | | if(null != vo) { |
| | | Integer sum = this.baseMapper.organSumIntegral(communityIds,yearTime); |
| | | vo.setOrganSumIntegral(sum); |
| | | } |
| | | return R.ok(vo); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R pbStatisticsTop(Long communityId, String belongTo, String choice, Long checkUnitId,Long[] unitIds) { |
| | | public R pbStatisticsTop(Long communityId, String belongTo, String choice, Long checkUnitId,Long[] unitIds ,String yearTime) { |
| | | |
| | | List<Long> communityIds = new ArrayList<>(); |
| | | if (null != communityId){ |
| | |
| | | communityIds.add(communityId); |
| | | } |
| | | } |
| | | return R.ok(this.baseMapper.pbStatisticsTop(communityIds, belongTo, choice, checkUnitId,unitIds)); |
| | | //查询 活动总积分 |
| | | PbCheckUnitStatisticsVo vo = this.baseMapper.pbStatisticsTop(communityIds, belongTo, choice, checkUnitId,unitIds); |
| | | if(null != vo) { |
| | | Integer sum = this.baseMapper.pbOrganSumIntegral(communityIds,yearTime); |
| | | vo.setOrganSumIntegral(sum); |
| | | } |
| | | return R.ok(vo); |
| | | } |
| | | |
| | | /** |
| | |
| | | <if test="choice != null and choice != ''"> |
| | | AND belong_to = #{choice} |
| | | </if> |
| | | |
| | | <if test=" null != yearTime and '' != yearTime"> |
| | | and ( `create_at` >= concat(#{yearTime},'-01-01 00:00:00') AND `create_at` <= concat(#{yearTime},'-12-31 59:59:59')) |
| | | </if> |
| | | |
| | | ) AS unitTotal, |
| | | (SELECT COUNT( id ) FROM com_pb_check_unit WHERE nature_name = '机关单位' |
| | | <if test="communityIds != null and communityIds.size() >0"> |
| | |
| | | <if test="choice != null and choice != ''"> |
| | | AND belong_to = #{choice} |
| | | </if> |
| | | <if test=" null != yearTime and '' != yearTime"> |
| | | and ( `create_at` >= concat(#{yearTime},'-01-01 00:00:00') AND `create_at` <= concat(#{yearTime},'-12-31 59:59:59')) |
| | | </if> |
| | | |
| | | ) AS organTotal, |
| | | (SELECT COUNT( id ) FROM com_pb_check_unit WHERE nature_name = '企事业单位' |
| | | <if test="communityIds != null and communityIds.size() >0"> |
| | |
| | | <if test="choice != null and choice != ''"> |
| | | AND belong_to = #{choice} |
| | | </if> |
| | | <if test=" null != yearTime and '' != yearTime"> |
| | | and ( `create_at` >= concat(#{yearTime},'-01-01 00:00:00') AND `create_at` <= concat(#{yearTime},'-12-31 59:59:59')) |
| | | </if> |
| | | ) AS businessTotal, |
| | | (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="communityIds != null and communityIds.size() >0"> |
| | |
| | | <if test="choice != null and choice != ''"> |
| | | AND cpcu.belong_to = #{choice} |
| | | </if> |
| | | <if test=" null != yearTime and '' != yearTime"> |
| | | and ( cpcu.`create_at` >= concat(#{yearTime},'-01-01 00:00:00') AND cpcu.`create_at` <= concat(#{yearTime},'-12-31 59:59:59')) |
| | | </if> |
| | | ) AS partyMemberTotal |
| | | </select> |
| | | <select id="unitStatistics" resultType="com.panzhihua.common.model.vos.common.PbCheckUnitStatisticsVo"> |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | AND belong_to = temp.belong_to) AS organTotal, |
| | | AND belong_to = temp.belong_to |
| | | <if test=" null != commonDto.yearTime and '' != commonDto.yearTime"> |
| | | and ( `create_at` >= concat(#{commonDto.yearTime},'-01-01 00:00:00') AND `create_at` <= concat(#{commonDto.yearTime},'-12-31 59:59:59')) |
| | | </if> |
| | | ) AS organTotal, |
| | | (SELECT COUNT( id ) FROM com_pb_check_unit WHERE nature_name = '企事业单位' |
| | | <if test="commonDto.communityIds != null and commonDto.communityIds.size() >0"> |
| | | AND community_id IN |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | AND belong_to = temp.belong_to) AS businessTotal, |
| | | AND belong_to = temp.belong_to |
| | | <if test=" null != commonDto.yearTime and '' != commonDto.yearTime"> |
| | | and ( `create_at` >= concat(#{commonDto.yearTime},'-01-01 00:00:00') AND `create_at` <= concat(#{commonDto.yearTime},'-12-31 59:59:59')) |
| | | </if> |
| | | ) AS businessTotal, |
| | | (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="commonDto.communityIds != null and commonDto.communityIds.size() >0"> |
| | | AND m.community_id IN |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | AND cpcu.belong_to = temp.belong_to) AS partyMemberTotal |
| | | AND cpcu.belong_to = temp.belong_to |
| | | <if test=" null != commonDto.yearTime and '' != commonDto.yearTime"> |
| | | and ( cpcu.`create_at` >= concat(#{commonDto.yearTime},'-01-01 00:00:00') AND cpcu.`create_at` <= concat(#{commonDto.yearTime},'-12-31 59:59:59')) |
| | | </if> |
| | | ) AS partyMemberTotal |
| | | FROM (SELECT belong_to,COUNT( id ) AS unitTotal FROM com_pb_check_unit WHERE 1=1 |
| | | <if test=" null != commonDto.yearTime and '' != commonDto.yearTime"> |
| | | and ( `create_at` >= concat(#{commonDto.yearTime},'-01-01 00:00:00') AND `create_at` <= concat(#{commonDto.yearTime},'-12-31 59:59:59')) |
| | | </if> |
| | | <if test="commonDto.communityIds != null and commonDto.communityIds.size() >0"> |
| | | AND community_id IN |
| | | <foreach collection="commonDto.communityIds" item="item" open="(" separator="," close=")"> |
| | |
| | | cpcu.`name` |
| | | </select> |
| | | |
| | | <select id="organSumIntegral" resultType="java.lang.Integer"> |
| | | SELECT sum(csr.pb_reward_integral) as organSumIntegral from ( |
| | | SELECT cm.user_id , cu.community_id FROM com_pb_check_unit cu inner JOIN com_pb_member cm on cm.check_unit_id = cu.id |
| | | where |
| | | cm.user_id is not null |
| | | and cu.community_id is not null |
| | | <if test="communityIds != null and communityIds.size() >0"> |
| | | AND cu.community_id IN |
| | | <foreach collection="communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test=" null != yearTime and '' != yearTime"> |
| | | and ( cu.`create_at` >= concat(#{yearTime},'-01-01 00:00:00') AND cu.`create_at` <= concat(#{yearTime},'-12-31 59:59:59')) |
| | | </if> |
| | | GROUP BY cm.user_id , cu.community_id |
| | | ) as cum INNER JOIN ( |
| | | SELECT ccc.* FROM com_act_act_regist as cr INNER JOIN ( |
| | | select ca.community_id ,cs.user_id,cs.activity_id,ca.pb_reward_integral |
| | | FROM com_act_activity ca LEFT JOIN com_act_act_sign cs on cs.activity_id = ca.id WHERE cs.`status` = '1' and ca.have_integral_reward = '1' |
| | | ORDER BY cs.user_id DESC |
| | | ) as ccc on cr.activity_id = ccc.activity_id and cr.user_id = ccc.user_id |
| | | ) as csr on csr.community_id = cum.community_id and csr.user_id = cum.user_id |
| | | |
| | | </select> |
| | | <select id="pbOrganSumIntegral" resultType="java.lang.Integer"> |
| | | SELECT sum(csr.pb_reward_integral) as organSumIntegral from ( |
| | | SELECT cm.user_id , cu.community_id FROM com_pb_check_unit cu inner JOIN com_pb_member cm on cm.check_unit_id = cu.id |
| | | where |
| | | cm.user_id is not null |
| | | and cu.community_id is not null |
| | | <if test="communityIds != null and communityIds.size() >0"> |
| | | AND cu.community_id IN |
| | | <foreach collection="communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test=" null != yearTime and '' != yearTime"> |
| | | and ( cm.`create_at` >= concat(#{yearTime},'-01-01 00:00:00') AND cm.`create_at` <= concat(#{yearTime},'-12-31 59:59:59')) |
| | | </if> |
| | | GROUP BY cm.user_id , cu.community_id |
| | | ) as cum INNER JOIN ( |
| | | SELECT ccc.* FROM com_act_act_regist as cr INNER JOIN ( |
| | | select ca.community_id ,cs.user_id,cs.activity_id,ca.pb_reward_integral |
| | | FROM com_act_activity ca LEFT JOIN com_act_act_sign cs on cs.activity_id = ca.id WHERE cs.`status` = '1' and ca.have_integral_reward = '1' |
| | | ORDER BY cs.user_id DESC |
| | | ) as ccc on cr.activity_id = ccc.activity_id and cr.user_id = ccc.user_id |
| | | ) as csr on csr.community_id = cum.community_id and csr.user_id = cum.user_id |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | | |