Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzou
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzou
提交
0ebf83eb
提交
0ebf83eb
编写于
4月 30, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibizdev提交
上级
6983ee7d
变更
54
展开全部
显示空白字符变更
内嵌
并排
正在显示
54 个修改的文件
包含
3581 行增加
和
263 行删除
+3581
-263
CHANGELOG.md
app_web/CHANGELOG.md
+3
-0
noimage.png
app_web/public/assets/img/noimage.png
+0
-0
view-config.json
app_web/public/assets/json/view-config.json
+8
-0
ibzdepartment_en_US.ts
...eb/src/locale/lanres/ibzdepartment/ibzdepartment_en_US.ts
+2
-0
ibzdepartment_zh_CN.ts
...eb/src/locale/lanres/ibzdepartment/ibzdepartment_zh_CN.ts
+2
-0
ibzorganization_en_US.ts
...rc/locale/lanres/ibzorganization/ibzorganization_en_US.ts
+31
-1
ibzorganization_zh_CN.ts
...rc/locale/lanres/ibzorganization/ibzorganization_zh_CN.ts
+31
-1
viewconfig.ts
app_web/src/mock/viewconfig/viewconfig.ts
+8
-0
ibzorganization-option-view-base.vue
...nization-option-view/ibzorganization-option-view-base.vue
+554
-0
ibzorganization-option-view.less
...organization-option-view/ibzorganization-option-view.less
+14
-0
ibzorganization-option-view.vue
...zorganization-option-view/ibzorganization-option-view.vue
+19
-0
state.ts
app_web/src/store/modules/view-action/state.ts
+12
-0
ibzorganization-ui-service-base.ts
...ervice/ibzorganization/ibzorganization-ui-service-base.ts
+1
-0
main-form-base.vue
...eb/src/widgets/ibzdepartment/main-form/main-form-base.vue
+47
-0
main-form-model.ts
...eb/src/widgets/ibzdepartment/main-form/main-form-model.ts
+5
-0
main-form-service.ts
.../src/widgets/ibzdepartment/main-form/main-form-service.ts
+3
-0
pickup-viewpickupviewpanel-pickupviewpanel-model.ts
...panel/pickup-viewpickupviewpanel-pickupviewpanel-model.ts
+3
-0
main-form-base.vue
.../src/widgets/ibzorganization/main-form/main-form-base.vue
+54
-7
main-form-model.ts
.../src/widgets/ibzorganization/main-form/main-form-model.ts
+8
-3
main-form-service.ts
...rc/widgets/ibzorganization/main-form/main-form-service.ts
+3
-0
new-form-form-base.vue
...gets/ibzorganization/new-form-form/new-form-form-base.vue
+1689
-0
new-form-form-model.ts
...gets/ibzorganization/new-form-form/new-form-form-model.ts
+106
-0
new-form-form-service.ts
...ts/ibzorganization/new-form-form/new-form-form-service.ts
+370
-0
new-form-form.less
.../widgets/ibzorganization/new-form-form/new-form-form.less
+49
-0
new-form-form.vue
...c/widgets/ibzorganization/new-form-form/new-form-form.vue
+14
-0
pickup-viewpickupviewpanel-pickupviewpanel-model.ts
...panel/pickup-viewpickupviewpanel-pickupviewpanel-model.ts
+3
-0
IBZDepartment.java
...rc/main/java/cn/ibizlab/core/ou/domain/IBZDepartment.java
+7
-0
IBZOrganization.java
.../main/java/cn/ibizlab/core/ou/domain/IBZOrganization.java
+7
-0
IBZDepartmentSearchContext.java
...cn/ibizlab/core/ou/filter/IBZDepartmentSearchContext.java
+14
-0
IBZOrganizationSearchContext.java
.../ibizlab/core/ou/filter/IBZOrganizationSearchContext.java
+14
-0
IBZDepartmentServiceImpl.java
...bizlab/core/ou/service/impl/IBZDepartmentServiceImpl.java
+1
-1
IBZEmployeeServiceImpl.java
.../ibizlab/core/ou/service/impl/IBZEmployeeServiceImpl.java
+1
-1
IBZOrganizationServiceImpl.java
...zlab/core/ou/service/impl/IBZOrganizationServiceImpl.java
+1
-1
h2_table.xml
ibzou-core/src/main/resources/liquibase/h2_table.xml
+5
-5
IBZDepartmentMapper.xml
...resources/mapper/ou/ibzdepartment/IBZDepartmentMapper.xml
+3
-3
IBZOrganizationMapper.xml
...urces/mapper/ou/ibzorganization/IBZOrganizationMapper.xml
+5
-5
IBZDepartmentDTO.java
.../src/main/java/cn/ibizlab/ouapi/dto/IBZDepartmentDTO.java
+8
-0
IBZOrganizationDTO.java
...rc/main/java/cn/ibizlab/ouapi/dto/IBZOrganizationDTO.java
+8
-0
IBZDepartmentResource.java
...ain/java/cn/ibizlab/ouapi/rest/IBZDepartmentResource.java
+0
-1
IBZEmployeeResource.java
.../main/java/cn/ibizlab/ouapi/rest/IBZEmployeeResource.java
+0
-1
IBZOrganizationResource.java
...n/java/cn/ibizlab/ouapi/rest/IBZOrganizationResource.java
+0
-1
IBZOUFallback.java
...l/src/main/java/cn/ibizlab/util/client/IBZOUFallback.java
+1
-1
IBZOUFeignClient.java
...rc/main/java/cn/ibizlab/util/client/IBZOUFeignClient.java
+3
-3
IBZUAAFallback.java
.../src/main/java/cn/ibizlab/util/client/IBZUAAFallback.java
+1
-1
IBZUAAFeignClient.java
...c/main/java/cn/ibizlab/util/client/IBZUAAFeignClient.java
+3
-3
FileItem.java
...u-util/src/main/java/cn/ibizlab/util/domain/FileItem.java
+19
-0
PermissionSyncJob.java
.../src/main/java/cn/ibizlab/util/job/PermissionSyncJob.java
+1
-1
FileController.java
...il/src/main/java/cn/ibizlab/util/rest/FileController.java
+86
-0
AuthPermissionEvaluator.java
...ava/cn/ibizlab/util/security/AuthPermissionEvaluator.java
+257
-209
AuthenticationUser.java
...ain/java/cn/ibizlab/util/security/AuthenticationUser.java
+2
-1
FileService.java
...il/src/main/java/cn/ibizlab/util/service/FileService.java
+11
-0
SimpleFileService.java
.../main/java/cn/ibizlab/util/service/SimpleFileService.java
+75
-0
SimpleUserService.java
.../main/java/cn/ibizlab/util/service/SimpleUserService.java
+5
-13
application-sys.yml
ibzou-util/src/main/resources/application-sys.yml
+4
-0
未找到文件。
app_web/CHANGELOG.md
0 → 100644
浏览文件 @
0ebf83eb
*2020-4-29*
初始化文件
app_web/public/assets/img/noimage.png
0 → 100644
浏览文件 @
0ebf83eb
18.2 KB
app_web/public/assets/json/view-config.json
浏览文件 @
0ebf83eb
...
@@ -47,6 +47,14 @@
...
@@ -47,6 +47,14 @@
"viewname"
:
"IBZDepartmentPickupGridView"
,
"viewname"
:
"IBZDepartmentPickupGridView"
,
"viewtag"
:
"66fa282d24a21eec39d958e7fc6c23a8"
"viewtag"
:
"66fa282d24a21eec39d958e7fc6c23a8"
},
},
"ibzorganizationoptionview"
:
{
"title"
:
"单位机构选项操作视图"
,
"caption"
:
"单位机构"
,
"viewtype"
:
"DEOPTVIEW"
,
"viewmodule"
:
"ou"
,
"viewname"
:
"IBZOrganizationOptionView"
,
"viewtag"
:
"995d26f289a30e31573d557a5f5ba254"
},
"ibzorganizationpickupview"
:
{
"ibzorganizationpickupview"
:
{
"title"
:
"单位机构数据选择视图"
,
"title"
:
"单位机构数据选择视图"
,
"caption"
:
"单位机构"
,
"caption"
:
"单位机构"
,
...
...
app_web/src/locale/lanres/ibzdepartment/ibzdepartment_en_US.ts
浏览文件 @
0ebf83eb
...
@@ -6,6 +6,7 @@ export default {
...
@@ -6,6 +6,7 @@ export default {
deptname
:
'部门名称'
,
deptname
:
'部门名称'
,
orgid
:
'单位'
,
orgid
:
'单位'
,
parentdeptid
:
'上级部门'
,
parentdeptid
:
'上级部门'
,
pdeptname
:
'上级部门'
,
shortname
:
'部门简称'
,
shortname
:
'部门简称'
,
deptlevel
:
'部门级别'
,
deptlevel
:
'部门级别'
,
showorder
:
'排序'
,
showorder
:
'排序'
,
...
@@ -47,6 +48,7 @@ export default {
...
@@ -47,6 +48,7 @@ export default {
deptid
:
"部门标识"
,
deptid
:
"部门标识"
,
deptcode
:
"部门代码"
,
deptcode
:
"部门代码"
,
deptname
:
"部门名称"
,
deptname
:
"部门名称"
,
pdeptname
:
"上级部门"
,
orgname
:
"单位"
,
orgname
:
"单位"
,
orgid
:
"单位"
,
orgid
:
"单位"
,
pdeptid
:
"上级部门"
,
pdeptid
:
"上级部门"
,
...
...
app_web/src/locale/lanres/ibzdepartment/ibzdepartment_zh_CN.ts
浏览文件 @
0ebf83eb
...
@@ -5,6 +5,7 @@ export default {
...
@@ -5,6 +5,7 @@ export default {
deptname
:
'部门名称'
,
deptname
:
'部门名称'
,
orgid
:
'单位'
,
orgid
:
'单位'
,
parentdeptid
:
'上级部门'
,
parentdeptid
:
'上级部门'
,
pdeptname
:
'上级部门'
,
shortname
:
'部门简称'
,
shortname
:
'部门简称'
,
deptlevel
:
'部门级别'
,
deptlevel
:
'部门级别'
,
showorder
:
'排序'
,
showorder
:
'排序'
,
...
@@ -46,6 +47,7 @@ export default {
...
@@ -46,6 +47,7 @@ export default {
deptid
:
'部门标识'
,
deptid
:
'部门标识'
,
deptcode
:
'部门代码'
,
deptcode
:
'部门代码'
,
deptname
:
'部门名称'
,
deptname
:
'部门名称'
,
pdeptname
:
'上级部门'
,
orgname
:
'单位'
,
orgname
:
'单位'
,
orgid
:
'单位'
,
orgid
:
'单位'
,
pdeptid
:
'上级部门'
,
pdeptid
:
'上级部门'
,
...
...
app_web/src/locale/lanres/ibzorganization/ibzorganization_en_US.ts
浏览文件 @
0ebf83eb
...
@@ -5,6 +5,7 @@ export default {
...
@@ -5,6 +5,7 @@ export default {
orgcode
:
'单位代码'
,
orgcode
:
'单位代码'
,
orgname
:
'名称'
,
orgname
:
'名称'
,
parentorgid
:
'上级单位'
,
parentorgid
:
'上级单位'
,
porgname
:
'上级单位'
,
shortname
:
'单位简称'
,
shortname
:
'单位简称'
,
orglevel
:
'单位级别'
,
orglevel
:
'单位级别'
,
showorder
:
'排序'
,
showorder
:
'排序'
,
...
@@ -19,6 +20,10 @@ export default {
...
@@ -19,6 +20,10 @@ export default {
},
},
pickupgridview
:
{
pickupgridview
:
{
caption
:
"单位机构"
,
caption
:
"单位机构"
,
title
:
'单位机构'
,
},
optionview
:
{
caption
:
"单位机构"
,
title
:
'单位机构'
,
title
:
'单位机构'
,
},
},
pickupview
:
{
pickupview
:
{
...
@@ -44,12 +49,37 @@ export default {
...
@@ -44,12 +49,37 @@ export default {
orgid
:
"单位标识"
,
orgid
:
"单位标识"
,
orgcode
:
"单位代码"
,
orgcode
:
"单位代码"
,
orgname
:
"名称"
,
orgname
:
"名称"
,
porg
id
:
"上级单位"
,
porg
name
:
"上级单位"
,
orglevel
:
"单位级别"
,
orglevel
:
"单位级别"
,
shortname
:
"单位简称"
,
shortname
:
"单位简称"
,
showorder
:
"排序"
,
showorder
:
"排序"
,
createdate
:
"创建时间"
,
createdate
:
"创建时间"
,
updatedate
:
"最后修改时间"
,
updatedate
:
"最后修改时间"
,
porgid
:
"上级单位"
,
},
uiactions
:
{
},
},
newform_form
:
{
details
:
{
group1
:
"单位机构基本信息"
,
formpage1
:
"基本信息"
,
srfupdatedate
:
"最后修改时间"
,
srforikey
:
""
,
srfkey
:
"单位标识"
,
srfmajortext
:
"名称"
,
srftempmode
:
""
,
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
orgcode
:
"单位代码"
,
orgname
:
"名称"
,
porgname
:
"上级单位"
,
orglevel
:
"单位级别"
,
shortname
:
"单位简称"
,
showorder
:
"排序"
,
orgid
:
"单位标识"
,
porgid
:
"上级单位"
,
},
},
uiactions
:
{
uiactions
:
{
},
},
...
...
app_web/src/locale/lanres/ibzorganization/ibzorganization_zh_CN.ts
浏览文件 @
0ebf83eb
...
@@ -4,6 +4,7 @@ export default {
...
@@ -4,6 +4,7 @@ export default {
orgcode
:
'单位代码'
,
orgcode
:
'单位代码'
,
orgname
:
'名称'
,
orgname
:
'名称'
,
parentorgid
:
'上级单位'
,
parentorgid
:
'上级单位'
,
porgname
:
'上级单位'
,
shortname
:
'单位简称'
,
shortname
:
'单位简称'
,
orglevel
:
'单位级别'
,
orglevel
:
'单位级别'
,
showorder
:
'排序'
,
showorder
:
'排序'
,
...
@@ -18,6 +19,10 @@ export default {
...
@@ -18,6 +19,10 @@ export default {
},
},
pickupgridview
:
{
pickupgridview
:
{
caption
:
'单位机构'
,
caption
:
'单位机构'
,
title
:
'单位机构'
,
},
optionview
:
{
caption
:
'单位机构'
,
title
:
'单位机构'
,
title
:
'单位机构'
,
},
},
pickupview
:
{
pickupview
:
{
...
@@ -43,12 +48,37 @@ export default {
...
@@ -43,12 +48,37 @@ export default {
orgid
:
'单位标识'
,
orgid
:
'单位标识'
,
orgcode
:
'单位代码'
,
orgcode
:
'单位代码'
,
orgname
:
'名称'
,
orgname
:
'名称'
,
porg
id
:
'上级单位'
,
porg
name
:
'上级单位'
,
orglevel
:
'单位级别'
,
orglevel
:
'单位级别'
,
shortname
:
'单位简称'
,
shortname
:
'单位简称'
,
showorder
:
'排序'
,
showorder
:
'排序'
,
createdate
:
'创建时间'
,
createdate
:
'创建时间'
,
updatedate
:
'最后修改时间'
,
updatedate
:
'最后修改时间'
,
porgid
:
'上级单位'
,
},
uiactions
:
{
},
},
newform_form
:
{
details
:
{
group1
:
'单位机构基本信息'
,
formpage1
:
'基本信息'
,
srfupdatedate
:
'最后修改时间'
,
srforikey
:
''
,
srfkey
:
'单位标识'
,
srfmajortext
:
'名称'
,
srftempmode
:
''
,
srfuf
:
''
,
srfdeid
:
''
,
srfsourcekey
:
''
,
orgcode
:
'单位代码'
,
orgname
:
'名称'
,
porgname
:
'上级单位'
,
orglevel
:
'单位级别'
,
shortname
:
'单位简称'
,
showorder
:
'排序'
,
orgid
:
'单位标识'
,
porgid
:
'上级单位'
,
},
},
uiactions
:
{
uiactions
:
{
},
},
...
...
app_web/src/mock/viewconfig/viewconfig.ts
浏览文件 @
0ebf83eb
...
@@ -55,6 +55,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
...
@@ -55,6 +55,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname"
:
"IBZDepartmentPickupGridView"
,
"viewname"
:
"IBZDepartmentPickupGridView"
,
"viewtag"
:
"66fa282d24a21eec39d958e7fc6c23a8"
"viewtag"
:
"66fa282d24a21eec39d958e7fc6c23a8"
},
},
"ibzorganizationoptionview"
:
{
"title"
:
"单位机构选项操作视图"
,
"caption"
:
"单位机构"
,
"viewtype"
:
"DEOPTVIEW"
,
"viewmodule"
:
"ou"
,
"viewname"
:
"IBZOrganizationOptionView"
,
"viewtag"
:
"995d26f289a30e31573d557a5f5ba254"
},
"ibzorganizationpickupview"
:
{
"ibzorganizationpickupview"
:
{
"title"
:
"单位机构数据选择视图"
,
"title"
:
"单位机构数据选择视图"
,
"caption"
:
"单位机构"
,
"caption"
:
"单位机构"
,
...
...
app_web/src/pages/ou/ibzorganization-option-view/ibzorganization-option-view-base.vue
0 → 100644
浏览文件 @
0ebf83eb
此差异已折叠。
点击以展开。
app_web/src/pages/ou/ibzorganization-option-view/ibzorganization-option-view.less
0 → 100644
浏览文件 @
0ebf83eb
.ibzorganization-option-view{
position: relative;
}
.view-container {
.view-card {
.ivu-card-body {
.content-container{
height: calc(100% - 64px);
}
}
}
}
\ No newline at end of file
app_web/src/pages/ou/ibzorganization-option-view/ibzorganization-option-view.vue
0 → 100644
浏览文件 @
0ebf83eb
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
IBZOrganizationOptionViewBase
from
'./ibzorganization-option-view-base.vue'
;
import
view_form
from
'@widgets/ibzorganization/new-form-form/new-form-form.vue'
;
@
Component
({
components
:
{
view_form
,
},
beforeRouteEnter
:
(
to
:
any
,
from
:
any
,
next
:
any
)
=>
{
next
((
vm
:
any
)
=>
{
vm
.
$store
.
commit
(
'addCurPageViewtag'
,
{
fullPath
:
to
.
fullPath
,
viewtag
:
vm
.
viewtag
});
});
},
})
export
default
class
IBZOrganizationOptionView
extends
IBZOrganizationOptionViewBase
{
}
</
script
>
\ No newline at end of file
app_web/src/store/modules/view-action/state.ts
浏览文件 @
0ebf83eb
...
@@ -10,6 +10,7 @@ export const viewstate: any = {
...
@@ -10,6 +10,7 @@ export const viewstate: any = {
viewaction
:
''
,
viewaction
:
''
,
viewdatachange
:
false
,
viewdatachange
:
false
,
refviews
:
[
refviews
:
[
'9e25d15d43ff644fa008c9cf7d063ac3'
,
],
],
},
},
{
{
...
@@ -31,6 +32,7 @@ export const viewstate: any = {
...
@@ -31,6 +32,7 @@ export const viewstate: any = {
viewdatachange
:
false
,
viewdatachange
:
false
,
refviews
:
[
refviews
:
[
'9e25d15d43ff644fa008c9cf7d063ac3'
,
'9e25d15d43ff644fa008c9cf7d063ac3'
,
'b59db4df07430a34645566a64d59244c'
,
],
],
},
},
{
{
...
@@ -61,6 +63,16 @@ export const viewstate: any = {
...
@@ -61,6 +63,16 @@ export const viewstate: any = {
refviews
:
[
refviews
:
[
],
],
},
},
{
viewtag
:
'995d26f289a30e31573d557a5f5ba254'
,
viewmodule
:
'ou'
,
viewname
:
'IBZOrganizationOptionView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'9e25d15d43ff644fa008c9cf7d063ac3'
,
],
},
{
{
viewtag
:
'9e25d15d43ff644fa008c9cf7d063ac3'
,
viewtag
:
'9e25d15d43ff644fa008c9cf7d063ac3'
,
viewmodule
:
'ou'
,
viewmodule
:
'ou'
,
...
...
app_web/src/uiservice/ibzorganization/ibzorganization-ui-service-base.ts
浏览文件 @
0ebf83eb
...
@@ -81,6 +81,7 @@ export default class IBZOrganizationUIServiceBase extends UIService {
...
@@ -81,6 +81,7 @@ export default class IBZOrganizationUIServiceBase extends UIService {
public
initViewMap
(){
public
initViewMap
(){
this
.
allViewMap
.
set
(
'EDITVIEW:'
,{
viewname
:
'editview'
,
srfappde
:
'ibzorganizations'
});
this
.
allViewMap
.
set
(
'EDITVIEW:'
,{
viewname
:
'editview'
,
srfappde
:
'ibzorganizations'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'pickupgridview'
,
srfappde
:
'ibzorganizations'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'pickupgridview'
,
srfappde
:
'ibzorganizations'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'optionview'
,
srfappde
:
'ibzorganizations'
});
this
.
allViewMap
.
set
(
'PICKUPVIEW:'
,{
viewname
:
'pickupview'
,
srfappde
:
'ibzorganizations'
});
this
.
allViewMap
.
set
(
'PICKUPVIEW:'
,{
viewname
:
'pickupview'
,
srfappde
:
'ibzorganizations'
});
this
.
allViewMap
.
set
(
'MDATAVIEW:'
,{
viewname
:
'gridview'
,
srfappde
:
'ibzorganizations'
});
this
.
allViewMap
.
set
(
'MDATAVIEW:'
,{
viewname
:
'gridview'
,
srfappde
:
'ibzorganizations'
});
}
}
...
...
app_web/src/widgets/ibzdepartment/main-form/main-form-base.vue
浏览文件 @
0ebf83eb
...
@@ -20,6 +20,31 @@
...
@@ -20,6 +20,31 @@
<input-box
v-model=
"data.deptname"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.deptname.disabled"
type=
'text'
style=
""
></input-box>
<input-box
v-model=
"data.deptname"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.deptname.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.pdeptname.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'pdeptname'
:itemRules=
"this.rules.pdeptname"
class=
''
:caption=
"$t('entities.ibzdepartment.main_form.details.pdeptname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.pdeptname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-picker
:formState=
"formState"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:itemParam=
'
{ }'
:disabled="detailsModel.pdeptname.disabled"
name='pdeptname'
deMajorField='deptname'
deKeyField='ibzdepartment'
:service="service"
:acParams="{ serviceName: 'IBZDepartmentService', interfaceName: 'FetchDefault'}"
valueitem='pdeptid'
:value="data.pdeptname"
editortype=""
:pickupView="{ viewname: 'ibzdepartment-pickup-view', title: $t('entities.ibzdepartment.views.pickupview.title'), deResParameters: [{ pathName: 'ibzorganizations', parameterName: 'ibzorganization' }, ], parameters: [{ pathName: 'ibzdepartments', parameterName: 'ibzdepartment' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange">
</app-picker>
</app-form-item>
</i-col>
</i-col>
<i-col
v-show=
"detailsModel.orgname.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<i-col
v-show=
"detailsModel.orgname.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'orgname'
:itemRules=
"this.rules.orgname"
class=
''
:caption=
"$t('entities.ibzdepartment.main_form.details.orgname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.orgname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'orgname'
:itemRules=
"this.rules.orgname"
class=
''
:caption=
"$t('entities.ibzdepartment.main_form.details.orgname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.orgname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
...
@@ -385,6 +410,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -385,6 +410,7 @@ export default class MainBase extends Vue implements ControlInterface {
deptid
:
null
,
deptid
:
null
,
deptcode
:
null
,
deptcode
:
null
,
deptname
:
null
,
deptname
:
null
,
pdeptname
:
null
,
orgname
:
null
,
orgname
:
null
,
orgid
:
null
,
orgid
:
null
,
pdeptid
:
null
,
pdeptid
:
null
,
...
@@ -502,6 +528,12 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -502,6 +528,12 @@ export default class MainBase extends Vue implements ControlInterface {
{
required
:
true
,
type
:
'string'
,
message
:
'部门名称 值不能为空'
,
trigger
:
'change'
},
{
required
:
true
,
type
:
'string'
,
message
:
'部门名称 值不能为空'
,
trigger
:
'change'
},
{
required
:
true
,
type
:
'string'
,
message
:
'部门名称 值不能为空'
,
trigger
:
'blur'
},
{
required
:
true
,
type
:
'string'
,
message
:
'部门名称 值不能为空'
,
trigger
:
'blur'
},
],
],
pdeptname
:
[
{
type
:
'string'
,
message
:
'上级部门 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'上级部门 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'string'
,
message
:
'上级部门 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'上级部门 值不能为空'
,
trigger
:
'blur'
},
],
orgname
:
[
orgname
:
[
{
type
:
'string'
,
message
:
'单位 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'单位 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'单位 值必须为字符串类型'
,
trigger
:
'blur'
},
{
type
:
'string'
,
message
:
'单位 值必须为字符串类型'
,
trigger
:
'blur'
},
...
@@ -588,6 +620,8 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -588,6 +620,8 @@ export default class MainBase extends Vue implements ControlInterface {
deptcode
:
new
FormItemModel
({
caption
:
'部门代码'
,
detailType
:
'FORMITEM'
,
name
:
'deptcode'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
1
})
deptcode
:
new
FormItemModel
({
caption
:
'部门代码'
,
detailType
:
'FORMITEM'
,
name
:
'deptcode'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
1
})
,
,
deptname
:
new
FormItemModel
({
caption
:
'部门名称'
,
detailType
:
'FORMITEM'
,
name
:
'deptname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
deptname
:
new
FormItemModel
({
caption
:
'部门名称'
,
detailType
:
'FORMITEM'
,
name
:
'deptname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
pdeptname
:
new
FormItemModel
({
caption
:
'上级部门'
,
detailType
:
'FORMITEM'
,
name
:
'pdeptname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
,
orgname
:
new
FormItemModel
({
caption
:
'单位'
,
detailType
:
'FORMITEM'
,
name
:
'orgname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
orgname
:
new
FormItemModel
({
caption
:
'单位'
,
detailType
:
'FORMITEM'
,
name
:
'orgname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
,
...
@@ -741,6 +775,18 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -741,6 +775,18 @@ export default class MainBase extends Vue implements ControlInterface {
this
.
formDataChange
({
name
:
'deptname'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
this
.
formDataChange
({
name
:
'deptname'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
}
/**
* 监控表单属性 pdeptname 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Main
*/
@
Watch
(
'data.pdeptname'
)
onPdeptnameChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'pdeptname'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
/**
* 监控表单属性 orgname 值
* 监控表单属性 orgname 值
*
*
...
@@ -904,6 +950,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -904,6 +950,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
}
...
...
app_web/src/widgets/ibzdepartment/main-form/main-form-model.ts
浏览文件 @
0ebf83eb
...
@@ -70,6 +70,11 @@ export default class MainModel {
...
@@ -70,6 +70,11 @@ export default class MainModel {
prop
:
'deptname'
,
prop
:
'deptname'
,
dataType
:
'TEXT'
,
dataType
:
'TEXT'
,
},
},
{
name
:
'pdeptname'
,
prop
:
'pdeptname'
,
dataType
:
'PICKUPTEXT'
,
},
{
{
name
:
'orgname'
,
name
:
'orgname'
,
prop
:
'orgname'
,
prop
:
'orgname'
,
...
...
app_web/src/widgets/ibzdepartment/main-form/main-form-service.ts
浏览文件 @
0ebf83eb
...
@@ -89,6 +89,9 @@ export default class MainService extends ControlService {
...
@@ -89,6 +89,9 @@ export default class MainService extends ControlService {
*/
*/
@
Errorlog
@
Errorlog
public
getItems
(
serviceName
:
string
,
interfaceName
:
string
,
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
public
getItems
(
serviceName
:
string
,
interfaceName
:
string
,
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
if
(
Object
.
is
(
serviceName
,
'IBZDepartmentService'
)
&&
Object
.
is
(
interfaceName
,
'FetchDefault'
))
{
return
this
.
doItems
(
this
.
appEntityService
.
FetchDefault
(
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
,
isloading
),
'deptid'
,
'ibzdepartment'
);
}
if
(
Object
.
is
(
serviceName
,
'IBZOrganizationService'
)
&&
Object
.
is
(
interfaceName
,
'FetchDefault'
))
{
if
(
Object
.
is
(
serviceName
,
'IBZOrganizationService'
)
&&
Object
.
is
(
interfaceName
,
'FetchDefault'
))
{
return
this
.
doItems
(
this
.
ibzorganizationService
.
FetchDefault
(
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
,
isloading
),
'orgid'
,
'ibzorganization'
);
return
this
.
doItems
(
this
.
ibzorganizationService
.
FetchDefault
(
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
,
isloading
),
'orgid'
,
'ibzorganization'
);
}
}
...
...
app_web/src/widgets/ibzdepartment/pickup-viewpickupviewpanel-pickupviewpanel/pickup-viewpickupviewpanel-pickupviewpanel-model.ts
浏览文件 @
0ebf83eb
...
@@ -30,6 +30,9 @@ export default class PickupViewpickupviewpanelModel {
...
@@ -30,6 +30,9 @@ export default class PickupViewpickupviewpanelModel {
{
{
name
:
'parentdeptid'
,
name
:
'parentdeptid'
,
},
},
{
name
:
'pdeptname'
,
},
{
{
name
:
'shortname'
,
name
:
'shortname'
,
},
},
...
...
app_web/src/widgets/ibzorganization/main-form/main-form-base.vue
浏览文件 @
0ebf83eb
...
@@ -20,6 +20,31 @@
...
@@ -20,6 +20,31 @@
<input-box
v-model=
"data.orgname"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.orgname.disabled"
type=
'text'
style=
""
></input-box>
<input-box
v-model=
"data.orgname"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.orgname.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.porgname.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'porgname'
:itemRules=
"this.rules.porgname"
class=
''
:caption=
"$t('entities.ibzorganization.main_form.details.porgname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.porgname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-picker
:formState=
"formState"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:itemParam=
'
{ }'
:disabled="detailsModel.porgname.disabled"
name='porgname'
deMajorField='orgname'
deKeyField='ibzorganization'
:service="service"
:acParams="{ serviceName: 'IBZOrganizationService', interfaceName: 'FetchDefault'}"
valueitem='porgid'
:value="data.porgname"
editortype=""
:pickupView="{ viewname: 'ibzorganization-pickup-view', title: $t('entities.ibzorganization.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'ibzorganizations', parameterName: 'ibzorganization' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange">
</app-picker>
</app-form-item>
</i-col>
</i-col>
<i-col
v-show=
"detailsModel.orglevel.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<i-col
v-show=
"detailsModel.orglevel.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'orglevel'
:itemRules=
"this.rules.orglevel"
class=
''
:caption=
"$t('entities.ibzorganization.main_form.details.orglevel')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.orglevel.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'orglevel'
:itemRules=
"this.rules.orglevel"
class=
''
:caption=
"$t('entities.ibzorganization.main_form.details.orglevel')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.orglevel.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
...
@@ -354,12 +379,13 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -354,12 +379,13 @@ export default class MainBase extends Vue implements ControlInterface {
orgid
:
null
,
orgid
:
null
,
orgcode
:
null
,
orgcode
:
null
,
orgname
:
null
,
orgname
:
null
,
porg
id
:
null
,
porg
name
:
null
,
orglevel
:
null
,
orglevel
:
null
,
shortname
:
null
,
shortname
:
null
,
showorder
:
null
,
showorder
:
null
,
createdate
:
null
,
createdate
:
null
,
updatedate
:
null
,
updatedate
:
null
,
porgid
:
null
,
ibzorganization
:
null
,
ibzorganization
:
null
,
};
};
...
@@ -468,7 +494,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -468,7 +494,7 @@ export default class MainBase extends Vue implements ControlInterface {
{
required
:
true
,
type
:
'string'
,
message
:
'名称 值不能为空'
,
trigger
:
'change'
},
{
required
:
true
,
type
:
'string'
,
message
:
'名称 值不能为空'
,
trigger
:
'change'
},
{
required
:
true
,
type
:
'string'
,
message
:
'名称 值不能为空'
,
trigger
:
'blur'
},
{
required
:
true
,
type
:
'string'
,
message
:
'名称 值不能为空'
,
trigger
:
'blur'
},
],
],
porg
id
:
[
porg
name
:
[
{
type
:
'string'
,
message
:
'上级单位 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'上级单位 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'上级单位 值必须为字符串类型'
,
trigger
:
'blur'
},
{
type
:
'string'
,
message
:
'上级单位 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'string'
,
message
:
'上级单位 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'上级单位 值不能为空'
,
trigger
:
'change'
},
...
@@ -504,6 +530,12 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -504,6 +530,12 @@ export default class MainBase extends Vue implements ControlInterface {
{
required
:
false
,
type
:
'string'
,
message
:
'最后修改时间 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'最后修改时间 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'最后修改时间 值不能为空'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'string'
,
message
:
'最后修改时间 值不能为空'
,
trigger
:
'blur'
},
],
],
porgid
:
[
{
type
:
'string'
,
message
:
'上级单位 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'上级单位 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'string'
,
message
:
'上级单位 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'上级单位 值不能为空'
,
trigger
:
'blur'
},
],
}
}
/**
/**
...
@@ -537,7 +569,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -537,7 +569,7 @@ export default class MainBase extends Vue implements ControlInterface {
,
,
orgname
:
new
FormItemModel
({
caption
:
'名称'
,
detailType
:
'FORMITEM'
,
name
:
'orgname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
orgname
:
new
FormItemModel
({
caption
:
'名称'
,
detailType
:
'FORMITEM'
,
name
:
'orgname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
,
porg
id
:
new
FormItemModel
({
caption
:
'上级单位'
,
detailType
:
'FORMITEM'
,
name
:
'porgid
'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
porg
name
:
new
FormItemModel
({
caption
:
'上级单位'
,
detailType
:
'FORMITEM'
,
name
:
'porgname
'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
,
orglevel
:
new
FormItemModel
({
caption
:
'单位级别'
,
detailType
:
'FORMITEM'
,
name
:
'orglevel'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
orglevel
:
new
FormItemModel
({
caption
:
'单位级别'
,
detailType
:
'FORMITEM'
,
name
:
'orglevel'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
,
...
@@ -548,6 +580,8 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -548,6 +580,8 @@ export default class MainBase extends Vue implements ControlInterface {
createdate
:
new
FormItemModel
({
caption
:
'创建时间'
,
detailType
:
'FORMITEM'
,
name
:
'createdate'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
createdate
:
new
FormItemModel
({
caption
:
'创建时间'
,
detailType
:
'FORMITEM'
,
name
:
'createdate'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
,
updatedate
:
new
FormItemModel
({
caption
:
'最后修改时间'
,
detailType
:
'FORMITEM'
,
name
:
'updatedate'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
updatedate
:
new
FormItemModel
({
caption
:
'最后修改时间'
,
detailType
:
'FORMITEM'
,
name
:
'updatedate'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
porgid
:
new
FormItemModel
({
caption
:
'上级单位'
,
detailType
:
'FORMITEM'
,
name
:
'porgid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
,
};
};
...
@@ -684,15 +718,15 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -684,15 +718,15 @@ export default class MainBase extends Vue implements ControlInterface {
}
}
/**
/**
* 监控表单属性 porg
id
值
* 监控表单属性 porg
name
值
*
*
* @param {*} newVal
* @param {*} newVal
* @param {*} oldVal
* @param {*} oldVal
* @memberof Main
* @memberof Main
*/
*/
@
Watch
(
'data.porg
id
'
)
@
Watch
(
'data.porg
name
'
)
onPorg
id
Change
(
newVal
:
any
,
oldVal
:
any
)
{
onPorg
name
Change
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'porg
id
'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
this
.
formDataChange
({
name
:
'porg
name
'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
}
/**
/**
...
@@ -755,6 +789,18 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -755,6 +789,18 @@ export default class MainBase extends Vue implements ControlInterface {
this
.
formDataChange
({
name
:
'updatedate'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
this
.
formDataChange
({
name
:
'updatedate'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
}
/**
* 监控表单属性 porgid 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Main
*/
@
Watch
(
'data.porgid'
)
onPorgidChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'porgid'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
/**
* 重置表单项值
* 重置表单项值
...
@@ -809,6 +855,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -809,6 +855,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
}
/**
/**
...
...
app_web/src/widgets/ibzorganization/main-form/main-form-model.ts
浏览文件 @
0ebf83eb
...
@@ -71,9 +71,9 @@ export default class MainModel {
...
@@ -71,9 +71,9 @@ export default class MainModel {
dataType
:
'TEXT'
,
dataType
:
'TEXT'
,
},
},
{
{
name
:
'porg
id
'
,
name
:
'porg
name
'
,
prop
:
'p
arentorgid
'
,
prop
:
'p
orgname
'
,
dataType
:
'PICKUP'
,
dataType
:
'PICKUP
TEXT
'
,
},
},
{
{
name
:
'orglevel'
,
name
:
'orglevel'
,
...
@@ -100,6 +100,11 @@ export default class MainModel {
...
@@ -100,6 +100,11 @@ export default class MainModel {
prop
:
'updatedate'
,
prop
:
'updatedate'
,
dataType
:
'DATETIME'
,
dataType
:
'DATETIME'
,
},
},
{
name
:
'porgid'
,
prop
:
'parentorgid'
,
dataType
:
'PICKUP'
,
},
{
{
name
:
'ibzorganization'
,
name
:
'ibzorganization'
,
prop
:
'orgid'
,
prop
:
'orgid'
,
...
...
app_web/src/widgets/ibzorganization/main-form/main-form-service.ts
浏览文件 @
0ebf83eb
...
@@ -80,6 +80,9 @@ export default class MainService extends ControlService {
...
@@ -80,6 +80,9 @@ export default class MainService extends ControlService {
*/
*/
@
Errorlog
@
Errorlog
public
getItems
(
serviceName
:
string
,
interfaceName
:
string
,
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
public
getItems
(
serviceName
:
string
,
interfaceName
:
string
,
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
if
(
Object
.
is
(
serviceName
,
'IBZOrganizationService'
)
&&
Object
.
is
(
interfaceName
,
'FetchDefault'
))
{
return
this
.
doItems
(
this
.
appEntityService
.
FetchDefault
(
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
,
isloading
),
'orgid'
,
'ibzorganization'
);
}
return
Promise
.
reject
([])
return
Promise
.
reject
([])
}
}
...
...
app_web/src/widgets/ibzorganization/new-form-form/new-form-form-base.vue
0 → 100644
浏览文件 @
0ebf83eb
此差异已折叠。
点击以展开。
app_web/src/widgets/ibzorganization/new-form-form/new-form-form-model.ts
0 → 100644
浏览文件 @
0ebf83eb
/**
* NewForm 部件模型
*
* @export
* @class NewFormModel
*/
export
default
class
NewFormModel
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof NewFormModel
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'srfwfmemo'
,
prop
:
'srfwfmemo'
,
dataType
:
'TEXT'
,
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name
:
'srffrontuf'
,
prop
:
'srffrontuf'
,
dataType
:
'TEXT'
,
},
{
name
:
'srfupdatedate'
,
prop
:
'updatedate'
,
dataType
:
'DATETIME'
,
},
{
name
:
'srforikey'
,
},
{
name
:
'srfkey'
,
prop
:
'orgid'
,
dataType
:
'TEXT'
,
},
{
name
:
'srfmajortext'
,
prop
:
'orgname'
,
dataType
:
'TEXT'
,
},
{
name
:
'srftempmode'
,
},
{
name
:
'srfuf'
,
},
{
name
:
'srfdeid'
,
},
{
name
:
'srfsourcekey'
,
},
{
name
:
'orgcode'
,
prop
:
'orgcode'
,
dataType
:
'TEXT'
,
},
{
name
:
'orgname'
,
prop
:
'orgname'
,
dataType
:
'TEXT'
,
},
{
name
:
'porgname'
,
prop
:
'porgname'
,
dataType
:
'PICKUPTEXT'
,
},
{
name
:
'orglevel'
,
prop
:
'orglevel'
,
dataType
:
'INT'
,
},
{
name
:
'shortname'
,
prop
:
'shortname'
,
dataType
:
'TEXT'
,
},
{
name
:
'showorder'
,
prop
:
'showorder'
,
dataType
:
'INT'
,
},
{
name
:
'orgid'
,
prop
:
'orgid'
,
dataType
:
'TEXT'
,
},
{
name
:
'porgid'
,
prop
:
'parentorgid'
,
dataType
:
'PICKUP'
,
},
{
name
:
'ibzorganization'
,
prop
:
'orgid'
,
dataType
:
'FONTKEY'
,
},
]
}
}
\ No newline at end of file
app_web/src/widgets/ibzorganization/new-form-form/new-form-form-service.ts
0 → 100644
浏览文件 @
0ebf83eb
此差异已折叠。
点击以展开。
app_web/src/widgets/ibzorganization/new-form-form/new-form-form.less
0 → 100644
浏览文件 @
0ebf83eb
.ivu-tabs-no-animation>.ivu-tabs-content{
padding: 0 16px;
}
.ivu-card-head{
padding: 14px 0;
}
.app-form {
overflow: auto;
> .ivu-row {
> .ivu-tabs {
height: 100%;
display: flex;
flex-direction: column;
> .ivu-tabs-content {
flex-grow: 1;
overflow: auto;
> .ivu-tabs-tabpane {
height: 100%;
}
}
}
}
}
.app-tabpanel-flex {
height: 100%;
> .ivu-tabs-content {
height: calc(100% - 52px);
> .ivu-tabs-tabpane {
height: 100%;
}
}
}
.app-form {
>.ivu-row:nth-child(2) {
>.ivu-col:nth-child(1) {
>.ivu-row.app-form-group.app-group-hiddden-caption:nth-child(1) {
margin-top: 12px;
}
}
}
}
// 表单行间距
.app-form{
.app-form-item{
margin-bottom: 20px;
}
}
// this is less
app_web/src/widgets/ibzorganization/new-form-form/new-form-form.vue
0 → 100644
浏览文件 @
0ebf83eb
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
NewFormBase
from
'./new-form-form-base.vue'
;
@
Component
({
components
:
{
}
})
export
default
class
NewForm
extends
NewFormBase
{
}
</
script
>
\ No newline at end of file
app_web/src/widgets/ibzorganization/pickup-viewpickupviewpanel-pickupviewpanel/pickup-viewpickupviewpanel-pickupviewpanel-model.ts
浏览文件 @
0ebf83eb
...
@@ -27,6 +27,9 @@ export default class PickupViewpickupviewpanelModel {
...
@@ -27,6 +27,9 @@ export default class PickupViewpickupviewpanelModel {
{
{
name
:
'parentorgid'
,
name
:
'parentorgid'
,
},
},
{
name
:
'porgname'
,
},
{
{
name
:
'shortname'
,
name
:
'shortname'
,
},
},
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/domain/IBZDepartment.java
浏览文件 @
0ebf83eb
...
@@ -69,6 +69,13 @@ public class IBZDepartment extends EntityMP implements Serializable {
...
@@ -69,6 +69,13 @@ public class IBZDepartment extends EntityMP implements Serializable {
@JSONField
(
name
=
"parentdeptid"
)
@JSONField
(
name
=
"parentdeptid"
)
@JsonProperty
(
"parentdeptid"
)
@JsonProperty
(
"parentdeptid"
)
private
String
parentdeptid
;
private
String
parentdeptid
;
/**
* 上级部门
*/
@TableField
(
exist
=
false
)
@JSONField
(
name
=
"pdeptname"
)
@JsonProperty
(
"pdeptname"
)
private
String
pdeptname
;
/**
/**
* 部门简称
* 部门简称
*/
*/
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/domain/IBZOrganization.java
浏览文件 @
0ebf83eb
...
@@ -62,6 +62,13 @@ public class IBZOrganization extends EntityMP implements Serializable {
...
@@ -62,6 +62,13 @@ public class IBZOrganization extends EntityMP implements Serializable {
@JSONField
(
name
=
"parentorgid"
)
@JSONField
(
name
=
"parentorgid"
)
@JsonProperty
(
"parentorgid"
)
@JsonProperty
(
"parentorgid"
)
private
String
parentorgid
;
private
String
parentorgid
;
/**
* 上级单位
*/
@TableField
(
exist
=
false
)
@JSONField
(
name
=
"porgname"
)
@JsonProperty
(
"porgname"
)
private
String
porgname
;
/**
/**
* 单位简称
* 单位简称
*/
*/
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/filter/IBZDepartmentSearchContext.java
浏览文件 @
0ebf83eb
...
@@ -53,6 +53,20 @@ public class IBZDepartmentSearchContext extends QueryWrapperContext<IBZDepartmen
...
@@ -53,6 +53,20 @@ public class IBZDepartmentSearchContext extends QueryWrapperContext<IBZDepartmen
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_pdeptid_eq
)){
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_pdeptid_eq
)){
this
.
getSelectCond
().
eq
(
"pdeptid"
,
n_pdeptid_eq
);
this
.
getSelectCond
().
eq
(
"pdeptid"
,
n_pdeptid_eq
);
}
}
}
private
String
n_pdeptname_eq
;
//[上级部门]
public
void
setN_pdeptname_eq
(
String
n_pdeptname_eq
)
{
this
.
n_pdeptname_eq
=
n_pdeptname_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_pdeptname_eq
)){
this
.
getSelectCond
().
eq
(
"pdeptname"
,
n_pdeptname_eq
);
}
}
private
String
n_pdeptname_like
;
//[上级部门]
public
void
setN_pdeptname_like
(
String
n_pdeptname_like
)
{
this
.
n_pdeptname_like
=
n_pdeptname_like
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_pdeptname_like
)){
this
.
getSelectCond
().
like
(
"pdeptname"
,
n_pdeptname_like
);
}
}
}
private
String
n_bcode_like
;
//[业务编码]
private
String
n_bcode_like
;
//[业务编码]
public
void
setN_bcode_like
(
String
n_bcode_like
)
{
public
void
setN_bcode_like
(
String
n_bcode_like
)
{
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/filter/IBZOrganizationSearchContext.java
浏览文件 @
0ebf83eb
...
@@ -53,6 +53,20 @@ public class IBZOrganizationSearchContext extends QueryWrapperContext<IBZOrganiz
...
@@ -53,6 +53,20 @@ public class IBZOrganizationSearchContext extends QueryWrapperContext<IBZOrganiz
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_porgid_eq
)){
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_porgid_eq
)){
this
.
getSelectCond
().
eq
(
"porgid"
,
n_porgid_eq
);
this
.
getSelectCond
().
eq
(
"porgid"
,
n_porgid_eq
);
}
}
}
private
String
n_porgname_eq
;
//[上级单位]
public
void
setN_porgname_eq
(
String
n_porgname_eq
)
{
this
.
n_porgname_eq
=
n_porgname_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_porgname_eq
)){
this
.
getSelectCond
().
eq
(
"porgname"
,
n_porgname_eq
);
}
}
private
String
n_porgname_like
;
//[上级单位]
public
void
setN_porgname_like
(
String
n_porgname_like
)
{
this
.
n_porgname_like
=
n_porgname_like
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_porgname_like
)){
this
.
getSelectCond
().
like
(
"porgname"
,
n_porgname_like
);
}
}
}
private
String
n_shortname_like
;
//[单位简称]
private
String
n_shortname_like
;
//[单位简称]
public
void
setN_shortname_like
(
String
n_shortname_like
)
{
public
void
setN_shortname_like
(
String
n_shortname_like
)
{
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/impl/IBZDepartmentServiceImpl.java
浏览文件 @
0ebf83eb
...
@@ -39,7 +39,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -39,7 +39,7 @@ import com.alibaba.fastjson.JSONObject;
* 实体[部门] 服务对象接口实现
* 实体[部门] 服务对象接口实现
*/
*/
@Slf4j
@Slf4j
@Service
@Service
(
"IBZDepartmentServiceImpl"
)
public
class
IBZDepartmentServiceImpl
extends
ServiceImpl
<
IBZDepartmentMapper
,
IBZDepartment
>
implements
IIBZDepartmentService
{
public
class
IBZDepartmentServiceImpl
extends
ServiceImpl
<
IBZDepartmentMapper
,
IBZDepartment
>
implements
IIBZDepartmentService
{
@Autowired
@Autowired
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/impl/IBZEmployeeServiceImpl.java
浏览文件 @
0ebf83eb
...
@@ -39,7 +39,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -39,7 +39,7 @@ import com.alibaba.fastjson.JSONObject;
* 实体[人员] 服务对象接口实现
* 实体[人员] 服务对象接口实现
*/
*/
@Slf4j
@Slf4j
@Service
@Service
(
"IBZEmployeeServiceImpl"
)
public
class
IBZEmployeeServiceImpl
extends
ServiceImpl
<
IBZEmployeeMapper
,
IBZEmployee
>
implements
IIBZEmployeeService
{
public
class
IBZEmployeeServiceImpl
extends
ServiceImpl
<
IBZEmployeeMapper
,
IBZEmployee
>
implements
IIBZEmployeeService
{
private
int
batchSize
=
500
;
private
int
batchSize
=
500
;
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/impl/IBZOrganizationServiceImpl.java
浏览文件 @
0ebf83eb
...
@@ -39,7 +39,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -39,7 +39,7 @@ import com.alibaba.fastjson.JSONObject;
* 实体[单位机构] 服务对象接口实现
* 实体[单位机构] 服务对象接口实现
*/
*/
@Slf4j
@Slf4j
@Service
@Service
(
"IBZOrganizationServiceImpl"
)
public
class
IBZOrganizationServiceImpl
extends
ServiceImpl
<
IBZOrganizationMapper
,
IBZOrganization
>
implements
IIBZOrganizationService
{
public
class
IBZOrganizationServiceImpl
extends
ServiceImpl
<
IBZOrganizationMapper
,
IBZOrganization
>
implements
IIBZOrganizationService
{
@Autowired
@Autowired
...
...
ibzou-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
0ebf83eb
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<databaseChangeLog
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext=
"http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"
>
<databaseChangeLog
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext=
"http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"
>
<!--输出实体[IBZORG]数据结构 -->
<!--输出实体[IBZORG]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-ibzorg-3
80
-1"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-ibzorg-3
97
-1"
>
<createTable
tableName=
"IBZORG"
>
<createTable
tableName=
"IBZORG"
>
<column
name=
"ORGID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"ORGID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_IBZORG_ORGID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_IBZORG_ORGID"
/>
...
@@ -106,7 +106,7 @@
...
@@ -106,7 +106,7 @@
</createTable>
</createTable>
</changeSet>
</changeSet>
<!--输出实体[IBZDEPT]数据结构 -->
<!--输出实体[IBZDEPT]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-ibzdept-
499
-3"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-ibzdept-
508
-3"
>
<createTable
tableName=
"IBZDEPT"
>
<createTable
tableName=
"IBZDEPT"
>
<column
name=
"DEPTID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"DEPTID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_IBZDEPT_DEPTID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_IBZDEPT_DEPTID"
/>
...
@@ -139,7 +139,7 @@
...
@@ -139,7 +139,7 @@
</changeSet>
</changeSet>
<!--输出实体[IBZORG]外键关系 -->
<!--输出实体[IBZORG]外键关系 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-ibzorg-3
80
-4"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-ibzorg-3
97
-4"
>
<addForeignKeyConstraint
baseColumnNames=
"PORGID"
baseTableName=
"IBZORG"
constraintName=
"DER1N_IBZORG_IBZORG_PORGID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ORGID"
referencedTableName=
"IBZORG"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"PORGID"
baseTableName=
"IBZORG"
constraintName=
"DER1N_IBZORG_IBZORG_PORGID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ORGID"
referencedTableName=
"IBZORG"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[IBZEMP]外键关系 -->
<!--输出实体[IBZEMP]外键关系 -->
...
@@ -150,10 +150,10 @@
...
@@ -150,10 +150,10 @@
<addForeignKeyConstraint
baseColumnNames=
"ORGID"
baseTableName=
"IBZEMP"
constraintName=
"DER1N_IBZEMP_IBZORG_ORGID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ORGID"
referencedTableName=
"IBZORG"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"ORGID"
baseTableName=
"IBZEMP"
constraintName=
"DER1N_IBZEMP_IBZORG_ORGID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ORGID"
referencedTableName=
"IBZORG"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[IBZDEPT]外键关系 -->
<!--输出实体[IBZDEPT]外键关系 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-ibzdept-
499
-7"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-ibzdept-
508
-7"
>
<addForeignKeyConstraint
baseColumnNames=
"PDEPTID"
baseTableName=
"IBZDEPT"
constraintName=
"DER1N_IBZDEPT_IBZDEPT_PDEPTID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"DEPTID"
referencedTableName=
"IBZDEPT"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"PDEPTID"
baseTableName=
"IBZDEPT"
constraintName=
"DER1N_IBZDEPT_IBZDEPT_PDEPTID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"DEPTID"
referencedTableName=
"IBZDEPT"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-ibzdept-
499
-8"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-ibzdept-
508
-8"
>
<addForeignKeyConstraint
baseColumnNames=
"ORGID"
baseTableName=
"IBZDEPT"
constraintName=
"DER1N_IBZDEPT_IBZORG_ORGID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ORGID"
referencedTableName=
"IBZORG"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"ORGID"
baseTableName=
"IBZDEPT"
constraintName=
"DER1N_IBZDEPT_IBZORG_ORGID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ORGID"
referencedTableName=
"IBZORG"
validate=
"true"
/>
</changeSet>
</changeSet>
...
...
ibzou-core/src/main/resources/mapper/ou/ibzdepartment/IBZDepartmentMapper.xml
浏览文件 @
0ebf83eb
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select
id=
"selectById"
resultMap=
"IBZDepartmentResultMap"
databaseId=
"mysql"
>
<select
id=
"selectById"
resultMap=
"IBZDepartmentResultMap"
databaseId=
"mysql"
>
<![CDATA[select t1.* from (SELECT t1.`BCODE`, t1.`CREATEDATE`, t1.`DEPTCODE`, t1.`DEPTID`, t1.`DEPTLEVEL`, t1.`DEPTNAME`, t1.`ENABLE`, t1.`ORGID`, t1.`ORGNAME`, t1.`PDEPTID`, t1
.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZDEPT` t1
) t1 where deptid=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.`BCODE`, t1.`CREATEDATE`, t1.`DEPTCODE`, t1.`DEPTID`, t1.`DEPTLEVEL`, t1.`DEPTNAME`, t1.`ENABLE`, t1.`ORGID`, t1.`ORGNAME`, t1.`PDEPTID`, t1
1.`DEPTNAME` AS `PDEPTNAME`, t1.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZDEPT` t1 LEFT JOIN IBZDEPT t11 ON t1.PDEPTID = t11.DEPTID
) t1 where deptid=#{id}]]>
</select>
</select>
<select
id=
"selectById"
resultMap=
"IBZDepartmentResultMap"
databaseId=
"postgresql"
>
<select
id=
"selectById"
resultMap=
"IBZDepartmentResultMap"
databaseId=
"postgresql"
>
<![CDATA[select t1.* from (SELECT t1.BCODE, t1.CREATEDATE, t1.DEPTCODE, t1.DEPTID, t1.DEPTLEVEL, t1.DEPTNAME, t1.ENABLE, t1.ORGID, t1.PDEPTID, t1.SHORTNAME, t1.SHOWORDER, t1.UPDATEDATE FROM IBZDEPT t1 ) t1 where deptid=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.BCODE, t1.CREATEDATE, t1.DEPTCODE, t1.DEPTID, t1.DEPTLEVEL, t1.DEPTNAME, t1.ENABLE, t1.ORGID, t1.PDEPTID, t1.SHORTNAME, t1.SHOWORDER, t1.UPDATEDATE FROM IBZDEPT t1 ) t1 where deptid=#{id}]]>
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
<!--数据查询[Default]-->
<!--数据查询[Default]-->
<sql
id=
"Default"
databaseId=
"mysql"
>
<sql
id=
"Default"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`BCODE`, t1.`CREATEDATE`, t1.`DEPTCODE`, t1.`DEPTID`, t1.`DEPTLEVEL`, t1.`DEPTNAME`, t1.`ENABLE`, t1.`ORGID`, t1.`ORGNAME`, t1.`PDEPTID`, t1
.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZDEPT` t1
<![CDATA[ SELECT t1.`BCODE`, t1.`CREATEDATE`, t1.`DEPTCODE`, t1.`DEPTID`, t1.`DEPTLEVEL`, t1.`DEPTNAME`, t1.`ENABLE`, t1.`ORGID`, t1.`ORGNAME`, t1.`PDEPTID`, t1
1.`DEPTNAME` AS `PDEPTNAME`, t1.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZDEPT` t1 LEFT JOIN IBZDEPT t11 ON t1.PDEPTID = t11.DEPTID
WHERE t1.ENABLE = 1
WHERE t1.ENABLE = 1
]]>
]]>
</sql>
</sql>
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
<!--数据查询[View]-->
<!--数据查询[View]-->
<sql
id=
"View"
databaseId=
"mysql"
>
<sql
id=
"View"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`BCODE`, t1.`CREATEDATE`, t1.`DEPTCODE`, t1.`DEPTID`, t1.`DEPTLEVEL`, t1.`DEPTNAME`, t1.`ENABLE`, t1.`ORGID`, t1.`ORGNAME`, t1.`PDEPTID`, t1
.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZDEPT` t1
<![CDATA[ SELECT t1.`BCODE`, t1.`CREATEDATE`, t1.`DEPTCODE`, t1.`DEPTID`, t1.`DEPTLEVEL`, t1.`DEPTNAME`, t1.`ENABLE`, t1.`ORGID`, t1.`ORGNAME`, t1.`PDEPTID`, t1
1.`DEPTNAME` AS `PDEPTNAME`, t1.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZDEPT` t1 LEFT JOIN IBZDEPT t11 ON t1.PDEPTID = t11.DEPTID
WHERE t1.ENABLE = 1
WHERE t1.ENABLE = 1
]]>
]]>
</sql>
</sql>
...
...
ibzou-core/src/main/resources/mapper/ou/ibzorganization/IBZOrganizationMapper.xml
浏览文件 @
0ebf83eb
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select
id=
"selectById"
resultMap=
"IBZOrganizationResultMap"
databaseId=
"mysql"
>
<select
id=
"selectById"
resultMap=
"IBZOrganizationResultMap"
databaseId=
"mysql"
>
<![CDATA[select t1.* from (SELECT t1.`CREATEDATE`, t1.`ENABLE`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t1
.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZORG` t1
) t1 where orgid=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.`CREATEDATE`, t1.`ENABLE`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t1
1.`ORGNAME` AS `PORGNAME`, t1.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZORG` t1 LEFT JOIN IBZORG t11 ON t1.PORGID = t11.ORGID
) t1 where orgid=#{id}]]>
</select>
</select>
<select
id=
"selectById"
resultMap=
"IBZOrganizationResultMap"
databaseId=
"postgresql"
>
<select
id=
"selectById"
resultMap=
"IBZOrganizationResultMap"
databaseId=
"postgresql"
>
<![CDATA[select t1.* from (SELECT t1.CREATEDATE, t1.ENABLE, t1.ORGCODE, t1.ORGID, t1.ORGLEVEL, t1.ORGNAME, t1.PORGID, t1.SHORTNAME, t1.SHOWORDER, t1.UPDATEDATE FROM IBZORG t1 ) t1 where orgid=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.CREATEDATE, t1.ENABLE, t1.ORGCODE, t1.ORGID, t1.ORGLEVEL, t1.ORGNAME, t1.PORGID, t1.SHORTNAME, t1.SHOWORDER, t1.UPDATEDATE FROM IBZORG t1 ) t1 where orgid=#{id}]]>
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
<!--数据查询[Default]-->
<!--数据查询[Default]-->
<sql
id=
"Default"
databaseId=
"mysql"
>
<sql
id=
"Default"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`ENABLE`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t1
.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZORG` t1
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`ENABLE`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t1
1.`ORGNAME` AS `PORGNAME`, t1.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZORG` t1 LEFT JOIN IBZORG t11 ON t1.PORGID = t11.ORGID
WHERE t1.ENABLE = 1
WHERE t1.ENABLE = 1
]]>
]]>
</sql>
</sql>
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
<!--数据查询[SelectPOrg]-->
<!--数据查询[SelectPOrg]-->
<sql
id=
"SelectPOrg"
databaseId=
"mysql"
>
<sql
id=
"SelectPOrg"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`ENABLE`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t1
.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZORG` t1
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`ENABLE`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t1
1.`ORGNAME` AS `PORGNAME`, t1.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZORG` t1 LEFT JOIN IBZORG t11 ON t1.PORGID = t11.ORGID
WHERE t1.ENABLE = 1
WHERE t1.ENABLE = 1
AND ( INSTR(#{srf.datacontext.orglevel} t1.ORGLEVEL)=1 )
AND ( INSTR(#{srf.datacontext.orglevel} t1.ORGLEVEL)=1 )
]]>
]]>
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
<!--数据查询[SelectSOrg]-->
<!--数据查询[SelectSOrg]-->
<sql
id=
"SelectSOrg"
databaseId=
"mysql"
>
<sql
id=
"SelectSOrg"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`ENABLE`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t1
.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZORG` t1
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`ENABLE`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t1
1.`ORGNAME` AS `PORGNAME`, t1.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZORG` t1 LEFT JOIN IBZORG t11 ON t1.PORGID = t11.ORGID
WHERE t1.ENABLE = 1
WHERE t1.ENABLE = 1
AND ( INSTR(t1.ORGLEVEL,#{srf.datacontext.orglevel} )
AND ( INSTR(t1.ORGLEVEL,#{srf.datacontext.orglevel} )
]]>
]]>
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
<!--数据查询[View]-->
<!--数据查询[View]-->
<sql
id=
"View"
databaseId=
"mysql"
>
<sql
id=
"View"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`ENABLE`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t1
.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZORG` t1
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`ENABLE`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t1
1.`ORGNAME` AS `PORGNAME`, t1.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZORG` t1 LEFT JOIN IBZORG t11 ON t1.PORGID = t11.ORGID
WHERE t1.ENABLE = 1
WHERE t1.ENABLE = 1
]]>
]]>
</sql>
</sql>
...
...
ibzou-provider/ibzou-provider-ouapi/src/main/java/cn/ibizlab/ouapi/dto/IBZDepartmentDTO.java
浏览文件 @
0ebf83eb
...
@@ -63,6 +63,14 @@ public class IBZDepartmentDTO extends DTOBase implements Serializable {
...
@@ -63,6 +63,14 @@ public class IBZDepartmentDTO extends DTOBase implements Serializable {
@JsonProperty
(
"parentdeptid"
)
@JsonProperty
(
"parentdeptid"
)
private
String
parentdeptid
;
private
String
parentdeptid
;
/**
* 属性 [PDEPTNAME]
*
*/
@JSONField
(
name
=
"pdeptname"
)
@JsonProperty
(
"pdeptname"
)
private
String
pdeptname
;
/**
/**
* 属性 [SHORTNAME]
* 属性 [SHORTNAME]
*
*
...
...
ibzou-provider/ibzou-provider-ouapi/src/main/java/cn/ibizlab/ouapi/dto/IBZOrganizationDTO.java
浏览文件 @
0ebf83eb
...
@@ -55,6 +55,14 @@ public class IBZOrganizationDTO extends DTOBase implements Serializable {
...
@@ -55,6 +55,14 @@ public class IBZOrganizationDTO extends DTOBase implements Serializable {
@JsonProperty
(
"parentorgid"
)
@JsonProperty
(
"parentorgid"
)
private
String
parentorgid
;
private
String
parentorgid
;
/**
* 属性 [PORGNAME]
*
*/
@JSONField
(
name
=
"porgname"
)
@JsonProperty
(
"porgname"
)
private
String
porgname
;
/**
/**
* 属性 [SHORTNAME]
* 属性 [SHORTNAME]
*
*
...
...
ibzou-provider/ibzou-provider-ouapi/src/main/java/cn/ibizlab/ouapi/rest/IBZDepartmentResource.java
浏览文件 @
0ebf83eb
...
@@ -114,7 +114,6 @@ public class IBZDepartmentResource {
...
@@ -114,7 +114,6 @@ public class IBZDepartmentResource {
@PreAuthorize
(
"hasPermission('','READ',this.getEntity())"
)
@ApiOperation
(
value
=
"GetDraft"
,
tags
=
{
"IBZDepartment"
},
notes
=
"GetDraft"
)
@ApiOperation
(
value
=
"GetDraft"
,
tags
=
{
"IBZDepartment"
},
notes
=
"GetDraft"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzdepartments/getdraft"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzdepartments/getdraft"
)
public
ResponseEntity
<
IBZDepartmentDTO
>
getDraft
()
{
public
ResponseEntity
<
IBZDepartmentDTO
>
getDraft
()
{
...
...
ibzou-provider/ibzou-provider-ouapi/src/main/java/cn/ibizlab/ouapi/rest/IBZEmployeeResource.java
浏览文件 @
0ebf83eb
...
@@ -168,7 +168,6 @@ public class IBZEmployeeResource {
...
@@ -168,7 +168,6 @@ public class IBZEmployeeResource {
@PreAuthorize
(
"hasPermission('','READ',this.getEntity())"
)
@ApiOperation
(
value
=
"GetDraft"
,
tags
=
{
"IBZEmployee"
},
notes
=
"GetDraft"
)
@ApiOperation
(
value
=
"GetDraft"
,
tags
=
{
"IBZEmployee"
},
notes
=
"GetDraft"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzemployees/getdraft"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzemployees/getdraft"
)
public
ResponseEntity
<
IBZEmployeeDTO
>
getDraft
()
{
public
ResponseEntity
<
IBZEmployeeDTO
>
getDraft
()
{
...
...
ibzou-provider/ibzou-provider-ouapi/src/main/java/cn/ibizlab/ouapi/rest/IBZOrganizationResource.java
浏览文件 @
0ebf83eb
...
@@ -155,7 +155,6 @@ public class IBZOrganizationResource {
...
@@ -155,7 +155,6 @@ public class IBZOrganizationResource {
@PreAuthorize
(
"hasPermission('','READ',this.getEntity())"
)
@ApiOperation
(
value
=
"GetDraft"
,
tags
=
{
"IBZOrganization"
},
notes
=
"GetDraft"
)
@ApiOperation
(
value
=
"GetDraft"
,
tags
=
{
"IBZOrganization"
},
notes
=
"GetDraft"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzorganizations/getdraft"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzorganizations/getdraft"
)
public
ResponseEntity
<
IBZOrganizationDTO
>
getDraft
()
{
public
ResponseEntity
<
IBZOrganizationDTO
>
getDraft
()
{
...
...
ibzou-util/src/main/java/cn/ibizlab/util/client/IBZOUFallback.java
浏览文件 @
0ebf83eb
...
@@ -7,7 +7,7 @@ import org.springframework.stereotype.Component;
...
@@ -7,7 +7,7 @@ import org.springframework.stereotype.Component;
public
class
IBZOUFallback
implements
IBZOUFeignClient
{
public
class
IBZOUFallback
implements
IBZOUFeignClient
{
@Override
@Override
public
JSONObject
getOrgInfo
(
String
orgLevel
)
{
public
JSONObject
getOrgInfo
(
String
loginName
)
{
return
null
;
return
null
;
}
}
}
}
ibzou-util/src/main/java/cn/ibizlab/util/client/IBZOUFeignClient.java
浏览文件 @
0ebf83eb
...
@@ -11,9 +11,9 @@ public interface IBZOUFeignClient
...
@@ -11,9 +11,9 @@ public interface IBZOUFeignClient
/**
/**
* 从ou中获取当前上下级组织、部门信息
* 从ou中获取当前上下级组织、部门信息
* @param
orgLevel
* @param
loginName 登录名
* @return
* @return
*/
*/
@GetMapping
(
value
=
"/ibzou/org/{
orglevel
}"
)
@GetMapping
(
value
=
"/ibzou/org/{
loginname
}"
)
JSONObject
getOrgInfo
(
@PathVariable
(
"
orglevel"
)
String
orgLevel
);
JSONObject
getOrgInfo
(
@PathVariable
(
"
loginname"
)
String
loginName
);
}
}
ibzou-util/src/main/java/cn/ibizlab/util/client/IBZUAAFallback.java
浏览文件 @
0ebf83eb
...
@@ -8,7 +8,7 @@ import java.util.Map;
...
@@ -8,7 +8,7 @@ import java.util.Map;
public
class
IBZUAAFallback
implements
IBZUAAFeignClient
{
public
class
IBZUAAFallback
implements
IBZUAAFeignClient
{
@Override
@Override
public
JSONObject
getUserPermissionData
(
String
userId
,
String
systemId
)
{
public
JSONObject
getUserPermissionData
(
String
loginName
,
String
systemId
)
{
return
null
;
return
null
;
}
}
...
...
ibzou-util/src/main/java/cn/ibizlab/util/client/IBZUAAFeignClient.java
浏览文件 @
0ebf83eb
...
@@ -11,12 +11,12 @@ public interface IBZUAAFeignClient
...
@@ -11,12 +11,12 @@ public interface IBZUAAFeignClient
/**
/**
* 从uaa中获取当前用户权限
* 从uaa中获取当前用户权限
* @param
userId
* @param
loginName
* @param systemId
* @param systemId
* @return
* @return
*/
*/
@GetMapping
(
value
=
"/uaa/permission/{
userid
}"
)
@GetMapping
(
value
=
"/uaa/permission/{
loginname
}"
)
JSONObject
getUserPermissionData
(
@PathVariable
(
"
userid"
)
String
userId
,
@RequestParam
(
"systemid"
)
String
systemId
);
JSONObject
getUserPermissionData
(
@PathVariable
(
"
loginname"
)
String
loginName
,
@RequestParam
(
"systemid"
)
String
systemId
);
/**
/**
* 推送系统权限数据到uaa
* 推送系统权限数据到uaa
...
...
ibzou-util/src/main/java/cn/ibizlab/util/domain/FileItem.java
0 → 100644
浏览文件 @
0ebf83eb
package
cn
.
ibizlab
.
util
.
domain
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.fasterxml.jackson.annotation.JsonInclude.Include
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
@Data
@JsonInclude
(
Include
.
NON_NULL
)
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
@AllArgsConstructor
public
class
FileItem
{
private
String
id
;
private
String
name
;
private
long
size
;
private
String
ext
;
}
ibzou-util/src/main/java/cn/ibizlab/util/job/PermissionSyncJob.java
浏览文件 @
0ebf83eb
...
@@ -21,7 +21,7 @@ import java.io.IOException;
...
@@ -21,7 +21,7 @@ import java.io.IOException;
/**
/**
* 权限:向uaa同步当前系统菜单、权限资源任务类
* 权限:向uaa同步当前系统菜单、权限资源任务类
*/
*/
//
@Component //开启此类需要保证Main中开启了feign :EnableFeignClients
@Component
//开启此类需要保证Main中开启了feign :EnableFeignClients
public
class
PermissionSyncJob
implements
ApplicationRunner
{
public
class
PermissionSyncJob
implements
ApplicationRunner
{
private
Log
log
=
LogFactory
.
getLog
(
PermissionSyncJob
.
class
);
private
Log
log
=
LogFactory
.
getLog
(
PermissionSyncJob
.
class
);
...
...
ibzou-util/src/main/java/cn/ibizlab/util/rest/FileController.java
0 → 100644
浏览文件 @
0ebf83eb
package
cn
.
ibizlab
.
util
.
rest
;
import
cn.ibizlab.util.domain.FileItem
;
import
cn.ibizlab.util.service.FileService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.*
;
@Slf4j
public
class
FileController
{
@Autowired
private
FileService
fileService
;
@PostMapping
(
value
=
"${ibiz.uploadpath.path:ibizutil/upload}"
)
public
ResponseEntity
<
FileItem
>
upload
(
@RequestParam
(
"file"
)
MultipartFile
multipartFile
){
return
ResponseEntity
.
ok
().
body
(
fileService
.
saveFile
(
multipartFile
));
}
private
final
String
defaultdownloadpath
=
"ibizutil/download/{id}"
;
protected
String
getDefaultdownloadpath
(){
return
defaultdownloadpath
;
}
@GetMapping
(
value
=
"${ibiz.file.downloadpath:"
+
defaultdownloadpath
+
"}"
)
@ResponseStatus
(
HttpStatus
.
OK
)
public
void
download
(
@PathVariable
String
id
,
HttpServletResponse
response
){
File
file
=
fileService
.
getFile
(
id
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
getFileName
(
file
.
getName
()));
this
.
sendRespose
(
response
,
file
);
}
protected
void
sendRespose
(
HttpServletResponse
response
,
File
file
){
BufferedInputStream
bis
=
null
;
BufferedOutputStream
bos
=
null
;
try
{
bis
=
new
BufferedInputStream
(
new
FileInputStream
(
file
));
bos
=
new
BufferedOutputStream
(
response
.
getOutputStream
());
byte
[]
buff
=
new
byte
[
2048
];
int
bytesRead
;
while
(-
1
!=
(
bytesRead
=
bis
.
read
(
buff
,
0
,
buff
.
length
)))
{
bos
.
write
(
buff
,
0
,
bytesRead
);
}
}
catch
(
Exception
e
)
{
//throw e;
}
finally
{
if
(
bis
!=
null
)
{
try
{
bis
.
close
();
}
catch
(
IOException
e
)
{
}
}
if
(
bos
!=
null
)
{
try
{
bos
.
close
();
}
catch
(
IOException
e
)
{
}
}
}
}
protected
String
getFileName
(
String
fileName
){
try
{
return
new
String
(
fileName
.
getBytes
(
"utf-8"
),
"iso8859-1"
);
//防止中文乱码
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
}
return
fileName
;
}
}
\ No newline at end of file
ibzou-util/src/main/java/cn/ibizlab/util/security/AuthPermissionEvaluator.java
浏览文件 @
0ebf83eb
此差异已折叠。
点击以展开。
ibzou-util/src/main/java/cn/ibizlab/util/security/AuthenticationUser.java
浏览文件 @
0ebf83eb
...
@@ -62,7 +62,8 @@ public class AuthenticationUser implements UserDetails
...
@@ -62,7 +62,8 @@ public class AuthenticationUser implements UserDetails
private
int
superuser
;
private
int
superuser
;
@JsonIgnore
@JsonIgnore
private
JSONObject
permisionList
;
private
JSONObject
permisionList
;
private
String
levelcode
;
//单位级别编码
private
String
orglevel
;
//单位级别
private
String
deptlevel
;
//部门级别
@JsonIgnore
@JsonIgnore
private
Map
<
String
,
String
>
userSessionParam
;
//用户自定义session值
private
Map
<
String
,
String
>
userSessionParam
;
//用户自定义session值
@JsonIgnore
@JsonIgnore
...
...
ibzou-util/src/main/java/cn/ibizlab/util/service/FileService.java
0 → 100644
浏览文件 @
0ebf83eb
package
cn
.
ibizlab
.
util
.
service
;
import
cn.ibizlab.util.domain.FileItem
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.File
;
public
interface
FileService
{
FileItem
saveFile
(
MultipartFile
multipartFile
);
File
getFile
(
String
fileid
);
}
\ No newline at end of file
ibzou-util/src/main/java/cn/ibizlab/util/service/SimpleFileService.java
0 → 100644
浏览文件 @
0ebf83eb
package
cn
.
ibizlab
.
util
.
service
;
import
cn.ibizlab.util.domain.FileItem
;
import
cn.ibizlab.util.errors.InternalServerErrorException
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Primary
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.FileCopyUtils
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.File
;
import
java.io.IOException
;
import
java.nio.file.Files
;
import
java.util.UUID
;
@Primary
@Slf4j
@Service
public
class
SimpleFileService
implements
FileService
{
@Value
(
"${ibiz.filePath:/app/file/}"
)
private
String
fileRoot
;
@Override
public
FileItem
saveFile
(
MultipartFile
multipartFile
)
{
FileItem
item
=
null
;
// 获取文件名
String
fileName
=
multipartFile
.
getOriginalFilename
();
// 获取文件后缀
String
extname
=
"."
+
getExtensionName
(
fileName
);
// 用uuid作为文件名,防止生成的临时文件重复
String
fileid
=
UUID
.
randomUUID
().
toString
();
String
fileFullPath
=
this
.
fileRoot
+
"ibztuit"
+
File
.
separator
+
fileid
+
File
.
separator
+
fileName
;
File
file
=
new
File
(
fileFullPath
);
File
parent
=
new
File
(
file
.
getParent
());
if
(!
parent
.
exists
())
parent
.
mkdirs
();
try
{
FileCopyUtils
.
copy
(
multipartFile
.
getInputStream
()
,
Files
.
newOutputStream
(
file
.
toPath
()));
item
=
new
FileItem
(
fileid
,
fileName
,
(
int
)
multipartFile
.
getSize
()
,
extname
);
}
catch
(
IOException
e
)
{
throw
new
InternalServerErrorException
(
"文件上传失败"
);
}
return
item
;
}
@Override
public
File
getFile
(
String
fileid
)
{
String
dirpath
=
this
.
fileRoot
+
"ibztuit"
+
File
.
separator
+
fileid
;
File
parent
=
new
File
(
dirpath
);
if
(
parent
.
exists
()
&&
parent
.
isDirectory
()
&&
parent
.
listFiles
().
length
>
0
)
{
return
parent
.
listFiles
()[
0
];
}
throw
new
InternalServerErrorException
(
"文件未找到"
);
}
/**
* 获取文件扩展名
* @param filename
* @return
*/
public
static
String
getExtensionName
(
String
filename
)
{
if
((
filename
!=
null
)
&&
(
filename
.
length
()
>
0
))
{
int
dot
=
filename
.
lastIndexOf
(
'.'
);
if
((
dot
>-
1
)
&&
(
dot
<
(
filename
.
length
()
-
1
)))
{
return
filename
.
substring
(
dot
+
1
);
}
}
return
filename
;
}
}
\ No newline at end of file
ibzou-util/src/main/java/cn/ibizlab/util/service/SimpleUserService.java
浏览文件 @
0ebf83eb
...
@@ -60,7 +60,6 @@ public class SimpleUserService implements AuthenticationUserService{
...
@@ -60,7 +60,6 @@ public class SimpleUserService implements AuthenticationUserService{
user
.
setOrgcode
(
domains
);
user
.
setOrgcode
(
domains
);
user
.
setOrgname
(
domains
);
user
.
setOrgname
(
domains
);
testPermissionData
(
user
);
setUserPermission
(
user
);
setUserPermission
(
user
);
setUserOrgInfo
(
user
);
setUserOrgInfo
(
user
);
...
@@ -91,7 +90,7 @@ public class SimpleUserService implements AuthenticationUserService{
...
@@ -91,7 +90,7 @@ public class SimpleUserService implements AuthenticationUserService{
*/
*/
private
void
setUserPermission
(
AuthenticationUser
user
)
{
private
void
setUserPermission
(
AuthenticationUser
user
)
{
if
(
enablePermissionValid
){
if
(
enablePermissionValid
){
JSONObject
permission
=
uaaFeignClient
.
getUserPermissionData
(
user
.
get
Userid
(),
systemid
);
JSONObject
permission
=
uaaFeignClient
.
getUserPermissionData
(
user
.
get
Loginname
(),
systemid
);
user
.
setPermisionList
(
permission
);
user
.
setPermisionList
(
permission
);
}
}
}
}
...
@@ -102,18 +101,11 @@ public class SimpleUserService implements AuthenticationUserService{
...
@@ -102,18 +101,11 @@ public class SimpleUserService implements AuthenticationUserService{
*/
*/
private
void
setUserOrgInfo
(
AuthenticationUser
user
)
{
private
void
setUserOrgInfo
(
AuthenticationUser
user
)
{
if
(
enablePermissionValid
)
{
if
(
enablePermissionValid
)
{
user
.
setOrgInfo
(
ouFeignClient
.
getOrgInfo
(
user
.
getLevelcode
()));
JSONObject
orgInfo
=
ouFeignClient
.
getOrgInfo
(
user
.
getLoginname
());
if
(
orgInfo
==
null
)
throw
new
RuntimeException
(
"获取用户信息失败,请检查用户中心[IBZOU]中是否存在当前用户!"
);
user
.
setOrgInfo
(
orgInfo
);
}
}
}
}
/**
* 测试数据
* @param user
*/
private
void
testPermissionData
(
AuthenticationUser
user
){
user
.
setLevelcode
(
"4501"
);
user
.
setUserid
(
"4fb71d8997d4505d2748ad2bdc471969"
);
this
.
systemid
=
"2C40DFCD-0DF5-47BF-91A5-C45F810B0001"
;
}
}
}
ibzou-util/src/main/resources/application-sys.yml
浏览文件 @
0ebf83eb
...
@@ -60,3 +60,7 @@ logging:
...
@@ -60,3 +60,7 @@ logging:
ribbon
:
ribbon
:
ReadTimeout
:
60000
ReadTimeout
:
60000
ConnectTimeout
:
60000
ConnectTimeout
:
60000
#系统是否开启权限验证
ibiz
:
enablePermissionValid
:
false
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录