|
@@ -101,6 +101,32 @@ public class TextbookController {
|
|
|
return RT.ok(pageOutput);
|
|
return RT.ok(pageOutput);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @GetMapping(value = "/page-consumption")
|
|
|
|
|
+ @ApiOperation(value="教材管理列表(分页,学生收费用)")
|
|
|
|
|
+ @SaCheckPermission("textbook:detail")
|
|
|
|
|
+ public RT<PageOutput<TextbookConsumptionPageVo>> pageConsumption(@Valid TextbookConsumptionPageDto dto){
|
|
|
|
|
+ MPJLambdaWrapper<Textbook> textbookMPJLambdaWrapper = new MPJLambdaWrapper<>();
|
|
|
|
|
+ textbookMPJLambdaWrapper
|
|
|
|
|
+ .select(Textbook::getId)
|
|
|
|
|
+ .selectAs(Textbook::getId,TextbookConsumptionPageVo::getTextbookId)
|
|
|
|
|
+ .selectAs(BaseCourseSubject::getName, TextbookConsumptionPageVo::getCourseSubjectIdCn)
|
|
|
|
|
+ .select(Textbook.class, x -> VoToColumnUtil.fieldsToColumns(TextbookConsumptionPageVo.class).contains(x.getProperty()))
|
|
|
|
|
+ .leftJoin(TextbookClassRelation.class, TextbookClassRelation::getTextbookId, Textbook::getId)
|
|
|
|
|
+ .leftJoin(BaseClassMajorSet.class, BaseClassMajorSet::getClassId, TextbookClassRelation::getClassId)
|
|
|
|
|
+ .leftJoin(BaseCourseSubject.class, BaseCourseSubject::getId, Textbook::getCourseSubjectId)
|
|
|
|
|
+ .eq(dto.getBaseSemesterId() != null && dto.getBaseSemesterId() > 0, Textbook::getBaseSemesterId, dto.getBaseSemesterId())
|
|
|
|
|
+ .eq(dto.getClassId() != null && dto.getClassId() > 0,TextbookClassRelation::getClassId, dto.getClassId())
|
|
|
|
|
+ ;
|
|
|
|
|
+ IPage<TextbookConsumptionPageVo> page = textbookService.selectJoinListPage(ConventPage.getPage(dto),TextbookConsumptionPageVo.class,textbookMPJLambdaWrapper);
|
|
|
|
|
+ for(TextbookConsumptionPageVo t : page.getRecords()){
|
|
|
|
|
+ if(t.getTextbookType() != null && !t.getTextbookType().equals("")){
|
|
|
|
|
+ t.setTextbookTypeCn(TextbookTypeEnum.getValue(t.getTextbookType()));
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ PageOutput<TextbookConsumptionPageVo> pageOutput = ConventPage.getPageOutput(page, TextbookConsumptionPageVo.class);
|
|
|
|
|
+ return RT.ok(pageOutput);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@GetMapping(value = "/List-subscription")
|
|
@GetMapping(value = "/List-subscription")
|
|
|
@ApiOperation(value="教材管理列表(不分页,教材征订用)")
|
|
@ApiOperation(value="教材管理列表(不分页,教材征订用)")
|
|
|
@SaCheckPermission("textbook:detail")
|
|
@SaCheckPermission("textbook:detail")
|