ltx c4b01d2f53 feat: 完善运动记录与体测数据接口
AI运动站:按设备学校和学生学号关联学生、班级,返回课目编号与成绩值,并修正壹路训练有效次数的数值类型。

AI阳光跑:在分页查询与导出共用条件中排除零有效里程、零有效次数记录。

体测数据记录:补全年级与课目编号、姓名和测试时间,新增按当前筛选条件导出完整记录的 Excel 接口;800/1000 米成绩格式化为分秒。
2026-10-13 14:27:08 +08:00

135 lines
3.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VOL.Entity.SystemModels;
namespace VOL.Entity.DomainModels.YiLu
{
/// <summary>
/// 训练成绩表
/// </summary>
[Table("YL_Train")]
[Index(nameof(TrainSerial), IsUnique = true)] // 训练序列号唯一
[Index(nameof(DeviceSerial))]
[Index(nameof(UserSerial))]
[Index(nameof(CourseId))]
public class YL_Train : BaseEntity
{
/// <summary>
/// 主键ID
/// </summary>
[Key]
public long Id { get; set; }
/// <summary>
/// 设备序列号(设备唯一标识)
/// </summary>
[Required]
[MaxLength(64)]
public string DeviceSerial { get; set; }
/// <summary>
/// 设备类型
/// </summary>
public int DeviceType { get; set; }
/// <summary>
/// 人员编号
/// </summary>
[Required]
[MaxLength(64)]
public string UserSerial { get; set; }
/// <summary>
/// 单次训练唯一序列号(唯一字段)
/// </summary>
[Required]
[MaxLength(64)]
public string TrainSerial { get; set; }
/// <summary>
/// 视频序列号(多人共用,可重复)
/// </summary>
[Required]
[MaxLength(64)]
public string VideoSerial { get; set; }
/// <summary>
/// 是否测验任务 0=否 1=是
/// </summary>
public int TrainExam { get; set; }
/// <summary>
/// 测验任务ID(自由练习可为空)
/// </summary>
public int? QuizId { get; set; }
/// <summary>
/// 有效个数
/// </summary>
public double StandardCounts { get; set; }
/// <summary>
/// 不合格动作数
/// </summary>
public int UnStandardCounts { get; set; }
/// <summary>
/// 有效时长(秒)
/// 计时类课目使用,如悬垂
/// </summary>
public double? TimeKeeping { get; set; }
/// <summary>
/// 训练持续时间(秒)
/// </summary>
public int Duration { get; set; }
/// <summary>
/// 距离(米)
/// 跳远类课目使用
/// </summary>
public double? Distance { get; set; }
/// <summary>
/// 课目ID
/// </summary>
public int CourseId { get; set; }
/// <summary>
/// 开始时间
/// </summary>
public DateTime StartTime { get; set; }
/// <summary>
/// 结束时间
/// </summary>
public DateTime EndTime { get; set; }
/// <summary>
/// 成绩值(统一换算后的成绩,用于排序)
/// </summary>
public double? Score { get; set; }
/// <summary>
/// 是否有效成绩 0=否 1=是
/// </summary>
public int IsValid { get; set; }
/// <summary>
/// 数据上报时间
/// </summary>
public DateTime UploadTime { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
}
}