Explorar o código

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

dzx hai 5 meses
pai
achega
91d762a918

+ 7 - 5
src/main/java/com/xjrsoft/module/textbook/controller/TextbookController.java

@@ -14,6 +14,7 @@ import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
 import com.xjrsoft.common.utils.VoToColumnUtil;
+import com.xjrsoft.module.base.entity.BaseClassCourse;
 import com.xjrsoft.module.base.entity.BaseCourseSubject;
 import com.xjrsoft.module.base.entity.BaseSemester;
 import com.xjrsoft.module.base.service.IBaseSemesterService;
@@ -80,11 +81,11 @@ public class TextbookController {
                 .selectAs(BaseCourseSubject::getName, TextbookSubscriptionListVo::getCourseSubjectIdCn)
                 .selectSum(BaseClassMajorSet::getTotalStudent, TextbookSubscriptionListVo::getStudentSubscriptionNumber)
                 .select(Textbook.class, x -> VoToColumnUtil.fieldsToColumns(TextbookSubscriptionListVo.class).contains(x.getProperty()))
-                .leftJoin(TextbookClassRelation.class, TextbookClassRelation::getTextbookId, Textbook::getId)
-                .leftJoin(BaseClassMajorSet.class, BaseClassMajorSet::getClassId, TextbookClassRelation::getClassId)
+                .leftJoin(BaseClassCourse.class, BaseClassCourse::getCourseId, Textbook::getCourseSubjectId)
+                .leftJoin(BaseClassMajorSet.class, BaseClassMajorSet::getClassId, BaseClassCourse::getClassId)
                 .leftJoin(BaseCourseSubject.class, BaseCourseSubject::getId, Textbook::getCourseSubjectId)
-                .eq(dto.getBaseSemesterId() != null && dto.getBaseSemesterId() > 0, Textbook::getBaseSemesterId, dto.getBaseSemesterId())
-                .in(!classIdList.isEmpty(),TextbookClassRelation::getClassId, classIdList)
+                .eq(dto.getBaseSemesterId() != null && dto.getBaseSemesterId() > 0, BaseClassCourse::getBaseSemesterId, dto.getBaseSemesterId())
+                .in(!classIdList.isEmpty(),BaseClassCourse::getClassId, classIdList)
                 .groupBy(Textbook::getId)
         ;
         IPage<TextbookSubscriptionListVo> page = textbookService.selectJoinListPage(ConventPage.getPage(dto),TextbookSubscriptionListVo.class,textbookMPJLambdaWrapper);
@@ -98,8 +99,9 @@ public class TextbookController {
         return RT.ok(pageOutput);
     }
 
+    // TODO 学生确认领取教材列表
     @GetMapping(value = "/page-consumption")
-    @ApiOperation(value="教材管理列表(分页,学生收费用)")
+    @ApiOperation(value="学生确认领取教材列表(分页,学生收费用)")
     @SaCheckPermission("textbook:detail")
     public RT<PageOutput<TextbookConsumptionPageVo>> pageConsumption(@Valid TextbookConsumptionPageDto dto){
         MPJLambdaWrapper<Textbook> textbookMPJLambdaWrapper = new MPJLambdaWrapper<>();

+ 1 - 1
src/main/resources/mapper/base/BaseClassCourse.xml

@@ -35,7 +35,7 @@
         LEFT JOIN xjr_department t4 ON t4.id = t.org_id
         WHERE t.delete_mark = 0
         <if test="dto.className != null and dto.className != ''">
-            and t.name = #{dto.className}
+            and t.name = like concat('%', #{dto.className}, '%')
         </if>
         <if test="dto.deptId != null">
             and t4.id = #{dto.deptId}

+ 5 - 4
src/main/resources/mapper/textbook/TextbookMapper.xml

@@ -23,9 +23,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>
@@ -121,9 +121,10 @@
     </select>
 
     <select id="warehouseList" resultType="com.xjrsoft.module.textbook.vo.TextbookWarehouseRecordListVo">
-        SELECT t1.create_date AS warehouse_date, t2.name AS warehouse_user, t1.warehouse_number, t1.source
+        SELECT t1.create_date AS warehouse_date, t2.name AS warehouse_user, t1.warehouse_number, t3.name as source
         FROM textbook_warehouse_record t1
                  LEFT JOIN xjr_user t2 ON t1.create_user_id = t2.id
+                 LEFT JOIN xjr_dictionary_detail t3 ON t1.source = t3.code and item_id = 1739821114335490050
         WHERE t1.delete_mark = 0
           AND t1.textbook_id = #{id}
         order by t1.sort_code