|
|
@@ -30,7 +30,9 @@ import com.xjrsoft.module.textbook.dto.TextbookSubscriptionListDto;
|
|
|
import com.xjrsoft.module.textbook.dto.UpdateTextbookDto;
|
|
|
import com.xjrsoft.module.textbook.entity.Textbook;
|
|
|
import com.xjrsoft.module.textbook.entity.TextbookClassRelation;
|
|
|
+import com.xjrsoft.module.textbook.entity.TextbookStudentClaim;
|
|
|
import com.xjrsoft.module.textbook.service.ITextbookService;
|
|
|
+import com.xjrsoft.module.textbook.service.ITextbookStudentClaimService;
|
|
|
import com.xjrsoft.module.textbook.vo.TextbookConsumptionPageVo;
|
|
|
import com.xjrsoft.module.textbook.vo.TextbookIssueRecordListVo;
|
|
|
import com.xjrsoft.module.textbook.vo.TextbookPageVo;
|
|
|
@@ -79,6 +81,8 @@ public class TextbookController {
|
|
|
|
|
|
private final IBaseSemesterService baseSemesterService;
|
|
|
|
|
|
+ private final ITextbookStudentClaimService textbookStudentClaimService;
|
|
|
+
|
|
|
@GetMapping(value = "/page")
|
|
|
@ApiOperation(value="教材管理列表(分页)")
|
|
|
@SaCheckPermission("textbook:detail")
|
|
|
@@ -123,24 +127,22 @@ public class TextbookController {
|
|
|
return RT.ok(pageOutput);
|
|
|
}
|
|
|
|
|
|
- // TODO 学生确认领取教材列表
|
|
|
@GetMapping(value = "/page-consumption")
|
|
|
@ApiOperation(value="学生确认领取教材列表(分页,学生收费用)")
|
|
|
@SaCheckPermission("textbook:detail")
|
|
|
public RT<PageOutput<TextbookConsumptionPageVo>> pageConsumption(@Valid TextbookConsumptionPageDto dto){
|
|
|
- MPJLambdaWrapper<Textbook> textbookMPJLambdaWrapper = new MPJLambdaWrapper<>();
|
|
|
+ MPJLambdaWrapper<TextbookStudentClaim> textbookMPJLambdaWrapper = new MPJLambdaWrapper<>();
|
|
|
textbookMPJLambdaWrapper
|
|
|
- .select(Textbook::getId)
|
|
|
+ .select(TextbookStudentClaim::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(Textbook.class, Textbook::getId, TextbookStudentClaim::getTextbookId)
|
|
|
.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())
|
|
|
+ .eq(dto.getBaseSemesterId() != null && dto.getBaseSemesterId() > 0, TextbookStudentClaim::getBaseSemesterId, dto.getBaseSemesterId())
|
|
|
+ .eq(dto.getStudentUserId() != null && dto.getStudentUserId() > 0,TextbookStudentClaim::getStudentUserId, dto.getStudentUserId())
|
|
|
;
|
|
|
- IPage<TextbookConsumptionPageVo> page = textbookService.selectJoinListPage(ConventPage.getPage(dto),TextbookConsumptionPageVo.class,textbookMPJLambdaWrapper);
|
|
|
+ IPage<TextbookConsumptionPageVo> page = textbookStudentClaimService.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()));
|