功能优化&问题修改 10.7

dev_2307
hechao.zhu 1 year ago
parent 8d78a823fb
commit 56a9879e53
  1. 26
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/course/controller/SeCourseController.java

@ -185,15 +185,15 @@ public class SeCourseController extends JeecgController<SeCourse, ISeCourseServi
String courseid = request.getParameter("id"); String courseid = request.getParameter("id");
SeCourse seCourse = seCourseService.getById(courseid); SeCourse seCourse = seCourseService.getById(courseid);
if (seCourse.getNature() != null) { if (StringUtils.isNotBlank(seCourse.getNature())) {
SeNature seNature = seNatureService.getById(seCourse.getNature()); SeNature seNature = seNatureService.getById(seCourse.getNature());
seCourse.setNature(seNature.getContent()); seCourse.setNature(seNature.getContent());
} }
if (seCourse.getMajorid() != null) { if (StringUtils.isNotBlank(seCourse.getMajorid())) {
SeMajor seMajor = seMajorService.getById(seCourse.getMajorid()); SeMajor seMajor = seMajorService.getById(seCourse.getMajorid());
seCourse.setMajorid(seMajor.getName()); seCourse.setMajorid(seMajor.getName());
} }
if (seCourse.getAdvancedplacement() != null) { if (StringUtils.isNotBlank(seCourse.getAdvancedplacement())) {
String[] courseids = seCourse.getAdvancedplacement().split(","); String[] courseids = seCourse.getAdvancedplacement().split(",");
String advancedplacement = ""; String advancedplacement = "";
for (String id : courseids) { for (String id : courseids) {
@ -493,11 +493,11 @@ public class SeCourseController extends JeecgController<SeCourse, ISeCourseServi
* @return * @return
*/ */
@AutoLog(value = "课程-通过id查询") @AutoLog(value = "课程-通过id查询")
@ApiOperation(value="课程-通过id查询", notes="课程-通过id查询") @ApiOperation(value = "课程-通过id查询", notes = "课程-通过id查询")
@GetMapping(value = "/queryById") @GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) { public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
SeCourse sc = seCourseService.getById(id); SeCourse sc = seCourseService.getById(id);
if(sc==null) { if (sc == null) {
return Result.error("未找到对应数据"); return Result.error("未找到对应数据");
} }
return Result.OK(sc); return Result.OK(sc);
@ -508,22 +508,22 @@ public class SeCourseController extends JeecgController<SeCourse, ISeCourseServi
@GetMapping(value = "/dqyh") @GetMapping(value = "/dqyh")
public Result<?> dqyh(HttpServletRequest req) { public Result<?> dqyh(HttpServletRequest req) {
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
Map<String,String> map = new HashMap<>(); Map<String, String> map = new HashMap<>();
SeTeacherManage seTeacherManage = new SeTeacherManage(); SeTeacherManage seTeacherManage = new SeTeacherManage();
QueryWrapper<SeTeacherManage> queryWrapper = QueryGenerator.initQueryWrapper(seTeacherManage, req.getParameterMap()); QueryWrapper<SeTeacherManage> queryWrapper = QueryGenerator.initQueryWrapper(seTeacherManage, req.getParameterMap());
queryWrapper.eq("userid",user.getId()); queryWrapper.eq("userid", user.getId());
List<SeTeacherManage> list = seTeacherManageService.list(queryWrapper); List<SeTeacherManage> list = seTeacherManageService.list(queryWrapper);
map.put("depid",user.getDepartIds()); map.put("depid", user.getDepartIds());
map.put("teachingandoffice",user.getDepartIds()); map.put("teachingandoffice", user.getDepartIds());
map.put("majorid",list.get(0).getProfession()); map.put("majorid", list.get(0).getProfession());
map.put("verifier",user.getUsername()); map.put("verifier", user.getUsername());
return Result.OK(map); return Result.OK(map);
} }
@AutoLog(value = "考核目标-分页列表查询") @AutoLog(value = "考核目标-分页列表查询")
@ApiOperation(value = "考核目标-分页列表查询", notes = "考核目标-分页列表查询") @ApiOperation(value = "考核目标-分页列表查询", notes = "考核目标-分页列表查询")
@GetMapping(value = "/getnrxz") @GetMapping(value = "/getnrxz")
public Result<?> getnrxz(@RequestParam(name = "id", required = true)String id) { public Result<?> getnrxz(@RequestParam(name = "id", required = true) String id) {
SeCourse sc = seCourseService.getById(id); SeCourse sc = seCourseService.getById(id);
return Result.OK(sc); return Result.OK(sc);
} }

Loading…
Cancel
Save