|
@@ -5,10 +5,13 @@ import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.ui.ModelMap;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import com.ym.mec.biz.dal.dao.ClassGroupDao;
|
|
|
+import com.ym.mec.biz.dal.dao.StudentRegistrationDao;
|
|
|
import com.ym.mec.biz.dal.dto.MusicGroupBasicDto;
|
|
|
import com.ym.mec.biz.service.CooperationOrganLinkmanService;
|
|
|
import com.ym.mec.biz.service.MusicGroupService;
|
|
@@ -24,6 +27,12 @@ public class MusicGroupRecordController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private MusicGroupService musicGroupService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private StudentRegistrationDao studentRegistrationDao;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ClassGroupDao classGroupDao;
|
|
|
|
|
|
@ApiOperation(value = "查询基本信息")
|
|
|
@GetMapping("/queryBasicInfo")
|
|
@@ -39,4 +48,18 @@ public class MusicGroupRecordController extends BaseController {
|
|
|
|
|
|
return succeed(musicGroupBasicDto);
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "查询学员、师资")
|
|
|
+ @GetMapping("/queryStudentAndTeacher")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('musicGroupRecord/queryStudentAndTeacher')")
|
|
|
+ public Object queryStudentAndTeacher(String musicGroupId) {
|
|
|
+
|
|
|
+ ModelMap model = new ModelMap();
|
|
|
+
|
|
|
+ model.put("subject", studentRegistrationDao.countStudentWithSubjectByMusicGroupId(musicGroupId));
|
|
|
+ model.put("grade", studentRegistrationDao.countStudentWithGradeByMusicGroupId(musicGroupId));
|
|
|
+ model.put("teacher", classGroupDao.countTeacherByMusicGroupId(musicGroupId));
|
|
|
+
|
|
|
+ return succeed(model);
|
|
|
+ }
|
|
|
}
|