|
@@ -9,9 +9,12 @@ import com.ym.mec.biz.service.ClassGroupTeacherMapperService;
|
|
import com.ym.mec.common.controller.BaseController;
|
|
import com.ym.mec.common.controller.BaseController;
|
|
import com.ym.mec.common.entity.HttpResponseResult;
|
|
import com.ym.mec.common.entity.HttpResponseResult;
|
|
import com.ym.mec.common.page.QueryInfo;
|
|
import com.ym.mec.common.page.QueryInfo;
|
|
|
|
+
|
|
import io.swagger.annotations.*;
|
|
import io.swagger.annotations.*;
|
|
|
|
+
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
@@ -29,12 +32,14 @@ public class ClassGroupController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "新增单技班班级")
|
|
@ApiOperation(value = "新增单技班班级")
|
|
@PostMapping("/add")
|
|
@PostMapping("/add")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('classGroup/add')")
|
|
public Object add(@RequestBody ClassGroup classGroup) throws Exception {
|
|
public Object add(@RequestBody ClassGroup classGroup) throws Exception {
|
|
return succeed(classGroupService.addClassGroup(classGroup));
|
|
return succeed(classGroupService.addClassGroup(classGroup));
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "新增合奏班")
|
|
@ApiOperation(value = "新增合奏班")
|
|
@PostMapping("/addMixClass")
|
|
@PostMapping("/addMixClass")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('classGroup/addMixClass')")
|
|
public Object addMixClass(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId,
|
|
public Object addMixClass(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId,
|
|
@ApiParam(value = "班级名称", required = true) String name,
|
|
@ApiParam(value = "班级名称", required = true) String name,
|
|
@ApiParam(value = "班级编号,号分割", required = true) String classGroupIds) throws Exception {
|
|
@ApiParam(value = "班级编号,号分割", required = true) String classGroupIds) throws Exception {
|
|
@@ -43,6 +48,7 @@ public class ClassGroupController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "新增提高班")
|
|
@ApiOperation(value = "新增提高班")
|
|
@PostMapping("/addHighClass")
|
|
@PostMapping("/addHighClass")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('classGroup/addHighClass')")
|
|
public Object addHighClass(@ApiParam(value = "乐团提高班json", required = true) @RequestParam List<HighClassGroupDto> highClassGroupDtoList) throws Exception {
|
|
public Object addHighClass(@ApiParam(value = "乐团提高班json", required = true) @RequestParam List<HighClassGroupDto> highClassGroupDtoList) throws Exception {
|
|
if (highClassGroupDtoList.size() <= 0) {
|
|
if (highClassGroupDtoList.size() <= 0) {
|
|
return failed("参数不合法");
|
|
return failed("参数不合法");
|
|
@@ -52,6 +58,7 @@ public class ClassGroupController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "删除单技班")
|
|
@ApiOperation(value = "删除单技班")
|
|
@PostMapping("/delSingle")
|
|
@PostMapping("/delSingle")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('classGroup/delSingle')")
|
|
public Object delSingle(Integer classGroupId) {
|
|
public Object delSingle(Integer classGroupId) {
|
|
classGroupService.delete(classGroupId);
|
|
classGroupService.delete(classGroupId);
|
|
return succeed();
|
|
return succeed();
|
|
@@ -59,6 +66,7 @@ public class ClassGroupController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "删除合奏班")
|
|
@ApiOperation(value = "删除合奏班")
|
|
@PostMapping("/delMix")
|
|
@PostMapping("/delMix")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('classGroup/delMix')")
|
|
public Object delMix(Integer classGroupId) {
|
|
public Object delMix(Integer classGroupId) {
|
|
classGroupService.delete(classGroupId);
|
|
classGroupService.delete(classGroupId);
|
|
return succeed();
|
|
return succeed();
|
|
@@ -66,6 +74,7 @@ public class ClassGroupController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "修改班级")
|
|
@ApiOperation(value = "修改班级")
|
|
@PostMapping("/update")
|
|
@PostMapping("/update")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('classGroup/update')")
|
|
public Object update(ClassGroup classGroup) {
|
|
public Object update(ClassGroup classGroup) {
|
|
classGroup.setUpdateTime(new Date());
|
|
classGroup.setUpdateTime(new Date());
|
|
classGroupService.update(classGroup);
|
|
classGroupService.update(classGroup);
|
|
@@ -74,12 +83,14 @@ public class ClassGroupController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "分页查询班级列表")
|
|
@ApiOperation(value = "分页查询班级列表")
|
|
@GetMapping("/queryPage")
|
|
@GetMapping("/queryPage")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('classGroup/queryPage')")
|
|
public Object queryPage(QueryInfo queryInfo) {
|
|
public Object queryPage(QueryInfo queryInfo) {
|
|
return succeed(classGroupService.queryPage(queryInfo));
|
|
return succeed(classGroupService.queryPage(queryInfo));
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "合奏班相关班级获取")
|
|
@ApiOperation(value = "合奏班相关班级获取")
|
|
@GetMapping("/findClassGroupAboutMix")
|
|
@GetMapping("/findClassGroupAboutMix")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('classGroup/findClassGroupAboutMix')")
|
|
public HttpResponseResult findClassGroupAboutMix(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId,
|
|
public HttpResponseResult findClassGroupAboutMix(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId,
|
|
@ApiParam(value = "班级编号", required = false) Integer mixClassGroupId) {
|
|
@ApiParam(value = "班级编号", required = false) Integer mixClassGroupId) {
|
|
return succeed(classGroupService.findClassGroup(musicGroupId, mixClassGroupId));
|
|
return succeed(classGroupService.findClassGroup(musicGroupId, mixClassGroupId));
|
|
@@ -87,24 +98,28 @@ public class ClassGroupController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "乐团单技班列表")
|
|
@ApiOperation(value = "乐团单技班列表")
|
|
@GetMapping("/findMusicGroupClass")
|
|
@GetMapping("/findMusicGroupClass")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('classGroup/findMusicGroupClass')")
|
|
public HttpResponseResult findMusicGroupClass(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId) {
|
|
public HttpResponseResult findMusicGroupClass(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId) {
|
|
return succeed(classGroupService.findAllNormalClassGroupByMusicGroupId(musicGroupId));
|
|
return succeed(classGroupService.findAllNormalClassGroupByMusicGroupId(musicGroupId));
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "获取未分班的单技班列表")
|
|
@ApiOperation(value = "获取未分班的单技班列表")
|
|
@GetMapping("/findNoClassSubjects")
|
|
@GetMapping("/findNoClassSubjects")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('classGroup/findNoClassSubjects')")
|
|
public HttpResponseResult findNoClassSubjects(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId) {
|
|
public HttpResponseResult findNoClassSubjects(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId) {
|
|
return succeed(classGroupService.findNoClassSubjects(musicGroupId));
|
|
return succeed(classGroupService.findNoClassSubjects(musicGroupId));
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "乐团合奏班列表")
|
|
@ApiOperation(value = "乐团合奏班列表")
|
|
@GetMapping("/findMixMusicGroupClass")
|
|
@GetMapping("/findMixMusicGroupClass")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('classGroup/findMixMusicGroupClass')")
|
|
public HttpResponseResult findMixMusicGroupClass(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId) {
|
|
public HttpResponseResult findMixMusicGroupClass(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId) {
|
|
return succeed(classGroupService.findAllMixClassGroupByMusicGroupId(musicGroupId));
|
|
return succeed(classGroupService.findAllMixClassGroupByMusicGroupId(musicGroupId));
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "乐团所有班列表")
|
|
@ApiOperation(value = "乐团所有班列表")
|
|
@GetMapping("/findAllClassGroupByMusicGroup")
|
|
@GetMapping("/findAllClassGroupByMusicGroup")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('classGroup/findAllClassGroupByMusicGroup')")
|
|
public HttpResponseResult findAllClassGroupByMusicGroup(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId) {
|
|
public HttpResponseResult findAllClassGroupByMusicGroup(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId) {
|
|
return succeed(classGroupService.findAllClassGroupByMusicGroup(musicGroupId));
|
|
return succeed(classGroupService.findAllClassGroupByMusicGroup(musicGroupId));
|
|
}
|
|
}
|
|
@@ -112,6 +127,7 @@ public class ClassGroupController extends BaseController {
|
|
@ApiOperation(value = "乐团班级老师设置")
|
|
@ApiOperation(value = "乐团班级老师设置")
|
|
@PostMapping("/addClassGroupTeacher")
|
|
@PostMapping("/addClassGroupTeacher")
|
|
@ApiParam(value = "乐团班级老师json", required = true)
|
|
@ApiParam(value = "乐团班级老师json", required = true)
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('classGroup/addClassGroupTeacher')")
|
|
public HttpResponseResult addClassGroupTeacher(@RequestBody List<ClassGroupTeacherMapper> classGroupTeacherMapperList) {
|
|
public HttpResponseResult addClassGroupTeacher(@RequestBody List<ClassGroupTeacherMapper> classGroupTeacherMapperList) {
|
|
if (classGroupTeacherMapperList.size() <= 0) {
|
|
if (classGroupTeacherMapperList.size() <= 0) {
|
|
return failed("参数不合法");
|
|
return failed("参数不合法");
|
|
@@ -121,12 +137,14 @@ public class ClassGroupController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "获取乐团班级老师")
|
|
@ApiOperation(value = "获取乐团班级老师")
|
|
@GetMapping("/findMusicGroupClassTeacher")
|
|
@GetMapping("/findMusicGroupClassTeacher")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('classGroup/findMusicGroupClassTeacher')")
|
|
public HttpResponseResult findMusicGroupClassTeacher(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId) {
|
|
public HttpResponseResult findMusicGroupClassTeacher(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId) {
|
|
return succeed(classGroupService.getClassGroupAndTeachers(musicGroupId,"NORMAL,MIX"));
|
|
return succeed(classGroupService.getClassGroupAndTeachers(musicGroupId,"NORMAL,MIX"));
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "获取乐团班级老师课酬")
|
|
@ApiOperation(value = "获取乐团班级老师课酬")
|
|
@GetMapping("/findMusicGroupClassTeacherSalary")
|
|
@GetMapping("/findMusicGroupClassTeacherSalary")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('classGroup/findMusicGroupClassTeacherSalary')")
|
|
@ApiImplicitParams({@ApiImplicitParam(name = "musicGroupId", value = "乐团编号", required = true, dataType = "String"),
|
|
@ApiImplicitParams({@ApiImplicitParam(name = "musicGroupId", value = "乐团编号", required = true, dataType = "String"),
|
|
@ApiImplicitParam(name = "type", value = "结算类型(1-基准课酬,4-梯度课酬)", required = true, dataType = "Integer")})
|
|
@ApiImplicitParam(name = "type", value = "结算类型(1-基准课酬,4-梯度课酬)", required = true, dataType = "Integer")})
|
|
public HttpResponseResult findMusicGroupClassTeacherSalary(String musicGroupId, SalarySettlementTypeEnum type) {
|
|
public HttpResponseResult findMusicGroupClassTeacherSalary(String musicGroupId, SalarySettlementTypeEnum type) {
|
|
@@ -139,6 +157,7 @@ public class ClassGroupController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "乐团班级老师课酬确认")
|
|
@ApiOperation(value = "乐团班级老师课酬确认")
|
|
@PostMapping("/setClassGroupTeacherSalary")
|
|
@PostMapping("/setClassGroupTeacherSalary")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('classGroup/setClassGroupTeacherSalary')")
|
|
@ApiParam(value = "乐团班级老师<包含相应课酬>json", required = true)
|
|
@ApiParam(value = "乐团班级老师<包含相应课酬>json", required = true)
|
|
public Object setClassGroupTeacherSalary(@RequestBody List<ClassGroupTeacherMapper> classGroupTeacherMapperList) throws Exception {
|
|
public Object setClassGroupTeacherSalary(@RequestBody List<ClassGroupTeacherMapper> classGroupTeacherMapperList) throws Exception {
|
|
if (classGroupTeacherMapperList.size() <= 0) {
|
|
if (classGroupTeacherMapperList.size() <= 0) {
|
|
@@ -149,6 +168,7 @@ public class ClassGroupController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "根据群编号,获取群组所有成员基本信息")
|
|
@ApiOperation(value = "根据群编号,获取群组所有成员基本信息")
|
|
@GetMapping("/findGroupUsers")
|
|
@GetMapping("/findGroupUsers")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('classGroup/findGroupUsers')")
|
|
public Object findGroupUsers(String groupId) {
|
|
public Object findGroupUsers(String groupId) {
|
|
if (StringUtils.isEmpty(groupId)) {
|
|
if (StringUtils.isEmpty(groupId)) {
|
|
return failed("参数校验错误");
|
|
return failed("参数校验错误");
|
|
@@ -158,6 +178,7 @@ public class ClassGroupController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "乐团班级设置,成团确认")
|
|
@ApiOperation(value = "乐团班级设置,成团确认")
|
|
@PostMapping("/addMusicGroupTeam")
|
|
@PostMapping("/addMusicGroupTeam")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('classGroup/addMusicGroupTeam')")
|
|
@ApiImplicitParams({@ApiImplicitParam(name = "musicGroupId", value = "乐团编号", required = true, dataType = "String"),
|
|
@ApiImplicitParams({@ApiImplicitParam(name = "musicGroupId", value = "乐团编号", required = true, dataType = "String"),
|
|
@ApiImplicitParam(name = "teacherId", value = "老师编号", required = true, dataType = "Integer")})
|
|
@ApiImplicitParam(name = "teacherId", value = "老师编号", required = true, dataType = "Integer")})
|
|
public Object addMusicGroupTeam(Integer teacherId,String musicGroupId) throws Exception {
|
|
public Object addMusicGroupTeam(Integer teacherId,String musicGroupId) throws Exception {
|
|
@@ -171,6 +192,7 @@ public class ClassGroupController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "合并班级")
|
|
@ApiOperation(value = "合并班级")
|
|
@PostMapping("/mergeClassGroup")
|
|
@PostMapping("/mergeClassGroup")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('classGroup/mergeClassGroup')")
|
|
@ApiImplicitParams({@ApiImplicitParam(name = "classGroupIds", value = "班级编号,号分割", required = true, dataType = "String")})
|
|
@ApiImplicitParams({@ApiImplicitParam(name = "classGroupIds", value = "班级编号,号分割", required = true, dataType = "String")})
|
|
public HttpResponseResult mergeClassGroup(String classGroupIds) throws Exception {
|
|
public HttpResponseResult mergeClassGroup(String classGroupIds) throws Exception {
|
|
//软删除班级
|
|
//软删除班级
|