Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzlite
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzlite
提交
5dc9819a
提交
5dc9819a
编写于
11月 06, 2020
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
model 设计
上级
4ac44d13
变更
5
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
196 行增加
和
63 行删除
+196
-63
app-form-json.vue
app_web/src/components/app-form-json/app-form-json.vue
+6
-61
MetaModelExService.java
...n/ibizlab/core/extensions/service/MetaModelExService.java
+30
-0
Model.java
...ain/java/cn/ibizlab/core/lite/extensions/model/Model.java
+2
-2
TmpModel.java
.../java/cn/ibizlab/core/lite/extensions/model/TmpModel.java
+144
-0
LiteCoreResource.java
...java/cn/ibizlab/api/rest/extensions/LiteCoreResource.java
+14
-0
未找到文件。
app_web/src/components/app-form-json/app-form-json.vue
浏览文件 @
5dc9819a
...
...
@@ -122,50 +122,11 @@ export default class AppFormJson extends Vue {
}
let
_schema
=
{
"title"
:
"model"
,
"type"
:
"object"
,
"format"
:
"grid"
,
"properties"
:
{
"id"
:
{
"title"
:
"标识"
,
"type"
:
"string"
,
"options"
:
{
"grid_columns"
:
4
},
"propertyOrder"
:
1
},
"name"
:
{
"title"
:
"名称"
,
"type"
:
"string"
,
"options"
:
{
"grid_columns"
:
4
},
"propertyOrder"
:
2
},
"system"
:
{
"title"
:
"系统"
,
"type"
:
"string"
,
"options"
:
{
"grid_columns"
:
4
},
"propertyOrder"
:
3
},
"factEntity"
:
{
"title"
:
"事实实体"
,
"type"
:
"string"
,
"options"
:
{
"grid_columns"
:
4
},
"propertyOrder"
:
4
},
"model"
:
{
"$ref"
:
"#/definitions/model"
}
},
"$ref"
:
"#/definitions/model"
,
"definitions"
:
{
"model"
:
{
"title"
:
"模型"
,
"headerTemplate"
:
"{{ self.dataModelName }}"
,
"headerTemplate"
:
"{{ self.dataModelName }}"
,
"type"
:
"object"
,
"format"
:
"grid"
,
"properties"
:
{
...
...
@@ -184,7 +145,7 @@ export default class AppFormJson extends Vue {
"uniqueItems"
:
true
,
"items"
:
{
"title"
:
"对象"
,
"headerTemplate"
:
"{{ self.propertyName }}"
,
"headerTemplate"
:
"{{ self.propertyName }}"
,
"type"
:
"object"
,
"properties"
:
{
"propertyName"
:
{
...
...
@@ -258,7 +219,7 @@ export default class AppFormJson extends Vue {
"format"
:
"tabs"
,
"uniqueItems"
:
true
,
"items"
:
{
"title"
:
"子模型"
,
"title"
:
"子模型"
,
"$ref"
:
"#/definitions/model"
},
"propertyOrder"
:
3
...
...
@@ -272,29 +233,13 @@ export default class AppFormJson extends Vue {
"title"
:
"映射"
,
"type"
:
"object"
,
"properties"
:
{
"selfPropertyName"
:
{
"title"
:
"对象"
,
"type"
:
"string"
,
"options"
:
{
"grid_columns"
:
4
},
"propertyOrder"
:
1
},
"selfPropertyColumn"
:
{
"title"
:
"列"
,
"type"
:
"string"
,
"options"
:
{
"grid_columns"
:
4
},
"propertyOrder"
:
2
},
"parentPropertyName"
:
{
"title"
:
"父模型对象"
,
"type"
:
"string"
,
"options"
:
{
"grid_columns"
:
4
},
"propertyOrder"
:
3
"propertyOrder"
:
1
},
"parentPropertyColumn"
:
{
"title"
:
"父模型列"
,
...
...
@@ -302,7 +247,7 @@ export default class AppFormJson extends Vue {
"options"
:
{
"grid_columns"
:
4
},
"propertyOrder"
:
4
"propertyOrder"
:
2
}
}
},
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/extensions/service/MetaModelExService.java
浏览文件 @
5dc9819a
package
cn
.
ibizlab
.
core
.
extensions
.
service
;
import
cn.ibizlab.core.lite.extensions.model.DataModel
;
import
cn.ibizlab.core.lite.extensions.model.TmpModel
;
import
cn.ibizlab.core.lite.service.impl.MetaModelServiceImpl
;
import
cn.ibizlab.util.errors.BadRequestAlertException
;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.extern.slf4j.Slf4j
;
import
cn.ibizlab.core.lite.domain.MetaModel
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Primary
;
import
org.springframework.util.StringUtils
;
import
java.util.*
;
/**
...
...
@@ -29,7 +35,31 @@ public class MetaModelExService extends MetaModelServiceImpl {
@Override
@Transactional
public
MetaModel
change
(
MetaModel
et
)
{
if
((!
StringUtils
.
isEmpty
(
et
.
getConfig
()))&&
et
.
getConfig
().
indexOf
(
"releations"
)>
0
)
{
TmpModel
tmpModel
=
JSONObject
.
parseObject
(
et
.
getConfig
(),
TmpModel
.
class
);
DataModel
root
=
tmpModel
.
getDataModels
();
if
(
tmpModel
.
getTables
().
size
()>
0
)
{
System
.
out
.
println
(
tmpModel
.
getTables
());
//throw new BadRequestAlertException("结构分析失败","MetaModel",tmpModel.getFactEntity());
}
else
et
.
setConfig
(
JSONObject
.
toJSONString
(
root
));
}
return
super
.
change
(
et
);
}
@Override
public
boolean
create
(
MetaModel
et
)
{
change
(
et
);
return
super
.
create
(
et
);
}
@Override
public
boolean
update
(
MetaModel
et
)
{
change
(
et
);
return
super
.
update
(
et
);
}
}
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/model/Model.java
浏览文件 @
5dc9819a
...
...
@@ -38,11 +38,11 @@ public class Model {
public
static
void
main
(
String
[]
arg
)
{
String
jsonstr
=
"{\"
id\":\"sjmx1\",\"name\":\"一审公诉\",\"system\":\"tyyw2plus\",\"factEntity\":\"T_TYYW_XJ_YSGS_AJ\",\"model\":{\"dataModelName1\":\"案件\",\"objectProperties\":[{\"propertyName\":\"审查起诉表\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_XJ_YSGS_AJ\",\"propertyMappings\":[]},{\"propertyName\":\"案情摘要表\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_GG_AQZY\",\"propertyMappings\":[{\"selfPropertyColumn\":\"BMSAH\",\"JoinPropertyName1\":\"审查起诉表\",\"joinPropertyColumn\":\"BMSAH\"}]},{\"propertyName\":\"案件运行表\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"AJ_YX_AJ\",\"propertyMappings\":[{\"selfPropertyColumn\":\"BMSAH\",\"JoinPropertyName1\":\"审查起诉表\",\"joinPropertyColumn\":\"BMSAH\"}]},{\"propertyName\":\"侦查活动监督表\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_GG_ZCHDJD\",\"propertyMappings\":[{\"selfPropertyColumn\":\"BMSAH\",\"JoinPropertyName1\":\"审查起诉表\",\"joinPropertyColumn\":\"BMSAH\"}]},{\"propertyName\":\"审判活动监督表\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_GG_SPHDJD\",\"propertyMappings\":[{\"selfPropertyColumn\":\"BMSAH\",\"JoinPropertyName1\":\"审查起诉表\",\"joinPropertyColumn\":\"BMSAH\"}]}],\"nestedDataModels\":[{\"dataModelName\":\"嫌疑人\",\"objectProperties\":[{\"propertyName\":\"嫌疑人一审\",\"system\":\"tyywplus\",\"propertyEntity\":\"T_TYYW_XJ_YSGS_XYR\",\"propertyMappings\":[]},{\"propertyName\":\"自然人历史信息\",\"system\":\"tyywplus\",\"propertyEntity\":\"T_TYYW_GG_ZRRSJLS\",\"propertyMappings\":[{\"selfPropertyColumn\":\"BMSAH\",\"JoinPropertyName1\":\"嫌疑人一审\",\"joinPropertyColumn\":\"BMSAH\"},{\"selfPropertyColumn\":\"ZRRBM\",\"JoinPropertyName1\":\"嫌疑人一审\",\"joinPropertyColumn\":\"ZRRBM\"}]}],\"layerMappings\":[{\"selfPropertyName1\":\"嫌疑人一审\",\"selfPropertyColumn\":\"BMSAH\",\"parentPropertyName1\":\"审查起诉表\",\"parentPropertyColumn\":\"BMSAH\"}],\"nestedDataModels\":[{\"dataModelName\":\"强制措施\",\"objectProperties\":[{\"propertyName\":\"强制措施表\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_GG_QZCSQK\",\"propertyMappings\":[]}],\"nestedDataModels\":[],\"layerMappings\":[{\"selfPropertyName1\":\"强制措施表\",\"selfPropertyColumn\":\"BMSAH\",\"parentPropertyName1\":\"嫌疑人一审\",\"parentPropertyColumn\":\"BMSAH\"},{\"selfPropertyName1\":\"强制措施表\",\"selfPropertyColumn\":\"ZRRBM\",\"parentPropertyName1\":\"嫌疑人一审\",\"parentPropertyColumn\":\"ZRRBM\"}]},{\"dataModelName\":\"留置措施\",\"objectProperties\":[{\"propertyName\":\"留置措施表\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_GG_LZCSQK\",\"propertyMappings\":[]}],\"nestedDataModels\":[],\"layerMappings\":[{\"selfPropertyName1\":\"留置措施表\",\"selfPropertyColumn\":\"BMSAH\",\"parentPropertyName1\":\"嫌疑人一审\",\"parentPropertyColumn\":\"BMSAH\"},{\"selfPropertyName1\":\"留置措施表\",\"selfPropertyColumn\":\"ZRRBM\",\"parentPropertyName1\":\"嫌疑人一审\",\"parentPropertyColumn\":\"ZRRBM\"}]}]},{\"dataModelName\":\"受理日志\",\"objectProperties\":[{\"propertyName\":\"受理日志表\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"AJ_YX_SLRZ\",\"propertyMappings\":[]}],\"layerMappings\":[{\"selfPropertyName1\":\"受理日志表\",\"selfPropertyColumn\":\"BMSAH\",\"parentPropertyName1\":\"审查起诉表\",\"parentPropertyColumn\":\"BMSAH\"}]},{\"dataModelName\":\"线索移交\",\"objectProperties\":[{\"propertyName\":\"线索移交情况表\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_GG_XSYJQK\",\"propertyMappings\":[]}],\"nestedDataModels\":[],\"layerMappings\":[{\"selfPropertyName1\":\"线索移交情况表\",\"selfPropertyColumn\":\"BMSAH\",\"parentPropertyName1\":\"审查起诉表\",\"parentPropertyColumn\":\"BMSAH\"}]},{\"dataModelName\":\"检察建议\",\"objectProperties\":[{\"propertyName\":\"检察建议表\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_GG_JCJYQK\",\"propertyMappings\":[]}],\"nestedDataModels\":[],\"layerMappings\":[{\"selfPropertyName1\":\"检察建议表\",\"selfPropertyColumn\":\"BMSAH\",\"parentPropertyName1\":\"审查起诉表\",\"parentPropertyColumn\":\"BMSAH\"}]}]}
}"
;
String
jsonstr
=
"{\"
dataModelName\":\"T_TYYW_XJ_YSGS_AJ\",\"objectProperties\":[{\"propertyName\":\"T_TYYW_XJ_YSGS_AJ\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_XJ_YSGS_AJ\",\"propertyMappings\":[]},{\"propertyName\":\"T_TYYW_GG_AQZY\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_GG_AQZY\",\"propertyMappings\":[{\"selfPropertyColumn\":\"BMSAH\",\"joinPropertyName\":\"T_TYYW_XJ_YSGS_AJ\",\"joinPropertyColumn\":\"BMSAH\"}]},{\"propertyName\":\"AJ_YX_AJ\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"AJ_YX_AJ\",\"propertyMappings\":[{\"selfPropertyColumn\":\"BMSAH\",\"joinPropertyName\":\"T_TYYW_XJ_YSGS_AJ\",\"joinPropertyColumn\":\"BMSAH\"}]},{\"propertyName\":\"T_TYYW_GG_ZCHDJD\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_GG_ZCHDJD\",\"propertyMappings\":[{\"selfPropertyColumn\":\"BMSAH\",\"joinPropertyName\":\"T_TYYW_XJ_YSGS_AJ\",\"joinPropertyColumn\":\"BMSAH\"}]},{\"propertyName\":\"T_TYYW_GG_SPHDJD\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_GG_SPHDJD\",\"propertyMappings\":[{\"selfPropertyColumn\":\"BMSAH\",\"joinPropertyName\":\"T_TYYW_XJ_YSGS_AJ\",\"joinPropertyColumn\":\"BMSAH\"}]},{\"propertyName\":\"T_TYYW_GG_ZSCQQK\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_GG_ZSCQQK\",\"propertyMappings\":[{\"selfPropertyColumn\":\"BMSAH\",\"joinPropertyName\":\"T_TYYW_XJ_YSGS_AJ\",\"joinPropertyColumn\":\"BMSAH\"}]}],\"nestedDataModels\":[{\"dataModelName\":\"T_TYYW_XJ_YSGS_XYR\",\"objectProperties\":[{\"propertyName\":\"T_TYYW_XJ_YSGS_XYR\",\"system\":\"tyywplus\",\"propertyEntity\":\"T_TYYW_XJ_YSGS_XYR\",\"propertyMappings\":[]},{\"propertyName\":\"T_TYYW_GG_ZRRSJLS\",\"system\":\"tyywplus\",\"propertyEntity\":\"T_TYYW_GG_ZRRSJLS\",\"propertyMappings\":[{\"selfPropertyColumn\":\"BMSAH\",\"joinPropertyName\":\"T_TYYW_XJ_YSGS_XYR\",\"joinPropertyColumn\":\"BMSAH\"},{\"selfPropertyColumn\":\"ZRRBM\",\"joinPropertyName\":\"T_TYYW_XJ_YSGS_XYR\",\"joinPropertyColumn\":\"ZRRBM\"}]}],\"nestedDataModels\":[{\"dataModelName\":\"T_TYYW_GG_QZCSQK\",\"objectProperties\":[{\"propertyName\":\"T_TYYW_GG_QZCSQK\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_GG_QZCSQK\",\"propertyMappings\":[]}],\"nestedDataModels\":[],\"layerMappings\":[{\"selfPropertyColumn\":\"BMSAH\",\"parentPropertyColumn\":\"BMSAH\"},{\"selfPropertyColumn\":\"ZRRBM\",\"parentPropertyColumn\":\"ZRRBM\"}]},{\"dataModelName\":\"T_TYYW_GG_LZCSQK\",\"objectProperties\":[{\"propertyName\":\"T_TYYW_GG_LZCSQK\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_GG_LZCSQK\",\"propertyMappings\":[]}],\"nestedDataModels\":[],\"layerMappings\":[{\"selfPropertyColumn\":\"BMSAH\",\"parentPropertyColumn\":\"BMSAH\"},{\"selfPropertyColumn\":\"ZRRBM\",\"parentPropertyColumn\":\"ZRRBM\"}]}],\"layerMappings\":[{\"selfPropertyColumn\":\"BMSAH\",\"parentPropertyColumn\":\"BMSAH\"}]},{\"dataModelName\":\"AJ_YX_SLRZ\",\"objectProperties\":[{\"propertyName\":\"AJ_YX_SLRZ\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"AJ_YX_SLRZ\",\"propertyMappings\":[]}],\"nestedDataModels\":[],\"layerMappings\":[{\"selfPropertyColumn\":\"BMSAH\",\"parentPropertyColumn\":\"BMSAH\"}]},{\"dataModelName\":\"T_TYYW_GG_XSYJQK\",\"objectProperties\":[{\"propertyName\":\"T_TYYW_GG_XSYJQK\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_GG_XSYJQK\",\"propertyMappings\":[]}],\"nestedDataModels\":[],\"layerMappings\":[{\"selfPropertyColumn\":\"BMSAH\",\"parentPropertyColumn\":\"BMSAH\"}]},{\"dataModelName\":\"T_TYYW_GG_JCJYQK\",\"objectProperties\":[{\"propertyName\":\"T_TYYW_GG_JCJYQK\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_GG_JCJYQK\",\"propertyMappings\":[]}],\"nestedDataModels\":[],\"layerMappings\":[{\"selfPropertyColumn\":\"BMSAH\",\"parentPropertyColumn\":\"BMSAH\"}]}],\"layerMappings\":[]
}"
;
JSONObject
jo
=
JSON
.
parseObject
(
jsonstr
);
Model
model
=
JSONObject
.
toJavaObject
(
jo
,
Model
.
class
);
DataModel
model
=
JSONObject
.
toJavaObject
(
jo
,
Data
Model
.
class
);
System
.
out
.
println
(
JSONObject
.
toJSONString
(
model
));
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/model/TmpModel.java
0 → 100644
浏览文件 @
5dc9819a
package
cn
.
ibizlab
.
core
.
lite
.
extensions
.
model
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
lombok.experimental.Accessors
;
import
org.springframework.util.ObjectUtils
;
import
java.util.LinkedHashSet
;
@Getter
@Setter
@NoArgsConstructor
@Accessors
(
chain
=
true
)
public
class
TmpModel
{
@JSONField
(
ordinal
=
3
)
private
String
id
;
@JSONField
(
ordinal
=
1
)
private
String
factEntity
;
@JSONField
(
ordinal
=
2
)
private
String
factEntityName
;
@JSONField
(
ordinal
=
4
)
private
LinkedHashSet
<
String
>
tables
;
@JSONField
(
ordinal
=
5
)
private
LinkedHashSet
<
ReleationModel
>
releations
=
new
LinkedHashSet
<>();
@Getter
@Setter
@NoArgsConstructor
@Accessors
(
chain
=
true
)
public
static
class
ReleationModel
{
@JSONField
(
ordinal
=
1
)
private
String
entity
;
@JSONField
(
ordinal
=
3
)
private
String
entityName
;
@JSONField
(
ordinal
=
2
)
private
String
refEntity
;
@JSONField
(
ordinal
=
4
)
private
String
refEntityName
;
@JSONField
(
ordinal
=
5
)
private
LinkedHashSet
<
LookupModel
>
lookups
;
}
@Getter
@Setter
@NoArgsConstructor
@Accessors
(
chain
=
true
)
public
static
class
LookupModel
{
@JSONField
(
ordinal
=
1
)
private
String
field
;
@JSONField
(
ordinal
=
2
)
private
String
refField
;
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
DataModel
getDataModels
()
{
DataModel
dataModel
=
new
DataModel
();
dataModel
.
setDataModelName
(
this
.
getFactEntity
());
Property
property
=
new
Property
();
property
.
setOwnerDataModel
(
dataModel
);
property
.
setPropertyEntity
(
this
.
getFactEntity
());
property
.
setPropertyName
(
this
.
getFactEntity
());
property
.
setSystem
(
"tyyw2plus"
);
tables
.
remove
(
this
.
getFactEntity
());
dataModel
.
getObjectProperties
().
add
(
property
);
getPropertyByEntity
(
dataModel
).
forEach
(
item
->
dataModel
.
getObjectProperties
().
add
(
item
));
dataModel
.
setNestedDataModels
(
getDataModelsByParent
(
dataModel
));
return
dataModel
;
}
public
LinkedHashSet
<
DataModel
>
getDataModelsByParent
(
DataModel
parentEntity
)
{
LinkedHashSet
<
DataModel
>
list
=
new
LinkedHashSet
<>();
this
.
getReleations
().
forEach
(
releationModel
->
{
if
(
releationModel
.
getRefEntity
().
equalsIgnoreCase
(
parentEntity
.
getDataModelName
()))
{
DataModel
dataModel
=
new
DataModel
();
dataModel
.
setDataModelName
(
releationModel
.
getEntity
());
LinkedHashSet
<
LayerMapping
>
layerMappings
=
new
LinkedHashSet
<>();
releationModel
.
getLookups
().
forEach
(
lookupModel
->
{
LayerMapping
layerMapping
=
new
LayerMapping
();
layerMapping
.
setSelfPropertyColumn
(
lookupModel
.
getField
());
layerMapping
.
setParentPropertyColumn
(
lookupModel
.
getRefField
());
layerMappings
.
add
(
layerMapping
);
});
Property
property
=
new
Property
();
property
.
setOwnerDataModel
(
dataModel
);
property
.
setPropertyEntity
(
releationModel
.
getEntity
());
property
.
setPropertyName
(
releationModel
.
getEntity
());
property
.
setSystem
(
"tyyw2plus"
);
tables
.
remove
(
releationModel
.
getEntity
());
dataModel
.
getObjectProperties
().
add
(
property
);
dataModel
.
setLayerMappings
(
layerMappings
);
dataModel
.
setParentDataModel
(
parentEntity
);
getPropertyByEntity
(
dataModel
).
forEach
(
item
->
dataModel
.
getObjectProperties
().
add
(
item
));
LinkedHashSet
<
DataModel
>
nestedDataModels
=
getDataModelsByParent
(
dataModel
);
if
(!
ObjectUtils
.
isEmpty
(
nestedDataModels
))
dataModel
.
setNestedDataModels
(
nestedDataModels
);
list
.
add
(
dataModel
);
}
});
return
list
;
}
public
LinkedHashSet
<
Property
>
getPropertyByEntity
(
DataModel
dataModel
)
{
LinkedHashSet
<
Property
>
list
=
new
LinkedHashSet
<>();
this
.
getReleations
().
forEach
(
releationModel
->
{
if
(
releationModel
.
getEntity
().
equalsIgnoreCase
(
dataModel
.
getFactPorperty
().
getPropertyEntity
()))
{
if
(
dataModel
.
getParentDataModel
()!=
null
&&
dataModel
.
getParentDataModel
().
getDataModelName
().
equalsIgnoreCase
(
releationModel
.
getRefEntity
()))
return
;
Property
property
=
new
Property
();
property
.
setOwnerDataModel
(
dataModel
);
property
.
setPropertyEntity
(
releationModel
.
getRefEntity
());
property
.
setPropertyName
(
releationModel
.
getRefEntity
());
property
.
setSystem
(
"tyyw2plus"
);
tables
.
remove
(
releationModel
.
getRefEntity
());
releationModel
.
getLookups
().
forEach
(
lookupModel
->
{
PropertyMapping
propertyMapping
=
new
PropertyMapping
();
propertyMapping
.
setSelfPropertyColumn
(
lookupModel
.
getRefField
());
propertyMapping
.
setSelfProperty
(
property
);
propertyMapping
.
setJoinPropertyColumn
(
lookupModel
.
getField
());
propertyMapping
.
setJoinPropertyName
(
releationModel
.
getEntity
());
property
.
getPropertyMappings
().
add
(
propertyMapping
);
});
dataModel
.
getObjectProperties
().
add
(
property
);
}
});
return
list
;
}
}
ibzlite-provider/ibzlite-provider-api/src/main/java/cn/ibizlab/api/rest/extensions/LiteCoreResource.java
浏览文件 @
5dc9819a
此差异已折叠。
点击以展开。
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录