huanghongfa
2021-08-21 2e64c232ab6b51b2cecf1ee96e1e9b709234f326
随手拍改版接口开发
19个文件已修改
167 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/questnaire/QuestnaireStatisticsSummaryHeaderAdminVO.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityActivityApi.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityQuestnaireApi.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoDAO.java 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActQuestnaireDAO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActEasyPhotoService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActQuestnaireService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoClassifyServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActQuestnaireServiceImpl.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoDOMapper.xml 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActQuestnaireDOMapper.xml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/UserService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/questnaire/QuestnaireStatisticsSummaryHeaderAdminVO.java
@@ -26,6 +26,9 @@
    @ApiModelProperty("未填报党员")
    private Integer noPartymemberCount = 0;
    @ApiModelProperty("填报率")
    private Integer tag = 0;
    private BigDecimal tag = BigDecimal.ZERO;
    @ApiModelProperty("社区小程序用户总人数")
    private Integer userCount = 0;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -4283,7 +4283,7 @@
     * @return  问卷调查统计汇总表头统计数据
     */
    @GetMapping("/questnaire/statisticsSummary/header")
    R statisticsSummaryHeader(@RequestParam("questId") Long questId);
    R statisticsSummaryHeader(@RequestParam("questId") Long questId,@RequestParam("communityId") Long communityId);
    /**
@@ -4340,4 +4340,12 @@
     */
    @PostMapping("/easyphoto/switch/publicity")
    R easyPhotoSwitchPublicity(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO);
    /**
     * 查询社区待处理随手拍id集合
     * @param communityId   社区id
     * @return  社区待处理随手拍id集合
     */
    @GetMapping("/easyphoto/noHandle/list")
    R easyPhotoNoHandleList(@RequestParam("communityId") Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java
@@ -791,4 +791,12 @@
     */
    @GetMapping("getUserOpenId")
    R getUserOpenId(@RequestParam("userId")Long userId);
    /**
     * 查询社区后台工作人员列表
     * @param communityId   社区id
     * @return  社区后台工作人员列表
     */
    @GetMapping("getUserListByCommunityId")
    R getUserListByCommunityId(@RequestParam("communityId")Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityActivityApi.java
@@ -635,4 +635,24 @@
    public R easyPhotoSwitchPublicity(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO) {
        return communityService.easyPhotoSwitchPublicity(comActEasyPhotoVO);
    }
    @ApiOperation(value = "查询社区后台工作人员列表", response = ComActEasyPhotoClassifyVO.class)
    @GetMapping("easyphoto/user/list")
    public R easyPhotoUserList() {
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        if(loginUserInfo == null){
            return R.fail("请先登录");
        }
        return userService.getUserListByCommunityId(loginUserInfo.getCommunityId());
    }
    @ApiOperation(value = "查询社区后台待处理随手拍id")
    @GetMapping("easyphoto/noHandle/list")
    public R easyPhotoNoHandleList() {
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        if(loginUserInfo == null){
            return R.fail("请先登录");
        }
        return communityService.easyPhotoNoHandleList(loginUserInfo.getCommunityId());
    }
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityQuestnaireApi.java
@@ -224,7 +224,7 @@
                                    if (firstvo != null) {
                                        Date time = firstvo.getCreateAt();
                                        if(time!=null) {
                                            String sd = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(time);
                                            String sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(time);
                                            dateStr = sd;
                                        }
                                    }
@@ -349,7 +349,11 @@
    @ApiOperation(value = "问卷调查统计汇总表头统计-lyq", response = QuestnaireStatisticsSummaryHeaderAdminVO.class)
    @GetMapping("/statistics/summary/header")
    public R statisticsSummaryHeader(@RequestParam("questId") Long questId) {
        return communityService.statisticsSummaryHeader(questId);
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        if(loginUserInfo == null){
            return R.fail("请先登录");
        }
        return communityService.statisticsSummaryHeader(questId,loginUserInfo.getCommunityId());
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java
@@ -1898,8 +1898,8 @@
     * @return  问卷调查统计汇总表头统计数据
     */
    @GetMapping("questnaire/statisticsSummary/header")
    public R statisticsSummaryHeader(@RequestParam("questId") Long questId) {
        return comActQuestnaireService.statisticsSummaryHeader(questId);
    public R statisticsSummaryHeader(@RequestParam("questId") Long questId,@RequestParam("communityId") Long communityId) {
        return comActQuestnaireService.statisticsSummaryHeader(questId,communityId);
    }
    /**
@@ -1929,4 +1929,14 @@
    public R easyPhotoSwitchPublicity(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO) {
        return comActEasyPhotoService.easyPhotoSwitchPublicity(comActEasyPhotoVO);
    }
    /**
     * 查询社区待处理随手拍id集合
     * @param communityId   社区id
     * @return  社区待处理随手拍id集合
     */
    @GetMapping("easyphoto/noHandle/list")
    public R easyPhotoNoHandleList(@RequestParam("communityId") Long communityId) {
        return comActEasyPhotoService.easyPhotoNoHandleList(communityId);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoDAO.java
@@ -199,11 +199,11 @@
            "p.activity_id, " +
            "p.activity_amount, " +
            "count(pu.id)giveThumbsUpNum, " +
            "p.handle_photo_list " +
            "c.name communityName " +
            "p.transfer_time" +
            "p.is_report_urban" +
            "p.transfer_reason" +
            "p.handle_photo_list," +
            "c.name communityName," +
            "p.transfer_time," +
            "p.is_report_urban," +
            "p.transfer_reason," +
            "p.urban_status" +
            "FROM " +
            "com_act_easy_photo p " +
@@ -334,4 +334,11 @@
    ComActEasyPhotoCountVO easyPhotoCount(ComActEasyPhotoVO comActEasyPhotoVO);
    List<ExportEasyPhotoVO> export(ExportEasyPhotoDTO exportEasyPhotoDTO);
    List<ExportEasyPhotoVO> exportByIds(List<Integer> ids);
    /**
     * 查询社区待处理随手拍id集合
     * @param communityId   社区id
     * @return  社区待处理随手拍id集合
     */
    List<Long> easyPhotoNoHandleIds(@Param("communityId")Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActQuestnaireDAO.java
@@ -164,7 +164,7 @@
     * @param questId   调查问卷id
     * @return  问卷调查统计汇总表头统计数据
     */
    QuestnaireStatisticsSummaryHeaderAdminVO statisticsSummaryHeader(@Param("questId") Long questId);
    QuestnaireStatisticsSummaryHeaderAdminVO statisticsSummaryHeader(@Param("questId") Long questId,@Param("communityId") Long communityId);
    void addNoNotice(@Param("questId") Long questId,@Param("userId") Long userId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActEasyPhotoService.java
@@ -126,4 +126,11 @@
    R updatePageeasyphoto(ComActEasyPhotoVO comActEasyPhotoVO);
    R export(ExportEasyPhotoDTO exportEasyPhotoDTO);
    /**
     * 查询社区待处理随手拍id集合
     * @param communityId   社区id
     * @return  社区待处理随手拍id集合
     */
    R easyPhotoNoHandleList(Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActQuestnaireService.java
@@ -136,7 +136,7 @@
     * @param questId   调查问卷id
     * @return  问卷调查统计汇总表头统计数据
     */
    R statisticsSummaryHeader(Long questId);
    R statisticsSummaryHeader(Long questId,Long communityId);
    /**
     * 定时任务检测待发布,调研中的问卷调查状态
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoClassifyServiceImpl.java
@@ -60,7 +60,7 @@
        }
        BeanUtils.copyProperties(addPhotoClassify,photoClassifyDO);
        photoClassifyDO.setUpdateAt(new Date());
        if(this.baseMapper.insert(photoClassifyDO) > 0){
        if(this.baseMapper.updateById(photoClassifyDO) > 0){
            return R.ok();
        }else{
            return R.fail();
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java
@@ -152,7 +152,7 @@
            comActEasyPhotoVO.setPhotoFeedbackList(photoFeedbackList);
        }
        comActEasyPhotoVO.setPhone(SensitiveUtil.desensitizedPhoneNumber(comActEasyPhotoVO.getPhone()));
//        comActEasyPhotoVO.setPhone(SensitiveUtil.desensitizedPhoneNumber(comActEasyPhotoVO.getPhone()));
        if(comActEasyPhotoVO.getAddrRemark()==null){
            comActEasyPhotoVO.setAddrRemark("");
        }
@@ -691,5 +691,15 @@
        }
    }
    /**
     * 查询社区待处理随手拍id集合
     * @param communityId   社区id
     * @return  社区待处理随手拍id集合
     */
    @Override
    public R easyPhotoNoHandleList(Long communityId){
        return R.ok(this.baseMapper.easyPhotoNoHandleIds(communityId));
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActQuestnaireServiceImpl.java
@@ -706,8 +706,16 @@
     * @return  问卷调查统计汇总表头统计数据
     */
    @Override
    public R statisticsSummaryHeader(Long questId){
        QuestnaireStatisticsSummaryHeaderAdminVO summaryHeaderAdminVO = this.questnaireDAO.statisticsSummaryHeader(questId);
    public R statisticsSummaryHeader(Long questId,Long communityId){
        QuestnaireStatisticsSummaryHeaderAdminVO summaryHeaderAdminVO = this.questnaireDAO.statisticsSummaryHeader(questId,communityId);
        if(summaryHeaderAdminVO != null){
            if(!summaryHeaderAdminVO.getUserCount().equals(0)){
                BigDecimal nub1 = BigDecimal.valueOf(summaryHeaderAdminVO.getAllCount());
                BigDecimal nub2 = BigDecimal.valueOf(summaryHeaderAdminVO.getUserCount());
                BigDecimal result = nub1.divide(nub2,2,RoundingMode.HALF_UP).multiply(BigDecimal.valueOf(100));
                summaryHeaderAdminVO.setTag(result);
            }
        }
        return R.ok(summaryHeaderAdminVO);
    }
@@ -721,7 +729,7 @@
        //查询所有开始时间已经超过当前时间的待发布状态调查问卷
        List<ComActQuestnaireDO> questnaireDOList = questnaireDAO.selectList(new QueryWrapper<ComActQuestnaireDO>().lambda()
                .eq(ComActQuestnaireDO::getState,ComActQuestnaireDO.state.dfb).eq(ComActQuestnaireDO::getIsHide,0)
                .ge(ComActQuestnaireDO::getStartTime,nowDate));
                .le(ComActQuestnaireDO::getStartTime,nowDate));
        questnaireDOList.forEach(questnaire -> {
            questnaire.setState(ComActQuestnaireDO.state.dyz);
            questnaire.setPublishTime(nowDate);
@@ -731,7 +739,7 @@
        //查询所有结束时间已经超过当前时间的调研中状态调查问卷
        List<ComActQuestnaireDO> questnaireList = questnaireDAO.selectList(new QueryWrapper<ComActQuestnaireDO>().lambda()
                .eq(ComActQuestnaireDO::getState,ComActQuestnaireDO.state.dyz).eq(ComActQuestnaireDO::getIsHide,0)
                .ge(ComActQuestnaireDO::getEndTime,nowDate));
                .le(ComActQuestnaireDO::getEndTime,nowDate));
        questnaireList.forEach(questnaire -> {
            questnaire.setState(ComActQuestnaireDO.state.yjs);
            questnaireDAO.updateById(questnaire);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoDOMapper.xml
@@ -62,7 +62,6 @@
            ca.`name` as classifyName,
            p.examine_at,
            c.name  communityName,
            p.is_report_urban,
            p.urban_status
        FROM
            com_act_easy_photo p
@@ -246,4 +245,8 @@
        p.create_at DESC
    </select>
    <select id="easyPhotoNoHandleIds" resultType="Long">
        select id from com_act_easy_photo where `status` = 1 and community_id = #{communityId} and del_tag = 0
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActQuestnaireDOMapper.xml
@@ -194,12 +194,13 @@
            AND user_id NOT IN ( SELECT user_id FROM com_act_questnaire_user_answer WHERE questnaire_id = #{questId} )) AS noVolunteerCount,
            (
            SELECT
                count( user_id )
                count( id )
            FROM
                sys_user AS su
                com_pb_member AS su
            WHERE
                is_partymember = 1
            AND user_id NOT IN ( SELECT user_id FROM com_act_questnaire_user_answer WHERE questnaire_id = #{questId} )) AS noPartymemberCount
                community_id = #{communityId}
            AND user_id NOT IN ( SELECT user_id FROM com_act_questnaire_user_answer WHERE questnaire_id = #{questId} )) AS noPartymemberCount,
            (select count(user_id) from sys_user where community_id = 2 and type = 1) as userCount
        FROM
            com_act_questnaire_user_answer AS caqua
            LEFT JOIN com_act_questnaire AS caq ON caq.id = caqua.questnaire_id
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java
@@ -1006,4 +1006,14 @@
        return userService.getUserOpenId(userId);
    }
    /**
     * 查询社区后台工作人员列表
     * @param communityId   社区id
     * @return  社区后台工作人员列表
     */
    @GetMapping("getUserListByCommunityId")
    public R getUserListByCommunityId(@RequestParam("communityId")Long communityId) {
        return userService.getUserListByCommunityId(communityId);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java
@@ -443,4 +443,7 @@
            "</script>")
    List<ComPbServiceTeamWishVO> getServiceTeamList(@Param("param") String param, @Param("communityId") Long communityId);
    @Select("select user_id,`name` from sys_user as su where type = 3 and community_id = #{communityId}")
    List<SysUserVO> getUserListByCommunityId(@Param("communityId") Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/UserService.java
@@ -485,4 +485,11 @@
     */
    R getUserOpenId(Long userId);
    /**
     * 查询社区后台工作人员列表
     * @param communityId   社区id
     * @return  社区后台工作人员列表
     */
    R getUserListByCommunityId(Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -2251,4 +2251,14 @@
        }
        return R.fail();
    }
    /**
     * 查询社区后台工作人员列表
     * @param communityId   社区id
     * @return  社区后台工作人员列表
     */
    @Override
    public R getUserListByCommunityId(Long communityId){
        return R.ok(this.userDao.getUserListByCommunityId(communityId));
    }
}