tangxiaobao
2021-09-07 7fc75c2aa55fe1b13ca9a89c23eea01d2d8942af
Merge remote-tracking branch 'origin/test' into txb
14个文件已修改
194 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/NeighborApi.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/AddComActNeighborCircleAppDTO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActQuestnaireAnswerContentVO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActReserveApi.java 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/NeighborApi.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMicroWishDAO.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleTopicMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActNeighborCircleTopicService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleTopicServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActMicroWishOperationRecordMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleDOMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleTopicDOMapper.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/NeighborApi.java
@@ -206,7 +206,9 @@
    @ApiOperation(value = "查询社区邻里圈话题列表", response = ComActNeighborCircleTopicAppVO.class)
    @GetMapping("topic/list")
    public R getNeighborTopicByApp(@RequestParam("communityId") Long communityId,@RequestParam(value = "isZero",defaultValue = "2",required = false) Integer isZero) {
    public R getNeighborTopicByApp(@RequestParam("communityId") Long communityId
            ,@RequestParam(value = "isZero",defaultValue = "2",required = false) Integer isZero
            ,@RequestParam(value = "name",defaultValue = "",required = false) String name) {
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
        if (loginUserInfo != null) {
            communityId = loginUserInfo.getCommunityId();
@@ -214,7 +216,7 @@
        if(isZero == null){
            isZero = 2;
        }
        return communityService.getNeighborTopicByApp(communityId,isZero);
        return communityService.getNeighborTopicByApp(communityId,isZero,name);
    }
    @ApiOperation(value = "用户新增邻里圈话题")
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/AddComActNeighborCircleAppDTO.java
@@ -37,6 +37,9 @@
    @ApiModelProperty(value = "微信审核结果(1.通过 2.拒绝)",hidden = true)
    private Integer wxExamineResult;
    @ApiModelProperty("用户新增邻里圈话题")
    private String topicName;
    /**
     * 是否需要审核(1.是 2.否)
     */
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActQuestnaireAnswerContentVO.java
@@ -31,6 +31,8 @@
    private Long selectionId;
    @ApiModelProperty("答题记录id")
    private Long reserveRecordId;
    @ApiModelProperty("题目id")
    private Long reserveSubId;
    @ApiModelProperty("填报时间")
    private Date time;
    @ApiModelProperty("用户昵称")
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -4531,7 +4531,7 @@
     * @return 邻里圈话题列表
     */
    @GetMapping("/neighbor/getNeighborTopicByApp")
    R getNeighborTopicByApp(@RequestParam("communityId") Long communityId,@RequestParam("isZero") Integer isZero);
    R getNeighborTopicByApp(@RequestParam("communityId") Long communityId,@RequestParam("isZero") Integer isZero,@RequestParam("name") String name);
    /**
     * 综治后台-查询社区列表
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActReserveApi.java
@@ -24,6 +24,7 @@
import com.panzhihua.common.service.user.UserService;
import com.panzhihua.common.utlis.DateUtils;
import com.panzhihua.common.utlis.SFTPUtil;
import com.panzhihua.common.utlis.StringUtils;
import com.panzhihua.community_backstage.config.SFTPConfig;
import com.panzhihua.community_backstage.excel.CustomSheetWriteHandler;
import io.swagger.annotations.Api;
@@ -161,7 +162,7 @@
            List<ComActReserveMakeRightStatisticsAdminVO> rightStatisticsList = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComActReserveMakeRightStatisticsAdminVO.class);
            rightStatisticsList.forEach(rightStatistics -> {
                ComActReserveMakeRightExcelAdminVO makeRightExcelAdminVO = new ComActReserveMakeRightExcelAdminVO();
                BeanUtils.copyProperties(rightStatistics,makeRightExcelAdminVO);
                BeanUtils.copyProperties(rightStatistics, makeRightExcelAdminVO);
                resultList.add(makeRightExcelAdminVO);
            });
            try {
@@ -244,7 +245,7 @@
            List<ComActReserveMakeListAdminVO> rightStatisticsList = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComActReserveMakeListAdminVO.class);
            rightStatisticsList.forEach(rightStatistics -> {
                ComActReserveMakeDetailedExcelAdminVO makeRightExcelAdminVO = new ComActReserveMakeDetailedExcelAdminVO();
                BeanUtils.copyProperties(rightStatistics,makeRightExcelAdminVO);
                BeanUtils.copyProperties(rightStatistics, makeRightExcelAdminVO);
                resultList.add(makeRightExcelAdminVO);
            });
            try {
@@ -320,7 +321,7 @@
            List<ComActReserveRegisterStatisticsAdminVO> rightStatisticsList = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComActReserveRegisterStatisticsAdminVO.class);
            rightStatisticsList.forEach(rightStatistics -> {
                ComActReserveRegisterExcelAdminVO makeRightExcelAdminVO = new ComActReserveRegisterExcelAdminVO();
                BeanUtils.copyProperties(rightStatistics,makeRightExcelAdminVO);
                BeanUtils.copyProperties(rightStatistics, makeRightExcelAdminVO);
                resultList.add(makeRightExcelAdminVO);
            });
            try {
@@ -407,7 +408,7 @@
            List<ComActReserveMakeHandleListAdminVO> rightStatisticsList = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComActReserveMakeHandleListAdminVO.class);
            rightStatisticsList.forEach(rightStatistics -> {
                ComActReserveMakeHandleExcelAdminVO makeRightExcelAdminVO = new ComActReserveMakeHandleExcelAdminVO();
                BeanUtils.copyProperties(rightStatistics,makeRightExcelAdminVO);
                BeanUtils.copyProperties(rightStatistics, makeRightExcelAdminVO);
                makeRightExcelAdminVO.setStatus(ReserveRecordStatusEnum.getCnDescByName(rightStatistics.getStatus()));
                resultList.add(makeRightExcelAdminVO);
            });
@@ -492,59 +493,14 @@
                    head1.add("登记时间");
                    headList.add(head1);
                    subVOList.forEach(sub -> {
                        if(sub.getType() != 5){
                        if (sub.getType() != 5) {
                            List<String> headn = new ArrayList<>();
                            headn.add(firstRowContent);
                            headn.add(sub.getContent());
                            headList.add(headn);
                        }
                    });
                    List<List<Object>> datalist = new ArrayList<>();
                    List<ComActQuestnaireAnswerContentVO> answerContentVOList = questnaireAnswersDTOS.getAnswers();
                    if(answerContentVOList!=null && answerContentVOList.size()>0) {
                        List<Object> userData = new ArrayList<>();
                        List<ComActQuestnaireAnswerContentVO> usersAnswers = questnaireAnswersDTOS.getAnswers();
                        //查询用户回答的所有答案,并新增到答案列表中
                        Long reserveRecordId = null;
                        StringBuffer sb = new StringBuffer();
                        Boolean isDX = false;
                        for (ComActQuestnaireAnswerContentVO userAnswers:usersAnswers) {
                            if (userAnswers.getOptionType().equals(5)){
                                continue;
                            }
                            if(reserveRecordId == null){
                                reserveRecordId = userAnswers.getReserveRecordId();
                                userData.add(userAnswers.getNickName());
                                userData.add(DateUtils.format(userAnswers.getTime(),DateUtils.ymdhms_format));
                            }
                            if(!reserveRecordId.equals(userAnswers.getReserveRecordId())){
                                if(isDX){
                                    String answer = sb.toString();
                                    userData.add(answer.substring(0,answer.length()-1));
                                    sb = new StringBuffer();
                                    isDX = false;
                                }
                                datalist.add(userData);
                                userData = new ArrayList<>();
                                reserveRecordId = userAnswers.getReserveRecordId();
                                userData.add(userAnswers.getNickName());
                                userData.add(DateUtils.format(userAnswers.getTime(),DateUtils.ymdhms_format));
                            }
                            //判断是否是多选框
                            if(userAnswers.getOptionType().equals(1)){
                                isDX = true;
                                sb.append(userAnswers.getAnswerContent() + ",");
                                continue;
                            }
                            userData.add(userAnswers.getAnswerContent());
                        }
                        if(isDX){
                            String answer = sb.toString();
                            userData.add(answer.substring(0,answer.length()-1));
                        }
                        datalist.add(userData);
                    }
                    List<List<Object>> datalist = dataList(questnaireAnswersDTOS.getAnswers());
                    WriteCellStyle headWriteCellStyle = new WriteCellStyle();
                    WriteCellStyle contentWriteCellStyle = new WriteCellStyle();
@@ -587,22 +543,95 @@
        }
    }
    @ApiOperation(value = "查询题目列表",response = ComActReserveSubListVO.class)
    @ApiOperation(value = "查询题目列表", response = ComActReserveSubListVO.class)
    @GetMapping("/subject/list")
    public R subjectList(@RequestParam("reserveId") Long reserveId) {
        return communityService.subjectListAdmin(reserveId);
    }
    @ApiOperation(value = "分页查询登记明细列表",response = ComActReserveRegisterDetailedVO.class)
    @ApiOperation(value = "分页查询登记明细列表", response = ComActReserveRegisterDetailedVO.class)
    @PostMapping("/register/detailed/list")
    public R registerDetailedList(@RequestBody PageReserveRegisterDetailedAdminDTO detailedAdminDTO) {
        return communityService.registerDetailedListAdmin(detailedAdminDTO);
    }
    @ApiOperation(value = "查询登记明细详情",response = ComActReserveRegisterDetailedVO.class)
    @ApiOperation(value = "查询登记明细详情", response = ComActReserveRegisterDetailedVO.class)
    @PostMapping("/register/detailed/detail")
    public R registerDetailedDetail(@RequestParam("reserveRecordId") Long reserveRecordId) {
        return communityService.registerDetailedDetailAdmin(reserveRecordId);
    }
    /**
     * 数据转换--登记明细用户填写答案导出数据格式转换
     *
     * @param answerContentVOList 用户答题记录
     * @return 用户填写答案数据
     */
    private List<List<Object>> dataList(List<ComActQuestnaireAnswerContentVO> answerContentVOList) {
        //结果数据集合
        List<List<Object>> resultList = new ArrayList<>();
        //构建单个用户数据
        List<Object> userData = new ArrayList<>();
        //遍历答案列表
        Long reserveRecordId = 0L;
        Long reserveSubId = 0L;
        StringBuffer sb = new StringBuffer();
        if (answerContentVOList != null && answerContentVOList.size() > 0) {
            for (ComActQuestnaireAnswerContentVO userAnswers : answerContentVOList) {
                //判断是文字描述直接跳过
                if (userAnswers.getOptionType().equals(5)) {
                    continue;
                }
                //判断reserveRecordId为空则为第一条记录,默认加上昵称和灯谜是
                if (reserveRecordId.equals(0L)) {
                    reserveRecordId = userAnswers.getReserveRecordId();
                    userData.add(userAnswers.getNickName());
                    userData.add(DateUtils.format(userAnswers.getTime(), DateUtils.ymdhms_format));
                }
                //根据reserveRecordId判断是否是第二条填报记录
                if (!reserveRecordId.equals(userAnswers.getReserveRecordId())) {
                    reserveSubId = 0L;
                    String answer = sb.toString();
                    userData.add(answer.substring(0, answer.length() - 1));
                    sb = new StringBuffer();
                    resultList.add(userData);
                    userData = new ArrayList<>();
                    reserveRecordId = userAnswers.getReserveRecordId();
                    userData.add(userAnswers.getNickName());
                    userData.add(DateUtils.format(userAnswers.getTime(), DateUtils.ymdhms_format));
                    answer = sb.toString();
                    if(StringUtils.isEmpty(answer)){
                        userData.add(userAnswers.getAnswerContent());
                    }
                }else{
                    if(reserveSubId.equals(0L)){
                        reserveSubId = userAnswers.getReserveSubId();
                    }
                    if(!reserveSubId.equals(userAnswers.getReserveSubId())){
                        reserveSubId = userAnswers.getReserveSubId();
                        String answer = sb.toString();
                        if(StringUtils.isEmpty(answer)){
                            sb.append(userAnswers.getAnswerContent() + ",");
                            answer = sb.toString();
                        }
                        userData.add(answer.substring(0, answer.length() - 1));
                        sb = new StringBuffer();
                        sb.append(userAnswers.getAnswerContent() + ",");
                    }else{
                        sb.append(userAnswers.getAnswerContent() + ",");
                    }
                }
            }
            String answer = sb.toString();
            if(StringUtils.isNotEmpty(answer)){
                userData.add(answer.substring(0, answer.length() - 1));
            }
            resultList.add(userData);
        }
        return resultList;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/NeighborApi.java
@@ -340,8 +340,8 @@
     * @return 邻里圈话题列表
     */
    @GetMapping("getNeighborTopicByApp")
    public R getNeighborTopicByApp(@RequestParam("communityId") Long communityId,@RequestParam("isZero") Integer isZero) {
        return comActNeighborCircleTopicService.getNeighborTopicByApp(communityId,isZero);
    public R getNeighborTopicByApp(@RequestParam("communityId") Long communityId,@RequestParam("isZero") Integer isZero,@RequestParam("name") String name) {
        return comActNeighborCircleTopicService.getNeighborTopicByApp(communityId,isZero,name);
    }
    /**
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMicroWishDAO.java
@@ -75,7 +75,7 @@
            "AND w.`status` = #{comActMicroWishVO.status}  " +
            " </if> " +
            "<if test='comActMicroWishVO.status == 3  and comActMicroWishVO.isPageMyWish==null'>" +
            "AND w.`status` = 3 " +
            "AND w.`status` in (2,3) " +
            " </if> " +
            "<if test='comActMicroWishVO.status != null and comActMicroWishVO.status!=0 and comActMicroWishVO.isPageMyWish!=null and comActMicroWishVO.status==1'>" +
            "AND w.`status` =1  " +
@@ -121,6 +121,7 @@
            "su.`name` responsible_name, " +
            "w.form, " +
            "w.reject_reason, " +
            "w.community_id, " +
            "w.examine_at, " +
            "w.finish, " +
            "w.finish_photo_path_list, " +
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleTopicMapper.java
@@ -38,7 +38,7 @@
     *            社区id
     * @return 邻里圈话题列表
     */
    List<ComActNeighborCircleTopicAppVO> getNeighborTopicByApp(@Param("communityId") Long communityId,@Param("isZero") Integer isZero);
    List<ComActNeighborCircleTopicAppVO> getNeighborTopicByApp(@Param("communityId") Long communityId,@Param("isZero") Integer isZero,@Param("name") String name);
    /**
     * 添加邻里圈话题热度
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActNeighborCircleTopicService.java
@@ -49,7 +49,7 @@
     *            社区id
     * @return 邻里圈话题列表
     */
    R getNeighborTopicByApp(Long communityId,Integer isZero);
    R getNeighborTopicByApp(Long communityId,Integer isZero,String name);
    /**
     * 小程序-用户新增话题
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
@@ -6,6 +6,7 @@
import javax.annotation.Resource;
import com.panzhihua.service_community.service.ComActNeighborCircleTopicService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -61,6 +62,8 @@
    private ComActDAO comActDAO;
    @Resource
    private ComActNeighborCircleTopicMapper comActNeighborCircleTopicMapper;
    @Resource
    private ComActNeighborCircleTopicService comActNeighborCircleTopicService;
    /**
     * 分页查询邻里圈列表
@@ -124,6 +127,25 @@
        if (StringUtils.isNotEmpty(addNeighborCircleAppDTO.getPhone())) {
            neighborCircleDO.setReleasePhone(addNeighborCircleAppDTO.getPhone());
        }
        //判断用户的话题是否是新增的
        if(StringUtils.isNotEmpty(addNeighborCircleAppDTO.getTopicName())){
            //新增邻里圈话题
            ComActNeighborCircleTopicDO circleTopicDO = comActNeighborCircleTopicMapper.selectOne(new QueryWrapper<ComActNeighborCircleTopicDO>()
                    .lambda().eq(ComActNeighborCircleTopicDO::getCommunityId,neighborCircleDO.getCommunityId())
                    .eq(ComActNeighborCircleTopicDO::getName,addNeighborCircleAppDTO.getTopicName()));
            if(circleTopicDO == null){
                circleTopicDO = new ComActNeighborCircleTopicDO();
                circleTopicDO.setCommunityId(neighborCircleDO.getCommunityId());
                circleTopicDO.setName(addNeighborCircleAppDTO.getTopicName());
                circleTopicDO.setCreateBy(neighborCircleDO.getReleaseId());
                circleTopicDO.setCreateAt(new Date());
                circleTopicDO.setCount(0);
                circleTopicDO.setHotNum(0L);
                circleTopicDO.setStatus(ComActNeighborCircleTopicDO.status.yes);
                comActNeighborCircleTopicMapper.insert(circleTopicDO);
            }
            neighborCircleDO.setTopicId(circleTopicDO.getId());
        }
        //判断当前邻里圈是否需要审核
        if(addNeighborCircleAppDTO.getIsExamine().equals(AddComActNeighborCircleAppDTO.isExamine.no)){
            //当邻里圈不需要审核才进入自动审核
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleTopicServiceImpl.java
@@ -113,8 +113,8 @@
     * @return 邻里圈话题列表
     */
    @Override
    public R getNeighborTopicByApp(Long communityId,Integer isZero){
        return R.ok(this.baseMapper.getNeighborTopicByApp(communityId,isZero));
    public R getNeighborTopicByApp(Long communityId,Integer isZero,String name){
        return R.ok(this.baseMapper.getNeighborTopicByApp(communityId,isZero,name));
    }
    /**
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActMicroWishOperationRecordMapper.xml
@@ -24,7 +24,7 @@
    <select id="selectId" resultType="Long">
        select id from com_act_micro_wish
        <where>
            1=1
            1=1 and community_id = #{communityId}
            <if test="status !=null">
                and status=#{status}
            </if>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleDOMapper.xml
@@ -100,7 +100,7 @@
        LEFT JOIN sys_user u ON nc.release_id = u.user_id
        LEFT JOIN com_act_neighbor_circle_topic as canct ON canct.id = nc.topic_id
        <where>
            nc.community_id = #{neighborCircleAdminDTO.communityId}
            nc.community_id = #{neighborCircleAdminDTO.communityId} and is_del = 2
            <if test='neighborCircleAdminDTO.releaseContent != null and neighborCircleAdminDTO.releaseContent != &quot;&quot;'>
                and nc.release_content like concat('%',#{neighborCircleAdminDTO.releaseContent},'%')
            </if>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleTopicDOMapper.xml
@@ -49,6 +49,9 @@
        <if test="isZero != null and isZero == 1">
            and `count` > 0
        </if>
        <if test="name != null and name != &quot;&quot;">
            and `name` like concat('%',#{name},'%')
        </if>
        order by hot_num desc
    </select>