Browse Source

修改bug

大数据与最优化研究所 1 month ago
parent
commit
611c898f83

+ 8 - 39
src/main/java/com/xjrsoft/module/textbook/service/impl/TextbookStudentClaimServiceImpl.java

@@ -438,27 +438,14 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
             dto.setClassIdList(classIdList);
         }
 
-        //为每本书添加数据
-//        for (TeacherCheckByclassVo t : teacherCheckByclassVoList.getRecords()) {
-//            MPJLambdaWrapper<WfTextbookClaim> qweryActualReceivedNum = new MPJLambdaWrapper<>();
-//            qweryActualReceivedNum
-//                    .disableSubLogicDel()
-//                    .selectSum(WfTextbookClaimItem::getIssueNumber, TeacherCheckByclassVo::getActualReceivedNum)
-//                    .leftJoin(WfTextbookClaimItem.class, WfTextbookClaimItem::getWfTextbookClaimId, WfTextbookClaim::getId)
-//                    .eq(WfTextbookClaim::getClassId, t.getClassId())
-//                    .eq(WfTextbookClaimItem::getTextbookId, t.getTextbookId());
-//            TeacherCheckByclassVo teacherCheckByclassVo = wfTextbookClaimMapper.selectJoinOne(TeacherCheckByclassVo.class, qweryActualReceivedNum);
-//
-//            t.setActualReceivedNum(teacherCheckByclassVo.getActualReceivedNum());
-//
-//            LambdaQueryWrapper<TextbookStudentClaim> queryActualClaimNum = new LambdaQueryWrapper<>();
-//            queryActualClaimNum
-//                    .eq(TextbookStudentClaim::getClassId, t.getClassId())
-//                    .eq(TextbookStudentClaim::getTextbookId, t.getTextbookId())
-//                    .eq(TextbookStudentClaim::getIsClaim, 1);
-//            Long actualClaimNum = this.count(queryActualClaimNum);
-//            t.setActualClaimNum(actualClaimNum);
-//        }
+//        // 获取当前班级采用班级申领的所有教材
+//        MPJLambdaWrapper<WfTextbookClaim> allTextbookMPJLambdaWrapper = new MPJLambdaWrapper<>();
+//        allTextbookMPJLambdaWrapper
+//                .eq()
+//                .groupBy("t.base_semester_id", "t.class_id", "t.textbook_id")
+//                ;
+
+
         return textbookStudentClaimMapper.getTeacherCheckByclassList(ConventPage.getPage(dto), dto);
     }
 
@@ -595,24 +582,6 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
             vo.setTextbookClaimVOList(eachStustuTextbooks);
         }
 
-//        //将班上所有学生进行分组,查询出list集合
-//        IPage<TeacherCheckByStuVo> teacherCheckByStuVoList = textbookStudentClaimMapper.getTeacherCheckByStuList(ConventPage.getPage(dto), dto);
-
-        //为每个学生添加教材领取记录集合
-        //学生id集合
-//        List<Long> stuIdList = new ArrayList<>();
-//        for (TeacherCheckByStuVo teacherCheckByStuVo : teacherCheckByStuVoList.getRecords()) {
-//            stuIdList.add(teacherCheckByStuVo.getStudentUserId());
-//        }
-//        //一次查出所有学生的所有书籍
-//        if(stuIdList.size() > 0){
-//            List<TextbookClaimVO> textbookClaimVOList = textbookStudentClaimMapper.getTextbookClaimVOList(stuIdList);
-//        }
-//
-//        for (TeacherCheckByStuVo t : teacherCheckByStuVoList.getRecords()) {
-//            List<TextbookClaimVO> textbookClaimVOList = textbookStudentClaimMapper.getTextbookClaimVOList(t.getStudentUserId());
-//            t.setTextbookClaimVOList(textbookClaimVOList);
-//        }
         return teacherCheckByStuVoList;
     }
 

+ 1 - 0
src/main/resources/mapper/textbook/TextbookStudentClaimMapper.xml

@@ -41,6 +41,7 @@
                 #{classId}
             </foreach>
         </if>
+        AND t.claim_type = 'claim_class'
         GROUP BY t.base_semester_id, t.class_id, t1.textbook_id),
         actual_claim_counts AS
         (SELECT base_semester_id, class_id, textbook_id, count(is_claim) AS claim_num