| | |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemClaimDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemInventoryDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActActRegistVO; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_dangjian.dao.NeedProblemClaimDAO; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | { |
| | | NeedProblemInventoryDTO comActActivityDO=baseMapper.getActivityEndTime(aId); |
| | | |
| | | if(comActActivityDO!=null) |
| | | { |
| | | if(comActActivityDO.getNeedEndTime().getTime()<new Date().getTime()) |
| | | { |
| | | List<String> timeList=baseMapper.getNotTimeId(aId); |
| | | for (String user:timeList) |
| | | List<NeedProblemClaimDTO> timeList=baseMapper.getNotTimeId(aId); |
| | | for (NeedProblemClaimDTO user:timeList) |
| | | { |
| | | long time=comActActivityDO.getNeedEndTime().getTime()-comActActivityDO.getNeedStartTime().getTime(); |
| | | baseMapper.updateEndTime(user,time+"",comActActivityDO.getNeedEndTime()); |
| | | baseMapper.updateEndTime(user.getId(),time+"",comActActivityDO.getNeedEndTime()); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | List<NeedProblemClaimDTO> timeList=baseMapper.getNotTimeId(aId); |
| | | for (NeedProblemClaimDTO user:timeList) |
| | | { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(user.getPunchStartTime()); |
| | | calendar.add(Calendar.HOUR_OF_DAY, 3); // 加3小时 |
| | | Date newDate = calendar.getTime(); |
| | | long time=newDate.getTime()-user.getPunchStartTime().getTime(); |
| | | |
| | | baseMapper.updateEndTime(user.getId(),time+"",newDate); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |