leutu
2024-06-03 3ef35e6cd16bbfa206b26bb3271eac40ad020bcb
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
package com.fastbee.iot.service;
 
import com.fastbee.common.core.iot.response.IdentityAndName;
import com.fastbee.iot.domain.ThingsModel;
import com.fastbee.iot.model.ImportThingsModelInput;
import com.fastbee.iot.model.ThingsModelPerm;
import com.fastbee.iot.model.ThingsModels.PropertyDto;
import com.fastbee.iot.model.ThingsModels.ThingsItems;
 
import java.util.List;
import java.util.Map;
 
/**
 * 物模型Service接口
 * 
 * @author kerwincui
 * @date 2021-12-16
 */
public interface IThingsModelService 
{
    /**
     * 查询物模型
     * 
     * @param modelId 物模型主键
     * @return 物模型
     */
    public ThingsModel selectThingsModelByModelId(Long modelId);
 
    /**
     * 查询单个物模型
     * @param model 物模型
     * @return 单个物模型
     */
    public ThingsModel selectSingleThingsModel(ThingsModel model);
 
    /**
     * 查询物模型列表
     * 
     * @param thingsModel 物模型
     * @return 物模型集合
     */
    public List<ThingsModel> selectThingsModelList(ThingsModel thingsModel);
 
    /**
     * 查询物模型对应设备分享用户权限列表
     *
     * @param productId 产品ID
     */
    public List<ThingsModelPerm> selectThingsModelPermList(Long productId);
 
    /**
     * 查询物模型列表-轮询使用
     *
     * @param thingsModel 物模型
     * @return 物模型集合
     */
    public Map<Integer, List<IdentityAndName>> selectThingsModelListCache(ThingsModel thingsModel);
 
    /**
     * 新增物模型
     * 
     * @param thingsModel 物模型
     * @return 结果
     */
    public int insertThingsModel(ThingsModel thingsModel);
 
    /**
     * 从模板导入物模型
     * @param input
     * @return
     */
    public int importByTemplateIds(ImportThingsModelInput input);
 
    /**
     * 修改物模型
     * 
     * @param thingsModel 物模型
     * @return 结果
     */
    public int updateThingsModel(ThingsModel thingsModel);
 
    /**
     * 批量删除物模型
     * 
     * @param modelIds 需要删除的物模型主键集合
     * @return 结果
     */
    public int deleteThingsModelByModelIds(Long[] modelIds);
 
    /**
     * 删除物模型信息
     * 
     * @param modelId 物模型主键
     * @return 结果
     */
    public int deleteThingsModelByModelId(Long modelId);
 
    /**
     * 根据产品ID获取JSON物模型
     * @param productId
     * @return
     */
    public String getCacheThingsModelByProductId(Long productId);
 
 
    /**
     * 获取单个物模型获取
     * @param productId
     * @param identify
     * @return
     */
    public PropertyDto getSingleThingModels(Long productId, String identify);
 
 
    /**
     * 批量查询产品的缓存物模型
     * @param productIds
     * @return
     */
    public Map<String, String> getBatchCacheThingsModelByProductIds(Long[] productIds);
 
    /**
     * 导入采集点数据
     * @param lists 数据列表
     * @param tempSlaveId 从机编码
     * @return 结果
     */
    public String importData(List<ThingsModel> lists,Integer tempSlaveId);
 
    /**
     * 根据模板id查询从机采集点列表
     *
     * @return 变量模板从机采集点集合
     */
    public List<ThingsModel> selectAllByTemplateId(Long templateId);
 
    /**
     * 根据产品id删除 产品物模型以及物模型缓存
     * @param productId
     */
    public void deleteProductThingsModelAndCacheByProductId(Long productId);
 
    /**
     * 同步采集点模板
     * @param productIds
     */
    public void synchronizeVarTempToProduct(List<Long> productIds,Long templateId);
 
 
}