feiyu02
2024-08-15 196bb14112448857a885e32dc4149e308e00b01a
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
package cn.flightfeather.supervision.lightshare.service
 
import cn.flightfeather.supervision.domain.entity.SelfPatrolTask
import cn.flightfeather.supervision.lightshare.vo.BaseResponse
import cn.flightfeather.supervision.lightshare.vo.LedgerSubTypeVo
import cn.flightfeather.supervision.lightshare.vo.LedgerVo
import cn.flightfeather.supervision.lightshare.vo.SelfPatrolTaskVo
import org.springframework.web.multipart.MultipartFile
 
interface SelfPatrolService {
 
    fun getPatrolType(sceneType: Int): BaseResponse<List<LedgerSubTypeVo>>
 
    /**
     * 发布应急自巡查任务
     */
    fun publishTask(tasks: List<SelfPatrolTask>): BaseResponse<Boolean>
 
    /**
     * 获取该用户发布的自寻查任务
     */
    fun getPublishedTask(userId: String, date: String?): BaseResponse<List<SelfPatrolTaskVo>>
 
    /**
     * 获取发布给该用户的自巡查任务
     */
    fun getToTask(userId: String, date: String?): BaseResponse<List<SelfPatrolTask?>>
 
    /**
     * 获取自巡查任务的上传记录
     */
    fun getTaskRecord(taskId: String): BaseResponse<List<LedgerSubTypeVo>>
 
    /**
     * 上传自巡查图片等相关内容
     */
    fun uploadSelfPatrol(
        userId: String,
        taskId: String?,
        list: String,
        files: Array<MultipartFile>,
    ): BaseResponse<Boolean>
 
    /**
     * 上传自巡查不涉及
     */
    fun uploadNoSelfPatrol(userId: String, taskId: String?, time: String, remark: String?, idList: List<Int>): BaseResponse<String>
 
    fun getDetail(userId: String, subTypeId: Int, taskId: String): BaseResponse<LedgerVo?>
 
    fun getDetailList(taskId: String): BaseResponse<List<LedgerVo>>
 
    /**
     * 判断应急自巡查任务是否完成并更新状态
     * @param taskId 任务id
     * @param justFinishedNum 内存中刚完成的任务数(考虑刚执行任务记录的插入语句还未真正入库的情况)
     */
    fun checkSelfPatrolFinished(taskId: String?, justFinishedNum: Int)
}