|
@@ -10,9 +10,11 @@ import com.ym.mec.biz.dal.dto.MusicScoreDto;
|
|
|
import com.ym.mec.biz.dal.entity.SysMusicScore;
|
|
|
import com.ym.mec.biz.dal.entity.SysMusicScoreAccompaniment;
|
|
|
import com.ym.mec.biz.dal.entity.SysMusicScoreCategories;
|
|
|
+import com.ym.mec.biz.dal.page.SysExamSongQueryInfo;
|
|
|
import com.ym.mec.biz.service.SysMusicScoreService;
|
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
|
import com.ym.mec.common.exception.BizException;
|
|
|
+import com.ym.mec.common.page.PageInfo;
|
|
|
import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -129,4 +131,33 @@ public class SysMusicScoreServiceImpl extends BaseServiceImpl<Integer, SysMusicS
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ private String getParentTreeName(Integer categoriesId){
|
|
|
+ StringBuffer sb = new StringBuffer();
|
|
|
+ while (true){
|
|
|
+ SysMusicScoreCategories categories = sysMusicScoreCategoriesDao.get(categoriesId);
|
|
|
+ if(sb.length() == 0){
|
|
|
+ sb.append(categories.getName());
|
|
|
+ }else {
|
|
|
+ sb.insert(0,"/");
|
|
|
+ sb.insert(0,categories.getName());
|
|
|
+ }
|
|
|
+ if(categories.getParentId() == 0){
|
|
|
+ return sb.toString();
|
|
|
+ }
|
|
|
+ categoriesId = categories.getParentId();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public PageInfo<SysMusicScore> queryMusicScorePage(SysExamSongQueryInfo queryInfo) {
|
|
|
+ PageInfo<SysMusicScore> sysMusicScorePageInfo = queryPage(queryInfo);
|
|
|
+ List<SysMusicScore> rows = sysMusicScorePageInfo.getRows();
|
|
|
+ if(rows != null && rows.size() > 0){
|
|
|
+ for (SysMusicScore row : rows) {
|
|
|
+ row.setCategoriesName(getParentTreeName(row.getCategoriesId()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return sysMusicScorePageInfo;
|
|
|
+ }
|
|
|
}
|