Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdst
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdst
提交
df5f68fa
提交
df5f68fa
编写于
12月 09, 2020
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
配置完成
上级
b518aad0
变更
8
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
101 行增加
和
59 行删除
+101
-59
app-form-json-field-set.vue
.../src/components/app-form-json/app-form-json-field-set.vue
+12
-12
webSecurityConfig.java
...rc/main/java/cn/ibizlab/web/config/webSecurityConfig.java
+2
-1
DevBootSecurityConfig.java
...rc/main/java/cn/ibizlab/config/DevBootSecurityConfig.java
+1
-0
Option.java
.../main/java/cn/ibizlab/core/dict/extensions/vo/Option.java
+0
-33
EntityModel.java
...a/cn/ibizlab/core/lite/extensions/domain/EntityModel.java
+7
-7
DbEntityService.java
...ibizlab/core/lite/extensions/service/DbEntityService.java
+75
-3
apiSecurityConfig.java
...rc/main/java/cn/ibizlab/api/config/apiSecurityConfig.java
+2
-1
DstCoreResource.java
.../java/cn/ibizlab/api/rest/extensions/DstCoreResource.java
+2
-2
未找到文件。
app_web/src/components/app-form-json/app-form-json-field-set.vue
浏览文件 @
df5f68fa
...
...
@@ -78,7 +78,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
options
:
{
grid_columns
:
6
,
select2_options
:
{
//
width: 350,
width
:
350
,
value
:
""
,
},
},
...
...
@@ -105,7 +105,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
options
:
{
grid_columns
:
6
,
select2_options
:
{
//
width: 250,
width
:
250
,
value
:
""
,
},
},
...
...
@@ -130,7 +130,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
options
:
{
grid_columns
:
6
,
select2_options
:
{
//
width: 350,
width
:
350
,
value
:
""
,
},
},
...
...
@@ -157,7 +157,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
options
:
{
grid_columns
:
6
,
select2_options
:
{
//
width: 250,
width
:
250
,
value
:
""
,
},
},
...
...
@@ -182,7 +182,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
options
:
{
grid_columns
:
6
,
select2_options
:
{
//
width: 350,
width
:
350
,
value
:
""
,
},
},
...
...
@@ -209,7 +209,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
options
:
{
grid_columns
:
6
,
select2_options
:
{
//
width: 250,
width
:
250
,
value
:
""
,
},
},
...
...
@@ -233,7 +233,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
],
options
:
{
select2_options
:
{
//
width: 350,
width
:
350
,
value
:
""
,
},
},
...
...
@@ -260,7 +260,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
options
:
{
grid_columns
:
6
,
select2_options
:
{
//
width: 250,
width
:
250
,
value
:
""
,
},
},
...
...
@@ -285,7 +285,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
options
:
{
grid_columns
:
6
,
select2_options
:
{
//
width: 350,
width
:
350
,
value
:
""
,
},
},
...
...
@@ -312,7 +312,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
options
:
{
grid_columns
:
6
,
select2_options
:
{
//
width: 250,
width
:
250
,
value
:
""
,
},
},
...
...
@@ -337,7 +337,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
options
:
{
grid_columns
:
6
,
select2_options
:
{
//
width: 350,
width
:
350
,
value
:
""
,
},
},
...
...
@@ -364,7 +364,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
options
:
{
grid_columns
:
6
,
select2_options
:
{
//
width: 250,
width
:
250
,
value
:
""
,
},
},
...
...
ibzdst-app/ibzdst-app-web/src/main/java/cn/ibizlab/web/config/webSecurityConfig.java
浏览文件 @
df5f68fa
...
...
@@ -119,7 +119,8 @@ public class webSecurityConfig extends WebSecurityConfigurerAdapter {
// 文件操作
.
antMatchers
(
"/"
+
downloadpath
+
"/**"
).
permitAll
()
.
antMatchers
(
"/"
+
uploadpath
).
permitAll
()
.
antMatchers
(
"/"
+
previewpath
+
"/**"
);
.
antMatchers
(
"/"
+
previewpath
+
"/**"
).
permitAll
()
.
antMatchers
(
"/dst/**"
).
permitAll
();
for
(
String
excludePattern
:
excludesPattern
)
{
authenticationTokenFilter
.
addExcludePattern
(
excludePattern
);
...
...
ibzdst-boot/src/main/java/cn/ibizlab/config/DevBootSecurityConfig.java
浏览文件 @
df5f68fa
...
...
@@ -116,6 +116,7 @@ public class DevBootSecurityConfig extends WebSecurityConfigurerAdapter {
// 文件操作
.
antMatchers
(
"/"
+
downloadpath
+
"/**"
).
permitAll
()
.
antMatchers
(
"/"
+
uploadpath
).
permitAll
()
.
antMatchers
(
"/dst/**"
).
permitAll
()
.
antMatchers
(
"/"
+
previewpath
+
"/**"
).
permitAll
();
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/dict/extensions/vo/Option.java
已删除
100644 → 0
浏览文件 @
b518aad0
package
cn
.
ibizlab
.
core
.
dict
.
extensions
.
vo
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
lombok.experimental.Accessors
;
import
java.util.List
;
import
java.util.Map
;
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Accessors
(
chain
=
true
)
public
class
Option
{
private
String
id
;
private
Object
value
;
private
String
label
;
private
List
<
Option
>
children
;
private
String
iconClass
;
private
String
filter
;
private
Boolean
disabled
;
@JsonIgnore
@JSONField
(
serialize
=
false
)
private
String
parent
;
private
Map
<
String
,
Object
>
extension
;
}
ibzdst-core/src/main/java/cn/ibizlab/core/lite/extensions/domain/EntityModel.java
浏览文件 @
df5f68fa
...
...
@@ -192,18 +192,18 @@ public class EntityModel {
String
columnExp
=
fieldModel
.
getColumnExp
();
if
(
StringUtils
.
isEmpty
(
columnExp
))
continue
;
if
(
fieldModel
.
isPhysicalField
())
continue
;
//
if(fieldModel.isPhysicalField())
//
continue;
if
(!
StringUtils
.
isEmpty
(
columnSet
)){
columnSet
=
columnSet
+
","
;
}
columnSet
=
columnSet
+
columnExp
;
}
if
(!
StringUtils
.
isEmpty
(
columnSet
)){
columnSet
=
columnSet
+
","
;
}
columnSet
=
columnSet
+
"t.*"
;
//
if(!StringUtils.isEmpty(columnSet)){
//
columnSet=columnSet+",";
//
}
//
columnSet=columnSet+"t.*";
return
"select "
+
columnSet
+
" from "
+
this
.
getTableName
()+
" t "
;
}
else
if
(
"CORE"
.
equalsIgnoreCase
(
dataSet
))
...
...
@@ -231,7 +231,7 @@ public class EntityModel {
public
String
getDsName
()
{
String
dsName
=
this
.
getEntity
().
getDs
Name
();
String
dsName
=
this
.
getEntity
().
getDs
Id
();
if
(
StringUtils
.
isEmpty
(
dsName
))
{
dsName
=
this
.
getSystemId
()+
"-master"
;
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/lite/extensions/service/DbEntityService.java
浏览文件 @
df5f68fa
...
...
@@ -21,6 +21,8 @@ import org.springframework.context.annotation.Primary;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
import
java.io.BufferedReader
;
import
java.io.Reader
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -69,7 +71,58 @@ public class DbEntityService extends ServiceImpl<DbEntityMapper, EntityObj> impl
if
(!
StringUtils
.
isEmpty
(
filter
.
getCustSqlSegment
()))
qw
.
apply
(
filter
.
getCustSqlSegment
());
return
baseMapper
.
search
(
sql
,
qw
);
List
<
EntityObj
>
list
=
baseMapper
.
search
(
sql
,
qw
);
list
.
forEach
(
entityObj
->
{
entityObj
.
keySet
().
forEach
(
key
->{
Object
value
=
entityObj
.
get
(
key
);
if
(
value
!=
null
&&
value
instanceof
java
.
sql
.
Clob
)
{
// Clob类型 转String
BufferedReader
br
=
null
;
Reader
is
=
null
;
try
{
String
reString
=
""
;
is
=
((
java
.
sql
.
Clob
)
value
).
getCharacterStream
();
br
=
new
BufferedReader
(
is
);
String
s
=
br
.
readLine
();
StringBuffer
sb
=
new
StringBuffer
();
while
(
s
!=
null
)
{
sb
.
append
(
s
);
s
=
br
.
readLine
();
}
reString
=
sb
.
toString
();
entityObj
.
put
(
key
,
reString
);
}
catch
(
Exception
ex
)
{
}
finally
{
try
{
if
(
br
!=
null
){
br
.
close
();
}
}
catch
(
Exception
ex
)
{}
try
{
if
(
is
!=
null
){
is
.
close
();
}
}
catch
(
Exception
ex
)
{}
}
}
});
});
return
list
;
}
catch
(
Exception
ex
)
{
...
...
@@ -144,7 +197,8 @@ public class DbEntityService extends ServiceImpl<DbEntityMapper, EntityObj> impl
{
EntityModel
entityModel
=
dataModel
.
getFactEntityModel
();
List
<
ModelObj
>
rt
=
new
ArrayList
<>();
List
<
EntityObj
>
factEntityList
=
this
.
selectBase
(
entityModel
,
QueryFilter
.
createQuery
().
cust
(
dataModel
.
lookup
(
kEntityObjs
)));
List
<
EntityObj
>
factEntityList
=
new
ArrayList
<>();
splitList
(
kEntityObjs
,
1000
).
forEach
(
list
->
factEntityList
.
addAll
(
this
.
selectBase
(
entityModel
,
QueryFilter
.
createQuery
().
cust
(
dataModel
.
lookup
(
list
)))));
factEntityList
.
forEach
(
entityObj
->
rt
.
add
(
new
ModelObj
().
setDataModel
(
dataModel
).
setFactEntity
(
entityObj
.
setProperty
(
dataModel
.
getFactPorperty
()))));
fillEntityObj
(
dataModel
,
rt
);
...
...
@@ -163,7 +217,9 @@ public class DbEntityService extends ServiceImpl<DbEntityMapper, EntityObj> impl
if
(
property
.
getPropertyName
().
equals
(
dataModel
.
getFactPorperty
().
getPropertyName
()))
continue
;
EntityModel
entityModel
=
property
.
getEntityModel
();
List
<
EntityObj
>
entityObjs
=
this
.
selectBase
(
entityModel
,
QueryFilter
.
createQuery
().
cust
(
property
.
lookup
(
modelObjs
)));
List
<
EntityObj
>
entityObjs
=
new
ArrayList
<>();
splitList
(
modelObjs
,
1000
).
forEach
(
list
->
entityObjs
.
addAll
(
this
.
selectBase
(
entityModel
,
QueryFilter
.
createQuery
().
cust
(
property
.
lookup
(
list
)))));
entityObjs
.
forEach
(
entityObj
->
{
entityObj
.
setProperty
(
property
);
entityObj
.
findModel
(
modelObjs
);
...
...
@@ -173,4 +229,20 @@ public class DbEntityService extends ServiceImpl<DbEntityMapper, EntityObj> impl
}
private
<
T
>
List
<
List
<
T
>>
splitList
(
List
<
T
>
list
,
int
groupSize
){
int
length
=
list
.
size
();
// 计算可以分成多少组
int
num
=
(
length
+
groupSize
-
1
)/
groupSize
;
// TODO
List
<
List
<
T
>>
newList
=
new
ArrayList
<>(
num
);
for
(
int
i
=
0
;
i
<
num
;
i
++)
{
// 开始位置
int
fromIndex
=
i
*
groupSize
;
// 结束位置
int
toIndex
=
(
i
+
1
)
*
groupSize
<
length
?
(
i
+
1
)
*
groupSize
:
length
;
newList
.
add
(
list
.
subList
(
fromIndex
,
toIndex
))
;
}
return
newList
;
}
}
ibzdst-provider/ibzdst-provider-api/src/main/java/cn/ibizlab/api/config/apiSecurityConfig.java
浏览文件 @
df5f68fa
...
...
@@ -121,7 +121,8 @@ public class apiSecurityConfig extends WebSecurityConfigurerAdapter {
// 文件操作
.
antMatchers
(
"/"
+
downloadpath
+
"/**"
).
permitAll
()
.
antMatchers
(
"/"
+
uploadpath
).
permitAll
()
.
antMatchers
(
"/"
+
previewpath
+
"/**"
).
permitAll
();
.
antMatchers
(
"/"
+
previewpath
+
"/**"
).
permitAll
()
.
antMatchers
(
"/dst/**"
).
permitAll
();
for
(
String
excludePattern
:
excludesPattern
)
{
authenticationTokenFilter
.
addExcludePattern
(
excludePattern
);
...
...
ibzdst-provider/ibzdst-provider-api/src/main/java/cn/ibizlab/api/rest/extensions/DstCoreResource.java
浏览文件 @
df5f68fa
package
cn
.
ibizlab
.
api
.
rest
.
extensions
;
import
cn.ibizlab.core.dict.extensions.vo.Option
;
import
cn.ibizlab.core.lite.domain.DstSystem
;
import
cn.ibizlab.core.lite.domain.MetaField
;
import
cn.ibizlab.core.lite.extensions.domain.*
;
...
...
@@ -11,6 +10,7 @@ import cn.ibizlab.core.lite.extensions.service.LiteModelService;
import
cn.ibizlab.util.client.IBZDictFeignClient
;
import
cn.ibizlab.util.dict.CodeItem
;
import
cn.ibizlab.util.dict.CodeList
;
import
cn.ibizlab.util.dict.Option
;
import
cn.ibizlab.util.errors.BadRequestAlertException
;
import
cn.ibizlab.util.helper.DataObject
;
import
com.alibaba.fastjson.JSON
;
...
...
@@ -64,7 +64,7 @@ public class DstCoreResource {
@PathVariable
(
name
=
"modelname"
,
required
=
false
)
String
modelname
)
{
List
<
Option
>
list
=
new
ArrayList
<>();
liteModelService
.
getDataModel
(
modelid
,
modelname
).
getSubDataModel
().
forEach
(
dataModel
->
list
.
add
(
new
Option
().
setId
(
dataModel
.
getDataModelName
()).
setLabel
(
dataModel
.
getFactPorperty
().
get
PropertyName
()
)));
liteModelService
.
getDataModel
(
modelid
,
modelname
).
getSubDataModel
().
forEach
(
dataModel
->
list
.
add
(
new
Option
().
setId
(
dataModel
.
getDataModelName
()).
setLabel
(
dataModel
.
getFactPorperty
().
get
EntityModel
().
getLogicName
()+
"["
+
dataModel
.
getDataModelName
()+
"]"
)));
return
ResponseEntity
.
ok
(
list
);
}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录