浏览代码

移动端班级考核调整

dzx 11 月之前
父节点
当前提交
19a4bdfcbc

+ 9 - 10
src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentAssessmentInspectionServiceImpl.java

@@ -232,7 +232,7 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
         List<BaseStudentAssessmentCategory> baseStudentAssessmentCategorieList = categoryMapper.selectList(baseStudentAssessmentCategoryLambdaQueryWrapper);
 
         //导出子表
-        if(baseStudentAssessmentCategorieList.size() > 0){
+        if(!baseStudentAssessmentCategorieList.isEmpty()){
             //需要合并的列
             int[] mergeColumeIndex = {0, 1, 2, 3, 4};
             ExcelMergeUtil excelFillCellMergeStrategy = new ExcelMergeUtil(1, mergeColumeIndex);
@@ -268,7 +268,7 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
                         .eq(dto.getGradeId() != null, BaseClass::getGradeId, dto.getGradeId())
                         .eq(dto.getClassId() != null, BaseClass::getId, dto.getClassId())
                         .eq(dto.getClassStatus() != null, BaseClass::getIsGraduate, dto.getClassStatus())
-                        .like(dto.getName() != null && !dto.getName().equals(""), XjrUser::getName, dto.getName());
+                        .like(dto.getName() != null && !dto.getName().isEmpty(), XjrUser::getName, dto.getName());
 
                 List<CalssQuantitativeAssessmentPageVo> resultList = baseClassMapper.selectJoinList(CalssQuantitativeAssessmentPageVo.class, baseClassMPJLambdaWrapper);
 
@@ -423,7 +423,6 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
                             }
                         }
 
-
                         c.setAssessMoney(" ");
                         c.setAssessSumScore(" ");
                     }
@@ -475,7 +474,7 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
                 .eq(dto.getGradeId() != null, BaseClass::getGradeId, dto.getGradeId())
                 .eq(dto.getClassId() != null, BaseClass::getId, dto.getClassId())
                 .eq(dto.getClassStatus() != null, BaseClass::getIsGraduate, dto.getClassStatus())
-                .like(dto.getName() != null && !dto.getName().equals(""), XjrUser::getName, dto.getName());
+                .like(dto.getName() != null && !dto.getName().isEmpty(), XjrUser::getName, dto.getName());
 
         IPage<CalssQuantitativeAssessmentPageVo> resultPage = baseClassMapper.selectJoinPage(page, CalssQuantitativeAssessmentPageVo.class, baseClassMPJLambdaWrapper);
 
