Merge branch 'local_20221024' into huacheng_test
| | |
| | | |
| | | @ApiModelProperty(value = "社区id集合") |
| | | private List<Long> communityIds; |
| | | |
| | | @ApiModelProperty(value = "报道单位id集合") |
| | | private Long[] unitIds; |
| | | } |
| | | |
| | |
| | | @GetMapping("/statistics/top") |
| | | R unitStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, |
| | | @RequestParam(value = "belongTo") String belongTo, |
| | | @RequestParam(value = "choice", required = false) String choice); |
| | | @RequestParam(value = "choice", required = false) String choice, |
| | | @RequestParam(value = "unitIds", required = false) Long[] unitIds); |
| | | |
| | | /** |
| | | * 报到单位统计 |
| | |
| | | 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); |
| | | @RequestParam(value = "checkUnitId", required = false) Long checkUnitId, |
| | | @RequestParam(value = "unitIds", required = false) Long[] unitIds); |
| | | |
| | | /** |
| | | * 报到党员统计-按单位归属统计 |
| | |
| | | private SFTPConfig sftpConfig; |
| | | @Resource |
| | | private UserService userService; |
| | | private final Long[] ids = {1584725574201409537L,1584725574771834881L,1584725575031881730L,1584725575593918466L, |
| | | 1584725576118206466L,1584725576416002050L,1584725576667660289L,1584725576952872961L,1584725577238085633L, |
| | | 1584725577854648322L,1584725578626400258L,1584725579213602817L,1584725579867914241L,1584725580505448449L, |
| | | 1584725580815826946L,1584725581386252289L,1584725581671464962L,1584726087093485569L,1584726087433224193L, |
| | | 1584726088058175490L,1584726088880259073L,1584726089442295809L,1584726091128406018L,1584726091694637058L, |
| | | 1584726092537692162L,1584726093053591554L,1584726093779206146L,1584726094655815681L}; |
| | | |
| | | /** |
| | | * description queryByPage 分页查询 |
| | |
| | | public R queryByPage(@RequestBody PageComPbCheckUnitDto comPbCheckUnit) { |
| | | //comPbCheckUnit.setCommunityId(this.getCommunityId()); |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区","钒钛高新区"}; |
| | | Long[] ids = {1584725574201409537L,1584725574771834881L,1584725575031881730L,1584725575593918466L, |
| | | 1584725576118206466L,1584725576416002050L,1584725576667660289L,1584725576952872961L,1584725577238085633L, |
| | | 1584725577854648322L,1584725578626400258L,1584725579213602817L,1584725579867914241L,1584725580505448449L, |
| | | 1584725580815826946L,1584725581386252289L,1584725581671464962L,1584726087093485569L,1584726087433224193L, |
| | | 1584726088058175490L,1584726088880259073L,1584726089442295809L,1584726091128406018L,1584726091694637058L, |
| | | 1584726092537692162L,1584726093053591554L,1584726093779206146L,1584726094655815681L}; |
| | | |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(ArrayUtil.contains(area, loginUserInfo.getName())){ |
| | | comPbCheckUnit.setBelongTo(loginUserInfo.getName()); |
| | |
| | | @RequestParam(value = "belongTo", required = false) String choice) { |
| | | String belongTo = ""; |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区","钒钛高新区"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | belongTo = this.getLoginUserInfo().getName(); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(ArrayUtil.contains(area, loginUserInfo.getName())){ |
| | | belongTo = loginUserInfo.getName(); |
| | | } |
| | | return this.comPbCheckUnitService.unitStatisticsTop(communityId, belongTo, choice); |
| | | Long[] unitIds = {}; |
| | | //攀枝花中国农业银行 |
| | | if ("PZHZGNYYH".equals(loginUserInfo.getAccount())){ |
| | | unitIds = ids; |
| | | } |
| | | return this.comPbCheckUnitService.unitStatisticsTop(communityId, belongTo, choice,unitIds); |
| | | } |
| | | |
| | | @ApiOperation(value = "报到单位统计", response = PbCheckUnitStatisticsVo.class) |
| | | @PostMapping("/statistics") |
| | | public R unitStatistics(@RequestBody PagePbCheckUnitCommonDto commonDto) { |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区","钒钛高新区"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | commonDto.setBelongTo(this.getLoginUserInfo().getName()); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(ArrayUtil.contains(area, loginUserInfo.getName())){ |
| | | commonDto.setBelongTo(loginUserInfo.getName()); |
| | | } |
| | | //攀枝花中国农业银行 |
| | | if ("PZHZGNYYH".equals(loginUserInfo.getAccount())){ |
| | | commonDto.setUnitIds(ids); |
| | | } |
| | | return this.comPbCheckUnitService.unitStatistics(commonDto); |
| | | } |
| | |
| | | @RequestParam(value = "checkUnitId", required = false) Long checkUnitId) { |
| | | String belongTo = ""; |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区","钒钛高新区"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | belongTo = this.getLoginUserInfo().getName(); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(ArrayUtil.contains(area, loginUserInfo.getName())){ |
| | | belongTo = loginUserInfo.getName(); |
| | | } |
| | | return this.comPbCheckUnitService.pbStatisticsTop(communityId, belongTo, choice, checkUnitId); |
| | | Long[] unitIds = {}; |
| | | //攀枝花中国农业银行 |
| | | if ("PZHZGNYYH".equals(loginUserInfo.getAccount())){ |
| | | unitIds = ids; |
| | | } |
| | | return this.comPbCheckUnitService.pbStatisticsTop(communityId, belongTo, choice, checkUnitId,unitIds); |
| | | } |
| | | |
| | | @ApiOperation(value = "报到党员统计-按单位归属统计", response = PbCheckUnitStatisticsVo.class) |
| | | @PostMapping("/pbStatistics/belong") |
| | | public R pbStatisticsBelong(@RequestBody PagePbCheckUnitCommonDto commonDto) { |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区","钒钛高新区"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | commonDto.setBelongTo(this.getLoginUserInfo().getName()); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(ArrayUtil.contains(area, loginUserInfo.getName())){ |
| | | commonDto.setBelongTo(loginUserInfo.getName()); |
| | | } |
| | | //攀枝花中国农业银行 |
| | | if ("PZHZGNYYH".equals(loginUserInfo.getAccount())){ |
| | | commonDto.setUnitIds(ids); |
| | | } |
| | | return this.comPbCheckUnitService.pbStatisticsBelong(commonDto); |
| | | } |
| | |
| | | @PostMapping("/pbStatistics/unit") |
| | | public R pbStatisticsUnit(@RequestBody PagePbCheckUnitCommonDto commonDto) { |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区","钒钛高新区"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | commonDto.setBelongTo(this.getLoginUserInfo().getName()); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(ArrayUtil.contains(area, loginUserInfo.getName())){ |
| | | commonDto.setBelongTo(loginUserInfo.getName()); |
| | | } |
| | | //攀枝花中国农业银行 |
| | | if ("PZHZGNYYH".equals(loginUserInfo.getAccount())){ |
| | | commonDto.setUnitIds(ids); |
| | | } |
| | | return this.comPbCheckUnitService.pbStatisticsUnit(commonDto); |
| | | } |
| | |
| | | @GetMapping("/statistics/top") |
| | | public R unitStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, |
| | | @RequestParam(value = "belongTo") String belongTo, |
| | | @RequestParam(value = "belongTo", required = false) String choice) { |
| | | return comPbCheckUnitService.unitStatisticsTop(communityId, belongTo, choice); |
| | | @RequestParam(value = "belongTo", required = false) String choice, |
| | | @RequestParam(value = "unitIds", required = false) Long[] unitIds) { |
| | | return comPbCheckUnitService.unitStatisticsTop(communityId, belongTo, choice,unitIds); |
| | | } |
| | | |
| | | /** |
| | |
| | | public 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) { |
| | | return comPbCheckUnitService.pbStatisticsTop(communityId, belongTo, choice, checkUnitId); |
| | | @RequestParam(value = "checkUnitId", required = false) Long checkUnitId, |
| | | @RequestParam(value = "unitIds", required = false) Long[] unitIds) { |
| | | return comPbCheckUnitService.pbStatisticsTop(communityId, belongTo, choice, checkUnitId,unitIds); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param choice |
| | | * @return |
| | | */ |
| | | PbCheckUnitStatisticsVo unitStatisticsTop(@Param("communityIds") List<Long> communityIds, @Param("belongTo") String belongTo, @Param("choice") String choice); |
| | | PbCheckUnitStatisticsVo unitStatisticsTop(@Param("communityIds") List<Long> communityIds, @Param("belongTo") String belongTo, @Param("choice") String choice, @Param("unitIds") Long[] unitIds); |
| | | |
| | | /** |
| | | * 报到单位统计 |
| | |
| | | * @param checkUnitId |
| | | * @return |
| | | */ |
| | | PbCheckUnitStatisticsVo pbStatisticsTop(@Param("communityIds") List<Long> communityIds, @Param("belongTo") String belongTo, @Param("choice") String choice, @Param("checkUnitId") Long checkUnitId); |
| | | PbCheckUnitStatisticsVo pbStatisticsTop(@Param("communityIds") List<Long> communityIds, @Param("belongTo") String belongTo, @Param("choice") String choice, @Param("checkUnitId") Long checkUnitId, @Param("unitIds")Long[] unitIds); |
| | | |
| | | /** |
| | | * 报到党员统计-按单位归属统计 |
| | |
| | | * @param choice |
| | | * @return |
| | | */ |
| | | R unitStatisticsTop(Long communityId, String belongTo, String choice); |
| | | R unitStatisticsTop(Long communityId, String belongTo, String choice,Long[] unitIds); |
| | | |
| | | /** |
| | | * 报到单位统计 |
| | |
| | | * @param checkUnitId |
| | | * @return |
| | | */ |
| | | R pbStatisticsTop(Long communityId, String belongTo, String choice, Long checkUnitId); |
| | | R pbStatisticsTop(Long communityId, String belongTo, String choice, Long checkUnitId,Long[] unitIds); |
| | | |
| | | /** |
| | | * 报到党员统计-按单位归属统计 |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R unitStatisticsTop(Long communityId, String belongTo, String choice) { |
| | | public R unitStatisticsTop(Long communityId, String belongTo, String choice,Long[] unitIds) { |
| | | List<Long> communityIds = new ArrayList<>(); |
| | | if (null != communityId){ |
| | | communityIds = comPbMemberDAO.selectIds(communityId); |
| | |
| | | } |
| | | } |
| | | |
| | | return R.ok(this.baseMapper.unitStatisticsTop(communityIds, belongTo, choice)); |
| | | return R.ok(this.baseMapper.unitStatisticsTop(communityIds, belongTo, choice,unitIds)); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R pbStatisticsTop(Long communityId, String belongTo, String choice, Long checkUnitId) { |
| | | public R pbStatisticsTop(Long communityId, String belongTo, String choice, Long checkUnitId,Long[] unitIds) { |
| | | |
| | | List<Long> communityIds = new ArrayList<>(); |
| | | if (null != communityId){ |
| | |
| | | communityIds.add(communityId); |
| | | } |
| | | } |
| | | return R.ok(this.baseMapper.pbStatisticsTop(communityIds, belongTo, choice, checkUnitId)); |
| | | return R.ok(this.baseMapper.pbStatisticsTop(communityIds, belongTo, choice, checkUnitId,unitIds)); |
| | | } |
| | | |
| | | /** |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="unitIds != null and unitIds.length != 0 "> |
| | | AND id IN |
| | | <foreach collection="unitIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND belong_to = #{belongTo} |
| | |
| | | <if test="communityIds != null and communityIds.size() >0"> |
| | | AND community_id IN |
| | | <foreach collection="communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="unitIds != null and unitIds.length != 0 "> |
| | | AND id IN |
| | | <foreach collection="unitIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="unitIds != null and unitIds.length != 0 "> |
| | | AND id IN |
| | | <foreach collection="unitIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND belong_to = #{belongTo} |
| | | </if> |
| | |
| | | <if test="communityIds != null and communityIds.size() >0"> |
| | | AND m.community_id IN |
| | | <foreach collection="communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="unitIds != null and unitIds.length != 0 "> |
| | | AND cpcu.id IN |
| | | <foreach collection="unitIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="commonDto.unitIds != null and commonDto.unitIds.length !=0"> |
| | | AND id IN |
| | | <foreach collection="commonDto.unitIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | AND belong_to = temp.belong_to) 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 |
| | | <foreach collection="commonDto.communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="commonDto.unitIds != null and commonDto.unitIds.length !=0"> |
| | | AND id IN |
| | | <foreach collection="commonDto.unitIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="commonDto.unitIds != null and commonDto.unitIds.length !=0"> |
| | | AND m.id IN |
| | | <foreach collection="commonDto.unitIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | AND cpcu.belong_to = temp.belong_to) AS partyMemberTotal |
| | | FROM (SELECT belong_to,COUNT( id ) AS unitTotal FROM com_pb_check_unit WHERE 1=1 |
| | | <if test="commonDto.communityIds != null and commonDto.communityIds.size() >0"> |
| | | AND community_id IN |
| | | <foreach collection="commonDto.communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="commonDto.unitIds != null and commonDto.unitIds.length !=0"> |
| | | AND id IN |
| | | <foreach collection="commonDto.unitIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | |
| | | <if test="unitIds != null and unitIds.length !=0"> |
| | | AND cpcu.id IN |
| | | <foreach collection="unitIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND cpcu.belong_to = #{belongTo} |
| | | </if> |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="unitIds != null and unitIds.length !=0"> |
| | | AND cpcu.id IN |
| | | <foreach collection="unitIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND cpcu.belong_to = #{belongTo} |
| | | </if> |
| | |
| | | <if test="communityIds != null and communityIds.size() >0"> |
| | | AND m.community_id IN |
| | | <foreach collection="communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="unitIds != null and unitIds.length !=0"> |
| | | AND cpcu.id IN |
| | | <foreach collection="unitIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="commonDto.unitIds != null and commonDto.unitIds.length !=0"> |
| | | AND cpcu.id IN |
| | | <foreach collection="commonDto.unitIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | AND m.check_unit_id is not null AND cpcu.nature_name = '机关单位' AND cpcu.belong_to = temp.belong_to) 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 |
| | | <if test="commonDto.communityIds != null and commonDto.communityIds.size() >0"> |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="commonDto.unitIds != null and commonDto.unitIds.length !=0"> |
| | | AND cpcu.id IN |
| | | <foreach collection="commonDto.unitIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | AND cpcu.nature_name = '企事业单位' AND cpcu.belong_to = temp.belong_to) AS businessTotal |
| | | FROM (SELECT cpcu.belong_to,COUNT( m.id ) AS partyMemberTotal 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 |
| | | <foreach collection="commonDto.communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="commonDto.unitIds != null and commonDto.unitIds.length !=0"> |
| | | AND cpcu.id IN |
| | | <foreach collection="commonDto.unitIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="commonDto.unitIds != null and commonDto.unitIds.length !=0"> |
| | | AND cpcu.id IN |
| | | <foreach collection="commonDto.unitIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="commonDto.belongTo != null and commonDto.belongTo != ''"> |
| | | AND cpcu.belong_to = #{commonDto.belongTo} |
| | | </if> |