|
@@ -46,8 +46,8 @@ public class SceneInfoService extends SuperService {
|
|
|
|
|
|
|
|
public ResultContent saveInfo(SceneInfoParam param) {
|
|
public ResultContent saveInfo(SceneInfoParam param) {
|
|
|
boolean isAdd = true;
|
|
boolean isAdd = true;
|
|
|
- SceneInfo entity = null;
|
|
|
|
|
|
|
|
|
|
|
|
+ SceneInfo entity = null;
|
|
|
SceneInfo temp = sceneInfoDao.findTopByName(param.getName());
|
|
SceneInfo temp = sceneInfoDao.findTopByName(param.getName());
|
|
|
// SceneInfo codeTemp = sceneInfoDao.findTopByCode(param.getCode());
|
|
// SceneInfo codeTemp = sceneInfoDao.findTopByCode(param.getCode());
|
|
|
if (StringUtils.isNotEmpty(param.getId())) {
|
|
if (StringUtils.isNotEmpty(param.getId())) {
|
|
@@ -179,6 +179,12 @@ public class SceneInfoService extends SuperService {
|
|
|
|
|
|
|
|
//--------------------------场景组件信息 end-----------------------
|
|
//--------------------------场景组件信息 end-----------------------
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 转换应用基本信息模型
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param entity
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
public SceneInfoModel toModel(SceneInfo entity) {
|
|
public SceneInfoModel toModel(SceneInfo entity) {
|
|
|
SceneInfoModel model = new SceneInfoModel();
|
|
SceneInfoModel model = new SceneInfoModel();
|
|
|
if (ObjectUtils.isNotEmpty(entity)) {
|
|
if (ObjectUtils.isNotEmpty(entity)) {
|
|
@@ -187,16 +193,28 @@ public class SceneInfoService extends SuperService {
|
|
|
return model;
|
|
return model;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 转换应用模型 (包含组件)
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param entity
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
public SceneInfoAboutComModel toAboutComModel(SceneInfo entity) {
|
|
public SceneInfoAboutComModel toAboutComModel(SceneInfo entity) {
|
|
|
SceneInfoAboutComModel model = new SceneInfoAboutComModel();
|
|
SceneInfoAboutComModel model = new SceneInfoAboutComModel();
|
|
|
if (ObjectUtils.isNotEmpty(entity)) {
|
|
if (ObjectUtils.isNotEmpty(entity)) {
|
|
|
BeanUtils.copyProperties(entity, model);
|
|
BeanUtils.copyProperties(entity, model);
|
|
|
// 场景包含的组件
|
|
// 场景包含的组件
|
|
|
- model.setComponents(getSceneAllComponents(entity.getId()));
|
|
|
|
|
|
|
+ model.setChildren(getSceneAllComponents(entity.getId()));
|
|
|
}
|
|
}
|
|
|
return model;
|
|
return model;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 转换组件模型
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param entity
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
public SceneComponentModel toComponentModel(SceneComponent entity) {
|
|
public SceneComponentModel toComponentModel(SceneComponent entity) {
|
|
|
SceneComponentModel model = new SceneComponentModel();
|
|
SceneComponentModel model = new SceneComponentModel();
|
|
|
if (ObjectUtils.isNotEmpty(entity)) {
|
|
if (ObjectUtils.isNotEmpty(entity)) {
|