Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdisk
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdisk
提交
88052ea8
提交
88052ea8
编写于
3月 18, 2021
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
zoo457790531 发布系统代码 [ibz-disk,存储]
上级
6b203ae1
变更
13
显示空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
292 行增加
和
71 行删除
+292
-71
meta-dynamic-model_BO_CN_base.ts
...ities/meta-dynamic-model/meta-dynamic-model_BO_CN_base.ts
+16
-16
meta-dynamic-model_en_US_base.ts
...ities/meta-dynamic-model/meta-dynamic-model_en_US_base.ts
+16
-16
meta-dynamic-model_zh_CN_base.ts
...ities/meta-dynamic-model/meta-dynamic-model_zh_CN_base.ts
+16
-16
sdindex-view-appmenu.ts
...src/mock/app/sdindex-view-appmenu/sdindex-view-appmenu.ts
+1
-1
page-register.ts
app_web/src/pages/disk/sdindex-view/page-register.ts
+2
-1
router.ts
app_web/src/pages/disk/sdindex-view/router.ts
+27
-0
meta-dynamic-model-grid-view-base.vue
...mic-model-grid-view/meta-dynamic-model-grid-view-base.vue
+2
-2
state.ts
app_web/src/store/modules/view-action/state.ts
+1
-1
sdindex-view-appmenu-model.ts
...ts/app/sdindex-view-appmenu/sdindex-view-appmenu-model.ts
+1
-1
h2_table.xml
ibzdisk-core/src/main/resources/liquibase/h2_table.xml
+2
-2
pom.xml
ibzdisk-dependencies/pom.xml
+5
-5
RuleUtils.java
...-util/src/main/java/cn/ibizlab/util/helper/RuleUtils.java
+113
-10
Setting.java
...sk-util/src/main/java/cn/ibizlab/util/helper/Setting.java
+90
-0
未找到文件。
app_web/src/locale/lanres/entities/meta-dynamic-model/meta-dynamic-model_BO_CN_base.ts
浏览文件 @
88052ea8
...
...
@@ -29,11 +29,8 @@ function getLocaleResourceBase(){
title
:
commonLogic
.
appcommonhandle
(
"动态模型编辑视图"
,
null
),
},
},
dynainst
_form
:
{
main
_form
:
{
details
:
{
druipart1
:
commonLogic
.
appcommonhandle
(
"副本"
,
null
),
tabpage1
:
commonLogic
.
appcommonhandle
(
"副本"
,
null
),
tabpanel1
:
commonLogic
.
appcommonhandle
(
""
,
null
),
group1
:
commonLogic
.
appcommonhandle
(
"动态模型基本信息"
,
null
),
formpage1
:
commonLogic
.
appcommonhandle
(
"基本信息"
,
null
),
srforikey
:
commonLogic
.
appcommonhandle
(
""
,
null
),
...
...
@@ -46,13 +43,17 @@ function getLocaleResourceBase(){
configname
:
commonLogic
.
appcommonhandle
(
"配置名称"
,
null
),
formitem
:
commonLogic
.
appcommonhandle
(
"文件"
,
null
),
systemid
:
commonLogic
.
appcommonhandle
(
"系统"
,
null
),
pdynainstid
:
commonLogic
.
appcommonhandle
(
"父实例"
,
null
),
configid
:
commonLogic
.
appcommonhandle
(
"配置标识"
,
null
),
},
uiactions
:
{
},
},
main
_form
:
{
dynainst
_form
:
{
details
:
{
druipart1
:
commonLogic
.
appcommonhandle
(
"副本"
,
null
),
tabpage1
:
commonLogic
.
appcommonhandle
(
"副本"
,
null
),
tabpanel1
:
commonLogic
.
appcommonhandle
(
""
,
null
),
group1
:
commonLogic
.
appcommonhandle
(
"动态模型基本信息"
,
null
),
formpage1
:
commonLogic
.
appcommonhandle
(
"基本信息"
,
null
),
srforikey
:
commonLogic
.
appcommonhandle
(
""
,
null
),
...
...
@@ -65,7 +66,6 @@ function getLocaleResourceBase(){
configname
:
commonLogic
.
appcommonhandle
(
"配置名称"
,
null
),
formitem
:
commonLogic
.
appcommonhandle
(
"文件"
,
null
),
systemid
:
commonLogic
.
appcommonhandle
(
"系统"
,
null
),
pdynainstid
:
commonLogic
.
appcommonhandle
(
"父实例"
,
null
),
configid
:
commonLogic
.
appcommonhandle
(
"配置标识"
,
null
),
},
uiactions
:
{
...
...
@@ -221,6 +221,16 @@ function getLocaleResourceBase(){
tip
:
commonLogic
.
appcommonhandle
(
"帮助"
,
null
),
},
},
editviewtoolbar_toolbar
:
{
tbitem1
:
{
caption
:
commonLogic
.
appcommonhandle
(
"保存并关闭"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"保存并关闭"
,
null
),
},
tbitem2
:
{
caption
:
commonLogic
.
appcommonhandle
(
"关闭"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"关闭"
,
null
),
},
},
dynainstgridviewtoolbar_toolbar
:
{
tbitem1_publish
:
{
caption
:
commonLogic
.
appcommonhandle
(
"发布模型"
,
null
),
...
...
@@ -287,16 +297,6 @@ function getLocaleResourceBase(){
tip
:
commonLogic
.
appcommonhandle
(
"帮助"
,
null
),
},
},
editviewtoolbar_toolbar
:
{
tbitem1
:
{
caption
:
commonLogic
.
appcommonhandle
(
"保存并关闭"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"保存并关闭"
,
null
),
},
tbitem2
:
{
caption
:
commonLogic
.
appcommonhandle
(
"关闭"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"关闭"
,
null
),
},
},
};
return
data
;
}
...
...
app_web/src/locale/lanres/entities/meta-dynamic-model/meta-dynamic-model_en_US_base.ts
浏览文件 @
88052ea8
...
...
@@ -29,11 +29,8 @@ function getLocaleResourceBase(){
title
:
commonLogic
.
appcommonhandle
(
"动态模型编辑视图"
,
null
),
},
},
dynainst
_form
:
{
main
_form
:
{
details
:
{
druipart1
:
commonLogic
.
appcommonhandle
(
"副本"
,
null
),
tabpage1
:
commonLogic
.
appcommonhandle
(
"副本"
,
null
),
tabpanel1
:
commonLogic
.
appcommonhandle
(
""
,
null
),
group1
:
commonLogic
.
appcommonhandle
(
"动态模型基本信息"
,
null
),
formpage1
:
commonLogic
.
appcommonhandle
(
"基本信息"
,
null
),
srforikey
:
commonLogic
.
appcommonhandle
(
""
,
null
),
...
...
@@ -46,13 +43,17 @@ function getLocaleResourceBase(){
configname
:
commonLogic
.
appcommonhandle
(
"配置名称"
,
null
),
formitem
:
commonLogic
.
appcommonhandle
(
"文件"
,
null
),
systemid
:
commonLogic
.
appcommonhandle
(
"系统"
,
null
),
pdynainstid
:
commonLogic
.
appcommonhandle
(
"父实例"
,
null
),
configid
:
commonLogic
.
appcommonhandle
(
"配置标识"
,
null
),
},
uiactions
:
{
},
},
main
_form
:
{
dynainst
_form
:
{
details
:
{
druipart1
:
commonLogic
.
appcommonhandle
(
"副本"
,
null
),
tabpage1
:
commonLogic
.
appcommonhandle
(
"副本"
,
null
),
tabpanel1
:
commonLogic
.
appcommonhandle
(
""
,
null
),
group1
:
commonLogic
.
appcommonhandle
(
"动态模型基本信息"
,
null
),
formpage1
:
commonLogic
.
appcommonhandle
(
"基本信息"
,
null
),
srforikey
:
commonLogic
.
appcommonhandle
(
""
,
null
),
...
...
@@ -65,7 +66,6 @@ function getLocaleResourceBase(){
configname
:
commonLogic
.
appcommonhandle
(
"配置名称"
,
null
),
formitem
:
commonLogic
.
appcommonhandle
(
"文件"
,
null
),
systemid
:
commonLogic
.
appcommonhandle
(
"系统"
,
null
),
pdynainstid
:
commonLogic
.
appcommonhandle
(
"父实例"
,
null
),
configid
:
commonLogic
.
appcommonhandle
(
"配置标识"
,
null
),
},
uiactions
:
{
...
...
@@ -221,6 +221,16 @@ function getLocaleResourceBase(){
tip
:
commonLogic
.
appcommonhandle
(
"Help"
,
null
),
},
},
editviewtoolbar_toolbar
:
{
tbitem1
:
{
caption
:
commonLogic
.
appcommonhandle
(
"Save And Close"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"Save And Close Window"
,
null
),
},
tbitem2
:
{
caption
:
commonLogic
.
appcommonhandle
(
"关闭"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"关闭"
,
null
),
},
},
dynainstgridviewtoolbar_toolbar
:
{
tbitem1_publish
:
{
caption
:
commonLogic
.
appcommonhandle
(
"发布模型"
,
null
),
...
...
@@ -287,16 +297,6 @@ function getLocaleResourceBase(){
tip
:
commonLogic
.
appcommonhandle
(
"Help"
,
null
),
},
},
editviewtoolbar_toolbar
:
{
tbitem1
:
{
caption
:
commonLogic
.
appcommonhandle
(
"Save And Close"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"Save And Close Window"
,
null
),
},
tbitem2
:
{
caption
:
commonLogic
.
appcommonhandle
(
"关闭"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"关闭"
,
null
),
},
},
};
return
data
;
}
...
...
app_web/src/locale/lanres/entities/meta-dynamic-model/meta-dynamic-model_zh_CN_base.ts
浏览文件 @
88052ea8
...
...
@@ -29,11 +29,8 @@ function getLocaleResourceBase(){
title
:
commonLogic
.
appcommonhandle
(
"动态模型编辑视图"
,
null
),
},
},
dynainst
_form
:
{
main
_form
:
{
details
:
{
druipart1
:
commonLogic
.
appcommonhandle
(
"副本"
,
null
),
tabpage1
:
commonLogic
.
appcommonhandle
(
"副本"
,
null
),
tabpanel1
:
commonLogic
.
appcommonhandle
(
""
,
null
),
group1
:
commonLogic
.
appcommonhandle
(
"动态模型基本信息"
,
null
),
formpage1
:
commonLogic
.
appcommonhandle
(
"基本信息"
,
null
),
srforikey
:
commonLogic
.
appcommonhandle
(
""
,
null
),
...
...
@@ -46,13 +43,17 @@ function getLocaleResourceBase(){
configname
:
commonLogic
.
appcommonhandle
(
"配置名称"
,
null
),
formitem
:
commonLogic
.
appcommonhandle
(
"文件"
,
null
),
systemid
:
commonLogic
.
appcommonhandle
(
"系统"
,
null
),
pdynainstid
:
commonLogic
.
appcommonhandle
(
"父实例"
,
null
),
configid
:
commonLogic
.
appcommonhandle
(
"配置标识"
,
null
),
},
uiactions
:
{
},
},
main
_form
:
{
dynainst
_form
:
{
details
:
{
druipart1
:
commonLogic
.
appcommonhandle
(
"副本"
,
null
),
tabpage1
:
commonLogic
.
appcommonhandle
(
"副本"
,
null
),
tabpanel1
:
commonLogic
.
appcommonhandle
(
""
,
null
),
group1
:
commonLogic
.
appcommonhandle
(
"动态模型基本信息"
,
null
),
formpage1
:
commonLogic
.
appcommonhandle
(
"基本信息"
,
null
),
srforikey
:
commonLogic
.
appcommonhandle
(
""
,
null
),
...
...
@@ -65,7 +66,6 @@ function getLocaleResourceBase(){
configname
:
commonLogic
.
appcommonhandle
(
"配置名称"
,
null
),
formitem
:
commonLogic
.
appcommonhandle
(
"文件"
,
null
),
systemid
:
commonLogic
.
appcommonhandle
(
"系统"
,
null
),
pdynainstid
:
commonLogic
.
appcommonhandle
(
"父实例"
,
null
),
configid
:
commonLogic
.
appcommonhandle
(
"配置标识"
,
null
),
},
uiactions
:
{
...
...
@@ -221,6 +221,16 @@ function getLocaleResourceBase(){
tip
:
commonLogic
.
appcommonhandle
(
"帮助"
,
null
),
},
},
editviewtoolbar_toolbar
:
{
tbitem1
:
{
caption
:
commonLogic
.
appcommonhandle
(
"保存并关闭"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"保存并关闭"
,
null
),
},
tbitem2
:
{
caption
:
commonLogic
.
appcommonhandle
(
"关闭"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"关闭"
,
null
),
},
},
dynainstgridviewtoolbar_toolbar
:
{
tbitem1_publish
:
{
caption
:
commonLogic
.
appcommonhandle
(
"发布模型"
,
null
),
...
...
@@ -287,16 +297,6 @@ function getLocaleResourceBase(){
tip
:
commonLogic
.
appcommonhandle
(
"帮助"
,
null
),
},
},
editviewtoolbar_toolbar
:
{
tbitem1
:
{
caption
:
commonLogic
.
appcommonhandle
(
"保存并关闭"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"保存并关闭"
,
null
),
},
tbitem2
:
{
caption
:
commonLogic
.
appcommonhandle
(
"关闭"
,
null
),
tip
:
commonLogic
.
appcommonhandle
(
"关闭"
,
null
),
},
},
};
return
data
;
}
...
...
app_web/src/mock/app/sdindex-view-appmenu/sdindex-view-appmenu.ts
浏览文件 @
88052ea8
...
...
@@ -29,7 +29,7 @@ mock.onGet('v7/sdindex-viewappmenu').reply((config: any) => {
resourcetag
:
''
,
},
{
id
:
'
4AD5C30C-D39B-42EC-9418-70615CA75A3C
'
,
id
:
'
1d2cb876f234f9a7ecef37a9b70dd824
'
,
name
:
'menuitem2'
,
text
:
'动态模型'
,
type
:
'MENUITEM'
,
...
...
app_web/src/pages/disk/sdindex-view/page-register.ts
浏览文件 @
88052ea8
export
const
PageComponents
=
{
install
(
Vue
:
any
,
opt
:
any
)
{
Vue
.
component
(
'meta-dynamic-model-edit-view'
,
()
=>
import
(
'@pages/lite/meta-dynamic-model-edit-view/meta-dynamic-model-edit-view.vue'
));
Vue
.
component
(
'sdfile-edit-view'
,
()
=>
import
(
'@pages/disk/sdfile-edit-view/sdfile-edit-view.vue'
));
Vue
.
component
(
'meta-dynamic-model-dyna-inst-grid-view'
,
()
=>
import
(
'@pages/lite/meta-dynamic-model-dyna-inst-grid-view/meta-dynamic-model-dyna-inst-grid-view.vue'
));
Vue
.
component
(
'meta-dynamic-model-dyna-inst-edit-view'
,
()
=>
import
(
'@pages/lite/meta-dynamic-model-dyna-inst-edit-view/meta-dynamic-model-dyna-inst-edit-view.vue'
));
...
...
app_web/src/pages/disk/sdindex-view/router.ts
浏览文件 @
88052ea8
...
...
@@ -35,6 +35,20 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/disk/sdindex-view/sdindex-view.vue'
),
children
:
[
{
path
:
'metadynamicmodels/:metadynamicmodel?/editview/:editview?'
,
meta
:
{
caption
:
'entities.metadynamicmodel.views.editview.caption'
,
info
:
''
,
parameters
:
[
{
pathName
:
'sdindexview'
,
parameterName
:
'sdindexview'
},
{
pathName
:
'metadynamicmodels'
,
parameterName
:
'metadynamicmodel'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/lite/meta-dynamic-model-edit-view/meta-dynamic-model-edit-view.vue'
),
},
{
path
:
'sdfiles/:sdfile?/editview/:editview?'
,
meta
:
{
...
...
@@ -172,6 +186,19 @@ const router = new Router({
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/lite/meta-dynamic-model-dyna-inst-grid-view/meta-dynamic-model-dyna-inst-grid-view.vue'
),
},
{
path
:
'/metadynamicmodels/:metadynamicmodel?/editview/:editview?'
,
meta
:
{
caption
:
'entities.metadynamicmodel.views.editview.caption'
,
info
:
''
,
parameters
:
[
{
pathName
:
'metadynamicmodels'
,
parameterName
:
'metadynamicmodel'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/lite/meta-dynamic-model-edit-view/meta-dynamic-model-edit-view.vue'
),
},
...
globalRoutes
,
{
...
...
app_web/src/pages/lite/meta-dynamic-model-grid-view/meta-dynamic-model-grid-view-base.vue
浏览文件 @
88052ea8
...
...
@@ -1316,7 +1316,7 @@ export default class MetaDynamicModelGridViewBase extends Vue {
const
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
{
pathName
:
'metadynamicmodels'
,
parameterName
:
'metadynamicmodel'
},
{
pathName
:
'
dynainsteditview'
,
parameterName
:
'dynainst
editview'
},
{
pathName
:
'
editview'
,
parameterName
:
'
editview'
},
];
const
_this
:
any
=
this
;
const
openIndexViewTab
=
(
data
:
any
)
=>
{
...
...
@@ -1357,7 +1357,7 @@ export default class MetaDynamicModelGridViewBase extends Vue {
const
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
{
pathName
:
'metadynamicmodels'
,
parameterName
:
'metadynamicmodel'
},
{
pathName
:
'
dynainsteditview'
,
parameterName
:
'dynainst
editview'
},
{
pathName
:
'
editview'
,
parameterName
:
'
editview'
},
];
const
_this
:
any
=
this
;
if
(
fullargs
&&
fullargs
.
copymode
){
...
...
app_web/src/store/modules/view-action/state.ts
浏览文件 @
88052ea8
...
...
@@ -39,7 +39,7 @@ export const viewstate: any = {
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'
92d51d41db51a671793ee8dc8876f9e9
'
,
'
e8892afaebe9a899e5d528d5b55d3cc5
'
,
],
},
{
...
...
app_web/src/widgets/app/sdindex-view-appmenu/sdindex-view-appmenu-model.ts
浏览文件 @
88052ea8
...
...
@@ -34,7 +34,7 @@ export default class SDIndexViewModel {
authtag
:
'web-SDIndexView-menuitem1'
,
},
{
id
:
'
4AD5C30C-D39B-42EC-9418-70615CA75A3C
'
,
id
:
'
1d2cb876f234f9a7ecef37a9b70dd824
'
,
name
:
'menuitem2'
,
text
:
'动态模型'
,
type
:
'MENUITEM'
,
...
...
ibzdisk-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
88052ea8
...
...
@@ -4,7 +4,7 @@
<!--输出实体[META_DYNAMICMODEL]数据结构 -->
<changeSet
author=
"root"
id=
"tab-meta_dynamicmodel-
15
-1"
>
<changeSet
author=
"root"
id=
"tab-meta_dynamicmodel-
2
-1"
>
<createTable
tableName=
"IBZDYNAMICMODEL"
>
<column
name=
"DYNAINSTID"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
...
...
@@ -27,7 +27,7 @@
<!--输出实体[META_DYNAMICMODEL]外键关系 -->
<changeSet
author=
"root"
id=
"fk-meta_dynamicmodel-
15
-2"
>
<changeSet
author=
"root"
id=
"fk-meta_dynamicmodel-
2
-2"
>
<addForeignKeyConstraint
baseColumnNames=
"PDYNAINSTID"
baseTableName=
"IBZDYNAMICMODEL"
constraintName=
"DER1N_META_DYNAMICMODEL_META_D"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"CONFIGID"
referencedTableName=
"IBZDYNAMICMODEL"
validate=
"true"
/>
</changeSet>
...
...
ibzdisk-dependencies/pom.xml
浏览文件 @
88052ea8
...
...
@@ -361,11 +361,6 @@
<artifactId>
dynamic-datasource-spring-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
org.apache.ant
</groupId>
<artifactId>
ant
</artifactId>
<version>
1.10.9
</version>
</dependency>
<!-- AliOSS -->
<dependency>
<groupId>
com.aliyun.oss
</groupId>
...
...
@@ -373,6 +368,11 @@
<version>
3.8.0
</version>
</dependency>
<dependency>
<groupId>
org.apache.ant
</groupId>
<artifactId>
ant
</artifactId>
<version>
1.10.9
</version>
</dependency>
</dependencies>
...
...
ibzdisk-util/src/main/java/cn/ibizlab/util/helper/RuleUtils.java
浏览文件 @
88052ea8
package
cn
.
ibizlab
.
util
.
helper
;
import
cn.ibizlab.util.domain.EntityBase
;
import
java.lang.reflect.Method
;
import
java.math.BigDecimal
;
...
...
@@ -312,6 +311,13 @@ public class RuleUtils
}
public
static
boolean
ge
(
Object
exp
,
Object
finalObject
)
{
if
(
ObjectUtils
.
isEmpty
(
exp
)){
return
false
;
}
if
(
ObjectUtils
.
isEmpty
(
finalObject
)){
return
false
;
}
return
(!(
lt
(
exp
,
finalObject
)));
}
...
...
@@ -321,6 +327,12 @@ public class RuleUtils
}
public
static
boolean
le
(
Object
exp
,
Object
finalObject
)
{
if
(
ObjectUtils
.
isEmpty
(
exp
)){
return
false
;
}
if
(
ObjectUtils
.
isEmpty
(
finalObject
)){
return
false
;
}
return
(!(
gt
(
exp
,
finalObject
)));
}
...
...
@@ -330,6 +342,15 @@ public class RuleUtils
}
public
static
boolean
notin
(
Object
expObj
,
Object
finalObject
)
{
if
(
ObjectUtils
.
isEmpty
(
finalObject
))
return
true
;
if
(
ObjectUtils
.
isEmpty
(
expObj
))
return
false
;
String
tvs
=
expObj
.
toString
().
trim
();
if
(
StringUtils
.
isEmpty
(
tvs
)){
return
false
;
}
return
(!
in
(
expObj
,
finalObject
));
}
public
static
boolean
in
(
Object
expObj
,
Object
object
,
String
members
)
...
...
@@ -340,7 +361,8 @@ public class RuleUtils
{
if
(
ObjectUtils
.
isEmpty
(
finalObject
))
return
false
;
if
(
ObjectUtils
.
isEmpty
(
expObj
))
return
false
;
String
tvs
=
expObj
.
toString
().
trim
();
if
(
StringUtils
.
isEmpty
(
tvs
)){
return
false
;
...
...
@@ -397,6 +419,16 @@ public class RuleUtils
}
public
static
boolean
notmatchor
(
Object
expObj
,
Object
obj
)
{
if
(
ObjectUtils
.
isEmpty
(
obj
)){
return
true
;
}
if
(
ObjectUtils
.
isEmpty
(
expObj
)){
return
false
;
}
String
exp
=
expObj
.
toString
().
trim
();
if
(
StringUtils
.
isEmpty
(
exp
)){
return
false
;
}
return
(!
matchor
(
expObj
,
obj
));
}
...
...
@@ -406,6 +438,16 @@ public class RuleUtils
}
public
static
boolean
notmatchand
(
Object
expObj
,
Object
finalObject
)
{
if
(
ObjectUtils
.
isEmpty
(
finalObject
)){
return
true
;
}
if
(
ObjectUtils
.
isEmpty
(
expObj
)){
return
false
;
}
String
exp
=
expObj
.
toString
().
trim
();
if
(
StringUtils
.
isEmpty
(
exp
)){
return
false
;
}
return
(!
matchand
(
expObj
,
finalObject
));
}
...
...
@@ -415,7 +457,10 @@ public class RuleUtils
}
public
static
boolean
matchor
(
Object
expObj
,
Object
obj
)
{
if
(
obj
==
null
){
if
(
ObjectUtils
.
isEmpty
(
obj
)){
return
false
;
}
if
(
ObjectUtils
.
isEmpty
(
expObj
)){
return
false
;
}
String
exp
=
expObj
.
toString
().
trim
();
...
...
@@ -438,7 +483,10 @@ public class RuleUtils
public
static
boolean
leftmatchor
(
Object
expObj
,
Object
obj
)
{
if
(
obj
==
null
){
if
(
ObjectUtils
.
isEmpty
(
obj
)){
return
false
;
}
if
(
ObjectUtils
.
isEmpty
(
expObj
)){
return
false
;
}
String
exp
=
expObj
.
toString
().
trim
();
...
...
@@ -462,7 +510,10 @@ public class RuleUtils
public
static
boolean
rightmatchor
(
Object
expObj
,
Object
obj
)
{
if
(
obj
==
null
){
if
(
ObjectUtils
.
isEmpty
(
obj
)){
return
false
;
}
if
(
ObjectUtils
.
isEmpty
(
expObj
)){
return
false
;
}
String
exp
=
expObj
.
toString
().
trim
();
...
...
@@ -490,10 +541,10 @@ public class RuleUtils
}
public
static
boolean
matchand
(
Object
expObj
,
Object
obj
)
{
if
(
obj
==
null
){
if
(
ObjectUtils
.
isEmpty
(
obj
)
){
return
false
;
}
if
(
expObj
==
null
){
if
(
ObjectUtils
.
isEmpty
(
expObj
)
){
return
false
;
}
String
exp
=
expObj
.
toString
().
trim
();
...
...
@@ -580,4 +631,56 @@ public class RuleUtils
}
return
acts
;
}
public
static
boolean
inc2s
(
String
tvs
,
Object
finalObject
)
{
if
(
ObjectUtils
.
isEmpty
(
finalObject
))
return
false
;
if
(
StringUtils
.
isEmpty
(
tvs
))
return
false
;
if
(
finalObject
instanceof
String
)
{
tvs
=
"s:"
+
tvs
;
}
else
return
false
;
List
acts
=
parseTvs
(
tvs
);
for
(
Iterator
localIterator
=
acts
.
iterator
();
localIterator
.
hasNext
();)
{
Object
act
=
localIterator
.
next
();
if
(
equal
(
c2s
(
act
.
toString
()),
c2s
(
finalObject
.
toString
())))
return
true
;
}
return
false
;
}
public
static
String
c2s
(
String
str
)
{
if
(
str
==
null
)
return
null
;
if
(
str
.
length
()<
300
)
{
str
=
str
.
trim
();
//1234567890()【】〔2018〕
str
=
str
.
replace
(
"1"
,
"1"
).
replace
(
"2"
,
"2"
).
replace
(
"3"
,
"3"
).
replace
(
"4"
,
"4"
).
replace
(
"5"
,
"5"
).
replace
(
"6"
,
"6"
).
replace
(
"7"
,
"7"
)
.
replace
(
"8"
,
"8"
).
replace
(
"9"
,
"9"
).
replace
(
"0"
,
"0"
)
.
replace
(
"("
,
"〔"
).
replace
(
")"
,
"〕"
)
.
replace
(
"("
,
"〔"
).
replace
(
")"
,
"〕"
)
.
replace
(
"【"
,
"〔"
).
replace
(
"】"
,
"〕"
)
.
replace
(
"["
,
"〔"
).
replace
(
"]"
,
"〕"
);
}
return
str
;
}
public
static
boolean
notinc2s
(
String
tvs
,
Object
finalObject
)
{
return
(!
inc2s
(
tvs
,
finalObject
));
}
}
\ No newline at end of file
ibzdisk-util/src/main/java/cn/ibizlab/util/helper/Setting.java
0 → 100644
浏览文件 @
88052ea8
package
cn
.
ibizlab
.
util
.
helper
;
import
cn.ibizlab.util.domain.EntityBase
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
lombok.experimental.Accessors
;
import
org.springframework.util.StringUtils
;
import
java.io.IOException
;
import
java.io.StringReader
;
import
java.util.*
;
@Getter
@Setter
@NoArgsConstructor
@Accessors
(
chain
=
true
)
public
class
Setting
{
private
String
property
;
private
String
value
;
public
static
String
getValue
(
String
configString
,
String
propertyName
)
{
return
DataObject
.
getStringValue
(
getMap
(
configString
).
get
(
propertyName
),
""
);
}
public
static
<
T
extends
EntityBase
>
T
getEntity
(
String
configString
,
T
entityBase
)
{
if
(
entityBase
!=
null
)
{
Map
map
=
getMap
(
configString
);
map
.
keySet
().
forEach
(
key
->{
entityBase
.
set
(
key
.
toString
(),
map
.
get
(
key
));
});
}
return
entityBase
;
}
public
static
Map
getMap
(
String
configString
)
{
Map
map
=
new
HashMap
();
map
.
put
(
"param"
,
configString
);
if
(!(
StringUtils
.
isEmpty
(
configString
)))
{
try
{
Object
obj
=
JSON
.
parse
(
configString
);
if
(
obj
==
null
)
return
map
;
else
if
(
obj
instanceof
JSONArray
)
{
List
<
Setting
>
settings
=
JSONArray
.
parseArray
(
configString
,
Setting
.
class
);
for
(
Setting
setting:
settings
)
map
.
put
(
setting
.
getProperty
(),
setting
.
getValue
());
}
else
if
(
obj
instanceof
JSONObject
)
{
JSONObject
jo
=
(
JSONObject
)
obj
;
jo
.
keySet
().
forEach
(
key
->{
map
.
put
(
key
,
jo
.
get
(
key
));
});
}
}
catch
(
Exception
ex
)
{
if
(
configString
.
indexOf
(
"="
)>
0
)
{
Properties
proper
=
new
Properties
();
try
{
proper
.
load
(
new
StringReader
(
configString
));
//把字符串转为reader
}
catch
(
IOException
e
)
{
}
Enumeration
enum1
=
proper
.
propertyNames
();
while
(
enum1
.
hasMoreElements
())
{
String
strKey
=
(
String
)
enum1
.
nextElement
();
String
strValue
=
proper
.
getProperty
(
strKey
);
map
.
put
(
strKey
,
strValue
);
}
}
}
}
return
map
;
}
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录