Browse Source

Merge remote-tracking branch 'origin/master'

Joburgess 4 years ago
parent
commit
e950f72bf3

+ 3 - 3
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/IndexBaseMonthDataDao.java

@@ -113,7 +113,7 @@ public interface IndexBaseMonthDataDao extends BaseDAO<Long, IndexBaseMonthData>
     List<Long> queryApplyForQuitGroupNum(@Param("organIds") Set<Integer> organIds);
     List<Long> queryApplyForQuitGroupNum(@Param("organIds") Set<Integer> organIds);
 
 
     List<Long> queryStudentAttendanceInfo(@Param("organIds") Set<Integer> organIds,
     List<Long> queryStudentAttendanceInfo(@Param("organIds") Set<Integer> organIds,
-                                          @Param("type") String type, @Param("firstDayOfMonth") Date firstDayOfMonth, @Param("startTime") String startTime);
+                                          @Param("type") String type, @Param("startTime") String startTime);
 
 
 
 
     /**
     /**
@@ -121,14 +121,14 @@ public interface IndexBaseMonthDataDao extends BaseDAO<Long, IndexBaseMonthData>
      * @param organIds
      * @param organIds
      * @return
      * @return
      */
      */
-    List<Long> getAttendanceError(@Param("organIds") String organIds, @Param("firstDayOfMonth") Date firstDayOfMonth, @Param("startTime") String startTime);
+    List<Long> getAttendanceError(@Param("organIds") String organIds,@Param("startTime") String startTime);
 
 
     /**
     /**
      * 获取旷课考勤
      * 获取旷课考勤
      * @param organIds
      * @param organIds
      * @return
      * @return
      */
      */
