郑永安
2023-06-19 7a6abd05683528032687c75e80e0bd2030a3e46c
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
67
68
69
70
71
72
73
74
75
76
package com.gkhy.safePlatform.safeCheck.repository;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gkhy.safePlatform.safeCheck.entity.SafeCheckTaskAndQuota;
import com.gkhy.safePlatform.safeCheck.entity.WorkOrderRelatedDataDO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
 
import java.util.Date;
import java.util.List;
 
@Repository
public interface SafeCheckTaskAndQuotaRepository extends BaseMapper<SafeCheckTaskAndQuota> {
 
    /**
     * @description 将任务关联的指标插入到任务指标关联表中
     */
    int saveTaskAndQuotas(@Param("taskAndQuotas") List<SafeCheckTaskAndQuota> taskAndQuotas);
 
    /**
     * @description 根据任务id获取所有的任务关联的巡检点
     */
    List<SafeCheckTaskAndQuota> findTaskAndQuotaByTaskId(@Param("id") Long taskId);
 
 
    /**
     * @description 根据任务与巡检点关联表查询数据
     */
    SafeCheckTaskAndQuota getTaskAndQuotaById(@Param("id") int taskAndQuotaId);
 
    /**
     * @description 将任务关联的巡检点rfid相同的数据rfid定位状态都改为已定位
     */
    int updateRfidPositionStatusByTaskIdAndRfid(@Param("taskId") Long taskId, @Param("rfid") String rfid, @Param("rifdPositionStatus") Byte rifdPositionStatus);
 
    /**
     * @description 统计同一个任务的巡检点rfid相同的数量
     */
    int countRfidSameByTaskId(Long taskId, String rfid);
 
    /**
     * @description 将巡检点检查结果信息进行修改
     */
    int updatePointCheckResultByIdAndTaskId(@Param("taskAndQuota") SafeCheckTaskAndQuota safeCheckTaskAndQuota);
 
    /**
     * @description 查询该任务下巡检点是否还有没有定位的
     */
    List<String> selectNoRfidPositionByTaskId(Long taskId);
 
    /**
     * @description 查询该任务下巡检点是否还有没提交的
     */
    List<String> selectRfidNoReportByTaskId(Long taskId);
 
    /**
     * @description 统计巡检点中是否存在巡检异常的数据
     */
    int countRfidReportIsAbnormalByTaskId(Long taskId, Byte reportResult);
 
 
    /**
     * @description 根据任务id查询所有的巡检链数据
     */
    List<SafeCheckTaskAndQuota> listTaskAndQuotaByTaskId(Long taskId);
 
    /**
     * @description 根据任务id和巡检点对应的id查询巡检记录
     */
    SafeCheckTaskAndQuota getTaskAndQuotaByIdAndTaskId(int id, Long taskId);
 
    /**
     * 根据巡检指标id查询所有相关的数据rifd、region、point
     */
    WorkOrderRelatedDataDO getWorkOrderRelatedData(@Param("id") int id);
}