Browse Source

bug修复

dzx 6 months ago
parent
commit
c4da124f20

+ 10 - 19
src/main/java/com/xjrsoft/module/databoard/controller/DatadetailController.java

@@ -104,9 +104,11 @@ public class DatadetailController {
 
         List<WorkflowExtra> workflowExtras = extraService.list(
                 new MPJLambdaWrapper<WorkflowExtra>()
+                        .select(WorkflowExtra::getId)
                         .select(WorkflowExtra.class, x -> VoToColumnUtil.fieldsToColumns(WorkflowExtra.class).contains(x.getProperty()))
                         .leftJoin(WorkflowSchema.class, WorkflowSchema::getId, WorkflowExtra::getSchemaId)
                         .leftJoin(DictionaryDetail.class, DictionaryDetail::getId, WorkflowSchema::getCategory)
+                        .orderByDesc("t.end_time")
         );
 
 
@@ -170,28 +172,17 @@ public class DatadetailController {
         result.setDistributionList(distributionList);
         List<DurationVo> durationList = new ArrayList<>();
 
-        List<Duration> timeDifferences = new ArrayList<>();
+        List<Long> secondList = new ArrayList<>();
         completeCountList.stream().filter(el -> el.getEndTime() != null && el.getStartTime() != null).forEach(el -> {
-            Duration diff = Duration.between(el.getEndTime(), el.getStartTime());
-            timeDifferences.add(diff);
+            Duration diff = Duration.between(el.getStartTime(), el.getEndTime());
+            secondList.add(diff.getSeconds());
         });
 
-        int zeroHour = 0;
-        int oneHour = 0;
-        int fourHour = 0;
-        int eightHour = 0;
-        for (Duration timeDifference : timeDifferences) {
-            long seconds = timeDifference.getSeconds();
-            if(seconds < 3600){
-                zeroHour ++;
-            }else if(seconds < 14400){
-                oneHour ++;
-            }else if(seconds < 28800){
-                fourHour ++;
-            }else{
-                eightHour ++;
-            }
-        }
+        long zeroHour = secondList.stream().filter(x -> x < 3600L).count();
+        long oneHour = secondList.stream().filter(x -> x < 14400L && x >= 3600L).count();
+        long fourHour = secondList.stream().filter(x -> x < 28800L && x >= 14400L).count();
+        long eightHour = secondList.stream().filter(x -> x >= 28800L).count();
+
         DurationVo zeroVo = new DurationVo();
         zeroVo.setDuration("0-1h");
         zeroVo.setCount(zeroHour);

+ 1 - 1
src/main/java/com/xjrsoft/module/databoard/vo/DurationVo.java

@@ -22,6 +22,6 @@ public class DurationVo {
     * 完成总数
     */
     @ApiModelProperty("数量")
-    private Integer count;
+    private Long count;
 
 }

+ 3 - 0
src/main/java/com/xjrsoft/module/student/vo/StudentReportRecordPageVo.java

@@ -44,4 +44,7 @@ public class StudentReportRecordPageVo {
     @ApiModelProperty("是否已报到(1:是 0:否)")
     private Integer isReport;
 
+    @ApiModelProperty("毕业学校")
+    private String graduatedUniversity;
+
 }

+ 1 - 1
src/main/resources/mapper/student/StudentReportRecordMapper.xml

@@ -38,7 +38,7 @@
     </select>
     <select id="getMobilePage" parameterType="com.xjrsoft.module.student.dto.StudentReportRecordPageDto"
             resultType="com.xjrsoft.module.student.vo.StudentReportRecordPageVo">
-        SELECT t1.id as user_id,t1.name,t1.credential_number,t1.mobile,t4.name AS stduy_status_cn,t5.telephone AS parent_mobile,
+        SELECT t1.id as user_id,t1.name,t1.credential_number,t1.mobile,t4.name AS stduy_status_cn,t5.telephone AS parent_mobile,t2.graduated_university,
         (select count(*) from student_report_record where user_id = t1.id and base_semester_id = #{dto.baseSemesterId} and delete_mark = 0) as is_report FROM xjr_user t1
         INNER JOIN base_student_school_roll t2 ON t1.id = t2.user_id
         INNER JOIN base_class t3 ON t2.class_id = t3.id