zhubaomin
2025-04-11 a1744d0bf7f0ad8ac861d672cffd7c710dac4e7e
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.dy.pipIrrGlobal.daoIr;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dy.pipIrrGlobal.pojoIr.IrIntakeOperate;
import com.dy.pipIrrGlobal.voIr.VoIntakeResult;
import com.dy.pipIrrGlobal.voIr.VoToTerminateIntakes;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
 
import java.util.List;
 
/**
 * @author ZhuBaoMin
 * @date 2025-04-02 10:54
 * @LastEditTime 2025-04-02 10:54
 * @Description
 */
 
@Mapper
public interface IrIntakeOperateMapper extends BaseMapper<IrIntakeOperate> {
    int deleteByPrimaryKey(Long id);
 
    int insert(IrIntakeOperate record);
 
    int insertSelective(IrIntakeOperate record);
 
    IrIntakeOperate selectByPrimaryKey(Long id);
 
    int updateByPrimaryKeySelective(IrIntakeOperate record);
 
    int updateByPrimaryKey(IrIntakeOperate record);
 
    /**
     * 根据命令ID更新取水口操作记录
     * @param commandId
     * @param commandResult
     * @return
     */
    int updateByCommandId(@Param("commandId") Long commandId, @Param("commandResult") Byte commandResult, @Param("failureFactors") String failureFactors);
 
    /**
     * 根据计划ID获取待终止的取水口ID(已发布开发命令,无论是否成功)
     * @param planId
     * @return
     */
    List<Long> getToTerminateIntakeIds(Long planId);
 
    /**
     * 根据计划ID获取待终止的命令ID
     * @param planId
     * @return
     */
    List<Long> getTerminateCommandIds(Long planId);
 
    /**
     * 根据计划ID获取待终止的取水口列表(开阀成功的)
     * @param planId
     * @return
     */
    List<VoToTerminateIntakes> getToTerminateIntakes(Long planId);
 
    /**
     * 根据计划ID及管轮组ID获取取水口发布发布结果
     * @param planId
     * @param groupId
     * @return
     */
    List<VoIntakeResult> getIntakeResult(@Param("planId") Long planId, @Param("groupId") Long groupId);
 
    /**
     * 根据计划ID获取取水口命令发布失败数量,灌溉计划详情页使用
     * @param planId
     * @return
     */
    Integer getFailureCount(Long planId);
}