Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdict
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdict
提交
3f82079a
提交
3f82079a
编写于
4月 17, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibizdev提交
上级
5a305e7e
变更
12
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
72 行增加
和
88 行删除
+72
-88
app-index-view-base.vue
...web/src/pages/dict/app-index-view/app-index-view-base.vue
+2
-0
ibzdict-edit-view-base.vue
...c/pages/dict/ibzdict-edit-view/ibzdict-edit-view-base.vue
+2
-0
ibzdict-grid-view-base.vue
...c/pages/dict/ibzdict-grid-view/ibzdict-grid-view-base.vue
+2
-0
ibzdict-item-edit-view-base.vue
...ct/ibzdict-item-edit-view/ibzdict-item-edit-view-base.vue
+2
-0
ibzdict-item-grid-view-base.vue
...ct/ibzdict-item-grid-view/ibzdict-item-grid-view-base.vue
+2
-0
control-service.ts
app_web/src/widgets/control-service.ts
+1
-13
main-grid-base.vue
app_web/src/widgets/ibzdict/main-grid/main-grid-base.vue
+1
-1
main-grid-service.ts
app_web/src/widgets/ibzdict/main-grid/main-grid-service.ts
+3
-3
main-grid-base.vue
app_web/src/widgets/ibzdictitem/main-grid/main-grid-base.vue
+1
-1
main-grid-service.ts
...eb/src/widgets/ibzdictitem/main-grid/main-grid-service.ts
+3
-3
IBZDictItemServiceImpl.java
...bizlab/core/dict/service/impl/IBZDictItemServiceImpl.java
+43
-16
IBZDictServiceImpl.java
...cn/ibizlab/core/dict/service/impl/IBZDictServiceImpl.java
+10
-51
未找到文件。
app_web/src/pages/dict/app-index-view/app-index-view-base.vue
浏览文件 @
3f82079a
...
...
@@ -157,6 +157,7 @@ export default class AppIndexViewBase extends Vue {
@
Watch
(
'viewparam'
,{
immediate
:
true
,
deep
:
true
})
onParamData
(
newVal
:
any
,
oldVal
:
any
)
{
if
(
newVal
){
this
.
viewparams
=
{};
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
...
...
@@ -249,6 +250,7 @@ export default class AppIndexViewBase extends Vue {
* @memberof AppIndexViewBase
*/
private
parseViewParam
():
void
{
this
.
context
=
{};
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
...
...
app_web/src/pages/dict/ibzdict-edit-view/ibzdict-edit-view-base.vue
浏览文件 @
3f82079a
...
...
@@ -239,6 +239,7 @@ export default class IBZDictEditViewBase extends Vue {
@
Watch
(
'viewparam'
,{
immediate
:
true
,
deep
:
true
})
onParamData
(
newVal
:
any
,
oldVal
:
any
)
{
if
(
newVal
){
this
.
viewparams
=
{};
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
...
...
@@ -385,6 +386,7 @@ export default class IBZDictEditViewBase extends Vue {
* @memberof IBZDictEditViewBase
*/
private
parseViewParam
():
void
{
this
.
context
=
{};
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
...
...
app_web/src/pages/dict/ibzdict-grid-view/ibzdict-grid-view-base.vue
浏览文件 @
3f82079a
...
...
@@ -261,6 +261,7 @@ export default class IBZDictGridViewBase extends Vue {
@
Watch
(
'viewparam'
,{
immediate
:
true
,
deep
:
true
})
onParamData
(
newVal
:
any
,
oldVal
:
any
)
{
if
(
newVal
){
this
.
viewparams
=
{};
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
...
...
@@ -411,6 +412,7 @@ export default class IBZDictGridViewBase extends Vue {
* @memberof IBZDictGridViewBase
*/
private
parseViewParam
():
void
{
this
.
context
=
{};
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
...
...
app_web/src/pages/dict/ibzdict-item-edit-view/ibzdict-item-edit-view-base.vue
浏览文件 @
3f82079a
...
...
@@ -239,6 +239,7 @@ export default class IBZDictItemEditViewBase extends Vue {
@
Watch
(
'viewparam'
,{
immediate
:
true
,
deep
:
true
})
onParamData
(
newVal
:
any
,
oldVal
:
any
)
{
if
(
newVal
){
this
.
viewparams
=
{};
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
...
...
@@ -385,6 +386,7 @@ export default class IBZDictItemEditViewBase extends Vue {
* @memberof IBZDictItemEditViewBase
*/
private
parseViewParam
():
void
{
this
.
context
=
{};
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
...
...
app_web/src/pages/dict/ibzdict-item-grid-view/ibzdict-item-grid-view-base.vue
浏览文件 @
3f82079a
...
...
@@ -261,6 +261,7 @@ export default class IBZDictItemGridViewBase extends Vue {
@
Watch
(
'viewparam'
,{
immediate
:
true
,
deep
:
true
})
onParamData
(
newVal
:
any
,
oldVal
:
any
)
{
if
(
newVal
){
this
.
viewparams
=
{};
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
...
...
@@ -411,6 +412,7 @@ export default class IBZDictItemGridViewBase extends Vue {
* @memberof IBZDictItemGridViewBase
*/
private
parseViewParam
():
void
{
this
.
context
=
{};
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
...
...
app_web/src/widgets/control-service.ts
浏览文件 @
3f82079a
...
...
@@ -172,19 +172,7 @@ export default class ControlService {
// }
item
[
dataitem
.
name
]
=
val
;
});
if
(
isCreate
)
{
if
(
!
item
.
srfuf
){
Object
.
assign
(
item
,
{
srfuf
:
'0'
});
}
}
else
{
if
(
!
item
.
srfuf
){
Object
.
assign
(
item
,
{
srfuf
:
'1'
});
}
}
item
.
srfuf
=
data
.
srfuf
?
data
.
srfuf
:
(
isCreate
?
"0"
:
"1"
);
return
item
;
}
...
...
app_web/src/widgets/ibzdict/main-grid/main-grid-base.vue
浏览文件 @
3f82079a
...
...
@@ -646,7 +646,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
let
dataInfo
=
''
;
_datas
.
forEach
((
record
:
any
,
index
:
number
)
=>
{
let
srfmajortext
=
record
.
srfmajortext
;
let
srfmajortext
=
record
.
dictname
;
if
(
index
<
5
)
{
if
(
!
Object
.
is
(
dataInfo
,
''
))
{
dataInfo
+=
'、'
;
...
...
app_web/src/widgets/ibzdict/main-grid/main-grid-service.ts
浏览文件 @
3f82079a
...
...
@@ -251,8 +251,6 @@ export default class MainService extends ControlService {
@
Errorlog
public
loadDraft
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
//仿真主键数据
data
.
dictid
=
Util
.
createUUID
();
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
...
...
@@ -265,8 +263,10 @@ export default class MainService extends ControlService {
//处理返回数据,补充判断标识
if
(
response
.
data
){
Object
.
assign
(
response
.
data
,{
srfuf
:
'0'
});
//仿真主键数据
response
.
data
.
ibzdict
=
Util
.
createUUID
();
}
this
.
handleResponse
(
action
,
response
);
this
.
handleResponse
(
action
,
response
,
true
);
this
.
mergeDefaults
(
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
...
...
app_web/src/widgets/ibzdictitem/main-grid/main-grid-base.vue
浏览文件 @
3f82079a
...
...
@@ -716,7 +716,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
let
dataInfo
=
''
;
_datas
.
forEach
((
record
:
any
,
index
:
number
)
=>
{
let
srfmajortext
=
record
.
srfmajortext
;
let
srfmajortext
=
record
.
itemname
;
if
(
index
<
5
)
{
if
(
!
Object
.
is
(
dataInfo
,
''
))
{
dataInfo
+=
'、'
;
...
...
app_web/src/widgets/ibzdictitem/main-grid/main-grid-service.ts
浏览文件 @
3f82079a
...
...
@@ -251,8 +251,6 @@ export default class MainService extends ControlService {
@
Errorlog
public
loadDraft
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
//仿真主键数据
data
.
itemid
=
Util
.
createUUID
();
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
...
...
@@ -265,8 +263,10 @@ export default class MainService extends ControlService {
//处理返回数据,补充判断标识
if
(
response
.
data
){
Object
.
assign
(
response
.
data
,{
srfuf
:
'0'
});
//仿真主键数据
response
.
data
.
ibzdictitem
=
Util
.
createUUID
();
}
this
.
handleResponse
(
action
,
response
);
this
.
handleResponse
(
action
,
response
,
true
);
this
.
mergeDefaults
(
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
...
...
ibzdict-core/src/main/java/cn/ibizlab/core/dict/service/impl/IBZDictItemServiceImpl.java
浏览文件 @
3f82079a
...
...
@@ -91,9 +91,8 @@ public class IBZDictItemServiceImpl extends ServiceImpl<IBZDictItemMapper, IBZDi
@Override
@Transactional
public
boolean
remove
(
String
key
)
{
boolean
ret
=
removeById
(
key
);
if
(!
ret
)
return
ret
;
return
ret
;
if
(!
removeById
(
key
))
return
false
;
return
true
;
}
@Override
...
...
@@ -104,10 +103,10 @@ public class IBZDictItemServiceImpl extends ServiceImpl<IBZDictItemMapper, IBZDi
@Override
@Transactional
public
boolean
create
(
IBZDictItem
et
)
{
boolean
ret
=
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
));
if
(!
ret
)
return
ret
;
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getItemid
()),
et
);
return
ret
;
return
true
;
}
@Override
...
...
@@ -118,13 +117,10 @@ public class IBZDictItemServiceImpl extends ServiceImpl<IBZDictItemMapper, IBZDi
@Override
@Transactional
public
boolean
update
(
IBZDictItem
et
)
{
boolean
ret
=
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"ibzdictitemid"
,
et
.
getItemid
()));
if
(!
ret
)
return
ret
;
IBZDictItem
newet
=
get
(
et
.
getItemid
());
CachedBeanCopier
.
copy
(
newet
,
et
);
return
ret
;
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"ibzdictitemid"
,
et
.
getItemid
())))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getItemid
()),
et
);
return
true
;
}
@Override
...
...
@@ -133,13 +129,44 @@ public class IBZDictItemServiceImpl extends ServiceImpl<IBZDictItemMapper, IBZDi
}
List
<
IBZDictItem
>
selectByDictid
(
String
dictid
)
{
@Override
public
List
<
IBZDictItem
>
selectByDictid
(
String
dictid
)
{
return
baseMapper
.
selectByDictid
(
dictid
);
}
void
saveByDictid
(
String
dictid
,
List
<
IBZDictItem
>)
;
@Override
public
void
saveByDictid
(
String
dictid
,
List
<
IBZDictItem
>
list
)
{
if
(
list
==
null
)
return
;
Set
<
String
>
delIds
=
new
HashSet
<
String
>();
List
<
IBZDictItem
>
_update
=
new
ArrayList
<
IBZDictItem
>();
List
<
IBZDictItem
>
_create
=
new
ArrayList
<
IBZDictItem
>();
for
(
IBZDictItem
before:
selectByDictid
(
dictid
)){
delIds
.
add
(
before
.
getItemid
());
}
for
(
IBZDictItem
sub:
list
)
{
sub
.
setDictid
(
dictid
);
if
(
ObjectUtils
.
isEmpty
(
sub
.
getItemid
()))
sub
.
setItemid
((
String
)
sub
.
getDefaultKey
(
true
));
if
(
delIds
.
contains
(
sub
.
getItemid
()))
{
delIds
.
remove
(
sub
.
getItemid
());
_update
.
add
(
sub
);
}
else
_create
.
add
(
sub
);
}
if
(
_update
.
size
()>
0
)
this
.
updateBatch
(
_update
,
500
);
if
(
_create
.
size
()>
0
)
this
.
createBatch
(
_create
,
500
);
if
(
delIds
.
size
()>
0
)
this
.
removeBatch
(
delIds
,
500
);
}
void
removeByDictid
(
String
dictid
)
;
@Override
public
void
removeByDictid
(
String
dictid
)
{
this
.
remove
(
new
QueryWrapper
<
IBZDictItem
>().
eq
(
"ibzdictid"
,
dictid
));
}
/**
...
...
ibzdict-core/src/main/java/cn/ibizlab/core/dict/service/impl/IBZDictServiceImpl.java
浏览文件 @
3f82079a
...
...
@@ -60,18 +60,10 @@ public class IBZDictServiceImpl extends ServiceImpl<IBZDictMapper, IBZDict> impl
@Override
@Transactional
public
boolean
create
(
IBZDict
et
)
{
boolean
ret
=
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
));
if
(!
ret
)
return
ret
;
//嵌套[字典项目]
if
(!
ObjectUtils
.
isEmpty
(
et
.
getItems
())){
for
(
cn
.
ibizlab
.
core
.
dict
.
domain
.
IBZDictItem
sub:
et
.
getItems
())
{
sub
.
setDictid
(
et
.
getDictid
());
}
ibzdictitemService
.
createBatch
(
et
.
getItems
(),
500
)
;
}
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getDictid
()),
et
);
return
ret
;
return
true
;
}
@Override
...
...
@@ -92,34 +84,10 @@ public class IBZDictServiceImpl extends ServiceImpl<IBZDictMapper, IBZDict> impl
@Override
@Transactional
public
boolean
update
(
IBZDict
et
)
{
boolean
ret
=
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"ibzdictid"
,
et
.
getDictid
()));
if
(!
ret
)
return
ret
;
//嵌套[字典项目]
Set
_items
=
new
HashSet
();
if
(!
ObjectUtils
.
isEmpty
(
et
.
getItems
())){
for
(
cn
.
ibizlab
.
core
.
dict
.
domain
.
IBZDictItem
sub:
et
.
getItems
())
{
sub
.
setDictid
(
et
.
getDictid
());
if
(
ObjectUtils
.
isEmpty
(
sub
.
getItemid
()))
sub
.
setItemid
((
String
)
sub
.
getDefaultKey
(
true
));
_items
.
add
(
sub
.
getItemid
());
}
ibzdictitemService
.
saveBatch
(
et
.
getItems
(),
500
)
;
}
IBZDict
newet
=
get
(
et
.
getDictid
());
//删除多余的嵌套[字典项目]
if
(
_items
.
size
()>
0
&&(!
ObjectUtils
.
isEmpty
(
et
.
getItems
()))){
List
<
String
>
ids
=
new
ArrayList
<
String
>();
for
(
cn
.
ibizlab
.
core
.
dict
.
domain
.
IBZDictItem
sub:
et
.
getItems
())
{
if
(!
_items
.
contains
(
sub
.
getItemid
()))
ids
.
add
(
sub
.
getItemid
());
}
if
(
ids
.
size
()>
0
)
ibzdictitemService
.
removeBatch
(
ids
,
500
)
;
}
CachedBeanCopier
.
copy
(
newet
,
et
);
return
ret
;
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"ibzdictid"
,
et
.
getDictid
())))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getDictid
()),
et
);
return
true
;
}
@Override
...
...
@@ -130,18 +98,9 @@ public class IBZDictServiceImpl extends ServiceImpl<IBZDictMapper, IBZDict> impl
@Override
@Transactional
public
boolean
remove
(
String
key
)
{
IBZDict
et
=
get
(
key
);
//嵌套[字典项目]
if
(!
ObjectUtils
.
isEmpty
(
et
.
getItems
())){
List
<
String
>
ids
=
new
ArrayList
<
String
>();
for
(
cn
.
ibizlab
.
core
.
dict
.
domain
.
IBZDictItem
sub:
et
.
getItems
())
{
ids
.
add
(
sub
.
getItemid
());
}
ibzdictitemService
.
removeBatch
(
ids
,
500
)
;
}
boolean
ret
=
removeById
(
key
);
if
(!
ret
)
return
ret
;
return
ret
;
ibzdictitemService
.
ByDictid
(
key
)
;
if
(!
removeById
(
key
))
return
false
;
return
true
;
}
@Override
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录