|
@@ -416,4 +416,85 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
result.add(indexErrInfoDto);
|
|
|
return result;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Boolean hasIndexErrData(String organIdsStr) {
|
|
|
+ Set<Integer> organIds = null;
|
|
|
+ if(StringUtils.isNotBlank(organIdsStr)){
|
|
|
+ organIds = Arrays.stream(organIdsStr.split(",")).map(Integer::new).collect(Collectors.toSet());
|
|
|
+ }
|
|
|
+ Date date = new Date();
|
|
|
+ int countLessThenThreeClassGroupNum = indexBaseMonthDataDao.countLessThenThreeClassGroupNum(organIds);
|
|
|
+ if(countLessThenThreeClassGroupNum > 0){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ List<Long> errInspection = indexBaseMonthDataDao.queryErrInspection(organIds);
|
|
|
+ if(errInspection.size() > 0){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ Date firstDayOfMonth = DateUtil.getFirstDayOfMonth(DateUtil.addMonths(date, -1));
|
|
|
+ int countNoPaymentStudentNum = indexBaseMonthDataDao.countNoPaymentStudentNum(organIds);
|
|
|
+ if(countNoPaymentStudentNum > 0){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ List<Long> quitGroupNum = indexBaseMonthDataDao.queryApplyForQuitGroupNum(organIds);
|
|
|
+ if(quitGroupNum.size() > 0){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ List<Long> attendanceInfo = indexBaseMonthDataDao.queryStudentAttendanceInfo(organIds, StudentAttendanceStatusEnum.TRUANT.getCode(),firstDayOfMonth);
|
|
|
+ if(attendanceInfo.size() > 0){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ List<Long> attendanceInfo1 = indexBaseMonthDataDao.queryStudentAttendanceInfo(organIds, StudentAttendanceStatusEnum.LEAVE.getCode(),null);
|
|
|
+ if(attendanceInfo1.size() > 0){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ List<Long> attendanceError = indexBaseMonthDataDao.getAttendanceError(organIdsStr,firstDayOfMonth);
|
|
|
+ if(attendanceError.size() > 0){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ List<Long> noAttendance = indexBaseMonthDataDao.getNoAttendance(organIdsStr,firstDayOfMonth);
|
|
|
+ if(noAttendance.size() > 0){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ List<Long> teacherLeave = indexBaseMonthDataDao.queryTeacherLeave(organIdsStr);
|
|
|
+ if(teacherLeave.size() > 0){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ String monthStr = DateUtil.format(date, DateUtil.ISO_YEAR_MONTH_FORMAT);
|
|
|
+ List<Long> lowTeacherSalary = indexBaseMonthDataDao.queryLowTeacherSalary(organIdsStr,monthStr);
|
|
|
+ if(lowTeacherSalary.size() > 0){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ List<Long> inspectionItem = indexBaseMonthDataDao.queryInspectionItem(organIdsStr);
|
|
|
+ if(inspectionItem.size() > 0){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ List<Long> inspectionItemPlan = indexBaseMonthDataDao.queryInspectionItemPlan(organIdsStr);
|
|
|
+ if(inspectionItemPlan.size() > 0){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ List<Long> studentVisit = indexBaseMonthDataDao.queryStudentVisit(organIdsStr);
|
|
|
+ if(studentVisit.size() > 0){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ if (sysUser == null) {
|
|
|
+ throw new BizException("用户信息获取失败");
|
|
|
+ }
|
|
|
+ //当前用户是否是分部经理
|
|
|
+ List<Integer> userRole = employeeDao.queryUserRole(sysUser.getId());
|
|
|
+ //获取关联的乐团列表
|
|
|
+ List<String> musicGroupIds = musicGroupDao.queryIdsByEduIdAndOrganIds(userRole.contains(3)?sysUser.getId():null,organIdsStr);
|
|
|
+ String configValue1 = sysConfigDao.findConfigValue("push_create_payment_calender");
|
|
|
+ date = new Date();
|
|
|
+ String format = DateUtil.format(date, DateUtil.DEFAULT_PATTERN);
|
|
|
+ if(musicGroupIds.size() > 0){
|
|
|
+ List<Long> calenderIds = musicGroupPaymentCalenderDao.queryEndIds(configValue1, format,musicGroupIds);
|
|
|
+ if(calenderIds.size() > 0){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|