| | |
| | | @ApiModelProperty("区级") |
| | | private String belongTo; |
| | | |
| | | @ApiModelProperty("单位性质") |
| | | private String natureName; |
| | | |
| | | } |
| | | |
| | |
| | | @ApiModelProperty("单位性质") |
| | | private String natureName; |
| | | |
| | | @ApiModelProperty("工作单位") |
| | | private String workUnitName; |
| | | |
| | | @ApiModelProperty("是否注册小程序(1.是 0.否)") |
| | | private Integer isRegister; |
| | | } |
| | |
| | | * 报到单位统计-顶部数据 |
| | | * @param communityId |
| | | * @param belongTo |
| | | * @param choice |
| | | * @return |
| | | */ |
| | | @GetMapping("/statistics/top") |
| | | R unitStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, @RequestParam(value = "belongTo") String belongTo); |
| | | R unitStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, |
| | | @RequestParam(value = "belongTo") String belongTo, |
| | | @RequestParam(value = "choice", required = false) String choice); |
| | | |
| | | /** |
| | | * 报到单位统计 |
| | |
| | | * 报到党员统计-顶部数据 |
| | | * @param communityId |
| | | * @param belongTo |
| | | * @param choice |
| | | * @param checkUnitId |
| | | * @return |
| | | */ |
| | | @GetMapping("/pbStatistics/top") |
| | | R pbStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, @RequestParam(value = "belongTo") String belongTo); |
| | | R pbStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, |
| | | @RequestParam(value = "belongTo") String belongTo, |
| | | @RequestParam(value = "choice", required = false) String choice, |
| | | @RequestParam(value = "checkUnitId", required = false) Long checkUnitId); |
| | | |
| | | /** |
| | | * 报到党员统计-按单位归属统计 |
| | |
| | | import com.panzhihua.community_backstage.excel.CustomSheetWriteHandler; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "报到单位统计-顶部数据", response = PbCheckUnitStatisticsVo.class) |
| | | @ApiImplicitParam(name = "communityId", value = "社区id") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "communityId", value = "社区id"), |
| | | @ApiImplicitParam(name = "choice", value = "单位归属选择") |
| | | }) |
| | | @GetMapping("/statistics/top") |
| | | public R unitStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId) { |
| | | public R unitStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, |
| | | @RequestParam(value = "belongTo", required = false) String choice) { |
| | | String belongTo = ""; |
| | | String[] area={"东区","仁和区","米易县","盐边县"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | belongTo = this.getLoginUserInfo().getName(); |
| | | } |
| | | return this.comPbCheckUnitService.unitStatisticsTop(communityId, belongTo); |
| | | return this.comPbCheckUnitService.unitStatisticsTop(communityId, belongTo, choice); |
| | | } |
| | | |
| | | @ApiOperation(value = "报到单位统计", response = PbCheckUnitStatisticsVo.class) |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "报到党员统计-顶部数据", response = PbCheckUnitStatisticsVo.class) |
| | | @ApiImplicitParam(name = "communityId", value = "社区id") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "communityId", value = "社区id"), |
| | | @ApiImplicitParam(name = "choice", value = "单位归属选择"), |
| | | @ApiImplicitParam(name = "checkUnitId", value = "单位id") |
| | | }) |
| | | @GetMapping("/pbStatistics/top") |
| | | public R pbStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId) { |
| | | public R pbStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, |
| | | @RequestParam(value = "choice", required = false) String choice, |
| | | @RequestParam(value = "checkUnitId", required = false) Long checkUnitId) { |
| | | String belongTo = ""; |
| | | String[] area={"东区","仁和区","米易县","盐边县"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | belongTo = this.getLoginUserInfo().getName(); |
| | | } |
| | | return this.comPbCheckUnitService.pbStatisticsTop(communityId, belongTo); |
| | | return this.comPbCheckUnitService.pbStatisticsTop(communityId, belongTo, choice, checkUnitId); |
| | | } |
| | | |
| | | @ApiOperation(value = "报到党员统计-按单位归属统计", response = PbCheckUnitStatisticsVo.class) |
| | |
| | | <orderEntry type="library" name="Maven: com.google.code.findbugs:annotations:3.0.1" level="project" /> |
| | | <orderEntry type="library" name="Maven: net.jcip:jcip-annotations:1.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.github.penggle:kaptcha:2.3.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.jhlabs:filters:2.0.235-1" level="project" /> |
| | | </component> |
| | | </module> |
| | |
| | | * 报到单位统计-顶部数据 |
| | | * @param communityId |
| | | * @param belongTo |
| | | * @param choice |
| | | * @return |
| | | */ |
| | | @GetMapping("/statistics/top") |
| | | public R unitStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, |
| | | @RequestParam(value = "belongTo") String belongTo) { |
| | | return comPbCheckUnitService.unitStatisticsTop(communityId, belongTo); |
| | | @RequestParam(value = "belongTo") String belongTo, |
| | | @RequestParam(value = "belongTo", required = false) String choice) { |
| | | return comPbCheckUnitService.unitStatisticsTop(communityId, belongTo, choice); |
| | | } |
| | | |
| | | /** |
| | |
| | | * 报到党员统计-顶部数据 |
| | | * @param communityId |
| | | * @param belongTo |
| | | * @param choice |
| | | * @param checkUnitId |
| | | * @return |
| | | */ |
| | | @GetMapping("/pbStatistics/top") |
| | | public R pbStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, |
| | | @RequestParam(value = "belongTo") String belongTo) { |
| | | return comPbCheckUnitService.pbStatisticsTop(communityId, belongTo); |
| | | @RequestParam(value = "belongTo") String belongTo, |
| | | @RequestParam(value = "choice", required = false) String choice, |
| | | @RequestParam(value = "checkUnitId", required = false) Long checkUnitId) { |
| | | return comPbCheckUnitService.pbStatisticsTop(communityId, belongTo, choice, checkUnitId); |
| | | } |
| | | |
| | | /** |
| | |
| | | * 报到单位统计-顶部数据 |
| | | * @param communityId |
| | | * @param belongTo |
| | | * @param choice |
| | | * @return |
| | | */ |
| | | PbCheckUnitStatisticsVo unitStatisticsTop(@Param("communityId") Long communityId, @Param("belongTo") String belongTo); |
| | | PbCheckUnitStatisticsVo unitStatisticsTop(@Param("communityId") Long communityId, @Param("belongTo") String belongTo, @Param("choice") String choice); |
| | | |
| | | /** |
| | | * 报到单位统计 |
| | |
| | | * 报到党员统计-顶部数据 |
| | | * @param communityId |
| | | * @param belongTo |
| | | * @param choice |
| | | * @param checkUnitId |
| | | * @return |
| | | */ |
| | | PbCheckUnitStatisticsVo pbStatisticsTop(@Param("communityId") Long communityId, @Param("belongTo") String belongTo); |
| | | PbCheckUnitStatisticsVo pbStatisticsTop(@Param("communityId") Long communityId, @Param("belongTo") String belongTo, @Param("choice") String choice, @Param("checkUnitId") Long checkUnitId); |
| | | |
| | | /** |
| | | * 报到党员统计-按单位归属统计 |
| | |
| | | * 报到单位统计-顶部数据 |
| | | * @param communityId |
| | | * @param belongTo |
| | | * @param choice |
| | | * @return |
| | | */ |
| | | R unitStatisticsTop(Long communityId, String belongTo); |
| | | R unitStatisticsTop(Long communityId, String belongTo, String choice); |
| | | |
| | | /** |
| | | * 报到单位统计 |
| | |
| | | * 报到党员统计-顶部数据 |
| | | * @param communityId |
| | | * @param belongTo |
| | | * @param choice |
| | | * @param checkUnitId |
| | | * @return |
| | | */ |
| | | R pbStatisticsTop(Long communityId, String belongTo); |
| | | R pbStatisticsTop(Long communityId, String belongTo, String choice, Long checkUnitId); |
| | | |
| | | /** |
| | | * 报到党员统计-按单位归属统计 |
| | |
| | | import com.google.common.collect.Lists; |
| | | import com.panzhihua.common.enums.ComPbCheckUnitTypeEnum; |
| | | import com.panzhihua.common.model.vos.common.ComPbCheckUnitVo; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyBuildingMemberVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.excel.ComPbCheckUnitErrorExcelVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.excel.ComPbCheckUnitExcelVO; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | |
| | | * 报到单位统计-顶部数据 |
| | | * @param communityId |
| | | * @param belongTo |
| | | * @param choice |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R unitStatisticsTop(Long communityId, String belongTo) { |
| | | return R.ok(this.baseMapper.unitStatisticsTop(communityId, belongTo)); |
| | | public R unitStatisticsTop(Long communityId, String belongTo, String choice) { |
| | | return R.ok(this.baseMapper.unitStatisticsTop(communityId, belongTo, choice)); |
| | | } |
| | | |
| | | /** |
| | |
| | | * 报到党员统计-顶部数据 |
| | | * @param communityId |
| | | * @param belongTo |
| | | * @param choice |
| | | * @param checkUnitId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R pbStatisticsTop(Long communityId, String belongTo) { |
| | | return R.ok(this.baseMapper.pbStatisticsTop(communityId, belongTo)); |
| | | public R pbStatisticsTop(Long communityId, String belongTo, String choice, Long checkUnitId) { |
| | | return R.ok(this.baseMapper.pbStatisticsTop(communityId, belongTo, choice, checkUnitId)); |
| | | } |
| | | |
| | | /** |
| | |
| | | <if test="dto.belongTo != null and dto.belongTo != ''"> |
| | | and cpcu.belong_to =#{dto.belongTo} |
| | | </if> |
| | | <if test="dto.natureName != null and dto.natureName != ''"> |
| | | and cpcu.nature_name = #{dto.natureName} |
| | | </if> |
| | | </where> |
| | | order by cpcu.create_at desc |
| | | </select> |
| | |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND belong_to = #{belongTo} |
| | | </if> |
| | | <if test="choice != null and choice != ''"> |
| | | AND belong_to = #{choice} |
| | | </if> |
| | | ) AS unitTotal, |
| | | (SELECT COUNT( id ) FROM com_pb_check_unit WHERE nature_name = '机关单位' |
| | | <if test="communityId != null"> |
| | |
| | | </if> |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND belong_to = #{belongTo} |
| | | </if> |
| | | <if test="choice != null and choice != ''"> |
| | | AND belong_to = #{choice} |
| | | </if> |
| | | ) AS organTotal, |
| | | (SELECT COUNT( id ) FROM com_pb_check_unit WHERE nature_name = '企事业单位' |
| | |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND belong_to = #{belongTo} |
| | | </if> |
| | | <if test="choice != null and choice != ''"> |
| | | AND belong_to = #{choice} |
| | | </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="communityId != null"> |
| | |
| | | </if> |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND cpcu.belong_to = #{belongTo} |
| | | </if> |
| | | <if test="choice != null and choice != ''"> |
| | | AND cpcu.belong_to = #{choice} |
| | | </if> |
| | | ) AS partyMemberTotal |
| | | </select> |
| | |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND cpcu.belong_to = #{belongTo} |
| | | </if> |
| | | <if test="choice != null and choice != ''"> |
| | | AND cpcu.belong_to = #{choice} |
| | | </if> |
| | | <if test="checkUnitId != null"> |
| | | AND m.check_unit_id = #{checkUnitId} |
| | | </if> |
| | | ) AS organTotal, |
| | | (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 |
| | | AND cpcu.nature_name = '企事业单位' |
| | |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND cpcu.belong_to = #{belongTo} |
| | | </if> |
| | | <if test="choice != null and choice != ''"> |
| | | AND cpcu.belong_to = #{choice} |
| | | </if> |
| | | <if test="checkUnitId != null"> |
| | | AND m.check_unit_id = #{checkUnitId} |
| | | </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="communityId != null"> |
| | |
| | | </if> |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND cpcu.belong_to = #{belongTo} |
| | | </if> |
| | | <if test="choice != null and choice != ''"> |
| | | AND cpcu.belong_to = #{choice} |
| | | </if> |
| | | <if test="checkUnitId != null"> |
| | | AND m.check_unit_id = #{checkUnitId} |
| | | </if> |
| | | ) AS partyMemberTotal |
| | | </select> |
| | |
| | | </select> |
| | | <select id="pbStatisticsUnit" resultType="com.panzhihua.common.model.vos.common.ComPbCheckUnitVo"> |
| | | SELECT |
| | | cpcu.id, |
| | | cpcu.`name`, |
| | | cpcu.nature_name, |
| | | cpcu.belong_to, |
| | |
| | | <if test="dto.natureName !=null and dto.natureName !=''"> |
| | | and cpcu.nature_name = #{dto.natureName} |
| | | </if> |
| | | <if test="dto.workUnitName !=null and dto.workUnitName !=''"> |
| | | and cpcu.name = #{dto.workUnitName} |
| | | </if> |
| | | <if test="dto.isRegister !=null"> |
| | | <if test="dto.isRegister == 1"> |
| | | and m.user_id IS NOT NULL |