sfd
2025-05-23 b8fed13b2db09ba79b21bb792ce5161bac62e29b
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
77
78
79
80
81
82
83
84
85
86
package com.aps.core.mapper;
 
import com.aps.core.domain.ApsGasPipelinePrediction;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.jetbrains.annotations.NotNull;
 
import java.util.List;
import java.util.Map;
import java.util.Set;
 
/**
 * 管路手工气体预测数据Mapper接口
 * 
 * @author ruoyi
 * @date 2025-05-19
 */
public interface ApsGasPipelinePredictionMapper extends BaseMapper<ApsGasPipelinePrediction> 
{
    /**
     * 查询管路手工气体预测数据
     * 
     * @param id 管路手工气体预测数据主键
     * @return 管路手工气体预测数据
     */
    public ApsGasPipelinePrediction selectApsGasPipelinePredictionById(Long id);
 
    /**
     * 查询管路手工气体预测数据列表
     * 
     * @param apsGasPipelinePrediction 管路手工气体预测数据
     * @return 管路手工气体预测数据集合
     */
    public List<ApsGasPipelinePrediction> selectApsGasPipelinePredictionList(ApsGasPipelinePrediction apsGasPipelinePrediction);
 
    /**
     * 新增管路手工气体预测数据
     * 
     * @param apsGasPipelinePrediction 管路手工气体预测数据
     * @return 结果
     */
    public int insertApsGasPipelinePrediction(ApsGasPipelinePrediction apsGasPipelinePrediction);
 
    /**
     * 修改管路手工气体预测数据
     * 
     * @param apsGasPipelinePrediction 管路手工气体预测数据
     * @return 结果
     */
    public int updateApsGasPipelinePrediction(ApsGasPipelinePrediction apsGasPipelinePrediction);
 
    /**
     * 删除管路手工气体预测数据
     * 
     * @param id 管路手工气体预测数据主键
     * @return 结果
     */
    public int deleteApsGasPipelinePredictionById(Long id);
 
    /**
     * 批量删除管路手工气体预测数据
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteApsGasPipelinePredictionByIds(Long[] ids);
 
    void deleteAll();
 
    @Select("""
        <script>
            select id,  factory || '##' || material_code || '##' || TO_CHAR(predict_date, 'yyyy-MM') as key
             from aps_gas_pipeline_prediction
            where 1 = 0
            <if test="!keys.isEmpty()">or factory || '##' || material_code || '##' || TO_CHAR(predict_date, 'yyyy-MM') in
                <foreach collection="keys" item="item" open="(" separator="," close=")">
                    #{item}
                </foreach>
            </if>
        </script>
    """)
    List<Map<String, Object>> selectByFacOrMaterial(@NotNull Set<String> keys);
 
}