Parcourir la source

sop模板课程展示

wangxy il y a 2 jours
Parent
commit
2b340368fe

+ 20 - 0
fs-company/src/main/java/com/fs/company/controller/qw/QwSopController.java

@@ -11,6 +11,7 @@ import com.fs.common.enums.BusinessType;
 import com.fs.common.utils.ServletUtils;
 import com.fs.common.utils.poi.ExcelUtil;
 import com.fs.company.service.impl.CompanyDeptServiceImpl;
+import com.fs.course.domain.FsUserCourse;
 import com.fs.course.mapper.FsUserCourseMapper;
 import com.fs.course.mapper.FsUserCourseVideoMapper;
 import com.fs.framework.security.LoginUser;
@@ -177,6 +178,25 @@ public class QwSopController extends BaseController
         return R.ok().put("list", optionsVOS);
     }
 
+
+
+    /**
+     * 按课程 ID 取下拉选项(SOP 模板详情回显:公司课程列表未包含该课时补全名称)
+     */
+    @GetMapping("/courseOption/{id}")
+    public R courseOption(@PathVariable("id") Long id)
+    {
+        FsUserCourse course = fsUserCourseMapper.selectFsUserCourseByCourseId(id);
+        if (course == null) {
+            return R.error("未找到课程");
+        }
+        OptionsVO vo = new OptionsVO();
+        vo.setDictValue(course.getCourseId());
+        vo.setDictLabel(course.getCourseName());
+        vo.setDictImgUrl(course.getImgUrl());
+        return R.ok().put("data", vo);
+    }
+
     @GetMapping(value = "/videoList/{id}")
     public R videoList(@PathVariable("id") Long id)
     {