提交 f7ca8218 编写于 作者: tangyaolong's avatar tangyaolong

补充实体

上级 31e23118
......@@ -17,6 +17,7 @@ import cn.ibizlab.core.lite.service.*;
import cn.ibizlab.core.lite.service.impl.MetaModelServiceImpl;
import cn.ibizlab.core.rule.domain.RuleItem;
import cn.ibizlab.core.rule.service.IRuleItemService;
import cn.ibizlab.util.dict.Option;
import cn.ibizlab.util.errors.BadRequestAlertException;
import cn.ibizlab.util.errors.InternalServerErrorException;
import com.alibaba.fastjson.JSON;
......@@ -38,10 +39,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.*;
/**
* 实体[模型] 自定义服务对象
......@@ -237,7 +235,6 @@ public class MetaModelExService extends MetaModelServiceImpl {
LinkedHashSet<String> entities = new LinkedHashSet<>();
// 查询模型
MetaModel metaModel = metaModelService.get(et.getId());
// 查询模型对应的N个规则
for (RuleItem ruleItem : metaModel.getRuleitems()) {
JSONObject fieldSet = JSONObject.parseObject(ruleItem.getFieldSet());
......@@ -293,6 +290,10 @@ public class MetaModelExService extends MetaModelServiceImpl {
private List<EntityModel> getEntityModel(String modelId) {
List<EntityModel> entityModels = new ArrayList<>();
DataModel dataModel = liteModelService.getDataModel(modelId);
dataModel.getAllProperty().forEach(property -> {
EntityModel model = liteModelService.getEntityModel(property.getSystem(),property.getPropertyEntity());
entityModels.add(model);
});
List<Property> parents = dataModel.getParentProperty();
LinkedHashSet<DataModel> childs = dataModel.getNestedDataModels();
for(Property parent : parents){
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册