Browse Source

Merge branch 'saas' into master_saas

yonge 3 years ago
parent
commit
7f98f3491d

+ 8 - 7
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java

@@ -212,14 +212,15 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
             throw new BizException("主教与助教存在冲突");
         }
 
+        //疫情原因去掉这块限制
         //基础技能班和线上基础技能班,可分班原则为声部人数/6向上取整
-        if (classGroup.getType().equals(HIGH_ONLINE) || classGroup.getType().equals(HIGH)) {
-            HighClassGroupNumDto highClassGroupNumDto = getSubjectMaxHighClassGroupNum(classGroup.getMusicGroupId(), classGroup.getType());
-            if (highClassGroupNumDto.getNowHighClassGroupNum() >= highClassGroupNumDto.getMaxHighClassGroupNum()) {
-                String errMsg = classGroup.getType().equals(HIGH_ONLINE) ? "线上基础技能班" : "基础技能班";
-                throw new BizException("此乐团," + errMsg + "数量不能大于" + highClassGroupNumDto.getMaxHighClassGroupNum());
-            }
-        }
+//        if (classGroup.getType().equals(HIGH_ONLINE) || classGroup.getType().equals(HIGH)) {
+//            HighClassGroupNumDto highClassGroupNumDto = getSubjectMaxHighClassGroupNum(classGroup.getMusicGroupId(), classGroup.getType());
+//            if (highClassGroupNumDto.getNowHighClassGroupNum() >= highClassGroupNumDto.getMaxHighClassGroupNum()) {
+//                String errMsg = classGroup.getType().equals(HIGH_ONLINE) ? "线上基础技能班" : "基础技能班";
+//                throw new BizException("此乐团," + errMsg + "数量不能大于" + highClassGroupNumDto.getMaxHighClassGroupNum());
+//            }
+//        }
 
         String userIds = classGroup.getUserIds();
 

+ 28 - 7
mec-teacher/src/main/java/com/ym/mec/teacher/controller/SysMusicScoreAccompanimentController.java

@@ -1,5 +1,16 @@
 package com.ym.mec.teacher.controller;
 
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+import org.apache.commons.lang.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.entity.SysMusicScoreAccompaniment;
@@ -10,12 +21,7 @@ import com.ym.mec.biz.service.SysMusicScoreAccompanimentService;
 import com.ym.mec.biz.service.TeacherService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.exception.BizException;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.apache.commons.lang.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.*;
+import com.ym.mec.common.page.PageInfo;
 
 @RequestMapping("sysMusicScoreAccompaniment")
 @Api(tags = "曲库伴奏服务")
@@ -92,6 +98,21 @@ public class SysMusicScoreAccompanimentController extends BaseController {
         queryInfo.setCreateUserId(sysUser.getId());
         queryInfo.setShowFlag(1);
         queryInfo.setEnable(true);
-        return succeed(sysMusicScoreAccompanimentService.queryScorePage(queryInfo));
+        
+        PageInfo<SysMusicScoreAccompaniment> sysMusicScoreAccompanimentList = sysMusicScoreAccompanimentService.queryScorePage(queryInfo);
+       
+        String url = null,metronomeUrl = null;
+        for(SysMusicScoreAccompaniment smsa : sysMusicScoreAccompanimentList.getRows()){
+        	
+        	url = smsa.getUrl();
+        	metronomeUrl = smsa.getMetronomeUrl();
+        	
+        	smsa.setUrl(smsa.getMetronomeUrl());
+        	smsa.setMetronomeUrl(smsa.getMetronomeUrl());
+        	smsa.setMp3Url(url);
+        	smsa.setMetronomeMp3Url(metronomeUrl);
+        }
+        
+        return succeed();
     }
 }

+ 10 - 0
mec-teacher/src/main/java/com/ym/mec/teacher/controller/SysMusicScoreController.java

@@ -10,8 +10,10 @@ import com.ym.mec.biz.dal.page.SysExamSongQueryInfo;
 import com.ym.mec.biz.service.SysMusicScoreService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.exception.BizException;
+
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -64,4 +66,12 @@ public class SysMusicScoreController extends BaseController {
         queryInfo.setShowFlag(1);
         return succeed(sysMusicScoreService.queryPage(queryInfo));
     }
+
+    @ApiOperation(value = "分页查询")
+    @GetMapping("/queryPage2")
+    public Object queryPage2(SysExamSongQueryInfo queryInfo) {
+        queryInfo.setType("COMMON");
+        queryInfo.setShowFlag(1);
+        return succeed(sysMusicScoreService.queryMusicScorePageInfo(queryInfo));
+    }
 }

+ 10 - 0
mec-web/src/main/java/com/ym/mec/web/controller/SysMusicScoreController.java

@@ -8,8 +8,10 @@ import com.ym.mec.biz.service.OrganizationService;
 import com.ym.mec.biz.service.SysMusicScoreService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.exception.BizException;
+
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
@@ -75,4 +77,12 @@ public class SysMusicScoreController extends BaseController {
         }
         return succeed(sysMusicScoreService.queryMusicScorePage(queryInfo));
     }
+
+    @ApiOperation(value = "分页查询")
+    @GetMapping("/queryPage2")
+    public Object queryPage2(SysExamSongQueryInfo queryInfo) {
+        queryInfo.setType("COMMON");
+        queryInfo.setShowFlag(1);
+        return succeed(sysMusicScoreService.queryMusicScorePageInfo(queryInfo));
+    }
 }