xiongchao 3 years ago
parent
commit
1faa30914f

+ 5 - 0
platform-dao/src/main/java/com/platform/dao/vo/report/CheckJobReportVO.java

@@ -2,6 +2,7 @@ package com.platform.dao.vo.report;
 
 import com.platform.common.bean.DataScope;
 import com.platform.dao.entity.operate.Article;
+import com.platform.dao.vo.query.check.CheckJobVO;
 import com.platform.office.annotation.Excel;
 import lombok.Data;
 import lombok.experimental.Accessors;
@@ -45,4 +46,8 @@ public class CheckJobReportVO implements Serializable {
     @Excel(name = "完成率", orderNum = "5")
     private String finishRate;
 
+    /**
+     * 明细列表
+     */
+    List<CheckJobVO> detailList;
 }

+ 7 - 0
platform-dao/src/main/java/com/platform/dao/vo/report/CheckJobReportWeekHoursVO.java

@@ -1,10 +1,13 @@
 package com.platform.dao.vo.report;
 
+import com.platform.dao.vo.query.check.CheckJobVO;
+import com.platform.dao.vo.repair.RepairApplicationFormVO;
 import com.platform.office.annotation.Excel;
 import lombok.Data;
 import lombok.experimental.Accessors;
 
 import java.io.Serializable;
+import java.util.List;
 
 /**
  * @author cyz
@@ -29,4 +32,8 @@ public class CheckJobReportWeekHoursVO implements Serializable {
     @Excel(name = "可用工时", orderNum = "3")
     private Double useHours;
 
+    /**
+     * 明细列表
+     */
+    List<CheckJobVO> detailList;
 }

+ 6 - 0
platform-dao/src/main/java/com/platform/dao/vo/report/RepairReport24VO.java

@@ -1,5 +1,6 @@
 package com.platform.dao.vo.report;
 
+import com.platform.dao.vo.repair.RepairApplicationFormVO;
 import com.platform.office.annotation.Excel;
 import lombok.Data;
 import lombok.experimental.Accessors;
@@ -26,4 +27,9 @@ public class RepairReport24VO implements Serializable {
      */
     @Excel(name = "次数", orderNum = "2")
     private Integer num;
+
+    /**
+     * 明细列表
+     */
+    List<RepairApplicationFormVO> detailList;
 }

+ 7 - 0
platform-dao/src/main/java/com/platform/dao/vo/report/RepairReportMttr.java

@@ -1,10 +1,12 @@
 package com.platform.dao.vo.report;
 
+import com.platform.dao.vo.repair.RepairApplicationFormVO;
 import com.platform.office.annotation.Excel;
 import lombok.Data;
 import lombok.experimental.Accessors;
 
 import java.io.Serializable;
+import java.util.List;
 
 /**
  *
@@ -37,4 +39,9 @@ public class RepairReportMttr implements Serializable {
      */
     @Excel(name = "平均修复时间(小时)", orderNum = "4")
     private Double mttr;
+
+    /**
+     * 明细列表
+     */
+    List<RepairApplicationFormVO> detailList;
 }

+ 9 - 6
platform-service/src/main/java/com/platform/service/check/impl/CheckJobServiceImpl.java

