|
@@ -62,6 +62,8 @@ public class IndexErrDataRecordServiceImpl extends BaseServiceImpl<Long, IndexEr
|
|
|
private PracticeGroupDao practiceGroupDao;
|
|
|
@Autowired
|
|
|
private OrganizationDao organizationDao;
|
|
|
+ @Autowired
|
|
|
+ private TeacherDao teacherDao;
|
|
|
|
|
|
@Override
|
|
|
public BaseDAO<Long, IndexErrDataRecord> getDAO() {
|
|
@@ -178,6 +180,17 @@ public class IndexErrDataRecordServiceImpl extends BaseServiceImpl<Long, IndexEr
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ public List<SimpleUserDto> getAllEducationUsers(String organIds) {
|
|
|
+ Set<Integer> queryOrganIds = null;
|
|
|
+ if(StringUtils.isNotBlank(organIds)){
|
|
|
+ queryOrganIds = Arrays.stream(organIds.split(",")).map(Integer::new).collect(Collectors.toSet());
|
|
|
+ }
|
|
|
+ List<Integer> allDealUserIds = indexErrDataRecordDao.getAllDealUserIds(queryOrganIds);
|
|
|
+ List<SimpleUserDto> users = teacherDao.getUsersSimpleInfo(allDealUserIds);
|
|
|
+ return users;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
public List<IndexErrorDataExportDto> errRecordExport(String organIdsStr, String startDate, String endDate) {
|
|
|
List<IndexErrorDataExportDto> result = new ArrayList<>();
|
|
|
Set<Integer> queryOrganIds = null;
|
|
@@ -324,6 +337,60 @@ public class IndexErrDataRecordServiceImpl extends BaseServiceImpl<Long, IndexEr
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ public IndexErrorDataExportDto errDataSummarizing(IndexErrRecordQueryInfo queryInfo) {
|
|
|
+ PageInfo<IndexErrorDataExportDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
|
|
|
+ Map<String, Object> params = new HashMap<String, Object>();
|
|
|
+ MapUtil.populateMap(params, queryInfo);
|
|
|
+ Set<Integer> queryOrganIds = null;
|
|
|
+ if(StringUtils.isNotBlank(queryInfo.getOrganIds())){
|
|
|
+ queryOrganIds = Arrays.stream(queryInfo.getOrganIds().split(",")).map(Integer::new).collect(Collectors.toSet());
|
|
|
+ }
|
|
|
+ params.put("queryOrganIds", queryOrganIds);
|
|
|
+
|
|
|
+ List<IndexErrDataRecord> allErrDatas = indexErrDataRecordDao.getAllErrDatas(params);
|
|
|
+ IndexErrorDataExportDto record = new IndexErrorDataExportDto();
|
|
|
+
|
|
|
+ Map<IndexErrorType, Long> typeDataNumMap = allErrDatas.stream().collect(Collectors.groupingBy(IndexErrDataRecord::getDataType, Collectors.counting()));
|
|
|
+ Map<IndexErrorType, Long> typeSurplusDataNumMap = allErrDatas.stream().filter(e->Objects.isNull(e.getDealTime())).collect(Collectors.groupingBy(IndexErrDataRecord::getDataType, Collectors.counting()));
|
|
|
+ for (Map.Entry<IndexErrorType, Long> typeDataNumMapEntry : typeDataNumMap.entrySet()) {
|
|
|
+ switch (typeDataNumMapEntry.getKey()){
|
|
|
+ case MUSIC_PATROL_ITEM:
|
|
|
+ record.setMusicPatrolItem(typeDataNumMapEntry.getValue().intValue());
|
|
|
+ if(typeSurplusDataNumMap.containsKey(typeDataNumMapEntry.getValue())) {
|
|
|
+ record.setMusicPatrolItemSurplus(typeSurplusDataNumMap.get(typeDataNumMapEntry.getValue()).intValue());
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case INSPECTION_ITEM_PLAN:
|
|
|
+ record.setInspectionItemPlan(typeDataNumMapEntry.getValue().intValue());
|
|
|
+ if(typeSurplusDataNumMap.containsKey(typeDataNumMapEntry.getValue())) {
|
|
|
+ record.setInspectionItemPlanSurplus(typeSurplusDataNumMap.get(typeDataNumMapEntry.getValue()).intValue());
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case STUDENT_VISIT:
|
|
|
+ record.setStudentVisit(typeDataNumMapEntry.getValue().intValue());
|
|
|
+ if(typeSurplusDataNumMap.containsKey(typeDataNumMapEntry.getValue())) {
|
|
|
+ record.setStudentVisitSurplus(typeSurplusDataNumMap.get(typeDataNumMapEntry.getValue()).intValue());
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case TEACHER_EXCEPTION_ATTENDANCE:
|
|
|
+ record.setTeacherExceptionAttendance(typeDataNumMapEntry.getValue().intValue());
|
|
|
+ if(typeSurplusDataNumMap.containsKey(typeDataNumMapEntry.getValue())) {
|
|
|
+ record.setTeacherExceptionAttendanceSurplus(typeSurplusDataNumMap.get(typeDataNumMapEntry.getValue()).intValue());
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case TEACHER_NOT_A_CLASS:
|
|
|
+ record.setTeacherNotAClass(typeDataNumMapEntry.getValue().intValue());
|
|
|
+ if(typeSurplusDataNumMap.containsKey(typeDataNumMapEntry.getValue())) {
|
|
|
+ record.setTeacherNotAClassSurplus(typeSurplusDataNumMap.get(typeDataNumMapEntry.getValue()).intValue());
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return record;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
public PageInfo<InspectionItemPlan> queryErrInspectionData(InspectionItemPlanQueryInfo queryInfo) {
|
|
|
PageInfo<InspectionItemPlan> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
|
|
|
Map<String, Object> params = new HashMap<String, Object>();
|