| | |
| | | package com.ycl.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.common.base.Result; |
| | | import com.ycl.common.enums.business.FileTypeEnum; |
| | | import com.ycl.common.enums.business.ProjectCategoryEnum; |
| | | import com.ycl.common.utils.CopyUtils; |
| | | import com.ycl.common.utils.DateUtils; |
| | | import com.ycl.common.utils.SecurityUtils; |
| | |
| | | if (query.getProjectEndTime() != null) { |
| | | query.setProjectEndTime(DateUtils.getDayEnd(query.getProjectEndTime())); |
| | | } |
| | | String projectCategory = query.getProjectCategory(); |
| | | if (ProjectCategoryEnum.RESERVE.getType().equals(projectCategory)) { |
| | | query.setProjectStatus(ProjectCategoryEnum.RESERVE.getStatus()); |
| | | query.setReserveOrPrevious(ProjectCategoryEnum.RESERVE.getCode()); |
| | | } else if (ProjectCategoryEnum.PREVIOUS.getType().equals(projectCategory)) { |
| | | query.setProjectStatus(ProjectCategoryEnum.PREVIOUS.getStatus()); |
| | | query.setReserveOrPrevious(ProjectCategoryEnum.PREVIOUS.getCode()); |
| | | } else if (ProjectCategoryEnum.FINISH.getType().equals(projectCategory)) { |
| | | query.setProjectStatus(ProjectCategoryEnum.FINISH.getStatus()); |
| | | } else if (ProjectCategoryEnum.EXCEPTION.getType().equals(projectCategory)) { |
| | | //TODO |
| | | //先查出异常流程或者异常进度或者异常计划的projectId和异常种类 |
| | | //通过projectId查出项目数据 |
| | | //补充相应的异常数据(异常种类、异常流程节点等) |
| | | List<ProjectVO> list = new ArrayList<>(); |
| | | return Result.ok().data(list).total(0); |
| | | } |
| | | |
| | | IPage<ProjectInfoVO> page = PageUtil.getPage(query, ProjectInfoVO.class); |
| | | baseMapper.getPage(page, query); |
| | | List<ProjectInfoVO> records = page.getRecords(); |
| | |
| | | vo.setProjectColorCode("green"); |
| | | ProjectVO projectVO = new ProjectVO(); |
| | | copyToProjectVO(vo,projectVO); |
| | | //翻译项目阶段 |
| | | String phase = ProjectCategoryEnum.getPhaseByProjectStatus(projectVO.getProjectStatus(), projectVO.getProcessId() != null); |
| | | projectVO.setProjectPhase(phase); |
| | | list.add(projectVO); |
| | | }); |
| | | return Result.ok().data(list).total(page.getTotal()); |