hfxc226 3 years ago
parent
commit
2357e91b52

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

@@ -23,27 +23,32 @@ public class CheckJobReportVO implements Serializable {
     /**
      * 月份
      */
-    @Excel(name = "月份", orderNum = "1")
+    @Excel(name = "年", orderNum = "1")
+    private String year;
+    /**
+     * 月份
+     */
+    @Excel(name = "月份", orderNum = "2")
     private String month;
     /**
      * 每月总数
      */
-    @Excel(name = "总数", orderNum = "2")
+    @Excel(name = "总数", orderNum = "3")
     private Integer totalNum;
     /**
      * 完成数
      */
-    @Excel(name = "完成数", orderNum = "3")
+    @Excel(name = "完成数", orderNum = "4")
     private Integer totalFinishNum;
     /**
      * 未完成数
      */
-    @Excel(name = "未完成数", orderNum = "4")
+    @Excel(name = "未完成数", orderNum = "5")
     private Integer totalWaitNum;
     /**
      * 完成率
      */
-    @Excel(name = "完成率", orderNum = "5")
+    @Excel(name = "完成率", orderNum = "6")
     private String finishRate;
 
     /**

+ 1 - 1
platform-dao/src/main/resources/mapper/check/CheckJobMapper.xml

@@ -205,7 +205,7 @@
             <include refid="List_Condition"/>
         </where>
         Order By
-        checkjob.start_time asc,
+        checkjob.status asc,
         sbinfo.level asc,
         sbinfo.no asc,
         standard.period_type asc,

+ 29 - 25
platform-rest/src/main/java/com/platform/rest/controller/report/CheckJobReportController.java

@@ -36,35 +36,37 @@ import java.util.List;
 @RequestMapping("/report/check/jobs")
 public class CheckJobReportController {
 
-  private final  CheckJobService checkJobService;
+    private final CheckJobService checkJobService;
 
-  /**
-   * 保养任务每月统计报表导出
-   * @param dto 查询条件
-   * @param year 查询年份
-   * @return R
-   */
-  @SysLog("保养任务每月统计报表")
-  @GetMapping("")
-  public R getMonthReportByYear(CheckJobDTO dto, @RequestParam(required = false) Integer year, @RequestParam(required = false) LocalDate startMonth, @RequestParam(required = false) LocalDate endMonth){
-      return new R(checkJobService.getMonthReport(dto, year, startMonth, endMonth));
-  }
+    /**
+     * 保养任务每月统计报表导出
+     *
+     * @param dto  查询条件
+     * @param year 查询年份
+     * @return R
+     */
+    @SysLog("保养任务每月统计报表")
+    @GetMapping("")
+    public R getMonthReportByYear(CheckJobDTO dto, @RequestParam(required = false) Integer year, @RequestParam(required = false) LocalDate startMonth, @RequestParam(required = false) LocalDate endMonth) {
+        return new R(checkJobService.getMonthReport(dto, year, startMonth, endMonth));
+    }
 
     /**
      * 保养任务每月统计报表导出
-     * @param dto 查询条件
+     *
+     * @param dto  查询条件
      * @param year 查询年份
      * @return R
      */
     @GetMapping("/export")
     @SysLog("保养任务每月统计报表导出")
-    public void export(HttpServletResponse response, CheckJobDTO dto, @RequestParam(required = false) Integer year,@RequestParam(required = false) LocalDate startMonth, @RequestParam(required = false) LocalDate endMonth) {
+    public void export(HttpServletResponse response, CheckJobDTO dto, @RequestParam(required = false) Integer year, @RequestParam(required = false) LocalDate startMonth, @RequestParam(required = false) LocalDate endMonth) {
         List<CheckJobReportVO> list = checkJobService.getMonthReport(dto, year, startMonth, endMonth);
         String fileName = "";
-        if(year == null){
-            fileName =  DateUtils.dateToString(startMonth, DateUtils.PATTERN_YMD) + "-" + DateUtils.dateToString(endMonth, DateUtils.PATTERN_YMD)  + "-保养任务统计报表";
-        }else{
-            fileName =  year + "年-保养任务统计报表";
+        if (year == null) {
+            fileName = DateUtils.dateToString(startMonth, DateUtils.PATTERN_YMD) + "-" + DateUtils.dateToString(endMonth, DateUtils.PATTERN_YMD) + "-保养任务统计报表";
+        } else {
+            fileName = year + "年-保养任务统计报表";
         }
         ExcelUtil.exportResponseDict(response, CheckJobReportVO.class, list, fileName);
     }
@@ -85,19 +87,21 @@ public class CheckJobReportController {
 
     /**
      * 保养任务每月统计报表导出
-     * @param dto 查询条件
+     *
+     * @param dto  查询条件
      * @param year 查询年份
      * @return R
      */
     @SysLog("保养任务周工作负荷统计报表")
     @GetMapping("week")
-    public R getWeekReportByYear(CheckJobDTO dto, @RequestParam(required = false) Integer year,@RequestParam(required = false) LocalDate startMonth, @RequestParam(required = false) LocalDate endMonth){
+    public R getWeekReportByYear(CheckJobDTO dto, @RequestParam(required = false) Integer year, @RequestParam(required = false) LocalDate startMonth, @RequestParam(required = false) LocalDate endMonth) {
         return new R(checkJobService.getWeekReport(dto, year, startMonth, endMonth));
     }
 
     /**
      * 保养任务每月统计报表导出
-     * @param dto 查询条件
+     *
+     * @param dto  查询条件
      * @param year 查询年份
      * @return R
      */
@@ -106,10 +110,10 @@ public class CheckJobReportController {
     public void exportWeekReportByYear(HttpServletResponse response, CheckJobDTO dto, @RequestParam(required = false) Integer year, @RequestParam(required = false) LocalDate startMonth, @RequestParam(required = false) LocalDate endMonth) {
         List<CheckJobReportWeekHoursVO> list = checkJobService.getWeekReport(dto, year, startMonth, endMonth);
         String fileName = "";
-        if(year == null){
-            fileName =  DateUtils.dateToString(startMonth, DateUtils.PATTERN_YMD) + "-" + DateUtils.dateToString(endMonth, DateUtils.PATTERN_YMD)  + "-保养任务每周工作负荷统计报表";
-        }else{
-            fileName =  year + "年-保养任务每周工作负荷统计报表";
+        if (year == null) {
+            fileName = DateUtils.dateToString(startMonth, DateUtils.PATTERN_YMD) + "-" + DateUtils.dateToString(endMonth, DateUtils.PATTERN_YMD) + "-保养任务每周工作负荷统计报表";
+        } else {
+            fileName = year + "年-保养任务每周工作负荷统计报表";
         }
         ExcelUtil.exportResponseDict(response, CheckJobReportWeekHoursVO.class, list, fileName);
     }

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

@@ -826,9 +826,6 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
             searchEndTime = DateUtils.getLastDayOfMonth(endMonth);
         }
         // 选择非计划性的订单
-        //List<Integer> categoryList = new ArrayList<Integer>();
-        //categoryList.add(RepairApplicationFormCategoryEnum.PLAN_NOT.getValue());
-        //categoryList.add(RepairApplicationFormCategoryEnum.PLAN.getValue());
         repairApplicationFormDTO.setCategory(RepairApplicationFormCategoryEnum.PLAN_NOT.getValue());
 
         repairApplicationFormDTO.setSearchStartTime(searchStartTime);