| | |
| | | |
| | | 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 pNum=projectPlanService.getNum(item.getId(),null); |
| | | int accomplishNum=projectPlanService.getNum(item.getId(),"1"); |
| | | NewFightCommunityConstructionDTO dto=new NewFightCommunityConstructionDTO(); |
| | | dto.setId(item.getId()); |
| | | dto.setStatus("3"); |
| | | if(pNum==accomplishNum) |
| | | { |
| | | //已完成 |
| | | dto.setStatus("3"); |
| | | } |
| | | else |
| | | { |
| | | //进行中 |
| | | dto.setStatus("2"); |
| | | } |
| | | baseMapper.editData(dto); |
| | | } |
| | | } |