|
@@ -0,0 +1,66 @@
|
|
|
+package com.ruoyi.web.work.controller;
|
|
|
+
|
|
|
+import java.util.Arrays;
|
|
|
+import java.util.List;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+import com.ruoyi.common.annotation.Log;
|
|
|
+import com.ruoyi.common.core.controller.BaseController;
|
|
|
+import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
+import com.ruoyi.common.enums.BusinessType;
|
|
|
+import com.ruoyi.web.work.domain.TaskList;
|
|
|
+import com.ruoyi.web.work.service.ITaskListService;
|
|
|
+import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 任务进度列
|
|
|
+ * @author lsw
|
|
|
+ * @date 2024-07-03
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/work/list")
|
|
|
+public class TaskListController extends BaseController {
|
|
|
+ @Autowired
|
|
|
+ private ITaskListService taskListService;
|
|
|
+
|
|
|
+ @PreAuthorize("@ss.hasPermi('work:list:list')")
|
|
|
+ @GetMapping("/list")
|
|
|
+ public TableDataInfo list(TaskList taskList){
|
|
|
+ startPage();
|
|
|
+ List<TaskList> list = taskListService.selectList(taskList);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PreAuthorize("@ss.hasPermi('work:list:query')")
|
|
|
+ @GetMapping(value = "/detail/{id}")
|
|
|
+ public AjaxResult detail(@PathVariable("id") Long id){
|
|
|
+ return AjaxResult.success(taskListService.getById(id));
|
|
|
+ }
|
|
|
+
|
|
|
+ @PreAuthorize("@ss.hasPermi('work:list:add')")
|
|
|
+ @Log(title = "任务进度列", businessType = BusinessType.INSERT)
|
|
|
+ @PostMapping("/add")
|
|
|
+ public AjaxResult add(@RequestBody TaskList taskList){
|
|
|
+ return toAjax(taskListService.save(taskList));
|
|
|
+ }
|
|
|
+
|
|
|
+ @PreAuthorize("@ss.hasPermi('work:list:edit')")
|
|
|
+ @Log(title = "任务进度列", businessType = BusinessType.UPDATE)
|
|
|
+ @PostMapping("/edit")
|
|
|
+ public AjaxResult edit(@RequestBody TaskList taskList){
|
|
|
+ return toAjax(taskListService.updateById(taskList));
|
|
|
+ }
|
|
|
+
|
|
|
+ @PreAuthorize("@ss.hasPermi('work:list:remove')")
|
|
|
+ @Log(title = "任务进度列", businessType = BusinessType.DELETE)
|
|
|
+ @GetMapping("/remove/{ids}")
|
|
|
+ public AjaxResult remove(@PathVariable Long[] ids){
|
|
|
+ return toAjax(taskListService.removeByIds(Arrays.asList(ids)));
|
|
|
+ }
|
|
|
+}
|