| | |
| | | import com.gkhy.assess.common.utils.PageUtil; |
| | | import com.gkhy.assess.system.domain.AssPlanPerson; |
| | | import com.gkhy.assess.system.domain.AssProject; |
| | | import com.gkhy.assess.system.domain.vo.PersonRecognitionVO; |
| | | import com.gkhy.assess.system.domain.vo.ProjectStaticVO; |
| | | import com.gkhy.assess.system.enums.ProgressPhaseEnum; |
| | | import com.gkhy.assess.system.enums.ReportProgressEnum; |
| | |
| | | PageUtil.startPage(); |
| | | List<AssProject> projects=baseMapper.projectList(project); |
| | | //获取签字确认人数 |
| | | handleProjectRecognitionCount(projects); |
| | | return CommonPage.restPage(projects); |
| | | } |
| | | |
| | | public void handleProjectRecognitionCount(List<AssProject> projects){ |
| | | List<Long>projectIds=projects.stream().map(item -> item.getId()).collect(Collectors.toList()); |
| | | if(!projectIds.isEmpty()) { |
| | | List<PersonRecognitionVO> personAndRecognitions = planPersonMapper.getPersonAndRecognitionCount(projectIds); |
| | | Map<Long, PersonRecognitionVO> map = personAndRecognitions.stream().collect(Collectors.toMap(PersonRecognitionVO::getProjectId, a -> a)); |
| | | for (AssProject project : projects) { |
| | | PersonRecognitionVO personRecognitionVO = map.get(project.getId()); |
| | | if (personRecognitionVO != null) { |
| | | project.setPersonRecognition(personRecognitionVO); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public AssProject getProjectById(Long projectId) { |
| | | return baseMapper.getProjectById(projectId); |