mac
2023-11-28 31d32567ce92d2a3bc77865a6a1cec2635c9dc46
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
 
package com.hdl.linkpm.sdk.template.bean;
/*
 *create by wxr
 *date 2022/1/23
 */
 
import com.hdl.linkpm.sdk.template.GsonUtils;
 
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.UUID;
 
public class TemplateBean implements Serializable,Cloneable {
 
    @Override
    public TemplateBean clone() throws CloneNotSupportedException {
        try {
            TemplateBean tt = GsonUtils.copy(this, TemplateBean.class);
            if (tt != null) {
                return tt;
            }
        } catch (Exception e) {
            e.printStackTrace();
            return (TemplateBean) super.clone();
        }
        return (TemplateBean) super.clone();
    }
 
 
    public String getDebugFlag() {
        return debugFlag;
    }
 
    public void setDebugFlag(String debugFlag) {
        this.debugFlag = debugFlag;
    }
 
    private String debugFlag ;
 
    private String templateExtendsId;//    模板id    string
    private String templateName;//    模板名称    string
    private String projectType;//    项目类型    string
    private String houseLayoutId;//    户型id    string
    private String houseLayoutName;//    户型名称    string
    private String templateSourcePlatform;//    来源    string
    private String templateSourceDesc;//    应用软件    string
    private String modifyTime;//    更新时间    long
 
 
//    /**
//     * 已经匹配实际设备过的模板
//     */
//    List<TemplateDeviceBean> alreadyMatchedTemplateList = new ArrayList<>();
//
//    public List<TemplateDeviceBean> getAlreadyMatchedTemplateList() {
//        return alreadyMatchedTemplateList;
//    }
//
//    public void setAlreadyMatchedTemplateList(List<TemplateDeviceBean> alreadyMatchedTemplateList) {
//        this.alreadyMatchedTemplateList = alreadyMatchedTemplateList;
//    }
    /**
     * 用来记录真实设备下sid对应模板功能的sid
     */
    private HashMap<String,String> sidMap = new HashMap<>();
 
    public HashMap<String, String> getSidMap() {
        return sidMap;
    }
 
    public void setSidMap(HashMap<String, String> sidMap) {
        this.sidMap = sidMap;
    }
 
//    /**
//     * 已经配置的设备的mac列表  新的方式不需要在这里记录, 在其他地方记录 2022年5月22日 22:40:33
//     */
//    private List<String> matchMacList = new ArrayList<>();
//
//    public List<String> getMatchMacList() {
//        if (matchMacList == null) {
//            return new ArrayList<>();
//        }
//        return matchMacList;
//    }
 
    /**
     * 保存本地时使用的ID
     */
    private String localId;
    public String getLocalId() {
        if(localId == null || localId.equals("")){
            localId = UUID.randomUUID().toString().replace("-","");
        }
        return localId;
    }
 
    public void setLocalId(String localId) {
        this.localId = localId;
    }
 
 
    public String getTemplateExtendsId() {
        return templateExtendsId == null ? "" : templateExtendsId;
    }
    public void setTemplateExtendsId(String templateExtendsId) {
        this.templateExtendsId = templateExtendsId;
    }
 
    public String getTemplateName() {
        return templateName == null ? "" : templateName;
    }
 
    public void setTemplateName(String templateName) {
        this.templateName = templateName;
    }
 
    public String getProjectType() {
        return projectType == null ? "" : projectType;
    }
 
    public void setProjectType(String projectType) {
        this.projectType = projectType;
    }
 
    public String getHouseLayoutId() {
        return houseLayoutId == null ? "" : houseLayoutId;
    }
 
    public void setHouseLayoutId(String houseLayoutId) {
        this.houseLayoutId = houseLayoutId;
    }
 
    public String getHouseLayoutName() {
        return houseLayoutName == null ? "" : houseLayoutName;
    }
 
    public void setHouseLayoutName(String houseLayoutName) {
        this.houseLayoutName = houseLayoutName;
    }
 
    public String getTemplateSourcePlatform() {
        return templateSourcePlatform == null ? "" : templateSourcePlatform;
    }
 
    public void setTemplateSourcePlatform(String templateSourcePlatform) {
        this.templateSourcePlatform = templateSourcePlatform;
    }
 
    public String getTemplateSourceDesc() {
        return templateSourceDesc == null ? "" : templateSourceDesc;
    }
 
    public void setTemplateSourceDesc(String templateSourceDesc) {
        this.templateSourceDesc = templateSourceDesc;
    }
 
