Browse Source

收费管理

大数据与最优化研究所 1 năm trước cách đây
mục cha
commit
d21216b624

+ 5 - 0
src/main/java/com/xjrsoft/module/student/vo/StudentPersonalInfoVo.java

@@ -34,6 +34,11 @@ public class StudentPersonalInfoVo {
     */
     @ApiModelProperty("班级名称")
     private String className;
+    /**
+     * 班级名称
+     */
+    @ApiModelProperty("班级名称")
+    private String classId;
     /**
     * 身份证号
     */

+ 26 - 0
src/main/java/com/xjrsoft/module/textbook/controller/TextbookController.java

@@ -101,6 +101,32 @@ public class TextbookController {
         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")
     @ApiOperation(value="教材管理列表(不分页,教材征订用)")
     @SaCheckPermission("textbook:detail")

+ 27 - 0
src/main/java/com/xjrsoft/module/textbook/dto/TextbookConsumptionPageDto.java

@@ -0,0 +1,27 @@
+package com.xjrsoft.module.textbook.dto;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ContentStyle;
+import com.xjrsoft.common.page.PageInput;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+/**
+* @title: 教材管理分页查询入参(学生收费管理用)
+* @Author szs
+* @Date: 2023-12-25
+* @Version 1.0
+*/
+@Data
+public class TextbookConsumptionPageDto extends PageInput {
+    /**
+     * 班级
+     */
+    @ContentStyle(dataFormat = 49)
+    @ApiModelProperty("班级")
+    private Long classId;
+
+    @ApiModelProperty("学期id")
+    public Long baseSemesterId;
+}

+ 66 - 0
src/main/java/com/xjrsoft/module/textbook/vo/TextbookConsumptionPageVo.java

@@ -0,0 +1,66 @@
+package com.xjrsoft.module.textbook.vo;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ContentStyle;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+* @title: 教材管理表单出参
+* @Author szs
+* @Date: 2023-12-25
+* @Version 1.0
+*/
+@Data
+public class TextbookConsumptionPageVo {
+
+    /**
+    * 主键编号
+    */
+    @ApiModelProperty("主键编号")
+    private String id;
+    /**
+     * 教材编号
+     */
+    @ApiModelProperty("教材编号")
+    private String textbookId;
+    /**
+     * 课程编号(base_course_subject)
+     */
+    @ApiModelProperty("课程编号(base_course_subject)")
+    private Long courseSubjectId;
+    /**
+     * 课程编号(base_course_subject)
+     */
+    @ApiModelProperty("课程编号(base_course_subject)")
+    private String courseSubjectIdCn;
+    /**
+    * 书名
+    */
+    @ApiModelProperty("书名")
+    private String bookName;
+    /**
+    * 出版社
+    */
+    @ApiModelProperty("出版社")
+    private String publishingHouse;
+    /**
+    * 教材类型(xjr_dictionary_item[textbook_type])
+    */
+    @ApiModelProperty("教材类型(xjr_dictionary_item[textbook_type])")
+    private String textbookType;
+    /**
+     * 教材类型(xjr_dictionary_item[textbook_type])
+     */
+    @ApiModelProperty("教材类型(xjr_dictionary_item[textbook_type])")
+    private String textbookTypeCn;
+    /**
+     * 定价(元)
+     */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("定价(元)")
+    @ApiModelProperty("定价(元)")
+    private BigDecimal price;
+}

+ 1 - 1
src/main/resources/mapper/student/BaseStudentMapper.xml

@@ -24,7 +24,7 @@
 
     <!--个人财务画像,查询学生个人信息-->
     <select id="getPersonalInfo" resultType="com.xjrsoft.module.student.vo.StudentPersonalInfoVo">
-        SELECT t1.user_id,t2.name,t5.name AS gender_cn,t4.name AS class_name,t2.credential_number,t2.birth_date,t2.mobile,
+        SELECT t1.user_id,t2.name,t5.name AS gender_cn,t4.id as class_id, t4.name AS class_name,t2.credential_number,t2.birth_date,t2.mobile,
         t6.name AS archives_status_cn,t7.name AS roll_modality_cn,t1.student_id,t8.name AS major_set_name,
         t9.name AS stduy_status_cn,t10.name AS teacher_name,t10.mobile AS teacher_phone,t11.bed_number,t12.room_name,
         t13.name AS build_name,t14.is_indemnify FROM base_student t1