|
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;
|
}
|
|
|
|
|
|
|
}
|