yanghui
2022-10-27 aefbba46e174d3a7b24ec3895b66431705a53c40
Merge branch 'local_20221024' into huacheng_test
8个文件已修改
190 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/common/PagePbCheckUnitCommonDto.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/partybuilding/ComPbCheckUnitFeign.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPbCheckUnitApi.java 64 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/api/ComPbCheckUnitController.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbCheckUnitMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/ComPbCheckUnitService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbCheckUnitServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbCheckUnitMapper.xml 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/common/PagePbCheckUnitCommonDto.java
@@ -35,5 +35,8 @@
    @ApiModelProperty(value = "社区id集合")
    private List<Long> communityIds;
    @ApiModelProperty(value = "报道单位id集合")
    private Long[] unitIds;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/partybuilding/ComPbCheckUnitFeign.java
@@ -109,7 +109,8 @@
    @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);
    /**
     * 报到单位统计
@@ -131,7 +132,8 @@
    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);
    /**
     * 报到党员统计-按单位归属统计
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPbCheckUnitApi.java
@@ -69,6 +69,12 @@
    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  分页查询
@@ -83,12 +89,7 @@
    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());
@@ -272,18 +273,29 @@
                               @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);
    }
@@ -300,18 +312,29 @@
                             @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);
    }
@@ -320,8 +343,13 @@
    @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);
    }
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/api/ComPbCheckUnitController.java
@@ -140,8 +140,9 @@
    @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);
    }
    /**
@@ -166,8 +167,9 @@
    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);
    }
    /**
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbCheckUnitMapper.java
@@ -64,7 +64,7 @@
     * @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);
    /**
     * 报到单位统计
@@ -82,7 +82,7 @@
     * @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);
    /**
     * 报到党员统计-按单位归属统计
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/ComPbCheckUnitService.java
@@ -101,7 +101,7 @@
     * @param choice
     * @return
     */
    R unitStatisticsTop(Long communityId, String belongTo, String choice);
    R unitStatisticsTop(Long communityId, String belongTo, String choice,Long[] unitIds);
    /**
     * 报到单位统计
@@ -118,7 +118,7 @@
     * @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);
    /**
     * 报到党员统计-按单位归属统计
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbCheckUnitServiceImpl.java
@@ -266,7 +266,7 @@
     * @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);
@@ -275,7 +275,7 @@
            }
        }
        return R.ok(this.baseMapper.unitStatisticsTop(communityIds, belongTo, choice));
        return R.ok(this.baseMapper.unitStatisticsTop(communityIds, belongTo, choice,unitIds));
    }
    /**
@@ -306,7 +306,7 @@
     * @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){
@@ -315,7 +315,7 @@
                communityIds.add(communityId);
            }
        }
        return R.ok(this.baseMapper.pbStatisticsTop(communityIds, belongTo, choice, checkUnitId));
        return R.ok(this.baseMapper.pbStatisticsTop(communityIds, belongTo, choice, checkUnitId,unitIds));
    }
    /**
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbCheckUnitMapper.xml
@@ -113,6 +113,12 @@
                    #{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}
@@ -125,6 +131,12 @@
            <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>
@@ -142,6 +154,12 @@
                    #{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>
@@ -153,6 +171,12 @@
            <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>
@@ -174,11 +198,23 @@
                    #{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>
@@ -190,11 +226,23 @@
                    #{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>
@@ -213,7 +261,12 @@
                #{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>
@@ -232,6 +285,12 @@
                #{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>
@@ -246,6 +305,12 @@
        <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>
@@ -269,6 +334,12 @@
                    #{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">
@@ -277,11 +348,23 @@
                        #{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>
@@ -310,6 +393,12 @@
                #{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>