Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzlite
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzlite
提交
84b10ba1
提交
84b10ba1
编写于
10月 30, 2020
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tmp
上级
2bd98e51
变更
12
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
791 行增加
和
72 行删除
+791
-72
package.json
app_web/package.json
+2
-0
app-form-json.less
app_web/src/components/app-form-json/app-form-json.less
+21
-0
app-form-json.vue
app_web/src/components/app-form-json/app-form-json.vue
+351
-0
user-register.ts
app_web/src/user-register.ts
+2
-0
main-form-base.vue
app_web/src/widgets/meta-model/main-form/main-form-base.vue
+1
-1
tsconfig.json
app_web/tsconfig.json
+11
-0
DataModel.java
...ava/cn/ibizlab/core/lite/extensions/domain/DataModel.java
+0
-71
DataModel.java
...java/cn/ibizlab/core/lite/extensions/model/DataModel.java
+105
-0
LayerMapping.java
...a/cn/ibizlab/core/lite/extensions/model/LayerMapping.java
+103
-0
Model.java
...ain/java/cn/ibizlab/core/lite/extensions/model/Model.java
+46
-0
Property.java
.../java/cn/ibizlab/core/lite/extensions/model/Property.java
+54
-0
PropertyMapping.java
...n/ibizlab/core/lite/extensions/model/PropertyMapping.java
+95
-0
未找到文件。
app_web/package.json
浏览文件 @
84b10ba1
...
@@ -18,9 +18,11 @@
...
@@ -18,9 +18,11 @@
"@fullcalendar/list"
:
"^4.4.0"
,
"@fullcalendar/list"
:
"^4.4.0"
,
"@fullcalendar/timegrid"
:
"^4.4.0"
,
"@fullcalendar/timegrid"
:
"^4.4.0"
,
"@fullcalendar/vue"
:
"^4.4.0"
,
"@fullcalendar/vue"
:
"^4.4.0"
,
"@json-editor/json-editor"
:
"^2.5.1"
,
"@popperjs/core"
:
"^2.4.3"
,
"@popperjs/core"
:
"^2.4.3"
,
"async-validator"
:
"^3.3.0"
,
"async-validator"
:
"^3.3.0"
,
"axios"
:
"^0.19.1"
,
"axios"
:
"^0.19.1"
,
"bootstrap-vue"
:
"^2.18.1"
,
"core-js"
:
"^3.4.4"
,
"core-js"
:
"^3.4.4"
,
"echarts"
:
"^4.6.0"
,
"echarts"
:
"^4.6.0"
,
"element-ui"
:
"^2.13.0"
,
"element-ui"
:
"^2.13.0"
,
...
...
app_web/src/components/app-form-json/app-form-json.less
0 → 100644
浏览文件 @
84b10ba1
.btn-secondary {
color: black;
background-color: transparent;
border-color: transparent;
}
.form-control {
display: block;
height: calc(1.4em + 0.75rem + 2px);
padding: 0.375rem 0.75rem;
font-size: 13px;
font-weight: 400;
line-height: 1;
}
h3, .h3 {
font-size: 14px;
font-weight: 700;
margin-top: 5px;
}
//.bg-light {
// background-color: #fff!important;
//}
\ No newline at end of file
app_web/src/components/app-form-json/app-form-json.vue
0 → 100644
浏览文件 @
84b10ba1
此差异已折叠。
点击以展开。
app_web/src/user-register.ts
浏览文件 @
84b10ba1
import
AvueComponent
from
'./components/avue-component/avue-component.vue'
import
AvueComponent
from
'./components/avue-component/avue-component.vue'
import
AppAvueCrud
from
'./components/app-avue-crud/app-avue-crud.vue'
import
AppAvueCrud
from
'./components/app-avue-crud/app-avue-crud.vue'
import
AppFormJson
from
'./components/app-form-json/app-form-json.vue'
import
AppTreeselectRefreshview
from
'./components/app-treeselect-refreshview/app-treeselect-refreshview.vue'
import
AppTreeselectRefreshview
from
'./components/app-treeselect-refreshview/app-treeselect-refreshview.vue'
export
const
UserComponent
=
{
export
const
UserComponent
=
{
install
(
v
:
any
,
opt
:
any
)
{
install
(
v
:
any
,
opt
:
any
)
{
v
.
component
(
'avue-component'
,
AvueComponent
);
v
.
component
(
'avue-component'
,
AvueComponent
);
v
.
component
(
'app-avue-crud'
,
AppAvueCrud
);
v
.
component
(
'app-avue-crud'
,
AppAvueCrud
);
v
.
component
(
'app-treeselect-refreshview'
,
AppTreeselectRefreshview
);
v
.
component
(
'app-treeselect-refreshview'
,
AppTreeselectRefreshview
);
v
.
component
(
'app-form-json'
,
AppFormJson
);
}
}
};
};
\ No newline at end of file
app_web/src/widgets/meta-model/main-form/main-form-base.vue
浏览文件 @
84b10ba1
...
@@ -35,8 +35,8 @@
...
@@ -35,8 +35,8 @@
</i-col>
</i-col>
<i-col
v-show=
"detailsModel.modelcfg.visible"
:style=
"
{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 24, offset: 0 }" :lg="{ span: 24, offset: 0 }" :xl="{ span: 24, offset: 0 }">
<i-col
v-show=
"detailsModel.modelcfg.visible"
:style=
"
{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 24, offset: 0 }" :lg="{ span: 24, offset: 0 }" :xl="{ span: 24, offset: 0 }">
<app-form-item
name=
'modelcfg'
:itemRules=
"this.rules().modelcfg"
class=
''
:caption=
"$t('entities.metamodel.main_form.details.modelcfg')"
uiStyle=
"DEFAULT"
:labelWidth=
"0"
:isShowCaption=
"false"
:error=
"detailsModel.modelcfg.error"
:isEmptyCaption=
"false"
labelPos=
"NONE"
>
<app-form-item
name=
'modelcfg'
:itemRules=
"this.rules().modelcfg"
class=
''
:caption=
"$t('entities.metamodel.main_form.details.modelcfg')"
uiStyle=
"DEFAULT"
:labelWidth=
"0"
:isShowCaption=
"false"
:error=
"detailsModel.modelcfg.error"
:isEmptyCaption=
"false"
labelPos=
"NONE"
>
<input-box
v-model=
"data.modelcfg"
:textareaId=
"this.$util.createUUID()"
:disabled=
"detailsModel.modelcfg.disabled"
type=
'textarea'
textareaStyle=
"height:200px;"
></input-box>
<app-form-json
v-model=
"data.modelcfg"
data=
"data"
formState=
"formState"
></app-form-json>
</app-form-item>
</app-form-item>
</i-col>
</i-col>
...
...
app_web/tsconfig.json
浏览文件 @
84b10ba1
...
@@ -10,6 +10,17 @@
...
@@ -10,6 +10,17 @@
"experimentalDecorators"
:
true
,
"experimentalDecorators"
:
true
,
"allowSyntheticDefaultImports"
:
true
,
"allowSyntheticDefaultImports"
:
true
,
"sourceMap"
:
true
,
"sourceMap"
:
true
,
"allowJs"
:
true
,
"allowUnreachableCode"
:
true
,
"strictNullChecks"
:
false
,
"noImplicitAny"
:
false
,
//
不报告未使用的标签错误。
"allowUnusedLabels"
:
true
,
//
以严格模式解析并为每个源文件生成
"use strict"
语句
"alwaysStrict"
:
false
,
"baseUrl"
:
"."
,
"baseUrl"
:
"."
,
"types"
:
[
"types"
:
[
"webpack-env"
"webpack-env"
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/domain/DataModel.java
已删除
100644 → 0
浏览文件 @
2bd98e51
package
cn
.
ibizlab
.
core
.
lite
.
extensions
.
domain
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
lombok.experimental.Accessors
;
import
java.util.LinkedHashMap
;
import
java.util.LinkedHashSet
;
@Getter
@Setter
@NoArgsConstructor
@Accessors
(
chain
=
true
)
public
class
DataModel
{
private
String
id
;
private
String
name
;
private
String
factEntity
;
private
DataObjectModel
model
;
@Getter
@Setter
@NoArgsConstructor
@Accessors
(
chain
=
true
)
public
class
DataObjectModel
{
private
String
system
;
private
LinkedHashMap
<
String
,
PropertyModel
>
objProperties
;
private
LinkedHashMap
<
String
,
DataModel
>
nestedProperties
;
private
LinkedHashSet
<
LayerMapping
>
layerMappings
;
}
@Getter
@Setter
@NoArgsConstructor
@Accessors
(
chain
=
true
)
public
class
LayerMapping
{
private
String
parentPropertyName
;
private
String
parentPropertyEntity
;
private
String
parentPropertyField
;
private
String
selfPropertyName
;
private
String
selfPropertyEntity
;
private
String
selfPropertyField
;
}
@Getter
@Setter
@NoArgsConstructor
@Accessors
(
chain
=
true
)
public
class
PropertyModel
{
private
String
propertyName
;
private
String
system
;
private
String
propertyEntity
;
private
LinkedHashSet
<
PropertyMapping
>
propertyMappings
;
}
@Getter
@Setter
@NoArgsConstructor
@Accessors
(
chain
=
true
)
public
class
PropertyMapping
{
private
String
joinPropertyName
;
private
String
joinPropertyEntity
;
private
String
joinPropertyField
;
private
String
selfPropertyField
;
}
}
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/model/DataModel.java
0 → 100644
浏览文件 @
84b10ba1
package
cn
.
ibizlab
.
core
.
lite
.
extensions
.
model
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
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
org.springframework.util.StringUtils
;
import
java.util.LinkedHashSet
;
@Getter
@Setter
@NoArgsConstructor
@Accessors
(
chain
=
true
)
public
class
DataModel
{
@JsonIgnore
@JSONField
(
serialize
=
false
)
private
DataModel
parentDataModel
;
private
String
dataModelName
;
public
String
getDataModelName
()
{
if
(
StringUtils
.
isEmpty
(
dataModelName
))
{
Property
property
=
getFactPorperty
();
if
(
property
!=
null
)
return
property
.
getPropertyName
();
}
return
dataModelName
;
}
private
LinkedHashSet
<
Property
>
objectProperties
=
new
LinkedHashSet
<>();
public
void
setObjectProperties
(
LinkedHashSet
<
Property
>
objectProperties
)
{
if
(
objectProperties
!=
null
)
{
objectProperties
.
forEach
(
objectPorperty
->
objectPorperty
.
setOwnerDataModel
(
this
));
this
.
objectProperties
=
objectProperties
;
}
}
private
LinkedHashSet
<
DataModel
>
nestedDataModels
=
new
LinkedHashSet
<>();
public
void
setNestedDataModels
(
LinkedHashSet
<
DataModel
>
nestedDataModels
)
{
if
(
nestedDataModels
!=
null
)
{
nestedDataModels
.
forEach
(
nestedDataModel
->
nestedDataModel
.
setParentDataModel
(
this
));
this
.
nestedDataModels
=
nestedDataModels
;
}
}
private
LinkedHashSet
<
LayerMapping
>
layerMappings
=
new
LinkedHashSet
<>();
public
void
setLayerMappings
(
LinkedHashSet
<
LayerMapping
>
layerMappings
)
{
if
(
layerMappings
!=
null
)
{
layerMappings
.
forEach
(
layerMapping
->
layerMapping
.
setSelfDataModel
(
this
));
this
.
layerMappings
=
layerMappings
;
}
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
Property
getFactPorperty
()
{
if
(!
ObjectUtils
.
isEmpty
(
this
.
getObjectProperties
()))
{
return
(
Property
)
this
.
getObjectProperties
().
toArray
()[
0
];
}
return
null
;
}
public
Property
getObjectProperty
(
String
propertyName
)
{
if
(
this
.
getObjectProperties
()!=
null
&&(!
StringUtils
.
isEmpty
(
propertyName
)))
{
for
(
Property
property:
this
.
getObjectProperties
())
if
(
propertyName
.
equalsIgnoreCase
(
property
.
getPropertyName
()))
return
property
;
}
return
null
;
}
public
DataModel
getNestedDataModel
(
String
dataModelName
)
{
if
(
this
.
getNestedDataModels
()!=
null
&&(!
StringUtils
.
isEmpty
(
dataModelName
)))
{
for
(
DataModel
dataModel:
this
.
getNestedDataModels
())
if
(
dataModelName
.
equalsIgnoreCase
(
dataModel
.
getDataModelName
()))
return
dataModel
;
}
return
null
;
}
@Override
public
String
toString
()
{
return
"DataModel{"
+
"dataModelName='"
+
getDataModelName
()
+
'\''
+
", objectProperties="
+
getObjectProperties
()
+
", nestedDataModels="
+
getNestedDataModels
()
+
", layerMappings="
+
getLayerMappings
()
+
"}\r\n"
;
}
}
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/model/LayerMapping.java
0 → 100644
浏览文件 @
84b10ba1
package
cn
.
ibizlab
.
core
.
lite
.
extensions
.
model
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
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
org.springframework.util.StringUtils
;
import
java.util.LinkedHashSet
;
@Getter
@Setter
@NoArgsConstructor
@Accessors
(
chain
=
true
)
public
class
LayerMapping
{
@JsonIgnore
@JSONField
(
serialize
=
false
)
private
DataModel
selfDataModel
;
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
String
getSelfPropertyName
()
{
if
(
this
.
getSelfDataModel
()!=
null
)
{
Property
property
=
this
.
getSelfDataModel
().
getFactPorperty
();
if
(
property
!=
null
)
return
property
.
getPropertyName
();
}
return
""
;
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
String
getSelfPropertyEntity
()
{
if
(
this
.
getSelfDataModel
()!=
null
)
{
Property
property
=
this
.
getSelfDataModel
().
getFactPorperty
();
if
(
property
!=
null
)
return
property
.
getPropertyEntity
();
}
return
""
;
}
private
String
selfPropertyColumn
;
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
DataModel
getParentDataModel
()
{
if
(
this
.
getSelfDataModel
()!=
null
)
return
this
.
getSelfDataModel
().
getParentDataModel
();
return
null
;
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
String
getParentPropertyName
()
{
if
(
this
.
getParentDataModel
()!=
null
)
{
Property
property
=
this
.
getParentDataModel
().
getFactPorperty
();
if
(
property
!=
null
)
return
property
.
getPropertyName
();
}
return
""
;
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
String
getParentPropertyEntity
()
{
if
(
this
.
getParentDataModel
()!=
null
)
{
Property
property
=
this
.
getParentDataModel
().
getObjectProperty
(
this
.
getParentPropertyName
());
if
(
property
!=
null
)
return
property
.
getPropertyEntity
();
}
return
""
;
}
private
String
parentPropertyColumn
;
@Override
public
String
toString
()
{
return
"LayerMapping{"
+
"selfPropertyName='"
+
getSelfPropertyName
()
+
'\''
+
", selfPropertyEntity='"
+
getSelfPropertyEntity
()
+
'\''
+
", selfPropertyColumn='"
+
getSelfPropertyColumn
()
+
'\''
+
", parentPropertyName='"
+
getParentPropertyName
()
+
'\''
+
", parentPropertyEntity='"
+
getParentPropertyEntity
()
+
'\''
+
", parentPropertyColumn='"
+
getParentPropertyColumn
()
+
'\''
+
"}\r\n"
;
}
}
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/model/Model.java
0 → 100644
浏览文件 @
84b10ba1
package
cn
.
ibizlab
.
core
.
lite
.
extensions
.
model
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
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
org.springframework.util.StringUtils
;
import
java.util.LinkedHashSet
;
@Getter
@Setter
@NoArgsConstructor
@Accessors
(
chain
=
true
)
public
class
Model
{
private
String
id
;
private
String
name
;
private
String
system
;
private
String
factEntity
;
private
DataModel
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\"}]}]}}"
;
JSONObject
jo
=
JSON
.
parseObject
(
jsonstr
);
Model
model
=
JSONObject
.
toJavaObject
(
jo
,
Model
.
class
);
System
.
out
.
println
(
model
.
model
.
toString
());
}
}
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/model/Property.java
0 → 100644
浏览文件 @
84b10ba1
package
cn
.
ibizlab
.
core
.
lite
.
extensions
.
model
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
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
org.springframework.util.StringUtils
;
import
java.util.LinkedHashSet
;
@Getter
@Setter
@NoArgsConstructor
@Accessors
(
chain
=
true
)
public
class
Property
{
@JsonIgnore
@JSONField
(
serialize
=
false
)
private
DataModel
ownerDataModel
;
private
String
propertyName
;
private
String
system
;
private
String
propertyEntity
;
private
LinkedHashSet
<
PropertyMapping
>
propertyMappings
=
new
LinkedHashSet
<>();
public
void
setPropertyMappings
(
LinkedHashSet
<
PropertyMapping
>
propertyMappings
)
{
if
(
propertyMappings
!=
null
)
{
propertyMappings
.
forEach
(
propertyMapping
->
propertyMapping
.
setSelfProperty
(
this
));
this
.
propertyMappings
=
propertyMappings
;
}
}
@Override
public
String
toString
()
{
return
"Property{"
+
"propertyName='"
+
getPropertyName
()
+
'\''
+
", system='"
+
getSystem
()
+
'\''
+
", propertyEntity='"
+
getPropertyEntity
()
+
'\''
+
", propertyMappings="
+
getPropertyMappings
()
+
"}\r\n"
;
}
}
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/model/PropertyMapping.java
0 → 100644
浏览文件 @
84b10ba1
package
cn
.
ibizlab
.
core
.
lite
.
extensions
.
model
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
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
org.springframework.util.StringUtils
;
import
java.util.LinkedHashSet
;
@Getter
@Setter
@NoArgsConstructor
@Accessors
(
chain
=
true
)
public
class
PropertyMapping
{
@JsonIgnore
@JSONField
(
serialize
=
false
)
private
Property
selfProperty
;
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
DataModel
getSelfDataModel
()
{
if
(
this
.
getSelfProperty
()!=
null
)
return
this
.
getSelfProperty
().
getOwnerDataModel
();
return
null
;
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
String
getSelfPropertyName
()
{
if
(
this
.
getSelfProperty
()!=
null
)
return
this
.
getSelfProperty
().
getPropertyName
();
return
""
;
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
String
getSelfPropertyEntity
()
{
if
(
this
.
getSelfProperty
()!=
null
)
return
this
.
getSelfProperty
().
getPropertyEntity
();
return
""
;
}
private
String
selfPropertyColumn
;
private
String
joinPropertyName
;
public
String
getJoinPropertyName
()
{
if
(
StringUtils
.
isEmpty
(
joinPropertyName
))
{
Property
property
=
this
.
getSelfDataModel
().
getFactPorperty
();
if
(
property
!=
null
)
return
property
.
getPropertyName
();
}
return
joinPropertyName
;
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
String
getJoinPropertyEntity
()
{
if
(
this
.
getSelfDataModel
()!=
null
)
{
Property
property
=
this
.
getSelfDataModel
().
getObjectProperty
(
this
.
getJoinPropertyName
());
if
(
property
!=
null
)
return
property
.
getPropertyEntity
();
}
return
""
;
}
private
String
joinPropertyColumn
;
@Override
public
String
toString
()
{
return
"PropertyMapping{"
+
"selfPropertyName='"
+
getSelfPropertyName
()
+
'\''
+
", selfPropertyEntity='"
+
getSelfPropertyEntity
()
+
'\''
+
", selfPropertyColumn='"
+
getSelfPropertyColumn
()
+
'\''
+
", joinPropertyName='"
+
getJoinPropertyName
()
+
'\''
+
", joinPropertyEntity='"
+
getJoinPropertyEntity
()
+
'\''
+
", joinPropertyColumn='"
+
getJoinPropertyColumn
()
+
'\''
+
"}\r\n"
;
}
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录