Merge remote-tracking branch 'origin/huacheng_zts' into huacheng_test
| | |
| | | @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){ |
| | | return communityService.institutionalUnitServiceAnalysis(year,type,range,communityId,page,size,belongTo); |
| | | @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); |
| | | } |
| | | |
| | | |
| | |
| | | @ApiModelProperty("党员总数") |
| | | private Integer partyMemberCount; |
| | | |
| | | @ApiModelProperty("单位统计数据列表") |
| | | private PageVO<List<UnitActivityAnalysisVO>> unitList; |
| | | @ApiModelProperty("单位统计数据列表(时长倒序)") |
| | | private PageVO<List<UnitActivityAnalysisVO>> unitListByTime; |
| | | |
| | | @ApiModelProperty("党员统计数据列表(时长倒序)") |
| | | private PageVO<List<PartyMemberAnalysisVO>> partyMemberListByTime; |
| | | |
| | | @ApiModelProperty("党员统计数据列表") |
| | | private PageVO<List<PartyMemberAnalysisVO>> partyMemberList; |
| | | @ApiModelProperty("单位统计数据列表(次数倒序)") |
| | | private PageVO<List<UnitActivityAnalysisVO>> unitListByTimes; |
| | | |
| | | @ApiModelProperty("党员统计数据列表(次数倒序)") |
| | | private PageVO<List<PartyMemberAnalysisVO>> partyMemberByTimes; |
| | | |
| | | @ApiModelProperty("机关单位服务总次数") |
| | | private Integer unitServiceTotalCount; |
| | |
| | | @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 = "belongTo",required = false) String belongTo, |
| | | @RequestParam(value = "unitId",required = false) Long unitId); |
| | | |
| | | } |
| | |
| | | @RequestParam(value = "range",required = false)Integer range,@RequestParam(value = "communityId",required = false) Long communityId, |
| | | @RequestParam(value = "page",required = false) Integer page, |
| | | @RequestParam(value = "belongTo",required = false) String belongTo, |
| | | @RequestParam(value = "size",required = false) Integer size){ |
| | | return this.comActNeighborCircleService.institutionalUnitServiceAnalysis(year,type,range,communityId,page,size,belongTo); |
| | | @RequestParam(value = "size",required = false) Integer size, |
| | | @RequestParam(value = "unitId",required = false) Long unitId ){ |
| | | return this.comActNeighborCircleService.institutionalUnitServiceAnalysis(year,type,range,communityId,page,size,belongTo,unitId); |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 单位服务统计 |
| | | */ |
| | | List<UnitActivityAnalysisVO> institutionalUnitServiceAnalysis(@Param("beginTime") String beginTime, @Param("endTime") String endTIme, @Param("belongTo") String belongTo); |
| | | List<UnitActivityAnalysisVO> institutionalUnitActivityAnalysis(@Param("beginTime") String beginTime, @Param("endTime") String endTIme, @Param("belongTo") String belongTo); |
| | | List<UnitActivityAnalysisVO> institutionalUnitServiceAnalysis(@Param("beginTime") String beginTime, @Param("endTime") String endTIme, @Param("belongTo") String belongTo,@Param("communityId") Long communityId); |
| | | List<UnitActivityAnalysisVO> institutionalUnitActivityAnalysis(@Param("beginTime") String beginTime, @Param("endTime") String endTIme, @Param("belongTo") String belongTo,@Param("communityId") Long communityId); |
| | | |
| | | List<PartyMemberAnalysisVO> institutionalPartyMemberServiceAnalysis(@Param("beginTime") String beginTime, @Param("endTime") String endTIme, @Param("belongTo") String belongTo); |
| | | List<PartyMemberAnalysisVO> institutionalPartyMemberActAnalysis(@Param("beginTime") String beginTime, @Param("endTime") String endTIme, @Param("belongTo") String belongTo); |
| | | List<PartyMemberAnalysisVO> institutionalPartyMemberServiceAnalysis(@Param("beginTime") String beginTime, @Param("endTime") String endTIme, @Param("belongTo") String belongTo,@Param("communityId") Long communityId,@Param("unitId") Long unitId); |
| | | List<PartyMemberAnalysisVO> institutionalPartyMemberActAnalysis(@Param("beginTime") String beginTime, @Param("endTime") String endTIme, @Param("belongTo") String belongTo,@Param("communityId") Long communityId,@Param("unitId") Long unitId); |
| | | List<PartyMemberAnalysisVO> institutionalPartyMemberServiceAnalysisByServicesTimes(@Param("beginTime") String beginTime, @Param("endTime") String endTIme, @Param("belongTo") String belongTo); |
| | | } |
| | |
| | | * 机关单位服务统计排行 |
| | | * @return |
| | | * */ |
| | | R institutionalUnitServiceAnalysis(Integer year, Integer type, Integer range,Long communityId,Integer page,Integer size,String belongTo); |
| | | R institutionalUnitServiceAnalysis(Integer year, Integer type, Integer range,Long communityId,Integer page,Integer size,String belongTo,Long unitId); |
| | | |
| | | /** |
| | | * 后台服务统计 |
| | |
| | | import com.panzhihua.service_community.service.ComActNeighborCircleService; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | /** |
| | | * @auther lyq |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R institutionalUnitServiceAnalysis(Integer year, Integer type, Integer range, Long communityId,Integer page,Integer size,String belongTo) { |
| | | public R institutionalUnitServiceAnalysis(Integer year, Integer type, Integer range, Long communityId,Integer page,Integer size,String belongTo,Long unitId) { |
| | | ActivityAnalysisVO activityVO=new ActivityAnalysisVO(); |
| | | String beginTime=null; |
| | | String endTime=null; |
| | |
| | | } |
| | | } |
| | | //获取党员活动统计数据 |
| | | List<PartyMemberAnalysisVO> partyMemberAnalysisVOS = comActNeighborCircleDAO.institutionalPartyMemberServiceAnalysis(beginTime, endTime, belongTo); |
| | | List<PartyMemberAnalysisVO> partyMemberAnalysisVOS1 = comActNeighborCircleDAO.institutionalPartyMemberActAnalysis(beginTime, endTime, belongTo); |
| | | List<PartyMemberAnalysisVO> partyMemberAnalysisVOS = comActNeighborCircleDAO.institutionalPartyMemberServiceAnalysis(beginTime, endTime, belongTo,communityId,unitId); |
| | | List<PartyMemberAnalysisVO> partyMemberAnalysisVOS1 = comActNeighborCircleDAO.institutionalPartyMemberActAnalysis(beginTime, endTime, belongTo,communityId,unitId); |
| | | if (partyMemberAnalysisVOS1.size()>0){ |
| | | for (PartyMemberAnalysisVO vo : partyMemberAnalysisVOS1) { |
| | | if (ObjectUtils.isNotEmpty(vo)){ |
| | |
| | | activityVO.setPartyMemberServiceTotalCount(memberServiceCount); |
| | | activityVO.setPartyMemberServiceTotalTime(memberServiceTotalTome); |
| | | //处理排序 |
| | | if (null != type){ |
| | | if (type.equals(1)){ |
| | | //按时长排序 |
| | | ListUtil.sortByProperty(unitActivityAnalysisVOS, "serviceTime"); |
| | | ListUtil.sortByProperty(partyMemberAnalysisVOS, "serviceTime"); |
| | | }else if (type.equals(2)){ |
| | | //按次数排序 |
| | | ListUtil.sortByProperty(unitActivityAnalysisVOS, "serviceTimes"); |
| | | ListUtil.sortByProperty(partyMemberAnalysisVOS, "serviceTimes"); |
| | | } |
| | | } |
| | | // if (null != type){ |
| | | // if (type.equals(1)){ |
| | | // //按时长排序 |
| | | // ListUtil.sortByProperty(unitActivityAnalysisVOS, "serviceTime"); |
| | | // ListUtil.sortByProperty(partyMemberAnalysisVOS, "serviceTime"); |
| | | // }else if (type.equals(2)){ |
| | | // //按次数排序 |
| | | // ListUtil.sortByProperty(unitActivityAnalysisVOS, "serviceTimes"); |
| | | // ListUtil.sortByProperty(partyMemberAnalysisVOS, "serviceTimes"); |
| | | // } |
| | | // } |
| | | //统一进行排序,避免统计之后顺序混乱 |
| | | ListUtil.sortByProperty(unitActivityAnalysisVOS, "serviceTime"); |
| | | partyMemberAnalysisVOS = ListUtil.sortByProperty(partyMemberAnalysisVOS, "serviceTime"); |
| | | //执行倒序 |
| | | Collections.reverse(unitActivityAnalysisVOS); |
| | | Collections.reverse(partyMemberAnalysisVOS); |
| | | //处理分页 |
| | | PageVO<List<UnitActivityAnalysisVO>> unitPage=new PageVO<>(); |
| | | PageVO<List<PartyMemberAnalysisVO>> memberPage=new PageVO<>(); |
| | |
| | | unitPage.setRecords(unitActivityAnalysisVOS); |
| | | memberPage.setRecords(partyMemberAnalysisVOS); |
| | | } |
| | | activityVO.setUnitList(unitPage); |
| | | activityVO.setPartyMemberList(memberPage); |
| | | activityVO.setUnitListByTime(unitPage); |
| | | activityVO.setPartyMemberListByTime(memberPage); |
| | | List<UnitActivityAnalysisVO> unitActivityAnalysisVOTimes=unitActivityAnalysisVOS; |
| | | List<PartyMemberAnalysisVO> partyMemberAnalysisVOTimes=partyMemberAnalysisVOS; |
| | | ListUtil.sortByProperty(unitActivityAnalysisVOTimes, "serviceTimes"); |
| | | ListUtil.sortByProperty(partyMemberAnalysisVOTimes, "serviceTimes"); |
| | | Collections.reverse(unitActivityAnalysisVOTimes); |
| | | Collections.reverse(partyMemberAnalysisVOTimes); |
| | | PageVO<List<UnitActivityAnalysisVO>> unitPage1=new PageVO<>(); |
| | | PageVO<List<PartyMemberAnalysisVO>> memberPage1=new PageVO<>(); |
| | | if (ObjectUtils.isNotEmpty(page) && ObjectUtils.isNotEmpty(size)){ |
| | | //分页处理 |
| | | unitPage1.setRecordsCount(unitActivityAnalysisVOS.size()); |
| | | unitPage1.setPage(page); |
| | | unitPage1.setPages(getPages(unitPage.getRecordsCount(),size )); |
| | | memberPage1.setPage(page); |
| | | memberPage1.setRecordsCount(partyMemberAnalysisVOS.size()); |
| | | memberPage1.setPages(getPages(memberPage.getRecordsCount(), size)); |
| | | //处理分页的结果 |
| | | unitPage1.setRecords(subUnitList((ArrayList) unitActivityAnalysisVOTimes, page,size)); |
| | | memberPage1.setRecords(subUnitList((ArrayList)partyMemberAnalysisVOTimes,page ,size)); |
| | | |
| | | }else { |
| | | unitPage1.setRecords(unitActivityAnalysisVOS); |
| | | memberPage1.setRecords(partyMemberAnalysisVOS); |
| | | } |
| | | activityVO.setPartyMemberByTimes(memberPage1); |
| | | activityVO.setUnitListByTimes(unitPage1); |
| | | return R.ok(activityVO); |
| | | |
| | | } |
| | |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | and belong_to=#{belongTo} |
| | | </if> |
| | | <if test="communityId != null"> |
| | | and canc.community_id=#{communityId} |
| | | </if> |
| | | group by(canc.solve_unit_id) |
| | | having serviceTimes<>'' and serviceTime<>'' |
| | | order by serviceTime |
| | | order by serviceTime desc |
| | | </select> |
| | | <select id="institutionalUnitActivityAnalysis" |
| | | resultType="com.panzhihua.common.model.vos.neighbor.UnitActivityAnalysisVO"> |
| | |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | and belong_to=#{belongTo} |
| | | </if> |
| | | <if test="communityId != null"> |
| | | and canc.community_id=#{communityId} |
| | | </if> |
| | | GROUP BY (caa.check_unit_id) |
| | | having serviceTimes<>'' and serviceTime<>'' |
| | | order by serviceTime |
| | | order by serviceTime desc |
| | | </select> |
| | | <select id="institutionalPartyMemberServiceAnalysis" |
| | | resultType="com.panzhihua.common.model.vos.neighbor.PartyMemberAnalysisVO"> |
| | | SELECT count(caa.sponsor_id) as serviceTimes,sum(caa.duration) as serviceTime,caa.check_unit_id as unitId |
| | | ,caa.community_id as communityId,caa.sponsor_id as memberId,su.name as memberName,cpcu.name as belongUnit,ca.name as belongCommunity,cpcu.belong_to |
| | | ,caa.community_id as communityId,caa.sponsor_id as memberId,su.name as memberName,su.relation_name as belongUnit,ca.name as belongCommunity,cpcu.belong_to |
| | | FROM `com_act_activity` as caa |
| | | left join com_act_act_sign as caas on caa.id=caas.activity_id |
| | | left join sys_user as su on caa.sponsor_id=su.user_id |
| | |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | and belong_to=#{belongTo} |
| | | </if> |
| | | <if test="communityId != null"> |
| | | and su.communityId=#{communityId} |
| | | </if> |
| | | GROUP BY (caa.sponsor_id) |
| | | having serviceTimes<>'' and serviceTime<>'' and memberName<>'' |
| | | <if test="unitId != null"> |
| | | and unitId=#{unitId} |
| | | </if> |
| | | order by serviceTime desc |
| | | </select> |
| | | <select id="institutionalPartyMemberActAnalysis" |
| | | resultType="com.panzhihua.common.model.vos.neighbor.PartyMemberAnalysisVO"> |
| | | SELECT count(canc.solve_id) as serviceTimes,sum(canc.real_service_time) as serviceTime |
| | | ,canc.community_id as communityId,canc.solve_id as memberId,su.name as memberName,cpcu.name as belongUnit,ca.name as belongCommunity,cpcu.belong_to |
| | | ,canc.community_id as communityId,canc.solve_id as memberId,su.name as memberName,su.relation_name as belongUnit,ca.name as belongCommunity,cpcu.belong_to |
| | | FROM `com_act_neighbor_circle` as canc |
| | | left join sys_user as su on canc.solve_id=su.user_id |
| | | left join com_act as ca on su.community_id=ca.community_id |
| | |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | and belong_to=#{belongTo} |
| | | </if> |
| | | <if test="communityId != null"> |
| | | and su.communityId=#{communityId} |
| | | </if> |
| | | GROUP BY (canc.solve_id) |
| | | having serviceTimes<>'' and serviceTime<>'' and memberName<>'' |
| | | <if test="unitId != null"> |
| | | and unitId=#{unitId} |
| | | </if> |
| | | order by serviceTime desc |
| | | </select> |
| | | <select id="institutionalPartyMemberServiceAnalysisByServicesTimes" |
| | | resultType="com.panzhihua.common.model.vos.neighbor.PartyMemberAnalysisVO"> |
| | | SELECT count(caa.check_unit_id) as serviceTimes,sum(caa.duration) as serviceTime,caa.check_unit_id as unitId,caa.community_id as communityId,cpcu.belong_to |
| | | FROM com_act_activity as caa |
| | | left join com_pb_check_unit as cpcu on caa.check_unit_id=cpcu.id |
| | | where caa.check_unit_id<>'' |
| | | and caa.type=5 |
| | | <if test="beginTime != null"> |
| | | and caa.create_at between #{beginTime} and #{endTime} |
| | | </if> |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | and belong_to=#{belongTo} |
| | | </if> |
| | | GROUP BY (caa.check_unit_id) |
| | | having serviceTimes<>'' and serviceTime<>'' |
| | | order by serviceTimes desc |
| | | </select> |
| | | </mapper> |