feat(培训课程相关调整):1.培训计划中的形式”线上/线下“与课程中的”线上/线下“独立字段!,培训计划中是指线上培训还是线下培训,课程中是指该课程是线上课还是线下课,两者不能共用相互独立!
deploy-hxtesting / build-and-deploy (push) Successful in 1m18s

2.创建课程时课程默认是”线上“,发布课程时必须要有课件!
3.课程管理中的课件上传预览下载交互样式,按维护”试题“交互样式风格来!列表中增加一列”试题“,列表中”试题“、”课件“按实际情况只展示”有/无“即可!
This commit is contained in:
runny committed 2026-11-25 10:23:10 +08:00
1 parent ea0524c445
commit 9950a28346
13 files changed
+769 -169

No files matched your search

@@ -130,10 +130,12 @@ func (s *trainingService) GetCourse(ctx context.Context, tenantID uint64, id str
}
// applyLibraryCourseBinding 月度计划选择课程管理课程后的信息带出与锁定(000153):
// 课程名称/类型/形式随课程管理主数据锁定;讲师 000161 起计划侧可改(更新路径
// 不再覆盖,改动经 syncPlanLecturerToLibrary 回写主数据并重置待核验);新建时
// 讲师/学时/课程编号/适用部门(主办单位)/参加人员预填。课程管理条目缺失时按
// 原值保存(fail-open)。返回命中的课程管理条目(无关联返回 nil),供调用方继续带出课件等资料。
// 课程名称/类型随课程管理主数据锁定;形式(mode)为计划侧独立字段——计划形式
// 指本次培训线上办还是线下办,与课程主数据的线上课/线下课口径不同,不随课程
// 带出,由创建/调整表单自行选择;讲师 000161 起计划侧可改(更新路径不再覆盖,
// 改动经 syncPlanLecturerToLibrary 回写主数据并重置待核验);新建时讲师/学时/
// 课程编号/适用部门(主办单位)/参加人员预填。课程管理条目缺失时按原值保存
// (fail-open)。返回命中的课程管理条目(无关联返回 nil),供调用方继续带出课件等资料。
func (s *trainingService) applyLibraryCourseBinding(ctx context.Context, tenantID uint64, course *types.TrainingCourse, isCreate bool) *types.TrainingCourseLibrary {
if course.LibraryCourseID == "" {
return nil
@@ -143,10 +145,9 @@ func (s *trainingService) applyLibraryCourseBinding(ctx context.Context, tenantI
logger.Error(ctx, "Failed to load library course for plan binding", err, "library_course_id", course.LibraryCourseID)
return nil
}
// 锁定字段:随课程管理主数据,请求侧取值一律覆盖。
// 锁定字段:随课程管理主数据,请求侧取值一律覆盖(形式除外,见上)。
course.Name = item.Name
course.Type = item.Type
course.Mode = item.Mode
if isCreate && (item.LecturerID != "" || item.LecturerExternal != "") {
// 新建仍随主数据带出讲师;更新路径计划侧可改(000161)。
course.LecturerID = item.LecturerID