Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdata
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdata
提交
e8233e50
提交
e8233e50
编写于
8月 31, 2021
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
默认值
上级
189eef7c
变更
6
展开全部
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
128 行增加
和
48 行删除
+128
-48
DynamicModelService.java
...n/java/cn/ibizlab/core/data/lite/DynamicModelService.java
+17
-0
POSchema.java
...re/src/main/java/cn/ibizlab/core/data/model/POSchema.java
+7
-0
PojoOption.java
.../src/main/java/cn/ibizlab/core/data/model/PojoOption.java
+2
-2
PojoSchema.java
.../src/main/java/cn/ibizlab/core/data/model/PojoSchema.java
+92
-38
TransUtils.java
.../src/main/java/cn/ibizlab/core/data/model/TransUtils.java
+7
-2
BaseDataService.java
...va/cn/ibizlab/core/data/service/impl/BaseDataService.java
+3
-6
未找到文件。
ibzdata-core/src/main/java/cn/ibizlab/core/data/lite/DynamicModelService.java
浏览文件 @
e8233e50
...
@@ -259,6 +259,23 @@ public class DynamicModelService {
...
@@ -259,6 +259,23 @@ public class DynamicModelService {
modes
.
add
(
"query"
);
modes
.
add
(
"query"
);
metaFieldModel
.
set
(
"search_modes"
,
String
.
join
(
","
,
modes
));
metaFieldModel
.
set
(
"search_modes"
,
String
.
join
(
","
,
modes
));
}
}
if
((!
StringUtils
.
isEmpty
(
defield
.
getDefaultValueType
()))||(!
StringUtils
.
isEmpty
(
defield
.
getDefaultValue
())))
{
String
defaultValue
=
""
;
if
(
StringUtils
.
isEmpty
(
defield
.
getDefaultValueType
())||
"NONE"
.
equalsIgnoreCase
(
defield
.
getDefaultValueType
()))
{
defaultValue
=
defield
.
getDefaultValue
();
}
else
if
(!
StringUtils
.
isEmpty
(
defield
.
getDefaultValue
()))
{
defaultValue
=
String
.
format
(
"${%1$s.%2$s}"
,
defield
.
getDefaultValueType
(),
defield
.
getDefaultValue
());
}
else
{
defaultValue
=
String
.
format
(
"${%1$s}"
,
defield
.
getDefaultValueType
());
}
metaFieldModel
.
set
(
"default_value"
,
defaultValue
);
}
fieldModel
.
setCodeName
(
metaFieldModel
.
getCodeName
()).
setColumnName
(
metaFieldModel
.
getFieldName
()).
setUnionName
(
metaFieldModel
.
getFieldUniName
()).
setShowName
(
metaFieldModel
.
getFieldShowName
())
fieldModel
.
setCodeName
(
metaFieldModel
.
getCodeName
()).
setColumnName
(
metaFieldModel
.
getFieldName
()).
setUnionName
(
metaFieldModel
.
getFieldUniName
()).
setShowName
(
metaFieldModel
.
getFieldShowName
())
.
setComment
(
metaFieldModel
.
getFieldLogicName
()).
setField
(
metaFieldModel
);
.
setComment
(
metaFieldModel
.
getFieldLogicName
()).
setField
(
metaFieldModel
);
...
...
ibzdata-core/src/main/java/cn/ibizlab/core/data/model/POSchema.java
浏览文件 @
e8233e50
...
@@ -402,6 +402,13 @@ public class POSchema {
...
@@ -402,6 +402,13 @@ public class POSchema {
@JSONField
(
ordinal
=
11
)
@JSONField
(
ordinal
=
11
)
private
Set
<
String
>
searchModes
;
private
Set
<
String
>
searchModes
;
public
Column
setDefaultValue
(
String
defaultValue
)
{
if
((!
StringUtils
.
isEmpty
(
defaultValue
))&&(!
defaultValue
.
startsWith
(
"$"
)))
this
.
defaultValue
=
defaultValue
;
return
this
;
}
public
Column
putSearchModes
(
String
searchModes
)
public
Column
putSearchModes
(
String
searchModes
)
{
{
...
...
ibzdata-core/src/main/java/cn/ibizlab/core/data/model/PojoOption.java
浏览文件 @
e8233e50
...
@@ -232,11 +232,11 @@ public class PojoOption extends DataObj
...
@@ -232,11 +232,11 @@ public class PojoOption extends DataObj
return
this
.
set
(
"dict"
,
dict
);
return
this
.
set
(
"dict"
,
dict
);
}
}
public
String
getDefaultValue
()
{
public
String
getDefaultValue
()
{
return
this
.
getStringValue
(
"default
V
alue"
);
return
this
.
getStringValue
(
"default
_v
alue"
);
}
}
public
PojoOption
setDefaultValue
(
String
defaultValue
)
{
public
PojoOption
setDefaultValue
(
String
defaultValue
)
{
return
this
.
set
(
"default
V
alue"
,
defaultValue
);
return
this
.
set
(
"default
_v
alue"
,
defaultValue
);
}
}
public
String
getDataType
()
{
public
String
getDataType
()
{
return
this
.
getStringValue
(
"data_type"
);
return
this
.
getStringValue
(
"data_type"
);
...
...
ibzdata-core/src/main/java/cn/ibizlab/core/data/model/PojoSchema.java
浏览文件 @
e8233e50
此差异已折叠。
点击以展开。
ibzdata-core/src/main/java/cn/ibizlab/core/data/model/TransUtils.java
浏览文件 @
e8233e50
...
@@ -4,6 +4,7 @@ import cn.ibizlab.core.data.domain.POModel;
...
@@ -4,6 +4,7 @@ import cn.ibizlab.core.data.domain.POModel;
import
cn.ibizlab.core.data.lite.*
;
import
cn.ibizlab.core.data.lite.*
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
java.util.LinkedHashMap
;
import
java.util.LinkedHashMap
;
...
@@ -102,7 +103,7 @@ public class TransUtils {
...
@@ -102,7 +103,7 @@ public class TransUtils {
}
}
else
{
else
{
property
.
setPropertyType
(
PojoModel
.
PropertyType
.
valueOf
(
sub
.
getType
()));
property
.
setPropertyType
(
PojoModel
.
PropertyType
.
valueOf
(
sub
.
getType
()));
if
(
sub
.
getOptions
()!=
null
&&(!
StringUtils
.
isEmpty
(
sub
.
getOptions
().
getDict
()
)))
if
(
!
StringUtils
.
isEmpty
(
sub
.
getOptions
().
getDict
(
)))
property
.
setDict
(
sub
.
getOptions
().
getDict
());
property
.
setDict
(
sub
.
getOptions
().
getDict
());
}
}
...
@@ -140,9 +141,13 @@ public class TransUtils {
...
@@ -140,9 +141,13 @@ public class TransUtils {
.
setOptions
(
new
PojoOption
().
setAll
(
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
fieldModel
.
getField
()))));
.
setOptions
(
new
PojoOption
().
setAll
(
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
fieldModel
.
getField
()))));
Object
searchModes
=
fieldModel
.
getField
().
get
(
"search_modes"
);
Object
searchModes
=
fieldModel
.
getField
().
get
(
"search_modes"
);
if
(
searchModes
!=
null
)
if
(
!
ObjectUtils
.
isEmpty
(
searchModes
)
)
sub
.
getOptions
().
setSearchModes
(
searchModes
.
toString
());
sub
.
getOptions
().
setSearchModes
(
searchModes
.
toString
());
Object
defaultValue
=
fieldModel
.
getField
().
get
(
"default_value"
);
if
(!
ObjectUtils
.
isEmpty
(
defaultValue
))
sub
.
getOptions
().
setDefaultValue
(
defaultValue
.
toString
());
sub
.
getOptions
().
remove
(
"ext_params"
);
sub
.
getOptions
().
remove
(
"ext_params"
);
...
...
ibzdata-core/src/main/java/cn/ibizlab/core/data/service/impl/BaseDataService.java
浏览文件 @
e8233e50
...
@@ -240,12 +240,9 @@ public class BaseDataService implements IDataService {
...
@@ -240,12 +240,9 @@ public class BaseDataService implements IDataService {
{
{
refProperties
.
entrySet
().
forEach
(
propEntry
->{
refProperties
.
entrySet
().
forEach
(
propEntry
->{
PojoSchema
prop
=
propEntry
.
getValue
();
PojoSchema
prop
=
propEntry
.
getValue
();
if
(
prop
.
getOptions
()!=
null
)
{
String
refFieldCodeName
=
prop
.
getOptions
().
getRefFieldCodeName
();
String
refFieldCodeName
=
prop
.
getOptions
().
getRefFieldCodeName
();
if
((!
StringUtils
.
isEmpty
(
refFieldCodeName
))&&
parentData
.
get
(
refFieldCodeName
.
toLowerCase
())!=
null
)
if
((!
StringUtils
.
isEmpty
(
refFieldCodeName
))&&
parentData
.
get
(
refFieldCodeName
.
toLowerCase
())!=
null
)
et
.
set
(
propEntry
.
getKey
().
toLowerCase
(),
parentData
.
get
(
refFieldCodeName
.
toLowerCase
()));
et
.
set
(
propEntry
.
getKey
().
toLowerCase
(),
parentData
.
get
(
refFieldCodeName
.
toLowerCase
()));
}
});
});
}
}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录