道路线索应急巡查系统服务后台
feiyu02
2025-09-30 84569abda51ecf6c5549dec4cadee8d043422379
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package com.flightfeather.grid.web
 
import com.flightfeather.grid.domain.ds1.entity.ClueTask
import com.flightfeather.grid.service.ClueTaskService
import com.flightfeather.grid.vo.ClueInternalTaskVo
import com.flightfeather.grid.vo.ClueTaskOptions
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import io.swagger.annotations.ApiParam
import org.springframework.web.bind.annotation.*
 
@Api(tags = ["ClueTaskController"], description = "线索任务API接口")
@RestController
@RequestMapping("/clue/task")
class ClueTaskController(val clueTaskService: ClueTaskService) {
 
    @ApiOperation("创建内部线索巡查任务")
    @PutMapping("/create/internal")
    fun createInternalClueTask(
        @ApiParam("线索任务") @RequestBody clueInternalTaskVo: ClueInternalTaskVo,
    ) = resPack { clueTaskService.createInternalClueTask(clueInternalTaskVo) }
 
    @ApiOperation("创建线索巡查任务")
    @PutMapping("/create")
    fun createClueTask(
        @ApiParam("线索任务") @RequestBody clueTask: ClueTask,
    ) = resPack { clueTaskService.createClueTask(clueTask) }
 
    @ApiOperation("更新线索巡查任务")
    @PostMapping("/update")
    fun updateClueTask(
        @ApiParam("线索任务") @RequestBody clueTask: ClueTask,
    ) = resPack { clueTaskService.updateClueTask(clueTask) }
 
    @ApiOperation("查询线索任务")
    @PostMapping("/fetch")
    fun getClueTask(
        @ApiParam("线索任务") @RequestBody clueTask: ClueTask,
    ) = resPack { clueTaskService.getClueTask(clueTask) }
 
    @ApiOperation("查询线索任务")
    @PostMapping("/search")
    fun searchClueTask(
        @RequestParam("page", required = false) page: Int?,
        @RequestParam("per_page", required = false) perPage: Int?,
        @ApiParam("线索任务查询条件") @RequestBody clueTaskOptions: ClueTaskOptions,
    ) = resPack { clueTaskService.searchClueTask(clueTaskOptions, page, perPage) }
 
    @ApiOperation("删除线索任务")
    @DeleteMapping("/delete")
    fun deleteClueTask(
        @ApiParam("线索任务") @RequestBody clueTask: ClueTask,
    ) = resPack { clueTaskService.deleteClueTask(clueTask) }
 
    @ApiOperation("查询线索任务完成情况统计")
    @PostMapping("/summary")
    fun getClueTaskSummary(
        @ApiParam("线索任务查询条件") @RequestBody clueTaskOptions: ClueTaskOptions,
    ) = resPack { clueTaskService.getClueTaskSummary(clueTaskOptions) }
 
    @ApiOperation("完成线索任务")
    @PostMapping("/finish")
    fun finishClueTask(
        @ApiParam("线索任务id") @RequestParam clueTaskId: String,
    ) = resPack { clueTaskService.finishClueTask(clueTaskId) }
}