    public String getModifyTime() {
        return modifyTime == null ? "" : modifyTime;
    }
 
    public void setModifyTime(String modifyTime) {
        this.modifyTime = modifyTime;
    }
 
    private boolean inLocal = false;
    private boolean inCloud = false;
 
    public boolean isInLocal() {
        return inLocal;
    }
 
    public void setInLocal(boolean inLocal) {
        this.inLocal = inLocal;
    }
 
    public boolean isInCloud() {
        return inCloud;
    }
 
    public void setInCloud(boolean inCloud) {
        this.inCloud = inCloud;
    }
 
    //网关消息
    private List<TemplateGatewayBean> gatewayList = new ArrayList<>();
    //房间信息
    private List<TemplateRoomPackBean.TemplateRoomInfoBean> spatilaInfo = new ArrayList<>();
    //设备信息
    private List<TemplateDeviceBean> deviceList = new ArrayList<>();
    //功能信息
    private List<TemplateFunctionBean> functionList = new ArrayList<>();
    //场景信息
    private List<TemplateSceneBean> sceneList = new ArrayList<>();
    //安防信息
    private List<TemplateSecurityBean> securityList = new ArrayList<>();
 
    //自动化信息
    private List<TemplateLogicBean> logicList = new ArrayList<>();
 
 
    public List<TemplateGatewayBean> getGatewayList() {
        if (gatewayList == null) {
            return new ArrayList<>();
        }
        return gatewayList;
    }
 
    public void setGatewayList(List<TemplateGatewayBean> gatewayList) {
        this.gatewayList = gatewayList;
    }
 
    public List<TemplateRoomPackBean.TemplateRoomInfoBean> getSpatilaInfo() {
        if (spatilaInfo == null) {
            return new ArrayList<>();
        }
        return spatilaInfo;
    }
 
    public List<TemplateRoomPackBean.TemplateRoomInfoBean> getRoomList() {
        List<TemplateRoomPackBean.TemplateRoomInfoBean> roomInfoBeans = new ArrayList<>();
        for (TemplateRoomPackBean.TemplateRoomInfoBean bean : getSpatilaInfo()) {
//            if (bean.getRoomType().equals("ROOM"))
            {
                roomInfoBeans.add((bean));
            }
        }
        return roomInfoBeans;
    }
 
    public List<TemplateRoomPackBean.TemplateRoomInfoBean> getFloorList() {
        List<TemplateRoomPackBean.TemplateRoomInfoBean> roomInfoBeans = new ArrayList<>();
        for (TemplateRoomPackBean.TemplateRoomInfoBean bean : getSpatilaInfo()) {
            if (bean.getRoomType().equals("FLOOR"))
            {
                roomInfoBeans.add((bean));
            }
        }
        return roomInfoBeans;
    }
 
    public void setSpatilaInfo(List<TemplateRoomPackBean.TemplateRoomInfoBean> spatilaInfo) {
        this.spatilaInfo = spatilaInfo;
    }
 
    /**
     * 模板设备列表
     * @return 模板设备列表
     */
    public List<TemplateDeviceBean> getDeviceList() {
        if (deviceList == null) {
            return new ArrayList<>();
        }
        return deviceList;
    }
 
    public void setDeviceList(List<TemplateDeviceBean> deviceList) {
        this.deviceList = deviceList;
    }
 
    public List<TemplateFunctionBean> getFunctionList() {
        if (functionList == null) {
            return new ArrayList<>();
        }
        return functionList;
    }
 
    public void setFunctionList(List<TemplateFunctionBean> functionList) {
        this.functionList = functionList;
    }
 
    public List<TemplateSceneBean> getSceneList() {
        if (sceneList == null) {
            return new ArrayList<>();
        }
        return sceneList;
    }
 
    public void setSceneList(List<TemplateSceneBean> sceneList) {
        this.sceneList = sceneList;
    }
 
    public List<TemplateLogicBean> getLogicList() {
        if (logicList == null) {
            return new ArrayList<>();
        }
        return logicList;
    }
 
    public void setLogicList(List<TemplateLogicBean> logicList) {
        this.logicList = logicList;
    }
 
 
    public List<TemplateSecurityBean> getSecurityList() {
        if (securityList == null) {
            return new ArrayList<>();
        }
        return securityList;
    }
 
    public void setSecurityList(List<TemplateSecurityBean> securityList) {
        this.securityList = securityList;
    }
 
 
 
 
 
 
}