@@ -542,7 +541,7 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
             for(CalssQuantitativeAssessmentPageVo c: resultPage.getRecords()){
                 Long classId = Long.parseLong(c.getClassId());
                 //学生个人行为
-                if(individualBehaviorMap.get(classId) != null){
+                if(individualBehaviorMap.get(classId) != null && individualBehaviorMap.get(classId) != null){
                     Double sumScore = individualBehaviorMap.get(classId).getSumScore();
                     c.setStuPersonalBehaviorSubScore(sumScore==null?"":sumScore.toString());
                     String replacedExpression = xsgrFormula.replace("xsgrKouFen", Double.toString(sumScore));
@@ -556,7 +555,7 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
                     }
                 }
                 //常规管理
-                if(conventionalManagementMap.get(classId) != null){
+                if(conventionalManagementMap.get(classId) != null && conventionalManagementMap.get(classId) != null){
                     Double sumScore = conventionalManagementMap.get(classId).getSumScore();
                     if(sumScore != null){
                         String scoreStr = sumScore.toString();
@@ -574,7 +573,7 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
                     }
                 }
                 //获奖和荣誉
-                if(awardsAndHonorableMap.get(classId) != null){
+                if(awardsAndHonorableMap.get(classId) != null && awardsAndHonorableMap.get(classId) != null){
                     Double sumScore = awardsAndHonorableMap.get(classId).getSumScore();
                     if(sumScore != null){
                         c.setHonorSumScore(sumScore.toString());
@@ -591,8 +590,8 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
                     }
                 }
                 //军事化
-                if(paramilitaryMap.get(classId) != null){
-                    Double sumScore = awardsAndHonorableMap.get(classId).getSumScore();
+                if(paramilitaryMap.get(classId) != null && paramilitaryMap.get(classId) != null){
+                    Double sumScore = paramilitaryMap.get(classId).getSumScore();
                     if(sumScore != null){
                         c.setMilitaryManageComprehensiveIndex(sumScore.toString());
                         //此项得分
@@ -633,7 +632,7 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
                     }
                 }
                 //班级文化建设
-                if(classCultureMap.containsKey(classId)){
+                if(classCultureMap.containsKey(classId) && classCultureMap.get(classId) != null){
                     Double sumScore = classCultureMap.get(classId).getSumScore();
                     if(sumScore != null){
                         c.setClassCultureScore(sumScore.toString());

+ 5 - 5
src/main/resources/mapper/student/BaseStudentAssessmentInspectionMapper.xml

@@ -20,7 +20,7 @@
         LEFT JOIN xjr_user t5 ON t.assessment_user_id = t5.id
         LEFT JOIN xjr_dictionary_detail t6 ON t6.code= t.score_type
         LEFT JOIN base_class t7 ON t7.id = CAST(t.class_ids AS SIGNED)
-        WHERE  t.delete_mark = 0 AND t.delete_mark = 0  AND t2.delete_mark = 0
+        WHERE  t.delete_mark = 0 AND t.delete_mark = 0  AND t2.delete_mark = 0 and t.enabled_mark = 1
         <if test="dto.projectIds != null">
             and t.base_student_assessment_category_id = #{dto.projectIds}
         </if>
@@ -59,7 +59,7 @@
         left join xjr_user t5 on t.assessment_user_id=t5.id
         left join xjr_dictionary_detail t6 on t6.code=t.score_type
         left join xjr_user t7 on t.create_user_id=t7.id
-        where t.id = #{id} and t.delete_mark = 0 and t1.delete_mark = 0 and t2.delete_mark = 0
+        where t.id = #{id} and t.delete_mark = 0 and t1.delete_mark = 0 and t2.delete_mark = 0 and t.enabled_mark = 1
     </select>
 
     <select id="getMobilePage" parameterType="com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionMobilePageDto" resultType="com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionMobilePageVo">
@@ -80,7 +80,7 @@
         LEFT JOIN base_student_assessment_item t6 ON (t6.id = t1.base_student_assessment_item_id)
         LEFT JOIN xjr_dictionary_detail t4 ON t4.code=t1.score_type
         LEFT JOIN base_class t5 ON t5.id=t.class_id
-        WHERE t1.delete_mark = 0 and t.class_id in
+        WHERE t1.delete_mark = 0 and t1.enabled_mark = 1 and t.class_id in
         <foreach item="classId" index="index" collection="dto.classIds" open="(" close=")" separator=",">
             #{classId}
         </foreach>
@@ -234,7 +234,7 @@
         SUM(t.score * (LENGTH(personal_student_user_ids) - LENGTH(REPLACE(personal_student_user_ids, ',', '')) + 1)) AS sumScore
         from base_student_assessment_inspection t
         inner join base_student_assessment_category t1 on t1.id = t.base_student_assessment_category_id
-        where t.delete_mark = 0
+        where t.delete_mark = 0 and t.enabled_mark = 1
         <if test="dto.classIdList != null and !dto.classIdList.isEmpty()">
             and t.class_ids in
             <foreach item="classId" index="index" collection="dto.classIdList" open="(" close=")" separator=",">
@@ -266,7 +266,7 @@
         from base_student_assessment_class_relation t
                  left join base_student_assessment_inspection t1 on t1.id = t.base_student_assessment_inspection_id
                  left join base_student_assessment_category t2 on t2.id = t1.base_student_assessment_category_id
-        where t2.code = 'convention_manage'
+        where t2.code = 'convention_manage' and t1.enabled_mark = 1
           and t.class_id in
         <foreach item="classId" index="index" collection="dto.classIdList" open="(" close=")" separator=",">
             #{classId}