Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dzx 1 năm trước cách đây
mục cha
commit
41b08ec720

+ 15 - 13
src/main/java/com/xjrsoft/module/textbook/controller/TextbookController.java

@@ -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()));
@@ -397,12 +399,12 @@ public class TextbookController {
         return RT.fileStream(bot.toByteArray(), "TextbookSubscription" + ExcelTypeEnum.XLSX.getValue());
     }
 
-    @PostMapping("/textbook-claim-export-query")
-    @ApiOperation(value = "教材发放记录条件导出")
-    public ResponseEntity<byte[]> textbookClaimExportQuery(@Valid @RequestBody TextbookClaimExportQueryDto dto) {
-//    @GetMapping("/textbook-claim-export-query")
+//    @PostMapping("/textbook-claim-export-query")
 //    @ApiOperation(value = "教材发放记录条件导出")
-//    public ResponseEntity<byte[]> textbookClaimExportQuery(@Valid TextbookClaimExportQueryDto dto) {
+//    public ResponseEntity<byte[]> textbookClaimExportQuery(@Valid @RequestBody TextbookClaimExportQueryDto dto) {
+    @GetMapping("/textbook-claim-export-query")
+    @ApiOperation(value = "教材发放记录条件导出")
+    public ResponseEntity<byte[]> textbookClaimExportQuery(@Valid TextbookClaimExportQueryDto dto) {
         ByteArrayOutputStream bot = textbookService.listTextbookClaimExportQuery(dto);
         return RT.fileStream(bot.toByteArray(), "TextbookClaim" + ExcelTypeEnum.XLSX.getValue());
     }

+ 5 - 4
src/main/java/com/xjrsoft/module/textbook/controller/WfTextbookSubscriptionItemHistoryController.java

@@ -33,8 +33,8 @@ import java.util.List;
 * @Version 1.0
 */
 @RestController
-@RequestMapping("/student" + "/wfTextbookSubscriptionItemHistory")
-@Api(value = "/student"  + "/wfTextbookSubscriptionItemHistory",tags = "教材教辅征订项变更历史代码")
+@RequestMapping("/textbook" + "/wfTextbookSubscriptionItemHistory")
+@Api(value = "/textbook"  + "/wfTextbookSubscriptionItemHistory",tags = "教材教辅征订项变更历史代码")
 @AllArgsConstructor
 public class WfTextbookSubscriptionItemHistoryController {
 
@@ -58,8 +58,9 @@ public class WfTextbookSubscriptionItemHistoryController {
 //                        ext -> ext.selectAs(DictionaryDetail::getName, WfTextbookSubscriptionItemHistoryPageVo::getTextbookTypeCn))
                 .leftJoin(BaseCourseSubject.class, BaseCourseSubject::getId, Textbook::getCourseSubjectId)
                 .leftJoin(XjrUser.class, XjrUser::getId, WfTextbookSubscriptionItemHistory::getCreateUserId)
-                .eq(WfTextbookSubscriptionItemHistory::getWfTextbookSubscriptionItemId, dto.getWfTextbookSubscriptionItemId())
-                .orderByAsc(WfTextbookSubscriptionItemHistory::getHistoryVersion)
+                .eq(dto.getWfTextbookSubscriptionItemId() != null && dto.getWfTextbookSubscriptionItemId() > 0, WfTextbookSubscriptionItemHistory::getWfTextbookSubscriptionItemId, dto.getWfTextbookSubscriptionItemId())
+                .eq(dto.getWfTextbookSubscriptionId() != null && dto.getWfTextbookSubscriptionId() > 0, WfTextbookSubscriptionItemHistory::getWfTextbookSubscriptionId, dto.getWfTextbookSubscriptionId())
+                .orderByAsc("t.wf_textbook_subscription_item_id, t.history_version")
                 ;
         IPage<WfTextbookSubscriptionItemHistoryPageVo> page = wfTextbookSubscriptionItemHistoryService.selectJoinListPage(ConventPage.getPage(dto), WfTextbookSubscriptionItemHistoryPageVo.class, mpjLambdaWrapper);
         PageOutput<WfTextbookSubscriptionItemHistoryPageVo> pageOutput = ConventPage.getPageOutput(page, WfTextbookSubscriptionItemHistoryPageVo.class);

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

@@ -14,6 +14,11 @@ import lombok.Data;
 */
 @Data
 public class TextbookConsumptionPageDto extends PageInput {
+    /**
+     * 学生用户编号
+     */
+    @ApiModelProperty("学生用户编号")
+    private Long studentUserId;
     /**
      * 班级
      */

+ 5 - 1
src/main/java/com/xjrsoft/module/textbook/dto/WfTextbookSubscriptionItemHistoryPageDto.java

@@ -26,5 +26,9 @@ public class WfTextbookSubscriptionItemHistoryPageDto extends PageInput {
      */
     @ApiModelProperty("教材教辅征订项编号")
     private Long wfTextbookSubscriptionItemId;
-
+    /**
+     * 教材教辅征订编号
+     */
+    @ApiModelProperty("教材教辅征订编号")
+    private Long wfTextbookSubscriptionId;
 }

+ 7 - 10
src/main/java/com/xjrsoft/module/textbook/vo/TextbookClaimExportQueryVo.java

@@ -37,7 +37,13 @@ public class TextbookClaimExportQueryVo {
 
     @ExcelIgnore
     private Long textbookId;
-
+    /**
+     * 教材类型(xjr_dictionary_item[textbook_type])
+     */
+    @ContentStyle(dataFormat = 49)
+    @ExcelIgnore
+    @ApiModelProperty("教材类型(xjr_dictionary_item[textbook_type])")
+    private String textbookType;
     /**
      * 教材类型(xjr_dictionary_item[textbook_type])
      */
@@ -102,13 +108,4 @@ public class TextbookClaimExportQueryVo {
     @ExcelProperty("备注")
     @ApiModelProperty("备注")
     private String remark;
-
-    public TextbookClaimExportQueryVo() {
-
-    }
-
-    public TextbookClaimExportQueryVo(String bookName, BigDecimal subtotal) {
-        this.bookName = bookName;
-        this.subtotal = subtotal;
-    }
 }

+ 5 - 0
src/main/java/com/xjrsoft/module/textbook/vo/WfTextbookSubscriptionItemVo.java

@@ -134,6 +134,11 @@ public class WfTextbookSubscriptionItemVo {
      */
     @ApiModelProperty("教材编号")
     private Long textbookId;
+    /**
+     * 已入库数量
+     */
+    @ApiModelProperty("已入库数量")
+    private Integer inStockroomNum;
     /**
      * 变更类型(0:未变更,1:变更征订数量,2:变更课程)
      */

+ 109 - 103
src/main/resources/mapper/textbook/TextbookMapper.xml

@@ -8,7 +8,8 @@
         SELECT t1.id,t1.id AS textbookId,t1.sort_code,t1.issn,t1.book_name,t1.publishing_house,t1.editor_in_chief,
         t1.subject_group_id,t2.group_name,t3.name AS semester_name,t4.name AS course_name,t7.name AS
         is_textbook_plan_cn,
-        t5.name AS textbook_type_cn,t1.specifications_models,t1.appraisal_price,t1.price,t1.discount,t1.subtotal,t1.stock,
+        t5.name AS
+        textbook_type_cn,t1.specifications_models,t1.appraisal_price,t1.price,t1.discount,t1.subtotal,t1.stock,
         (SELECT GROUP_CONCAT(c2.name) FROM textbook_class_relation c1
         LEFT JOIN base_class c2 ON c1.class_id = c2.id
         WHERE c1.textbook_id = t1.id) AS use_class,
@@ -25,9 +26,9 @@
         <if test="dto.textbookType != null and dto.textbookType != ''">
             and t1.textbook_type = #{dto.textbookType}
         </if>
-<!--        <if test="dto.baseSemesterId != null and dto.baseSemesterId > 0">-->
-<!--            and t1.base_semester_id = #{dto.baseSemesterId}-->
-<!--        </if>-->
+        <!--        <if test="dto.baseSemesterId != null and dto.baseSemesterId > 0">-->
+        <!--            and t1.base_semester_id = #{dto.baseSemesterId}-->
+        <!--        </if>-->
         <if test="dto.subjectGroupId != null and dto.subjectGroupId > 0">
             and t1.subject_group_id = #{dto.subjectGroupId}
         </if>
@@ -80,10 +81,10 @@
 
     <select id="exerciseBookSubscriptionList" resultType="com.xjrsoft.module.textbook.vo.TextbookSubscriptionRecordVo">
         SELECT t2.create_date,
-               t4.name AS applicant_user,
+               t4.name                AS applicant_user,
                t5.book_name,
                t3.specifications_models,
-               t6.name as useClass,
+               t6.name                as useClass,
                t3.appraisal_price,
                t3.subscription_number as studentSubscriptionNumber
         FROM textbook_subscription_record t1
@@ -108,7 +109,8 @@
         FROM textbook
         WHERE delete_mark = 0
           AND issn = #{issn}
-        order by create_date desc limit 0,1
+        order by create_date desc
+        limit 0,1
     </select>
 
     <select id="warehouseList" resultType="com.xjrsoft.module.textbook.vo.TextbookWarehouseRecordListVo">
@@ -122,11 +124,12 @@
     </select>
 
     <select id="issueList" resultType="com.xjrsoft.module.textbook.vo.TextbookIssueRecordListVo">
-        SELECT t1.create_date                                                        AS issue_date,
-               t2.name                                                               AS issue_user,
+        SELECT t1.create_date                        AS issue_date,
+               t2.name                               AS issue_user,
                t1.issue_number,
-               t6.name                                                               AS issue_mode,
-               CONCAT(ifnull(t4.name, ''), ifnull(t5.name, ''), ' ', ifnull(t7.name, ''), ifnull(t9.recede_address, '')) as remark
+               t6.name                               AS issue_mode,
+               CONCAT(ifnull(t4.name, ''), ifnull(t5.name, ''), ' ', ifnull(t7.name, ''),
+                      ifnull(t9.recede_address, '')) as remark
         FROM textbook_issue_record t1
                  LEFT JOIN xjr_user t2 ON t1.create_user_id = t2.id
                  left join base_student_school_roll t3 on t3.user_id = t1.receive_user_id
@@ -147,35 +150,36 @@
           AND textbook_id = #{id}
     </select>
 
-    <select id="listTextbookStandingExportQuery" parameterType="com.xjrsoft.module.textbook.dto.TextbookStandingExportQuerytDto"
+    <select id="listTextbookStandingExportQuery"
+            parameterType="com.xjrsoft.module.textbook.dto.TextbookStandingExportQuerytDto"
             resultType="com.xjrsoft.module.textbook.vo.TextbookStandingExportQueryVo">
         SELECT t1.issn,
-            t1.book_name,
-            t1.publishing_house,
-            t1.editor_in_chief,
-            t2.group_name,
-            t6.name                        AS use_grade,
-            (SELECT GROUP_CONCAT(c2.name)
-            FROM textbook_class_relation c1
-            LEFT JOIN base_class c2 ON c1.class_id = c2.id
-            WHERE c1.textbook_id = t1.id) AS use_class,
-            t4.name                        AS course_name,
-            t7.name                        AS is_textbook_plan_cn,
-            t5.name                        AS textbook_type_cn,
-            t1.specifications_models,
-            t1.appraisal_price,
-            t1.price,
-            t1.discount,
-            t1.subtotal,
-            t1.stock,
-            t8.name as use_semester
+        t1.book_name,
+        t1.publishing_house,
+        t1.editor_in_chief,
+        t2.group_name,
+        t6.name AS use_grade,
+        (SELECT GROUP_CONCAT(c2.name)
+        FROM textbook_class_relation c1
+        LEFT JOIN base_class c2 ON c1.class_id = c2.id
+        WHERE c1.textbook_id = t1.id) AS use_class,
+        t4.name AS course_name,
+        t7.name AS is_textbook_plan_cn,
+        t5.name AS textbook_type_cn,
+        t1.specifications_models,
+        t1.appraisal_price,
+        t1.price,
+        t1.discount,
+        t1.subtotal,
+        t1.stock,
+        t8.name as use_semester
         FROM textbook t1
-            LEFT JOIN subject_group t2 ON t1.subject_group_id = t2.id
-            LEFT JOIN base_course_subject t4 ON t1.course_subject_id = t4.id
-            LEFT JOIN xjr_dictionary_detail t5 ON t1.textbook_type = t5.code AND t5.item_id = 1739209191193636865
-            LEFT JOIN base_grade t6 ON t1.grade_id = t6.id
-            LEFT JOIN xjr_dictionary_detail t7 ON t1.is_textbook_plan = t7.code AND t7.item_id = 1737360269850038273
-            LEFT JOIN base_semester t8 ON t1.base_semester_id = t8.id
+        LEFT JOIN subject_group t2 ON t1.subject_group_id = t2.id
+        LEFT JOIN base_course_subject t4 ON t1.course_subject_id = t4.id
+        LEFT JOIN xjr_dictionary_detail t5 ON t1.textbook_type = t5.code AND t5.item_id = 1739209191193636865
+        LEFT JOIN base_grade t6 ON t1.grade_id = t6.id
+        LEFT JOIN xjr_dictionary_detail t7 ON t1.is_textbook_plan = t7.code AND t7.item_id = 1737360269850038273
+        LEFT JOIN base_semester t8 ON t1.base_semester_id = t8.id
         WHERE t1.delete_mark = 0
         <if test="dto.textbookType != null and dto.textbookType != ''">
             and t1.textbook_type = #{dto.textbookType}
@@ -201,33 +205,34 @@
         order by t6.name desc
     </select>
 
-    <select id="listTextbookSubscriptionExportQuery" parameterType="com.xjrsoft.module.textbook.dto.TextbookSubscriptionExportQueryDto"
+    <select id="listTextbookSubscriptionExportQuery"
+            parameterType="com.xjrsoft.module.textbook.dto.TextbookSubscriptionExportQueryDto"
             resultType="com.xjrsoft.module.textbook.vo.TextbookSubscriptionExportQueryVo">
         SELECT t3.issn,
-               t3.book_name,
-               t3.publishing_house,
-               t3.editor_in_chief,
-               t3.appraisal_price,
-               t5.name        AS is_textbook_plan_cn,
-               t6.name        AS course_name,
-               t9.name        as useGrade,
-               t3.class_ids,
-               t3.student_subscription_number,
-               t3.teacher_subscription_number,
-               t3.teacher_reference_number,
-               t10.group_name,
-               t7.name        AS is_support_resources_cn
+        t3.book_name,
+        t3.publishing_house,
+        t3.editor_in_chief,
+        t3.appraisal_price,
+        t5.name AS is_textbook_plan_cn,
+        t6.name AS course_name,
+        t9.name as useGrade,
+        t3.class_ids,
+        t3.student_subscription_number,
+        t3.teacher_subscription_number,
+        t3.teacher_reference_number,
+        t10.group_name,
+        t7.name AS is_support_resources_cn
         FROM textbook_subscription_record t1
-                 LEFT JOIN wf_textbook_subscription t2 ON t1.wf_textbook_subscription_id = t2.id
-                 LEFT JOIN wf_textbook_subscription_item t3 ON t3.id = t1.wf_textbook_subscription_item_id
-                 LEFT JOIN xjr_dictionary_detail t5
-                           ON t3.is_textbook_plan = t5.code AND t5.item_id = 1737360269850038273
-                 LEFT JOIN base_course_subject t6 ON t3.course_subject_id = t6.id
-                 LEFT JOIN xjr_dictionary_detail t7
-                           ON t3.is_support_resources = t7.code AND t7.item_id = 1737360269850038273
-                 LEFT JOIN textbook t8 ON t8.id = t1.textbook_id
-                 LEFT JOIN base_grade t9 ON t9.id = t8.grade_id
-                 LEFT JOIN subject_group t10 ON t10.id = t2.subject_group_id
+        LEFT JOIN wf_textbook_subscription t2 ON t1.wf_textbook_subscription_id = t2.id
+        LEFT JOIN wf_textbook_subscription_item t3 ON t3.id = t1.wf_textbook_subscription_item_id
+        LEFT JOIN xjr_dictionary_detail t5
+        ON t3.is_textbook_plan = t5.code AND t5.item_id = 1737360269850038273
+        LEFT JOIN base_course_subject t6 ON t3.course_subject_id = t6.id
+        LEFT JOIN xjr_dictionary_detail t7
+        ON t3.is_support_resources = t7.code AND t7.item_id = 1737360269850038273
+        LEFT JOIN textbook t8 ON t8.id = t1.textbook_id
+        LEFT JOIN base_grade t9 ON t9.id = t8.grade_id
+        LEFT JOIN subject_group t10 ON t10.id = t2.subject_group_id
         WHERE t1.delete_mark = 0
         <if test="dto.textbookType != null and dto.textbookType != ''">
             and t8.textbook_type = #{dto.textbookType}
@@ -252,30 +257,32 @@
         </if>
     </select>
 
-    <select id="listTextbookClaimExportQuery" parameterType="com.xjrsoft.module.textbook.dto.TextbookClaimExportQueryDto"
+    <select id="listTextbookClaimExportQuery"
+            parameterType="com.xjrsoft.module.textbook.dto.TextbookClaimExportQueryDto"
             resultType="com.xjrsoft.module.textbook.vo.TextbookClaimExportQueryVo">
         with textbook_class as (
-            select
-                t.base_semester_id,
-                t.class_id,
-                t1.textbook_id,
-                sum(t2.stock) as num,
-                sum(t1.issue_number) as claimNum
-            from wf_textbook_claim t
-                inner join wf_textbook_claim_item t1 on t1.wf_textbook_claim_id = t.id
-                left join textbook t2 on t2.id = t1.textbook_id
-            where claim_type = 'claim_student'
-                AND t.status = 1
-            <if test="dto.baseSemesterId != null and dto.baseSemesterId > 0">
-                and t.base_semester_id = #{dto.baseSemesterId}
-            </if>
-            <if test="dto.classId != null and dto.classId > 0">
-                and t.class_id = #{dto.classId}
-            </if>
-            <if test="dto.textbookId != null and dto.textbookId > 0">
-                and t1.textbook_id = #{dto.textbookId}
-            </if>
-            group by t.base_semester_id, t.class_id, t1.textbook_id
+        select
+        t.base_semester_id,
+        t.class_id,
+        t1.textbook_id,
+        sum(t2.stock) as num,
+        sum(t1.issue_number) as claimNum
+        from wf_textbook_claim t
+        inner join wf_textbook_claim_item t1 on t1.wf_textbook_claim_id = t.id
+        left join textbook t2 on t2.id = t1.textbook_id
+        where claim_type = 'claim_student'
+        AND t.status = 1
+        AND t2.delete_mark = 0
+        <if test="dto.baseSemesterId != null and dto.baseSemesterId > 0">
+            and t.base_semester_id = #{dto.baseSemesterId}
+        </if>
+        <if test="dto.classId != null and dto.classId > 0">
+            and t.class_id = #{dto.classId}
+        </if>
+        <if test="dto.textbookId != null and dto.textbookId > 0">
+            and t1.textbook_id = #{dto.textbookId}
+        </if>
+        group by t.base_semester_id, t.class_id, t1.textbook_id
         )
         select
         t.base_semester_id,
@@ -301,26 +308,25 @@
         left join base_class t4 on t4.id = t.class_id
         left join xjr_user t5 on t5.id = t4.teacher_id
         left join base_classroom t6 on t6.id = t4.classroom_id
-        <where>
-            <if test="dto.textbookType != null and dto.textbookType != ''">
-                and t1.textbook_type = #{dto.textbookType}
-            </if>
-            <if test="dto.subjectGroupId != null and dto.subjectGroupId > 0">
-                and t1.subject_group_id = #{dto.subjectGroupId}
-            </if>
-            <if test="dto.courseSubjectId != null and dto.courseSubjectId > 0">
-                and t1.course_subject_id = #{dto.courseSubjectId}
-            </if>
-            <if test="dto.bookName != null and dto.bookName != ''">
-                and t1.book_name like concat('%',#{dto.bookName}, '%')
-            </if>
-            <if test="dto.isTextbookPlan != null and dto.isTextbookPlan != ''">
-                and t1.is_textbook_plan = #{dto.isTextbookPlan}
-            </if>
-            <if test="dto.issn != null and dto.issn != ''">
-                and t1.issn like concat('%', #{dto.issn}, '%')
-            </if>
-        </where>
+        where t1.delete_mark = 0
+        <if test="dto.textbookType != null and dto.textbookType != ''">
+            and t1.textbook_type = #{dto.textbookType}
+        </if>
+        <if test="dto.subjectGroupId != null and dto.subjectGroupId > 0">
+            and t1.subject_group_id = #{dto.subjectGroupId}
+        </if>
+        <if test="dto.courseSubjectId != null and dto.courseSubjectId > 0">
+            and t1.course_subject_id = #{dto.courseSubjectId}
+        </if>
+        <if test="dto.bookName != null and dto.bookName != ''">
+            and t1.book_name like concat('%',#{dto.bookName}, '%')
+        </if>
+        <if test="dto.isTextbookPlan != null and dto.isTextbookPlan != ''">
+            and t1.is_textbook_plan = #{dto.isTextbookPlan}
+        </if>
+        <if test="dto.issn != null and dto.issn != ''">
+            and t1.issn like concat('%', #{dto.issn}, '%')
+        </if>
         order by t2.name desc
     </select>
 </mapper>