Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzou
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzou
提交
16ac5cee
提交
16ac5cee
编写于
4月 01, 2021
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
hebao1234 发布系统代码 [ibz-ou,统一组织单位]
上级
d1512977
变更
17
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
200 行增加
和
58 行删除
+200
-58
sys-organizations.ts
...eb/src/mock/entity/sys-organizations/sys-organizations.ts
+44
-0
sys-organization-service-base.ts
...service/sys-organization/sys-organization-service-base.ts
+29
-0
config.xml
config.xml
+0
-5
Dockerfile
ibzou-app/ibzou-app-web/src/main/docker/Dockerfile
+1
-1
ibzou-app-web-k8s.yaml
...-app/ibzou-app-web/src/main/docker/ibzou-app-web-k8s.yaml
+4
-31
ibzou-app-web.yaml
ibzou-app/ibzou-app-web/src/main/docker/ibzou-app-web.yaml
+1
-15
SysOrganizationMapper.java
...java/cn/ibizlab/core/ou/mapper/SysOrganizationMapper.java
+1
-0
ISysDeptMemberService.java
...ava/cn/ibizlab/core/ou/service/ISysDeptMemberService.java
+1
-0
ISysOrganizationService.java
...a/cn/ibizlab/core/ou/service/ISysOrganizationService.java
+1
-0
SysDeptMemberServiceImpl.java
...bizlab/core/ou/service/impl/SysDeptMemberServiceImpl.java
+9
-0
SysOrganizationServiceImpl.java
...zlab/core/ou/service/impl/SysOrganizationServiceImpl.java
+9
-0
h2_table.xml
ibzou-core/src/main/resources/liquibase/h2_table.xml
+2
-2
SysOrganizationMapper.xml
...urces/mapper/ou/sysorganization/SysOrganizationMapper.xml
+19
-3
systemResource.json
ibzou-core/src/main/resources/permission/systemResource.json
+1
-1
SysDeptMemberResource.java
.../main/java/cn/ibizlab/api/rest/SysDeptMemberResource.java
+50
-0
SysOrganizationResource.java
...ain/java/cn/ibizlab/api/rest/SysOrganizationResource.java
+22
-0
AuthenticationUser.java
...ain/java/cn/ibizlab/util/security/AuthenticationUser.java
+6
-0
未找到文件。
app_web/src/mock/entity/sys-organizations/sys-organizations.ts
浏览文件 @
16ac5cee
...
...
@@ -314,6 +314,50 @@ mock.onGet(new RegExp(/^\/sysorganizations\/fetchdefault(\?[\w-./?%&=,]*)*$/)).r
console
.
groupEnd
();
return
[
status
,
records
?
records
:
[]];
});
// FetchTopOrg
mock
.
onGet
(
new
RegExp
(
/^
\/
sysorganizations
\/
fetchtoporg$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysorganization 方法: FetchTopOrg"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
mockDatas
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
?
mockDatas
:
[]];
});
// FetchTopOrg
mock
.
onGet
(
new
RegExp
(
/^
\/
sysorganizations
\/
fetchtoporg
(\?[\w
-.
/
?%&=,
]
*
)
*$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysorganization 方法: FetchTopOrg"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
if
(
config
.
url
.
includes
(
'page'
)){
let
url
=
config
.
url
.
split
(
'?'
)[
1
];
let
params
=
qs
.
parse
(
url
);
Object
.
assign
(
config
,
params
);
}
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
let
total
=
mockDatas
.
length
;
let
records
:
Array
<
any
>
=
[];
if
(
!
config
.
page
||
!
config
.
size
){
records
=
mockDatas
;
}
else
{
if
((
config
.
page
-
1
)
*
config
.
size
<
total
){
records
=
mockDatas
.
slice
(
config
.
page
,
config
.
size
);
}
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
records
?
records
:
[]);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
records
?
records
:
[]];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
...
...
app_web/src/service/sys-organization/sys-organization-service-base.ts
浏览文件 @
16ac5cee
...
...
@@ -200,4 +200,33 @@ export default class SysOrganizationServiceBase extends EntityService {
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/sysorganizations/searchdefault`
,
tempData
,
isloading
);
}
/**
* FetchTopOrg接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysOrganizationServiceBase
*/
public
async
FetchTopOrg
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
let
res
:
any
=
Http
.
getInstance
().
get
(
`/sysorganizations/fetchtoporg`
,
tempData
,
isloading
);
return
res
;
}
/**
* searchTopOrg接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysOrganizationServiceBase
*/
public
async
searchTopOrg
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/sysorganizations/searchtoporg`
,
tempData
,
isloading
);
}
}
\ No newline at end of file
config.xml
浏览文件 @
16ac5cee
...
...
@@ -37,11 +37,6 @@
git clone -b master $para2 ibzou/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzou/
mvn clean package -Pweb
cd ibzou-app/ibzou-app-web
mvn -Pweb docker:build
mvn -Pweb docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzou-app-web.yaml ibzlab-rt --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
...
...
ibzou-app/ibzou-app-web/src/main/docker/Dockerfile
浏览文件 @
16ac5cee
...
...
@@ -10,6 +10,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Duser.timezone=$TZ -Djava.security.egd=file:/dev/./urandom -jar /ibzou-app-web.jar
EXPOSE
30001
EXPOSE
8080
ADD
ibzou-app-web.jar /ibzou-app-web.jar
ibzou-app/ibzou-app-web/src/main/docker/ibzou-app-web-k8s.yaml
浏览文件 @
16ac5cee
...
...
@@ -22,34 +22,7 @@ spec:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-app-web:latest
imagePullPolicy
:
Always
ports
:
-
containerPort
:
30001
env
:
-
name
:
SPRING_CLOUD_NACOS_DISCOVERY_IP
value
:
"
172.16.180.237"
-
name
:
SERVER_PORT
value
:
"
30001"
-
name
:
SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR
value
:
"
172.16.100.243:8848"
-
name
:
SPRING_REDIS_HOST
value
:
"
172.16.100.243"
-
name
:
SPRING_REDIS_PORT
value
:
"
6379"
-
name
:
SPRING_REDIS_DATABASE
value
:
"
0"
-
name
:
SPRING_DATASOURCE_USERNAME
value
:
"
a_A_5d9d78509"
-
name
:
SPRING_DATASOURCE_PASSWORD
value
:
"
@6dEfb3@"
-
name
:
SPRING_DATASOURCE_URL
value
:
"
jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true"
-
name
:
SPRING_DATASOURCE_DRIVER-CLASS-NAME
value
:
"
com.mysql.jdbc.Driver"
-
name
:
SPRING_DATASOURCE_DEFAULTSCHEMA
value
:
"
a_A_5d9d78509"
-
name
:
NACOS
value
:
"
172.16.100.243:8848"
-
name
:
SPRING_CLOUD_NACOS_DISCOVERY_GROUP
value
:
"
ibizdev"
-
containerPort
:
8080
volumeMounts
:
-
name
:
data
mountPath
:
/app/file
...
...
@@ -69,9 +42,9 @@ spec:
type
:
NodePort
ports
:
-
name
:
http
port
:
30001
targetPort
:
30001
nodePort
:
30001
port
:
8080
targetPort
:
8080
nodePort
:
8080
protocol
:
TCP
selector
:
app
:
ibzou-app-web
...
...
ibzou-app/ibzou-app-web/src/main/docker/ibzou-app-web.yaml
浏览文件 @
16ac5cee
...
...
@@ -3,23 +3,9 @@ services:
ibzou-app-web
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-app-web:latest
ports
:
-
"
30001:30001
"
-
"
8080:8080
"
networks
:
-
agent_network
environment
:
-
SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
-
SERVER_PORT=30001
-
SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.100.243:8848
-
SPRING_REDIS_HOST=172.16.100.243
-
SPRING_REDIS_PORT=6379
-
SPRING_REDIS_DATABASE=0
-
SPRING_DATASOURCE_USERNAME=a_A_5d9d78509
-
SPRING_DATASOURCE_PASSWORD=@6dEfb3@
-
SPRING_DATASOURCE_URL=jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
-
SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
-
SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
-
NACOS=172.16.100.243:8848
-
SPRING_CLOUD_NACOS_DISCOVERY_GROUP=ibizdev
deploy
:
resources
:
limits
:
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/mapper/SysOrganizationMapper.java
浏览文件 @
16ac5cee
...
...
@@ -21,6 +21,7 @@ import com.alibaba.fastjson.JSONObject;
public
interface
SysOrganizationMapper
extends
BaseMapper
<
SysOrganization
>
{
Page
<
SysOrganization
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
SysOrganizationSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
SysOrganization
>
wrapper
);
Page
<
SysOrganization
>
searchTopOrg
(
IPage
page
,
@Param
(
"srf"
)
SysOrganizationSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
SysOrganization
>
wrapper
);
@Override
@Cacheable
(
value
=
"sysorganization"
,
key
=
"'row:'+#p0"
)
SysOrganization
selectById
(
Serializable
id
);
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/ISysDeptMemberService.java
浏览文件 @
16ac5cee
...
...
@@ -38,6 +38,7 @@ public interface ISysDeptMemberService extends IService<SysDeptMember> {
boolean
save
(
SysDeptMember
et
);
void
saveBatch
(
List
<
SysDeptMember
>
list
);
SysDeptMember
saveDeptMember
(
SysDeptMember
et
);
boolean
saveDeptMemberBatch
(
List
<
SysDeptMember
>
etList
);
Page
<
SysDeptMember
>
searchDefault
(
SysDeptMemberSearchContext
context
);
List
<
SysDeptMember
>
selectByDeptid
(
String
deptid
);
void
removeByDeptid
(
String
deptid
);
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/ISysOrganizationService.java
浏览文件 @
16ac5cee
...
...
@@ -42,6 +42,7 @@ public interface ISysOrganizationService extends IService<SysOrganization> {
@CacheEvict
(
value
=
"sysorganization"
,
allEntries
=
true
)
void
saveBatch
(
List
<
SysOrganization
>
list
);
Page
<
SysOrganization
>
searchDefault
(
SysOrganizationSearchContext
context
);
Page
<
SysOrganization
>
searchTopOrg
(
SysOrganizationSearchContext
context
);
List
<
SysOrganization
>
selectByParentorgid
(
String
orgid
);
List
<
SysOrganization
>
selectByParentorgid
(
Collection
<
String
>
ids
);
@CacheEvict
(
value
=
"sysorganization"
,
allEntries
=
true
)
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/impl/SysDeptMemberServiceImpl.java
浏览文件 @
16ac5cee
...
...
@@ -199,6 +199,15 @@ public class SysDeptMemberServiceImpl extends ServiceImpl<SysDeptMemberMapper, S
return
et
;
}
@Override
@Transactional
public
boolean
saveDeptMemberBatch
(
List
<
SysDeptMember
>
etList
)
{
for
(
SysDeptMember
et
:
etList
)
{
saveDeptMember
(
et
);
}
return
true
;
}
@Override
public
List
<
SysDeptMember
>
selectByDeptid
(
String
deptid
)
{
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/impl/SysOrganizationServiceImpl.java
浏览文件 @
16ac5cee
...
...
@@ -231,6 +231,15 @@ public class SysOrganizationServiceImpl extends ServiceImpl<SysOrganizationMappe
return
new
PageImpl
<
SysOrganization
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
/**
* 查询集合 顶级单位
*/
@Override
public
Page
<
SysOrganization
>
searchTopOrg
(
SysOrganizationSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
SysOrganization
>
pages
=
baseMapper
.
searchTopOrg
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
SysOrganization
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
/**
...
...
ibzou-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
16ac5cee
...
...
@@ -142,7 +142,7 @@
<!--输出实体[SYS_ORG]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_org-
49
-4"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_org-
51
-4"
>
<createTable
tableName=
"IBZORG"
>
<column
name=
"ORGID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_ORG_ORGID"
/>
...
...
@@ -252,7 +252,7 @@
<addForeignKeyConstraint
baseColumnNames=
"POSTID"
baseTableName=
"IBZEMP"
constraintName=
"DER1N_SYS_EMP_SYS_POST_POSTID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"POSTID"
referencedTableName=
"IBZPOST"
validate=
"true"
/>
</changeSet>
<!--输出实体[SYS_ORG]外键关系 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-sys_org-
49
-16"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-sys_org-
51
-16"
>
<addForeignKeyConstraint
baseColumnNames=
"PORGID"
baseTableName=
"IBZORG"
constraintName=
"DER1N_SYS_ORG_SYS_ORG_PORGID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ORGID"
referencedTableName=
"IBZORG"
validate=
"true"
/>
</changeSet>
<!--输出实体[SYS_POST]外键关系 -->
...
...
ibzou-core/src/main/resources/mapper/ou/sysorganization/SysOrganizationMapper.xml
浏览文件 @
16ac5cee
...
...
@@ -4,7 +4,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select
id=
"selectById"
resultMap=
"SysOrganizationResultMap"
databaseId=
"mysql"
>
<![CDATA[select t1.* from (SELECT t1.`CREATEDATE`, t1.`DOMAINS`, t1.`ENABLE`, t1.`ISVALID`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t11.`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}]]>
<![CDATA[select t1.* from (SELECT t1.`CREATEDATE`, t1.`DOMAINS`, t1.`ENABLE`, t1.`ISVALID`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t11.`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
id=
"selectById"
resultMap=
"SysOrganizationResultMap"
databaseId=
"oracle"
>
<![CDATA[select t1.* from (SELECT t1.CREATEDATE, t1.DOMAINS, t1.ENABLE, t1.ISVALID, t1.ORGCODE, t1.ORGID, t1.ORGLEVEL, t1.ORGNAME, t1.PORGID, t11.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}]]>
...
...
@@ -41,9 +41,18 @@
<if
test=
"ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere"
>
${ew.sqlSegment}
</if>
</select>
<!--数据集合[TopOrg]-->
<select
id=
"searchTopOrg"
parameterType=
"cn.ibizlab.core.ou.filter.SysOrganizationSearchContext"
resultMap=
"SysOrganizationResultMap"
>
select t1.* from (
<include
refid=
"TopOrg"
/>
)t1
<where><if
test=
"ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere"
>
${ew.sqlSegment}
</if></where>
<if
test=
"ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere"
>
${ew.sqlSegment}
</if>
</select>
<!--数据查询[Default]-->
<sql
id=
"Default"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`DOMAINS`, t1.`ENABLE`, t1.`ISVALID`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t11.`ORGNAME` AS `PORGNAME`, t1.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZORG` t1 LEFT JOIN
IBZORG t11 ON t1.PORGID = t11.ORGID
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`DOMAINS`, t1.`ENABLE`, t1.`ISVALID`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t11.`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
]]>
</sql>
...
...
@@ -59,9 +68,16 @@
WHERE t1.ENABLE = 1
]]>
</sql>
<!--数据查询[TopOrg]-->
<sql
id=
"TopOrg"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`DOMAINS`, t1.`ENABLE`, t1.`ISVALID`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t11.`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
AND ( t1.`PORGID` IS NULL )
]]>
</sql>
<!--数据查询[View]-->
<sql
id=
"View"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`DOMAINS`, t1.`ENABLE`, t1.`ISVALID`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t11.`ORGNAME` AS `PORGNAME`, t1.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZORG` t1 LEFT JOIN
IBZORG t11 ON t1.PORGID = t11.ORGID
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`DOMAINS`, t1.`ENABLE`, t1.`ISVALID`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t11.`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
]]>
</sql>
...
...
ibzou-core/src/main/resources/permission/systemResource.json
浏览文件 @
16ac5cee
...
...
@@ -31,7 +31,7 @@
"dename"
:
"SysOrganization"
,
"delogicname"
:
"单位机构"
,
"sysmoudle"
:{
"id"
:
"OU"
,
"name"
:
"ou"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}
,{
"id"
:
"TopOrg"
,
"name"
:
"顶级单位"
}
],
"deaction"
:[{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
},
{
"id"
:
"curorg"
,
"name"
:
"当前单位"
},{
"id"
:
"porg"
,
"name"
:
"上级单位"
},{
"id"
:
"sorg"
,
"name"
:
"下级单位"
}
]
}
...
...
ibzou-provider/ibzou-provider-api/src/main/java/cn/ibizlab/api/rest/SysDeptMemberResource.java
浏览文件 @
16ac5cee
...
...
@@ -146,6 +146,14 @@ public class SysDeptMemberResource {
sysdeptmemberdto
=
sysdeptmemberMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysdeptmemberdto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysDeptMember-SaveDeptMember-all')"
)
@ApiOperation
(
value
=
"批量处理[保存部门成员]"
,
tags
=
{
"部门成员"
},
notes
=
"批量处理[保存部门成员]"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysdeptmembers/savedeptmemberbatch"
)
public
ResponseEntity
<
Boolean
>
saveDeptMemberBatch
(
@RequestBody
List
<
SysDeptMemberDTO
>
sysdeptmemberdtos
)
{
List
<
SysDeptMember
>
domains
=
sysdeptmemberMapping
.
toDomain
(
sysdeptmemberdtos
);
boolean
result
=
sysdeptmemberService
.
saveDeptMemberBatch
(
domains
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
result
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysDeptMember-searchDefault-all')"
)
@ApiOperation
(
value
=
"获取DEFAULT"
,
tags
=
{
"部门成员"
}
,
notes
=
"获取DEFAULT"
)
...
...
@@ -286,6 +294,13 @@ public class SysDeptMemberResource {
sysdeptmemberdto
=
sysdeptmemberMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysdeptmemberdto
);
}
@ApiOperation
(
value
=
"批量处理[根据部门部门成员]"
,
tags
=
{
"部门成员"
},
notes
=
"批量处理[根据部门部门成员]"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysdepartments/{sysdepartment_id}/sysdeptmembers/savedeptmemberbatch"
)
public
ResponseEntity
<
Boolean
>
saveDeptMemberBySysDepartment
(
@PathVariable
(
"sysdepartment_id"
)
String
sysdepartment_id
,
@RequestBody
List
<
SysDeptMemberDTO
>
sysdeptmemberdtos
)
{
List
<
SysDeptMember
>
domains
=
sysdeptmemberMapping
.
toDomain
(
sysdeptmemberdtos
);
boolean
result
=
sysdeptmemberService
.
saveDeptMemberBatch
(
domains
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
result
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysDeptMember-searchDefault-all')"
)
@ApiOperation
(
value
=
"根据部门获取DEFAULT"
,
tags
=
{
"部门成员"
}
,
notes
=
"根据部门获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysdepartments/{sysdepartment_id}/sysdeptmembers/fetchdefault"
)
...
...
@@ -424,6 +439,13 @@ public class SysDeptMemberResource {
sysdeptmemberdto
=
sysdeptmemberMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysdeptmemberdto
);
}
@ApiOperation
(
value
=
"批量处理[根据人员部门成员]"
,
tags
=
{
"部门成员"
},
notes
=
"批量处理[根据人员部门成员]"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysemployees/{sysemployee_id}/sysdeptmembers/savedeptmemberbatch"
)
public
ResponseEntity
<
Boolean
>
saveDeptMemberBySysEmployee
(
@PathVariable
(
"sysemployee_id"
)
String
sysemployee_id
,
@RequestBody
List
<
SysDeptMemberDTO
>
sysdeptmemberdtos
)
{
List
<
SysDeptMember
>
domains
=
sysdeptmemberMapping
.
toDomain
(
sysdeptmemberdtos
);
boolean
result
=
sysdeptmemberService
.
saveDeptMemberBatch
(
domains
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
result
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysDeptMember-searchDefault-all')"
)
@ApiOperation
(
value
=
"根据人员获取DEFAULT"
,
tags
=
{
"部门成员"
}
,
notes
=
"根据人员获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysemployees/{sysemployee_id}/sysdeptmembers/fetchdefault"
)
...
...
@@ -562,6 +584,13 @@ public class SysDeptMemberResource {
sysdeptmemberdto
=
sysdeptmemberMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysdeptmemberdto
);
}
@ApiOperation
(
value
=
"批量处理[根据部门人员部门成员]"
,
tags
=
{
"部门成员"
},
notes
=
"批量处理[根据部门人员部门成员]"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysdepartments/{sysdepartment_id}/sysemployees/{sysemployee_id}/sysdeptmembers/savedeptmemberbatch"
)
public
ResponseEntity
<
Boolean
>
saveDeptMemberBySysDepartmentSysEmployee
(
@PathVariable
(
"sysdepartment_id"
)
String
sysdepartment_id
,
@PathVariable
(
"sysemployee_id"
)
String
sysemployee_id
,
@RequestBody
List
<
SysDeptMemberDTO
>
sysdeptmemberdtos
)
{
List
<
SysDeptMember
>
domains
=
sysdeptmemberMapping
.
toDomain
(
sysdeptmemberdtos
);
boolean
result
=
sysdeptmemberService
.
saveDeptMemberBatch
(
domains
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
result
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysDeptMember-searchDefault-all')"
)
@ApiOperation
(
value
=
"根据部门人员获取DEFAULT"
,
tags
=
{
"部门成员"
}
,
notes
=
"根据部门人员获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysdepartments/{sysdepartment_id}/sysemployees/{sysemployee_id}/sysdeptmembers/fetchdefault"
)
...
...
@@ -700,6 +729,13 @@ public class SysDeptMemberResource {
sysdeptmemberdto
=
sysdeptmemberMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysdeptmemberdto
);
}
@ApiOperation
(
value
=
"批量处理[根据单位机构部门部门成员]"
,
tags
=
{
"部门成员"
},
notes
=
"批量处理[根据单位机构部门部门成员]"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysorganizations/{sysorganization_id}/sysdepartments/{sysdepartment_id}/sysdeptmembers/savedeptmemberbatch"
)
public
ResponseEntity
<
Boolean
>
saveDeptMemberBySysOrganizationSysDepartment
(
@PathVariable
(
"sysorganization_id"
)
String
sysorganization_id
,
@PathVariable
(
"sysdepartment_id"
)
String
sysdepartment_id
,
@RequestBody
List
<
SysDeptMemberDTO
>
sysdeptmemberdtos
)
{
List
<
SysDeptMember
>
domains
=
sysdeptmemberMapping
.
toDomain
(
sysdeptmemberdtos
);
boolean
result
=
sysdeptmemberService
.
saveDeptMemberBatch
(
domains
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
result
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysDeptMember-searchDefault-all')"
)
@ApiOperation
(
value
=
"根据单位机构部门获取DEFAULT"
,
tags
=
{
"部门成员"
}
,
notes
=
"根据单位机构部门获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysorganizations/{sysorganization_id}/sysdepartments/{sysdepartment_id}/sysdeptmembers/fetchdefault"
)
...
...
@@ -838,6 +874,13 @@ public class SysDeptMemberResource {
sysdeptmemberdto
=
sysdeptmemberMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysdeptmemberdto
);
}
@ApiOperation
(
value
=
"批量处理[根据单位机构人员部门成员]"
,
tags
=
{
"部门成员"
},
notes
=
"批量处理[根据单位机构人员部门成员]"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysorganizations/{sysorganization_id}/sysemployees/{sysemployee_id}/sysdeptmembers/savedeptmemberbatch"
)
public
ResponseEntity
<
Boolean
>
saveDeptMemberBySysOrganizationSysEmployee
(
@PathVariable
(
"sysorganization_id"
)
String
sysorganization_id
,
@PathVariable
(
"sysemployee_id"
)
String
sysemployee_id
,
@RequestBody
List
<
SysDeptMemberDTO
>
sysdeptmemberdtos
)
{
List
<
SysDeptMember
>
domains
=
sysdeptmemberMapping
.
toDomain
(
sysdeptmemberdtos
);
boolean
result
=
sysdeptmemberService
.
saveDeptMemberBatch
(
domains
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
result
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysDeptMember-searchDefault-all')"
)
@ApiOperation
(
value
=
"根据单位机构人员获取DEFAULT"
,
tags
=
{
"部门成员"
}
,
notes
=
"根据单位机构人员获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysorganizations/{sysorganization_id}/sysemployees/{sysemployee_id}/sysdeptmembers/fetchdefault"
)
...
...
@@ -976,6 +1019,13 @@ public class SysDeptMemberResource {
sysdeptmemberdto
=
sysdeptmemberMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysdeptmemberdto
);
}
@ApiOperation
(
value
=
"批量处理[根据单位机构部门人员部门成员]"
,
tags
=
{
"部门成员"
},
notes
=
"批量处理[根据单位机构部门人员部门成员]"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysorganizations/{sysorganization_id}/sysdepartments/{sysdepartment_id}/sysemployees/{sysemployee_id}/sysdeptmembers/savedeptmemberbatch"
)
public
ResponseEntity
<
Boolean
>
saveDeptMemberBySysOrganizationSysDepartmentSysEmployee
(
@PathVariable
(
"sysorganization_id"
)
String
sysorganization_id
,
@PathVariable
(
"sysdepartment_id"
)
String
sysdepartment_id
,
@PathVariable
(
"sysemployee_id"
)
String
sysemployee_id
,
@RequestBody
List
<
SysDeptMemberDTO
>
sysdeptmemberdtos
)
{
List
<
SysDeptMember
>
domains
=
sysdeptmemberMapping
.
toDomain
(
sysdeptmemberdtos
);
boolean
result
=
sysdeptmemberService
.
saveDeptMemberBatch
(
domains
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
result
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysDeptMember-searchDefault-all')"
)
@ApiOperation
(
value
=
"根据单位机构部门人员获取DEFAULT"
,
tags
=
{
"部门成员"
}
,
notes
=
"根据单位机构部门人员获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysorganizations/{sysorganization_id}/sysdepartments/{sysdepartment_id}/sysemployees/{sysemployee_id}/sysdeptmembers/fetchdefault"
)
...
...
ibzou-provider/ibzou-provider-api/src/main/java/cn/ibizlab/api/rest/SysOrganizationResource.java
浏览文件 @
16ac5cee
...
...
@@ -157,6 +157,28 @@ public class SysOrganizationResource {
.
body
(
new
PageImpl
(
sysorganizationMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysOrganization-searchTopOrg-all') and hasPermission(#context,'ibzou-SysOrganization-Get')"
)
@ApiOperation
(
value
=
"获取顶级单位"
,
tags
=
{
"单位机构"
}
,
notes
=
"获取顶级单位"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysorganizations/fetchtoporg"
)
public
ResponseEntity
<
List
<
SysOrganizationDTO
>>
fetchTopOrg
(
SysOrganizationSearchContext
context
)
{
Page
<
SysOrganization
>
domains
=
sysorganizationService
.
searchTopOrg
(
context
)
;
List
<
SysOrganizationDTO
>
list
=
sysorganizationMapping
.
toDto
(
domains
.
getContent
());
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
header
(
"x-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageNumber
()))
.
header
(
"x-per-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageSize
()))
.
header
(
"x-total"
,
String
.
valueOf
(
domains
.
getTotalElements
()))
.
body
(
list
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzou-SysOrganization-searchTopOrg-all') and hasPermission(#context,'ibzou-SysOrganization-Get')"
)
@ApiOperation
(
value
=
"查询顶级单位"
,
tags
=
{
"单位机构"
}
,
notes
=
"查询顶级单位"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysorganizations/searchtoporg"
)
public
ResponseEntity
<
Page
<
SysOrganizationDTO
>>
searchTopOrg
(
@RequestBody
SysOrganizationSearchContext
context
)
{
Page
<
SysOrganization
>
domains
=
sysorganizationService
.
searchTopOrg
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
sysorganizationMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
}
...
...
ibzou-util/src/main/java/cn/ibizlab/util/security/AuthenticationUser.java
浏览文件 @
16ac5cee
...
...
@@ -52,6 +52,11 @@ public class AuthenticationUser implements UserDetails
* 租户
*/
private
String
srfdcid
;
/**
* 系统标识
*/
private
String
srfsystemid
;
/**
/**
* 动态实例标识
*/
...
...
@@ -254,6 +259,7 @@ public class AuthenticationUser implements UserDetails
if
(
this
.
sessionParams
==
null
)
{
sessionParams
=
getUserSessionParam
();
sessionParams
.
put
(
"srfsystemid"
,
this
.
getSrfsystemid
());
sessionParams
.
put
(
"srfdynainstid"
,
this
.
getSrfdynainstid
());
sessionParams
.
put
(
"srfpersonid"
,
this
.
getUserid
());
sessionParams
.
put
(
"srfpersonname"
,
this
.
getPersonname
());
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录