@@ -1217,7 +1217,8 @@ public class CheckJobServiceImpl extends BaseServiceImpl<CheckJobMapper, CheckJo
         List<CheckJobReportVO> result = new ArrayList<CheckJobReportVO>();
         for(Map<String, LocalDateTime> map: monthStartAndEndList){
             CheckJobReportVO vo = new CheckJobReportVO();
-            vo.setMonth(searchStartTime.getYear() + "-" + map.get("searchStartTimeMonth").getMonthValue() + "月");
+            List<CheckJobVO> detailList = new ArrayList<CheckJobVO>();
+            vo.setMonth(map.get("searchStartTimeMonth").getYear() + "-" + map.get("searchStartTimeMonth").getMonthValue() + "月");
             int totalNum = 0;
             int totalFinishNum = 0;
             int totalWaitNum = 0;
@@ -1225,6 +1226,7 @@ public class CheckJobServiceImpl extends BaseServiceImpl<CheckJobMapper, CheckJo
             for(CheckJobVO checkJob: list){
                 if(checkJob.getStartTime().isAfter(map.get("searchStartTimeMonth").toLocalDate()) && checkJob.getStartTime().isBefore(map.get("searchEndTimeMonth").toLocalDate())){
                     totalNum ++;
+                    detailList.add(checkJob);
                     if(checkJob.getStatus().equals(CheckJobStatusEnum.FINISHED.getValue())){
                         totalFinishNum ++;
                     }
@@ -1234,12 +1236,12 @@ public class CheckJobServiceImpl extends BaseServiceImpl<CheckJobMapper, CheckJo
             if(totalNum != 0){
                 totalWaitNum = totalNum - totalFinishNum;
                 finishRate = BigDecimalUtil.decimal(BigDecimalUtil.div(totalFinishNum*100, totalNum),2);
-                System.out.println(finishRate);
             }
             vo.setTotalNum(totalNum);
             vo.setTotalFinishNum(totalFinishNum);
             vo.setTotalWaitNum(totalWaitNum);
             vo.setFinishRate(finishRate+"%");
+            vo.setDetailList(detailList);
             result.add(vo);
         }
         return result;
@@ -1263,26 +1265,27 @@ public class CheckJobServiceImpl extends BaseServiceImpl<CheckJobMapper, CheckJo
         int i = 1;
         for(Map<String, LocalDateTime> map: monthStartAndEndList){
             CheckJobReportWeekHoursVO vo = new CheckJobReportWeekHoursVO();
+            List<CheckJobVO> detailList = new ArrayList<CheckJobVO>();
             vo.setWeek((i++) + "周");
             double totalHours = 0;
             for(CheckJobVO checkJob: list){
-                System.out.println("checkJob.getStandardHours(): " + checkJob.getStandardHours());
                 if(checkJob.getStartTime().isAfter(map.get("searchStartTimeWeek").toLocalDate()) && checkJob.getStartTime().isBefore(map.get("searchEndTimeWeek").toLocalDate())){
                     String standardHours = checkJob.getStandardHours();
+                    detailList.add(checkJob);
                     if(StringUtils.isBlank(checkJob.getStandardHours())){
                         continue;
                     }else{
                         totalHours = totalHours + Double.valueOf(standardHours);
-                        System.out.println("totalHours: " + totalHours);
                     }
                 }
             }
             vo.setTotalHours(totalHours);
+            vo.setDetailList(detailList);
             result.add(vo);
         }
-        for(CheckJobReportWeekHoursVO r: result){
+       /* for(CheckJobReportWeekHoursVO r: result){
             System.out.println(r.toString());
-        }
+        }*/
         return result;
     }
 }

+ 8 - 3
platform-service/src/main/java/com/platform/service/repair/impl/RepairApplicationFormServiceImpl.java

@@ -722,11 +722,11 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
         repairApplicationFormDTO.setSearchStartTime(searchStartTime);
         repairApplicationFormDTO.setSearchEndTime(searchEndTime);
         List<RepairApplicationFormVO> list = mapper.selectPageList(repairApplicationFormDTO);
-
         List<RepairReport24VO> result = new ArrayList<RepairReport24VO>();
         for(Map<String, LocalDateTime> map: monthStartAndEndList){
             RepairReport24VO vo = new RepairReport24VO();
-            vo.setMonth(searchStartTime.getYear() + "-" + map.get("searchStartTimeMonth").getMonthValue() + "月");
+            List<RepairApplicationFormVO> detailList = new ArrayList<RepairApplicationFormVO>();
+            vo.setMonth(map.get("searchStartTimeMonth").getYear() + "-" + map.get("searchStartTimeMonth").getMonthValue() + "月");
             int i = 0;
             for(RepairApplicationFormVO repairApplicationForm: list){
                 if(repairApplicationForm.getDealMinutes() == null){
@@ -740,9 +740,11 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
                 }
                 if(repairApplicationForm.getApplyTime().isAfter(map.get("searchStartTimeMonth")) && repairApplicationForm.getApplyTime().isBefore(map.get("searchEndTimeMonth"))){
                     i++;
+                    detailList.add(repairApplicationForm);
                 }
             }
             vo.setNum(i);
+            vo.setDetailList(detailList);
             result.add(vo);
         }
         return result;
@@ -793,7 +795,8 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
         List<RepairReportMttr> result = new ArrayList<RepairReportMttr>();
         for(Map<String, LocalDateTime> map: monthStartAndEndList){
             RepairReportMttr vo = new RepairReportMttr();
-            vo.setMonth(searchStartTime.getYear() + "-" + map.get("searchStartTimeMonth").getMonthValue() + "月");
+            List<RepairApplicationFormVO> detailList = new ArrayList<RepairApplicationFormVO>();
+            vo.setMonth(map.get("searchStartTimeMonth").getYear() + "-" + map.get("searchStartTimeMonth").getMonthValue() + "月");
             double totalMinuties = 0.0;
             double meanMinuties = 0.0;
             int i = 0;
@@ -803,6 +806,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
                 }
                 if(repairApplicationForm.getApplyTime().isAfter(map.get("searchStartTimeMonth")) && repairApplicationForm.getApplyTime().isBefore(map.get("searchEndTimeMonth"))){
                     i++;
+                    detailList.add(repairApplicationForm);
                     totalMinuties = totalMinuties + repairApplicationForm.getDealMinutes();
                 }
             }
@@ -815,6 +819,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
             vo.setTotalHours(totalMinuties);
             vo.setMttr(meanMinuties);
             vo.setNum(i);
+            vo.setDetailList(detailList);
             result.add(vo);
         }
         for(RepairReportMttr r: result){