| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -534,28 +534,41 @@ public class WorkActServiceImpl implements WorkActService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					//            活动状态:报名中:signing_up;截止报名: end_sign_up; 已开始: in_progress; 已报满: enough
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (nowDate.compareTo(inProgressActResultDTO.getSignUpEndTime()) == -1 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    || nowDate.compareTo(inProgressActResultDTO.getSignUpEndTime()) == 0) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                logger.info(String.format("当前时间%s报名截止时间%s处于报名中", | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        DateUtils.format(nowDate,DateUtils.DATE_TIME_PATTERN), | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        DateUtils.format(inProgressActResultDTO.getSignUpEndTime(),DateUtils.DATE_TIME_PATTERN))); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                //截止报名时间之前(包含报名时间截止时间点)
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                if (!inProgressActResultDTO.getActQuotaCategory()) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    //如果是不限制名额,则显示报名中
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    inProgressActResultDTO.setStatus("signing_up"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    logger.info("活动不限制名额,界面显示 报名中"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    continue; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    //固定名额,且已报名人数<活动需要人数显示报名中
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    if (inProgressActResultDTO.getActQuota() > inProgressActResultDTO.getSignedUp()) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        logger.info("活动限制名额,未报满,界面显示报名中"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        inProgressActResultDTO.setStatus("signing_up"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        continue; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    } else if (inProgressActResultDTO.getActQuota().equals(inProgressActResultDTO.getSignedUp())) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        inProgressActResultDTO.setStatus("enough"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        logger.info("活动限制名额,且已报满,界面显示已报满"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        continue; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } else if (nowDate.compareTo(inProgressActResultDTO.getSignUpEndTime()) == 1 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    || nowDate.compareTo(inProgressActResultDTO.getActStartTime()) == -1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    &&nowDate.compareTo(inProgressActResultDTO.getActStartTime()) == -1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                logger.info(String.format("当前时间%s报名截止时间%s活动预计开始时间%s界面显示截止报名", | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        DateUtils.format(nowDate,DateUtils.DATE_TIME_PATTERN), | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        DateUtils.format(inProgressActResultDTO.getSignUpEndTime(),DateUtils.DATE_TIME_PATTERN), | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        DateUtils.format(inProgressActResultDTO.getActStartTime(),DateUtils.DATE_TIME_PATTERN))); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                //活动报名截止-活动预计开始之间显示截止报名
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                inProgressActResultDTO.setStatus("end_sign_up"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                continue; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } else if (nowDate.compareTo(inProgressActResultDTO.getActStartTime()) == 1 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    || nowDate.compareTo(inProgressActResultDTO.getActStartTime()) == 0) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                logger.info(String.format("当前时间%s活动预计开始时间%s界面显示已开始", | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    DateUtils.format(nowDate,DateUtils.DATE_TIME_PATTERN), | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    DateUtils.format(inProgressActResultDTO.getActStartTime(),DateUtils.DATE_TIME_PATTERN))); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                //活动预计开始时间点之后,包含活动预计开始时间点,显示  已开始
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                inProgressActResultDTO.setStatus("in_progress"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                continue; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -596,6 +609,7 @@ public class WorkActServiceImpl implements WorkActService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @Date 2020/7/26 17:26 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     **/ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Transactional(rollbackFor = Exception.class) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public void cancelAct(CancelActFormDTO formDTO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ActInfoDTO actInfoDTO=actInfoService.get(formDTO.getActId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(null==actInfoDTO){ | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -671,6 +685,7 @@ public class WorkActServiceImpl implements WorkActService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @Date 2020/7/26 19:49 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     **/ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Transactional(rollbackFor = Exception.class) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public void saveActualTime(SaveActualTimeFormDTO formDTO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(formDTO.getActualStartTime().compareTo(formDTO.getActualEndTime())!=-1){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            throw new RenException(EpmetErrorCode.ACT_ACTUAL_START_TIME_ERROR.getCode()); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -736,6 +751,7 @@ public class WorkActServiceImpl implements WorkActService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @Date 2020/7/26 21:48 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     **/ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Transactional(rollbackFor = Exception.class) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public void finishAct(String actId) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ActInfoDTO actInfoDTO=actInfoService.get(actId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(null==actInfoDTO){ | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -862,10 +878,13 @@ public class WorkActServiceImpl implements WorkActService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(!actInfoDTO.getCreatedBy().equals(loginUserUtil.getLoginUserId())){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            throw new RenException(EpmetErrorCode.REQUIRE_PERMISSION.getCode()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //如果活动设置的分支大于0,需要判断是否已经处理完毕
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //待处理事项为空时才可以结束活动
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<ActUserRelationDTO> list=actUserRelationDao.selectInProgress(actInfoDTO.getId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(null!=list&&list.size()>0){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            throw new RenException(EpmetErrorCode.HAVE_HANDLE.getCode()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(actInfoDTO.getReward()>0){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            List<ActUserRelationDTO> list=actUserRelationDao.selectInProgress(actInfoDTO.getId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if(null!=list&&list.size()>0){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new RenException(EpmetErrorCode.HAVE_HANDLE.getCode()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //先填写实际开始时间、实际结束时间
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(null==actInfoDTO.getActualStartTime()||null==actInfoDTO.getActualEndTime()){ | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -882,6 +901,7 @@ public class WorkActServiceImpl implements WorkActService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @Date 2020/7/27 10:45 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     **/ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Transactional(rollbackFor = Exception.class) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public void summaryAct(SummaryActFormDTO formDTO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ActInfoDTO actInfoDTO=actInfoService.get(formDTO.getActId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(null==actInfoDTO){ | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -958,6 +978,7 @@ public class WorkActServiceImpl implements WorkActService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @Date 2020/7/27 13:55 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     **/ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Transactional(rollbackFor = Exception.class) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public PublishActResultDTO rePublish(RePublishFormDTO rePublishFormDTO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ActInfoDTO originalActInfo=actInfoService.get(rePublishFormDTO.getActId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(null==originalActInfo){ | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |