|
@@ -29,7 +29,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Isolation;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
-import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
@@ -402,11 +401,25 @@ public class ExamRegistrationServiceImpl extends BaseServiceImpl<Long, ExamRegis
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public OrganExamRegistStatisticsDto getOrganExamRegistStatistics(Integer organId) {
|
|
|
- List<Integer> childOrganIds = organizationService.getChildOrganIds(organId, false);
|
|
|
- if(CollectionUtils.isEmpty(childOrganIds)){
|
|
|
- return null;
|
|
|
+ public PageInfo<OrganExamRegistStatisticsDto> getOrganExamRegistStatistics(QueryInfo queryInfo) {
|
|
|
+ PageInfo<OrganExamRegistStatisticsDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
|
|
|
+ Map<String, Object> params = new HashMap<String, Object>();
|
|
|
+ MapUtil.populateMap(params, queryInfo);
|
|
|
+
|
|
|
+ List<Integer> childOrganIds = organizationService.getChildOrganIds(queryInfo.getOrganId(), false);
|
|
|
+ params.put("organIds", childOrganIds);
|
|
|
+
|
|
|
+ List<OrganExamRegistStatisticsDto> dataList = null;
|
|
|
+ int count = childOrganIds.size();
|
|
|
+ if (count > 0) {
|
|
|
+ pageInfo.setTotal(count);
|
|
|
+ params.put("offset", pageInfo.getOffset());
|
|
|
+ dataList = examRegistrationDao.getOrganExamRegistStatistics(params);
|
|
|
+ }
|
|
|
+ if (count == 0) {
|
|
|
+ dataList = new ArrayList<>();
|
|
|
}
|
|
|
- return examRegistrationDao.getOrganExamRegistStatistics(childOrganIds);
|
|
|
+ pageInfo.setRows(dataList);
|
|
|
+ return pageInfo;
|
|
|
}
|
|
|
}
|