浏览代码

1、课酬确认相关

Joburgess 5 年之前
父节点
当前提交
7edbdd025b

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentExtracurricularExercisesSituationDao.java

@@ -44,5 +44,14 @@ public interface StudentExtracurricularExercisesSituationDao extends BaseDAO<Lon
      */
      */
     List<TeacherExercisesServiceDto> findTeacherExercisesServiceSituations(@Param("monday") String monday,
     List<TeacherExercisesServiceDto> findTeacherExercisesServiceSituations(@Param("monday") String monday,
                                                                            @Param("teacherIds") List<Integer> teacherIds);
                                                                            @Param("teacherIds") List<Integer> teacherIds);
+
+    /**
+     * @describe 统计上周数据今日跟新的条数
+     * @author Joburgess
+     * @date 2020/4/20
+     * @param sunday:
+     * @return int
+     */
+    int findLastWeekTodayUpdateNum(@Param("sunday") String sunday);
 	
 	
 }
 }

+ 4 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExtracurricularExercisesReplyServiceImpl.java

@@ -191,6 +191,10 @@ public class ExtracurricularExercisesReplyServiceImpl extends BaseServiceImpl<Lo
 		LocalDate nowDate = LocalDateTime.now(DateUtil.zoneId).toLocalDate();
 		LocalDate nowDate = LocalDateTime.now(DateUtil.zoneId).toLocalDate();
 		if(nowDate.getDayOfWeek()==DayOfWeek.MONDAY){
 		if(nowDate.getDayOfWeek()==DayOfWeek.MONDAY){
 			nowDate = nowDate.plusDays(-1);
 			nowDate = nowDate.plusDays(-1);
+			int lastWeekTodayUpdateNum = studentExtracurricularExercisesSituationDao.findLastWeekTodayUpdateNum(nowDate.toString());
+			if(lastWeekTodayUpdateNum>0){
+				nowDate = LocalDateTime.now(DateUtil.zoneId).toLocalDate();
+			}
 		}
 		}
 		LocalDate monDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue());
 		LocalDate monDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue());
 		LocalDate sunDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.SUNDAY.getValue());
 		LocalDate sunDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.SUNDAY.getValue());

+ 3 - 0
mec-biz/src/main/resources/config/mybatis/StudentExtracurricularExercisesSituationMapper.xml

@@ -248,4 +248,7 @@
 		GROUP BY
 		GROUP BY
 			teacher_id_;
 			teacher_id_;
     </select>
     </select>
+    <select id="findLastWeekTodayUpdateNum" resultType="int">
+		SELECT COUNT(id_) FROM student_extracurricular_exercises_situation_ WHERE sunday_=#{sunday} AND DATE_FORMAT(update_time_,'%Y-%m-%d')=DATE_FORMAT(NOW(),'%Y-%m-%d')
+    </select>
 </mapper>
 </mapper>