|
@@ -8,10 +8,12 @@ import com.ym.mec.biz.dal.dao.*;
|
|
import com.ym.mec.biz.dal.dto.IndexBaseDto;
|
|
import com.ym.mec.biz.dal.dto.IndexBaseDto;
|
|
import com.ym.mec.biz.dal.dto.IndexErrorDataExportDto;
|
|
import com.ym.mec.biz.dal.dto.IndexErrorDataExportDto;
|
|
import com.ym.mec.biz.dal.dto.OrganVipGroupCategoryCourseNumDto;
|
|
import com.ym.mec.biz.dal.dto.OrganVipGroupCategoryCourseNumDto;
|
|
|
|
+import com.ym.mec.biz.dal.dto.SimpleUserDto;
|
|
import com.ym.mec.biz.dal.entity.IndexErrInfoDto;
|
|
import com.ym.mec.biz.dal.entity.IndexErrInfoDto;
|
|
import com.ym.mec.biz.dal.entity.Organization;
|
|
import com.ym.mec.biz.dal.entity.Organization;
|
|
import com.ym.mec.biz.dal.enums.*;
|
|
import com.ym.mec.biz.dal.enums.*;
|
|
import com.ym.mec.biz.dal.page.IndexDataQueryInfo;
|
|
import com.ym.mec.biz.dal.page.IndexDataQueryInfo;
|
|
|
|
+import com.ym.mec.biz.service.EmployeeService;
|
|
import com.ym.mec.biz.service.StudentExtracurricularExercisesSituationService;
|
|
import com.ym.mec.biz.service.StudentExtracurricularExercisesSituationService;
|
|
import com.ym.mec.common.constant.CommonConstants;
|
|
import com.ym.mec.common.constant.CommonConstants;
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
@@ -60,6 +62,8 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
private StudentExtracurricularExercisesSituationDao studentExtracurricularExercisesSituationDao;
|
|
private StudentExtracurricularExercisesSituationDao studentExtracurricularExercisesSituationDao;
|
|
@Autowired
|
|
@Autowired
|
|
private ClassGroupDao classGroupDao;
|
|
private ClassGroupDao classGroupDao;
|
|
|
|
+ @Autowired
|
|
|
|
+ private EmployeeService employeeService;
|
|
|
|
|
|
private static ThreadLocal<Set<Integer>> organIds = new ThreadLocal<Set<Integer>>(){
|
|
private static ThreadLocal<Set<Integer>> organIds = new ThreadLocal<Set<Integer>>(){
|
|
@Override
|
|
@Override
|
|
@@ -258,6 +262,33 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
if(CollectionUtils.isEmpty(dataTypes)||dataTypes.contains(IndexDataType.PROGRESS_MUSIC_GROUP_NUM)) {
|
|
if(CollectionUtils.isEmpty(dataTypes)||dataTypes.contains(IndexDataType.PROGRESS_MUSIC_GROUP_NUM)) {
|
|
saveData(indexBaseMonthDataDao.getMusicData(dayStr), dayStr, IndexDataType.PROGRESS_MUSIC_GROUP_NUM);
|
|
saveData(indexBaseMonthDataDao.getMusicData(dayStr), dayStr, IndexDataType.PROGRESS_MUSIC_GROUP_NUM);
|
|
}
|
|
}
|
|
|
|
+ if(CollectionUtils.isEmpty(dataTypes)||dataTypes.contains(TRANSACTION_TEACHER_NUM)) {
|
|
|
|
+ List<SimpleUserDto> transactionTeachers = employeeService.findByRole("58", null);
|
|
|
|
+ Map<Integer, Integer> organTeacherNumMap = new HashMap<>();
|
|
|
|
+ for (SimpleUserDto transactionTeacher : transactionTeachers) {
|
|
|
|
+ Set<Integer> organIds = Arrays.stream(transactionTeacher.getOrganIds().split(",")).map(s -> Integer.valueOf(s)).collect(Collectors.toSet());
|
|
|
|
+ for (Integer organId : organIds) {
|
|
|
|
+ if(organTeacherNumMap.containsKey(organId)){
|
|
|
|
+ organTeacherNumMap.put(organId, organTeacherNumMap.get(organId)+1);
|
|
|
|
+ }else{
|
|
|
|
+ organTeacherNumMap.put(organId, 1);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ List<IndexBaseMonthData> datas = new ArrayList<>();
|
|
|
|
+ Date month = DateUtil.stringToDate(dayStr, "yyyy-MM-dd");
|
|
|
|
+ for (Map.Entry<Integer, Integer> organTeacherNumMapEntry : organTeacherNumMap.entrySet()) {
|
|
|
|
+ IndexBaseMonthData data = new IndexBaseMonthData();
|
|
|
|
+ data.setOrganId(organTeacherNumMapEntry.getKey());
|
|
|
|
+ data.setMonth(month);
|
|
|
|
+ BigDecimal num = new BigDecimal(organTeacherNumMapEntry.getValue());
|
|
|
|
+ data.setTotalNum(num);
|
|
|
|
+ data.setActivateNum(num);
|
|
|
|
+ data.setPercent(num);
|
|
|
|
+ datas.add(data);
|
|
|
|
+ }
|
|
|
|
+ saveData(datas, dayStr, IndexDataType.TRANSACTION_TEACHER_NUM);
|
|
|
|
+ }
|
|
|
|
|
|
//人事数据
|
|
//人事数据
|
|
if(CollectionUtils.isEmpty(dataTypes)||dataTypes.contains(IndexDataType.TEACHER_NUM)) {
|
|
if(CollectionUtils.isEmpty(dataTypes)||dataTypes.contains(IndexDataType.TEACHER_NUM)) {
|