Browse Source

课时量统计调整

dzx 13 hours ago
parent
commit
9a95c7fa5a

+ 4 - 1
src/main/java/com/xjrsoft/module/attendance/service/impl/AttendanceStatisticsServiceImpl.java

@@ -476,6 +476,7 @@ public class AttendanceStatisticsServiceImpl extends MPJBaseServiceImpl<Attendan
                 }
             }
             dataList.add(data);
+            sortCode ++;
         }
 
         int allColumn = 8 + statistics.getAttendanceDays();//总列数
@@ -487,7 +488,7 @@ public class AttendanceStatisticsServiceImpl extends MPJBaseServiceImpl<Attendan
         // 第一行表头
         createFirstTitle(workbook, sheet, allColumn - 1);
         // 第二行表头
-        createSecondTitle(workbook, sheet, statistics, 3);
+        createSecondTitle(workbook, sheet, statistics, 7);
         // 第三行表头
         createThirdTitle(workbook, sheet, weekList);
         // 第四行表头
@@ -654,6 +655,8 @@ public class AttendanceStatisticsServiceImpl extends MPJBaseServiceImpl<Attendan
         for(int i = 0; i < 7; i ++){
             sheet.autoSizeColumn(i);
         }
+        sheet.setColumnWidth(4, 10*256);
+        sheet.setColumnWidth(5, 10*256);
 
         int cellNumber = 8;
         for (String dayOfWeek : weekList) {

+ 5 - 2
src/main/java/com/xjrsoft/module/classtime/service/impl/ClassTimeStatisticsServiceImpl.java

@@ -831,6 +831,9 @@ public class ClassTimeStatisticsServiceImpl extends MPJBaseServiceImpl<ClassTime
                 List<CourseListVo> courseList = allCourseList.stream()
                         .filter(x -> x.getTeacherId().contains(teacher.getId().toString()))
                         .collect(Collectors.toList());
+                if(14954800729414L == teacher.getId()){
+                    System.out.println(111);
+                }
 
                 //循环,统计出各项数据
                 for (CourseListVo courseListVo : courseList) {
@@ -876,9 +879,9 @@ public class ClassTimeStatisticsServiceImpl extends MPJBaseServiceImpl<ClassTime
                     //取出最大总平均课时
                     Double maxClassTime4 = insertList.stream().mapToDouble(ClassTimeStatisticsRecord::getClassTime4).max().getAsDouble();
                     //计算超工作量基数
-                    if(!maxClassTime4.equals(time14)){
+                    if(!maxClassTime4.equals(time13)){
 
-                        overWorkloadNumber = BigDecimal.valueOf(time13).divide((BigDecimal.valueOf(maxClassTime4).subtract(BigDecimal.valueOf(time14))),2, RoundingMode.HALF_UP).doubleValue();
+                        overWorkloadNumber = BigDecimal.valueOf(time14).divide((BigDecimal.valueOf(maxClassTime4).subtract(BigDecimal.valueOf(time13))),2, RoundingMode.HALF_UP).doubleValue();
                     }
                 }
                 double allClassTime = insertList.stream().filter(x -> x.getAllClassTime() != null).mapToDouble(ClassTimeStatisticsRecord::getAllClassTime).sum();

+ 1 - 1
src/main/resources/mapper/classtime/ClassTimeStatisticsMapper.xml

@@ -18,7 +18,7 @@
     </select>
 
     <select id="getCourseList" parameterType="com.xjrsoft.module.classtime.entity.ClassTimeStatistics" resultType="com.xjrsoft.module.classtime.vo.CourseListVo">
-        SELECT t1.class_id, t1.teacher_id, t2.short_name,t1.adjust_type,t4.reason,t1.schedule_date,t1.class_name,t1.course_name,t1.time_number FROM course_table t1
+        SELECT DISTINCT t1.class_id, t1.teacher_id, t2.short_name,t1.adjust_type,t4.reason,t1.schedule_date,t1.class_name,t1.course_name,t1.time_number FROM course_table t1
         LEFT JOIN class_time t2 ON t1.time_period = t2.time_period AND t1.time_number = t2.number
         LEFT JOIN course_table_bak t3 ON t1.id = t3.id
         LEFT JOIN wf_course_adjust t4 ON t4.id = t3.wf_course_adjust_id