-    List<Long> getNoAttendance(@Param("organIds") String organIds, @Param("firstDayOfMonth") Date firstDayOfMonth, @Param("startTime") String startTime);
+    List<Long> getNoAttendance(@Param("organIds") String organIds, @Param("startTime") String startTime);
 
 
     /**
     /**
      * 获取老师离职申请数
      * 获取老师离职申请数

+ 9 - 10
mec-biz/src/main/java/com/ym/mec/biz/service/impl/IndexBaseMonthDataServiceImpl.java

@@ -365,7 +365,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 			all.add(one);
 			all.add(one);
 		}
 		}
 
 
-		Date firstDayOfMonth = DateUtil.getFirstDayOfMonth(DateUtil.addMonths(date, -1));
+//		Date firstDayOfMonth = DateUtil.getFirstDayOfMonth(DateUtil.addMonths(date, -1));
 
 
 		if(IndexErrorType.STUDENT_INFO.equals(errorType)){
 		if(IndexErrorType.STUDENT_INFO.equals(errorType)){
 
 
@@ -378,9 +378,9 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 			twoChild.add(new IndexErrInfoDto(IndexErrorType.STUDENT_NOT_PAYMENT, IndexErrorType.STUDENT_NOT_PAYMENT.getMsg(), indexBaseMonthDataDao.countNoPaymentStudentNum(organIds), indexBaseMonthDataDao.getNoPaymentMusicGroup(organIds)));
 			twoChild.add(new IndexErrInfoDto(IndexErrorType.STUDENT_NOT_PAYMENT, IndexErrorType.STUDENT_NOT_PAYMENT.getMsg(), indexBaseMonthDataDao.countNoPaymentStudentNum(organIds), indexBaseMonthDataDao.getNoPaymentMusicGroup(organIds)));
 			List<Long> quitGroupNum = indexBaseMonthDataDao.queryApplyForQuitGroupNum(organIds);
 			List<Long> quitGroupNum = indexBaseMonthDataDao.queryApplyForQuitGroupNum(organIds);
 			twoChild.add(new IndexErrInfoDto(IndexErrorType.STUDENT_APPLY_FOR_QUIT_MUSIC_GROUP, IndexErrorType.STUDENT_APPLY_FOR_QUIT_MUSIC_GROUP.getMsg(), quitGroupNum.size(),  quitGroupNum));
 			twoChild.add(new IndexErrInfoDto(IndexErrorType.STUDENT_APPLY_FOR_QUIT_MUSIC_GROUP, IndexErrorType.STUDENT_APPLY_FOR_QUIT_MUSIC_GROUP.getMsg(), quitGroupNum.size(),  quitGroupNum));
-			List<Long> attendanceInfo = indexBaseMonthDataDao.queryStudentAttendanceInfo(organIds, StudentAttendanceStatusEnum.TRUANT.getCode(),firstDayOfMonth,startTime);
+			List<Long> attendanceInfo = indexBaseMonthDataDao.queryStudentAttendanceInfo(organIds, StudentAttendanceStatusEnum.TRUANT.getCode(),startTime);
 			twoChild.add(new IndexErrInfoDto(IndexErrorType.COURSE_TRUANT_STUDENT_NUM, IndexErrorType.COURSE_TRUANT_STUDENT_NUM.getMsg(), attendanceInfo.size(), attendanceInfo));
 			twoChild.add(new IndexErrInfoDto(IndexErrorType.COURSE_TRUANT_STUDENT_NUM, IndexErrorType.COURSE_TRUANT_STUDENT_NUM.getMsg(), attendanceInfo.size(), attendanceInfo));
-			List<Long> attendanceInfo1 = indexBaseMonthDataDao.queryStudentAttendanceInfo(organIds, StudentAttendanceStatusEnum.LEAVE.getCode(),null,startTime);
+			List<Long> attendanceInfo1 = indexBaseMonthDataDao.queryStudentAttendanceInfo(organIds, StudentAttendanceStatusEnum.LEAVE.getCode(),startTime);
 			twoChild.add(new IndexErrInfoDto(IndexErrorType.COURSE_LEAVE_STUDENT_NUM, IndexErrorType.COURSE_LEAVE_STUDENT_NUM.getMsg(), attendanceInfo1.size(), attendanceInfo1));
 			twoChild.add(new IndexErrInfoDto(IndexErrorType.COURSE_LEAVE_STUDENT_NUM, IndexErrorType.COURSE_LEAVE_STUDENT_NUM.getMsg(), attendanceInfo1.size(), attendanceInfo1));
 			two.setNum(twoChild.stream().mapToInt(IndexErrInfoDto::getNum).sum());
 			two.setNum(twoChild.stream().mapToInt(IndexErrInfoDto::getNum).sum());
 			two.setResult(twoChild);
 			two.setResult(twoChild);
@@ -393,10 +393,10 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 			three.setDesc(IndexErrorType.TEACHER_INFO.getMsg());
 			three.setDesc(IndexErrorType.TEACHER_INFO.getMsg());
 			List<IndexErrInfoDto> threeChild = new ArrayList<>();
 			List<IndexErrInfoDto> threeChild = new ArrayList<>();
 
 
-			List<Long> attendanceError = indexBaseMonthDataDao.getAttendanceError(organIdsStr,firstDayOfMonth,startTime);
+			List<Long> attendanceError = indexBaseMonthDataDao.getAttendanceError(organIdsStr,startTime);
 			threeChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_EXCEPTION_ATTENDANCE, IndexErrorType.TEACHER_EXCEPTION_ATTENDANCE.getMsg(), attendanceError.size(), attendanceError));
 			threeChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_EXCEPTION_ATTENDANCE, IndexErrorType.TEACHER_EXCEPTION_ATTENDANCE.getMsg(), attendanceError.size(), attendanceError));
 
 
-			List<Long> noAttendance = indexBaseMonthDataDao.getNoAttendance(organIdsStr,firstDayOfMonth,startTime);
+			List<Long> noAttendance = indexBaseMonthDataDao.getNoAttendance(organIdsStr,startTime);
 			threeChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_NOT_A_CLASS, IndexErrorType.TEACHER_NOT_A_CLASS.getMsg(), noAttendance.size(), noAttendance));
 			threeChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_NOT_A_CLASS, IndexErrorType.TEACHER_NOT_A_CLASS.getMsg(), noAttendance.size(), noAttendance));
 
 
 			List<Long> teacherLeave = indexBaseMonthDataDao.queryTeacherLeave(organIdsStr,startTime);
 			List<Long> teacherLeave = indexBaseMonthDataDao.queryTeacherLeave(organIdsStr,startTime);
@@ -478,7 +478,6 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 		}
 		}
 		resultMap.put("musicPatrol",flag1);
 		resultMap.put("musicPatrol",flag1);
 		boolean flag2 = false;
 		boolean flag2 = false;
-		Date firstDayOfMonth = DateUtil.getFirstDayOfMonth(DateUtil.addMonths(date, -1));
 		if(!flag2){
 		if(!flag2){
 			int countNoPaymentStudentNum = indexBaseMonthDataDao.countNoPaymentStudentNum(organIds);
 			int countNoPaymentStudentNum = indexBaseMonthDataDao.countNoPaymentStudentNum(organIds);
 			if(countNoPaymentStudentNum > 0){
 			if(countNoPaymentStudentNum > 0){
@@ -492,13 +491,13 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 			}
 			}
 		}
 		}
 		if(!flag2){
 		if(!flag2){
-			List<Long> attendanceInfo = indexBaseMonthDataDao.queryStudentAttendanceInfo(organIds, StudentAttendanceStatusEnum.TRUANT.getCode(),firstDayOfMonth,startTime);
+			List<Long> attendanceInfo = indexBaseMonthDataDao.queryStudentAttendanceInfo(organIds, StudentAttendanceStatusEnum.TRUANT.getCode(),startTime);
 			if(attendanceInfo.size() > 0){
 			if(attendanceInfo.size() > 0){
 				flag2 = true;
 				flag2 = true;
 			}
 			}
 		}
 		}
 		if(!flag2){
 		if(!flag2){
-			List<Long> attendanceInfo1 = indexBaseMonthDataDao.queryStudentAttendanceInfo(organIds, StudentAttendanceStatusEnum.LEAVE.getCode(),null,startTime);
+			List<Long> attendanceInfo1 = indexBaseMonthDataDao.queryStudentAttendanceInfo(organIds, StudentAttendanceStatusEnum.LEAVE.getCode(),startTime);
 			if(attendanceInfo1.size() > 0){
 			if(attendanceInfo1.size() > 0){
 				flag2 = true;
 				flag2 = true;
 			}
 			}
@@ -506,13 +505,13 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 		resultMap.put("studentInfo",flag2);
 		resultMap.put("studentInfo",flag2);
 		boolean flag3 = false;
 		boolean flag3 = false;
 		if(!flag3){
 		if(!flag3){
-			List<Long> attendanceError = indexBaseMonthDataDao.getAttendanceError(organIdsStr,firstDayOfMonth,startTime);
+			List<Long> attendanceError = indexBaseMonthDataDao.getAttendanceError(organIdsStr,startTime);
 			if(attendanceError.size() > 0){
 			if(attendanceError.size() > 0){
 				flag3 = true;
 				flag3 = true;
 			}
 			}
 		}
 		}
 		if(!flag3){
 		if(!flag3){
-			List<Long> noAttendance = indexBaseMonthDataDao.getNoAttendance(organIdsStr,firstDayOfMonth,startTime);
+			List<Long> noAttendance = indexBaseMonthDataDao.getNoAttendance(organIdsStr,startTime);
 			if(noAttendance.size() > 0){
 			if(noAttendance.size() > 0){
 				flag3 = true;
 				flag3 = true;
 			}
 			}

+ 0 - 9
mec-biz/src/main/resources/config/mybatis/IndexBaseMonthDataMapper.xml

@@ -573,9 +573,6 @@
 			<if test="type!=null and type=='TRUANT'">
 			<if test="type!=null and type=='TRUANT'">
 				AND (sa.status_ = 'TRUANT' OR sa.id_ IS NULL) AND (cs.new_course_id_ IS NULL OR cs.new_course_id_ = cs.id_)
 				AND (sa.status_ = 'TRUANT' OR sa.id_ IS NULL) AND (cs.new_course_id_ IS NULL OR cs.new_course_id_ = cs.id_)
 			</if>
 			</if>
-			<if test="firstDayOfMonth != null">
-				AND cs.class_date_ >= DATE_FORMAT(#{firstDayOfMonth},'%Y-%m-%d')
-			</if>
 			<if test="organIds!=null and organIds.size()>0">
 			<if test="organIds!=null and organIds.size()>0">
 				AND cs.organ_id_ IN
 				AND cs.organ_id_ IN
 				<foreach collection="organIds" item="organId" open="(" close=")" separator=",">
 				<foreach collection="organIds" item="organId" open="(" close=")" separator=",">
@@ -591,9 +588,6 @@
 		<if test="organIds != null and organIds != ''">
 		<if test="organIds != null and organIds != ''">
 			AND FIND_IN_SET(cs.organ_id_,#{organIds})
 			AND FIND_IN_SET(cs.organ_id_,#{organIds})
 		</if>
 		</if>
-		<if test="firstDayOfMonth != null">
-			AND cs.class_date_ >= DATE_FORMAT(#{firstDayOfMonth},'%Y-%m-%d')
-		</if>
 	</select>
 	</select>
 	<select id="getNoAttendance" resultType="java.lang.Long">
 	<select id="getNoAttendance" resultType="java.lang.Long">
 		SELECT DISTINCT ta.id_ FROM teacher_attendance ta
 		SELECT DISTINCT ta.id_ FROM teacher_attendance ta
@@ -603,9 +597,6 @@
 		<if test="organIds != null and organIds != ''">
 		<if test="organIds != null and organIds != ''">
 			AND FIND_IN_SET(cs.organ_id_,#{organIds})
 			AND FIND_IN_SET(cs.organ_id_,#{organIds})
 		</if>
 		</if>
-		<if test="firstDayOfMonth != null">
-			AND cs.class_date_ >= DATE_FORMAT(#{firstDayOfMonth},'%Y-%m-%d')
-		</if>
 	</select>
 	</select>
 	<select id="queryTeacherLeave" resultType="java.lang.Long">
 	<select id="queryTeacherLeave" resultType="java.lang.Long">
 		SELECT DISTINCT tlr.id_ FROM teacher_leave_record tlr
 		SELECT DISTINCT tlr.id_ FROM teacher_leave_record tlr