This commit is contained in:
2025-08-26 10:01:48 +08:00
40 changed files with 987 additions and 140 deletions

View File

@@ -4,6 +4,7 @@ import com.srs.system.domain.StudentMentalRating;
import com.srs.system.domain.vo.StudentMentalRatingVo;
import org.apache.ibatis.annotations.Param;
import java.time.LocalDate;
import java.util.List;
public interface StudentMentalRatingMapper {
@@ -47,5 +48,13 @@ public interface StudentMentalRatingMapper {
/** 单学号全部记录 */
List<StudentMentalRating> selectByStuNo(@Param("stuNo") String stuNo);
/**
* 查询今天的心理评级记录 陈冠元
* @param studentId 学生ID
* @param today 今天的日期
* @return 记录数
*/
int countTodayByStudentId(@Param("studentId") String studentId, @Param("today") LocalDate today);
}

View File

@@ -94,4 +94,12 @@
WHERE student_id = #{stuNo}
ORDER BY created_time DESC
</select>
<!-- 查询今天该学生是否已经填写过心理评测 陈冠元 -->
<select id="countTodayByStudentId" resultType="int">
SELECT COUNT(*)
FROM student_mental_rating
WHERE student_id = #{studentId}
AND DATE(created_time) = #{today}
</select>
</mapper>