1.”课程编号、课程名称、所属部门、说明、课程权限、分类、类型、线上/线下、讲师、时长、课件、试题、发布状态、创建时间、创建人“可滑动部分字段从左到右顺序”课程编号、课程名称、讲师、课件、试题、课程权限、分类、类型、线上/线下、时长、发布状态、创建时间、创建人、所属部门、说明“ 2.增加一个字段适合人员作为备注字段承接”年培训计划“和”月培训计划“过来的”适合人员“信息只做展示用,支持用户自定义录入, 3.”课程权限“默认当前所示部门,“全部”选项放在下拉列最前面排在部门选项上面 4.列表右侧固定字段“状态”、“操作”宽度再收窄一些 5.审核时要校验“课程名称、所属部门、课程权限、课件”必填!所属部门默认当前录入人员所属部门支持修改,课程权限也是默认当前录入人员所属部门支持修改
This commit is contained in:
1 parent
2f1cda34da
commit
0427a60bc3
13 files changed
+179
-49
No files matched your search
@@ -1085,9 +1085,12 @@ func (h *Handler) syncDemandLecturerToLibrary(ctx context.Context, tenantID uint
|
||||
category, suitable := trimSpace(d.Category), trimSpace(d.PostScope)
|
||||
// 仅按需求侧非空字段判断差异(空值=未填,不覆盖课程管理已有值,防止
|
||||
// 旧行误清讲师/分类);任一非空字段与条目不一致才回写并重置待核验。
|
||||
// 适合人员备注(000165):需求「适合人员」变更同步到课程管理备注字段,
|
||||
// 与存量 suitable_members 口径一并比较(老数据备注为空时首改会触发回写)。
|
||||
changed := (hasLecturer && (item.LecturerID != lecturerID || item.LecturerExternal != lecturerExt)) ||
|
||||
(category != "" && item.Category != category) ||
|
||||
(suitable != "" && item.SuitableMembers != suitable)
|
||||
(suitable != "" && item.SuitableMembers != suitable) ||
|
||||
(suitable != "" && item.PostScope != suitable)
|
||||
if !changed {
|
||||
continue
|
||||
}
|
||||
@@ -1101,6 +1104,7 @@ func (h *Handler) syncDemandLecturerToLibrary(ctx context.Context, tenantID uint
|
||||
}
|
||||
if suitable != "" {
|
||||
updated.SuitableMembers = suitable
|
||||
updated.PostScope = suitable
|
||||
}
|
||||
if _, err := h.svc.SaveCourseLibraryItem(ctx, tenantID, &updated, updaterID); err != nil {
|
||||
logger.Error(ctx, "Failed to sync demand course info to course library", err)
|
||||
|
||||
Reference in new issue
Block a user