| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemUnitTaskDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NewFightCommunityConstructionDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NewFightProjectPlanDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_dangjian.dao.NeedProblemUnitTaskDAO; |
| | | import com.panzhihua.service_dangjian.dao.NewFightCommunityConstructionDAO; |
| | | import com.panzhihua.service_dangjian.dao.NewFightProjectPlanDAO; |
| | | import com.panzhihua.service_dangjian.service.NeedProblemUnitTaskService; |
| | | import com.panzhihua.service_dangjian.service.NewFightCommunityConstructionService; |
| | | import com.panzhihua.service_dangjian.service.NewFightProjectPlanService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | for (NewFightCommunityConstructionDTO item:list) { |
| | | |
| | | // if(StringUtils.equals("1",item.getStatus())) |
| | | // { |
| | | // // 1 已发布 |
| | | // |
| | | // |
| | | // |
| | | // } |
| | | // else if(StringUtils.equals("2",item.getStatus())) |
| | | // { |
| | | // // 1 进行中 |
| | | // |
| | | // |
| | | // } |
| | | if(StringUtils.equals("1",item.getStatus())) |
| | | { |
| | | // 1 已发布 |
| | | Date startTime = item.getStartTime(); |
| | | if (startTime!=null) |
| | | { |
| | | if(new Date().getTime()>startTime.getTime()) |
| | | { |
| | | NewFightCommunityConstructionDTO dto=new NewFightCommunityConstructionDTO(); |
| | | dto.setId(item.getId()); |
| | | //进行中 |
| | | dto.setStatus("2"); |
| | | baseMapper.editData(dto); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //预计完成时间 |
| | | Date estimatedTime = item.getEstimatedTime(); |
| | |
| | | { |
| | | if(new Date().getTime()>estimatedTime.getTime()) |
| | | { |
| | | int accomplishNum=projectPlanService.getNum(item.getId(),"0"); |
| | | NewFightCommunityConstructionDTO dto=new NewFightCommunityConstructionDTO(); |
| | | dto.setId(item.getId()); |
| | | dto.setStatus("3"); |
| | | if(accomplishNum==0) |
| | | { |
| | | //已完成 |
| | | dto.setStatus("3"); |
| | | } |
| | | else |
| | | { |
| | | //进行中 |
| | | dto.setStatus("2"); |
| | | } |
| | | baseMapper.editData(dto); |
| | | } |
| | | } |