|
@@ -7,6 +7,7 @@ import com.izouma.wenlvju.domain.ArtType;
|
|
|
import com.izouma.wenlvju.domain.User;
|
|
import com.izouma.wenlvju.domain.User;
|
|
|
import com.izouma.wenlvju.domain.performance.Arrange;
|
|
import com.izouma.wenlvju.domain.performance.Arrange;
|
|
|
import com.izouma.wenlvju.domain.performance.ArrangeJudge;
|
|
import com.izouma.wenlvju.domain.performance.ArrangeJudge;
|
|
|
|
|
+import com.izouma.wenlvju.domain.performance.Performance;
|
|
|
import com.izouma.wenlvju.domain.performance.Programme;
|
|
import com.izouma.wenlvju.domain.performance.Programme;
|
|
|
import com.izouma.wenlvju.dto.ArrangeDTO;
|
|
import com.izouma.wenlvju.dto.ArrangeDTO;
|
|
|
import com.izouma.wenlvju.dto.PageQuery;
|
|
import com.izouma.wenlvju.dto.PageQuery;
|
|
@@ -17,6 +18,7 @@ import com.izouma.wenlvju.repo.ArtTypeRepo;
|
|
|
import com.izouma.wenlvju.repo.UserRepo;
|
|
import com.izouma.wenlvju.repo.UserRepo;
|
|
|
import com.izouma.wenlvju.repo.performance.ArrangeJudgeRepo;
|
|
import com.izouma.wenlvju.repo.performance.ArrangeJudgeRepo;
|
|
|
import com.izouma.wenlvju.repo.performance.ArrangeRepo;
|
|
import com.izouma.wenlvju.repo.performance.ArrangeRepo;
|
|
|
|
|
+import com.izouma.wenlvju.repo.performance.PerformanceRepo;
|
|
|
import com.izouma.wenlvju.repo.performance.ProgrammeRepo;
|
|
import com.izouma.wenlvju.repo.performance.ProgrammeRepo;
|
|
|
import com.izouma.wenlvju.utils.JpaUtils;
|
|
import com.izouma.wenlvju.utils.JpaUtils;
|
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
@@ -43,6 +45,7 @@ public class ArrangeService {
|
|
|
private ProgrammeRepo programmeRepo;
|
|
private ProgrammeRepo programmeRepo;
|
|
|
private ArrangeJudgeRepo arrangeJudgeRepo;
|
|
private ArrangeJudgeRepo arrangeJudgeRepo;
|
|
|
private UserRepo userRepo;
|
|
private UserRepo userRepo;
|
|
|
|
|
+ private PerformanceRepo performanceRepo;
|
|
|
|
|
|
|
|
public Page<Arrange> all(PageQuery pageQuery) {
|
|
public Page<Arrange> all(PageQuery pageQuery) {
|
|
|
Map<Long, String> artMap = artTypeRepo.findAll()
|
|
Map<Long, String> artMap = artTypeRepo.findAll()
|
|
@@ -77,7 +80,7 @@ public class ArrangeService {
|
|
|
.map(artMap::get)
|
|
.map(artMap::get)
|
|
|
.collect(Collectors.toList()));
|
|
.collect(Collectors.toList()));
|
|
|
List<ArrangeJudge> arrangeJudges = judgeMap.get(arrange.getId());
|
|
List<ArrangeJudge> arrangeJudges = judgeMap.get(arrange.getId());
|
|
|
- if (CollUtil.isNotEmpty(arrangeJudges)){
|
|
|
|
|
|
|
+ if (CollUtil.isNotEmpty(arrangeJudges)) {
|
|
|
String experts = arrangeJudges.stream()
|
|
String experts = arrangeJudges.stream()
|
|
|
.map(arrangeJudge -> userMap.get(arrangeJudge.getExpertId()))
|
|
.map(arrangeJudge -> userMap.get(arrangeJudge.getExpertId()))
|
|
|
.collect(Collectors.joining(","));
|
|
.collect(Collectors.joining(","));
|
|
@@ -88,6 +91,18 @@ public class ArrangeService {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// public void chooseGroup(ArrangeDTO dto) {
|
|
|
|
|
+// Arrange first = arrangeRepo.findFirstByPerformanceId(dto.getPerformanceId());
|
|
|
|
|
+// if (ObjectUtil.isNotNull(first) && first.isPublish()) {
|
|
|
|
|
+// throw new BusinessException("活动分组已发布");
|
|
|
|
|
+// }
|
|
|
|
|
+// Performance performance = performanceRepo.findById(dto.getPerformanceId())
|
|
|
|
|
+// .orElseThrow(new BusinessException("无展演活动"));
|
|
|
|
|
+// if (performance.isOnline()){
|
|
|
|
|
+// this.groupOnline(dto);
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+
|
|
|
/*
|
|
/*
|
|
|
分组
|
|
分组
|
|
|
*/
|
|
*/
|