|
|
@@ -30,6 +30,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import javax.validation.Valid;
|
|
|
import java.io.ByteArrayOutputStream;
|
|
|
import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* @title: 学生消费管理
|
|
|
@@ -83,8 +84,8 @@ public class ConsumptionController {
|
|
|
|
|
|
if (voList.stream().noneMatch(item -> Objects.equals(item.getId(), classGradeVo.getGradeId()))) {
|
|
|
voList.add(new BaseClassTreeVo() {{
|
|
|
- setId(classGradeVo.getId());
|
|
|
- setName(classGradeVo.getName());
|
|
|
+ setId(classGradeVo.getGradeId());
|
|
|
+ setName(classGradeVo.getGradeName());
|
|
|
setParentId(6L);
|
|
|
}});
|
|
|
}
|
|
|
@@ -147,6 +148,12 @@ public class ConsumptionController {
|
|
|
if (roleList.size() == 2 && roleList.contains("TEACHER") && roleList.contains("CLASSTE")) {
|
|
|
dto.setTeacherId(StpUtil.getLoginIdAsLong());
|
|
|
}
|
|
|
+
|
|
|
+ List<BaseClassGradeVo> classGradeVoList = baseClassService.getListByGrade();
|
|
|
+ if((dto.getClassIds() == null || dto.getClassIds().isEmpty()) && !classGradeVoList.isEmpty()) {
|
|
|
+ dto.setClassIdList(classGradeVoList.stream().map(BaseClassGradeVo::getId).map(String::valueOf).collect(Collectors.toList()));
|
|
|
+ }
|
|
|
+
|
|
|
IPage<PbVXsxxsfytbPageVo> page = pbVXsxxsfytbService.getPage(dto);
|
|
|
PageOutput<PbVXsxxsfytbPageVo> pageOutput = ConventPage.getPageOutput(page, PbVXsxxsfytbPageVo.class);
|
|
|
return RT.ok(pageOutput);
|