春风项目四线(合箱线、总装线)
yyt
2024-02-21 a9406b6b18ee5a8e29cad3248f46320a36ac9749
提交 | 用户 | 时间
fd2207 1 package com.jcdm.quartz.controller;
2
3 import java.util.List;
4 import javax.servlet.http.HttpServletResponse;
5 import org.springframework.beans.factory.annotation.Autowired;
6 import org.springframework.security.access.prepost.PreAuthorize;
7 import org.springframework.web.bind.annotation.DeleteMapping;
8 import org.springframework.web.bind.annotation.GetMapping;
9 import org.springframework.web.bind.annotation.PathVariable;
10 import org.springframework.web.bind.annotation.PostMapping;
11 import org.springframework.web.bind.annotation.RequestMapping;
12 import org.springframework.web.bind.annotation.RestController;
13 import com.jcdm.common.annotation.Log;
14 import com.jcdm.common.core.controller.BaseController;
15 import com.jcdm.common.core.domain.AjaxResult;
16 import com.jcdm.common.core.page.TableDataInfo;
17 import com.jcdm.common.enums.BusinessType;
18 import com.jcdm.common.utils.poi.ExcelUtil;
19 import com.jcdm.quartz.domain.SysJobLog;
20 import com.jcdm.quartz.service.ISysJobLogService;
21
22 /**
23  * 调度日志操作处理
24  * 
25  * @author jc
26  */
27 @RestController
28 @RequestMapping("/monitor/jobLog")
29 public class SysJobLogController extends BaseController
30 {
31     @Autowired
32     private ISysJobLogService jobLogService;
33
34     /**
35      * 查询定时任务调度日志列表
36      */
37     @PreAuthorize("@ss.hasPermi('monitor:job:list')")
38     @GetMapping("/list")
39     public TableDataInfo list(SysJobLog sysJobLog)
40     {
41         startPage();
42         List<SysJobLog> list = jobLogService.selectJobLogList(sysJobLog);
43         return getDataTable(list);
44     }
45
46     /**
47      * 导出定时任务调度日志列表
48      */
49     @PreAuthorize("@ss.hasPermi('monitor:job:export')")
50     @Log(title = "任务调度日志", businessType = BusinessType.EXPORT)
51     @PostMapping("/export")
52     public void export(HttpServletResponse response, SysJobLog sysJobLog)
53     {
54         List<SysJobLog> list = jobLogService.selectJobLogList(sysJobLog);
55         ExcelUtil<SysJobLog> util = new ExcelUtil<SysJobLog>(SysJobLog.class);
56         util.exportExcel(response, list, "调度日志");
57     }
58     
59     /**
60      * 根据调度编号获取详细信息
61      */
62     @PreAuthorize("@ss.hasPermi('monitor:job:query')")
63     @GetMapping(value = "/{jobLogId}")
64     public AjaxResult getInfo(@PathVariable Long jobLogId)
65     {
66         return success(jobLogService.selectJobLogById(jobLogId));
67     }
68
69
70     /**
71      * 删除定时任务调度日志
72      */
73     @PreAuthorize("@ss.hasPermi('monitor:job:remove')")
74     @Log(title = "定时任务调度日志", businessType = BusinessType.DELETE)
75     @DeleteMapping("/{jobLogIds}")
76     public AjaxResult remove(@PathVariable Long[] jobLogIds)
77     {
78         return toAjax(jobLogService.deleteJobLogByIds(jobLogIds));
79     }
80
81     /**
82      * 清空定时任务调度日志
83      */
84     @PreAuthorize("@ss.hasPermi('monitor:job:remove')")
85     @Log(title = "调度日志", businessType = BusinessType.CLEAN)
86     @DeleteMapping("/clean")
87     public AjaxResult clean()
88     {
89         jobLogService.cleanJobLog();
90         return success();
91     }
92 }