LuoTong
2024-07-29 587ecd99463a4998512a75ae9fc5f349d3049e7e
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java
@@ -183,7 +183,9 @@
            comActActivityDO.setIsProject(1);
        }
        if(comActActivityVO.getType()==5){
            comPbCheckUnitDao.selectOne(new QueryWrapper<ComPbCheckUnit>().lambda().eq(ComPbCheckUnit::getAdminPhone,comActActivityVO.getPhone()).last("limit 1"));
            //TODO 查询然后呢? 值都没给...
            comPbCheckUnitDao.selectOne(new QueryWrapper<ComPbCheckUnit>().lambda()
                    .eq(ComPbCheckUnit::getAdminPhone,comActActivityVO.getPhone()).last("limit 1"));
        }
        boolean save = this.save(comActActivityDO);
@@ -747,7 +749,7 @@
        if(!isNull(type)){
            comActActivityDOS=comActActivityDOS.stream().filter(comActActivityDO -> comActActivityDO.getType().equals(type)).collect(Collectors.toList());
        }
        if (!comActActivityDOS.isEmpty()) {
        if (comActActivityDOS != null  ) {
            comActActivityDOS.forEach(comActActivityDO -> {
                ComActActivityVO comActActivityVO = new ComActActivityVO();
                BeanUtils.copyProperties(comActActivityDO, comActActivityVO);
@@ -908,12 +910,12 @@
        page.setCurrent(pageNum);
        Long communityId = comActActivityVO.getCommunityId();
        if (null != communityId){
            List<Long> communityIds = comActDAO.selectIds(communityId);
            if (CollUtil.isEmpty(communityIds)) {
                communityIds = new ArrayList<>();
                communityIds.add(communityId);
            }
            comActActivityVO.setCommunityIds(communityIds);
//            List<Long> communityIds = comActDAO.selectIds(communityId);
//            if (CollUtil.isEmpty(communityIds)) {
//                communityIds = new ArrayList<>();
//                communityIds.add(communityId);
//            }
            comActActivityVO.setCommunityIds(Arrays.asList( comActActivityVO.getCommunityId() ));
        }
        IPage<ComActActivityVO> iPage = comActActivityDAO.pageActivityCommunityBack(page, comActActivityVO);
        iPage.getRecords().forEach(vo ->{
@@ -1521,9 +1523,48 @@
            if (comActActActRegistDO.getEndTime() != null) {
                return R.fail("无法重复签退");
            }
            //1.居民 2.党员 3.志愿者
            switch (comActActActRegistDO.getSignIdentity())
            {
                case 1:
                    if(comActActivityDO.getParticipantRewardWay()==2)
                    {
                        int hours = com.panzhihua.common.utlis.DateUtils.getHour(comActActActRegistDO.getStartTime(), comActActActRegistDO.getEndTime());
                        if(hours>1)
                        {
                            rewardIntegral=rewardIntegral * hours;
                        }
                    }
                    break;
                case 2:
                    if(comActActivityDO.getPbRewardWay()==2)
                    {
                        int hours = com.panzhihua.common.utlis.DateUtils.getHour(comActActActRegistDO.getStartTime(), comActActActRegistDO.getEndTime());
                        if(hours>1)
                        {
                            rewardIntegral=rewardIntegral * hours;
                        }
                    }
                    break;
                case 3:
                    if(comActActivityDO.getVolunteerRewardWay()==2)
                    {
                        int hours = com.panzhihua.common.utlis.DateUtils.getHour(comActActActRegistDO.getStartTime(), comActActActRegistDO.getEndTime());
                        if(hours>1)
                        {
                            rewardIntegral=rewardIntegral * hours;
                        }
                    }
                    break;
            }
            comActActRegistDO.setId(comActActActRegistDO.getId());
            comActActRegistDO.setEndTime(nowDate);
            comActActRegistDO.setAward(rewardIntegral);
            int result = comActActRegistDAO.updateById(comActActRegistDO);
            if (result > 0) {
                if (isHave) {