Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzou
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzou
提交
74432f1d
提交
74432f1d
编写于
4月 29, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibizdev提交
上级
2803b078
变更
8
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
202 行增加
和
2 行删除
+202
-2
ibzorganizations.ts
app_web/src/mock/entity/ibzorganizations/ibzorganizations.ts
+88
-0
ibzorganization-service-base.ts
...c/service/ibzorganization/ibzorganization-service-base.ts
+28
-0
IBZOrganizationMapper.java
...java/cn/ibizlab/core/ou/mapper/IBZOrganizationMapper.java
+2
-0
IIBZOrganizationService.java
...a/cn/ibizlab/core/ou/service/IIBZOrganizationService.java
+2
-0
IBZOrganizationServiceImpl.java
...zlab/core/ou/service/impl/IBZOrganizationServiceImpl.java
+18
-0
h2_table.xml
ibzou-core/src/main/resources/liquibase/h2_table.xml
+2
-2
IBZOrganizationMapper.xml
...urces/mapper/ou/ibzorganization/IBZOrganizationMapper.xml
+18
-0
IBZOrganizationResource.java
...n/java/cn/ibizlab/ouapi/rest/IBZOrganizationResource.java
+44
-0
未找到文件。
app_web/src/mock/entity/ibzorganizations/ibzorganizations.ts
浏览文件 @
74432f1d
...
...
@@ -191,6 +191,94 @@ mock.onGet(new RegExp(/^\/ibzorganizations\/getdraft$/)).reply((config: any) =>
return
[
status
,
{}];
});
// FetchSelectSOrg
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzorganizations
\/
fetchselectsorg$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzorganization 方法: FetchSelectSOrg"
);
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
:
[]];
});
// FetchSelectSOrg
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzorganizations
\/
fetchselectsorg
(\?[\w
-.
/
?%&=,
]
*
)
*$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzorganization 方法: FetchSelectSOrg"
);
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
:
[]];
});
// FetchSelectPOrg
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzorganizations
\/
fetchselectporg$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzorganization 方法: FetchSelectPOrg"
);
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
:
[]];
});
// FetchSelectPOrg
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzorganizations
\/
fetchselectporg
(\?[\w
-.
/
?%&=,
]
*
)
*$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzorganization 方法: FetchSelectPOrg"
);
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
:
[]];
});
// FetchDefault
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzorganizations
\/
fetchdefault$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzorganization 方法: FetchDefault"
);
...
...
app_web/src/service/ibzorganization/ibzorganization-service-base.ts
浏览文件 @
74432f1d
...
...
@@ -261,6 +261,34 @@ export default class IBZOrganizationServiceBase extends EntityService {
return
res
;
}
/**
* FetchSelectSOrg接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBZOrganizationServiceBase
*/
public
async
FetchSelectSOrg
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/ibzorganizations/fetchselectsorg`
,
tempData
,
isloading
);
}
/**
* FetchSelectPOrg接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBZOrganizationServiceBase
*/
public
async
FetchSelectPOrg
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/ibzorganizations/fetchselectporg`
,
tempData
,
isloading
);
}
/**
* FetchDefault接口方法
*
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/mapper/IBZOrganizationMapper.java
浏览文件 @
74432f1d
...
...
@@ -18,6 +18,8 @@ import com.alibaba.fastjson.JSONObject;
public
interface
IBZOrganizationMapper
extends
BaseMapper
<
IBZOrganization
>{
Page
<
IBZOrganization
>
searchSelectSOrg
(
IPage
page
,
@Param
(
"srf"
)
IBZOrganizationSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
IBZOrganization
>
wrapper
)
;
Page
<
IBZOrganization
>
searchSelectPOrg
(
IPage
page
,
@Param
(
"srf"
)
IBZOrganizationSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
IBZOrganization
>
wrapper
)
;
Page
<
IBZOrganization
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
IBZOrganizationSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
IBZOrganization
>
wrapper
)
;
@Override
@Cacheable
(
value
=
"ibzorganization"
,
key
=
"'row:'+#p0"
)
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/IIBZOrganizationService.java
浏览文件 @
74432f1d
...
...
@@ -35,6 +35,8 @@ public interface IIBZOrganizationService extends IService<IBZOrganization>{
void
removeBatch
(
Collection
<
String
>
idList
)
;
IBZOrganization
get
(
String
key
)
;
IBZOrganization
getDraft
(
IBZOrganization
et
)
;
Page
<
IBZOrganization
>
searchSelectSOrg
(
IBZOrganizationSearchContext
context
)
;
Page
<
IBZOrganization
>
searchSelectPOrg
(
IBZOrganizationSearchContext
context
)
;
Page
<
IBZOrganization
>
searchDefault
(
IBZOrganizationSearchContext
context
)
;
List
<
IBZOrganization
>
selectByParentorgid
(
String
orgid
)
;
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/impl/IBZOrganizationServiceImpl.java
浏览文件 @
74432f1d
...
...
@@ -153,6 +153,24 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe
}
/**
* 查询集合 查询下级单位
*/
@Override
public
Page
<
IBZOrganization
>
searchSelectSOrg
(
IBZOrganizationSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
IBZOrganization
>
pages
=
baseMapper
.
searchSelectSOrg
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
IBZOrganization
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
/**
* 查询集合 查询上级单位
*/
@Override
public
Page
<
IBZOrganization
>
searchSelectPOrg
(
IBZOrganizationSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
IBZOrganization
>
pages
=
baseMapper
.
searchSelectPOrg
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
IBZOrganization
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
/**
* 查询集合 DEFAULT
*/
...
...
ibzou-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
74432f1d
...
...
@@ -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"
>
<!--输出实体[IBZORG]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-ibzorg-3
44
-1"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-ibzorg-3
68
-1"
>
<createTable
tableName=
"IBZORG"
>
<column
name=
"ORGID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_IBZORG_ORGID"
/>
...
...
@@ -137,7 +137,7 @@
</changeSet>
<!--输出实体[IBZORG]外键关系 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-ibzorg-3
44
-4"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-ibzorg-3
68
-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"
/>
</changeSet>
<!--输出实体[IBZEMP]外键关系 -->
...
...
ibzou-core/src/main/resources/mapper/ou/ibzorganization/IBZOrganizationMapper.xml
浏览文件 @
74432f1d
...
...
@@ -29,6 +29,24 @@
where porgid=#{orgid}
</select>
<!--数据集合[SelectSOrg]-->
<select
id=
"searchSelectSOrg"
parameterType=
"cn.ibizlab.core.ou.filter.IBZOrganizationSearchContext"
resultMap=
"IBZOrganizationResultMap"
>
select t1.* from (
<include
refid=
"SelectSOrg"
/>
)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>
<!--数据集合[SelectPOrg]-->
<select
id=
"searchSelectPOrg"
parameterType=
"cn.ibizlab.core.ou.filter.IBZOrganizationSearchContext"
resultMap=
"IBZOrganizationResultMap"
>
select t1.* from (
<include
refid=
"SelectPOrg"
/>
)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]-->
<select
id=
"searchDefault"
parameterType=
"cn.ibizlab.core.ou.filter.IBZOrganizationSearchContext"
resultMap=
"IBZOrganizationResultMap"
>
select t1.* from (
...
...
ibzou-provider/ibzou-provider-ouapi/src/main/java/cn/ibizlab/ouapi/rest/IBZOrganizationResource.java
浏览文件 @
74432f1d
...
...
@@ -162,6 +162,50 @@ public class IBZOrganizationResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzorganizationMapping
.
toDto
(
ibzorganizationService
.
getDraft
(
new
IBZOrganization
())));
}
@PreAuthorize
(
"hasPermission('READ',{#context,'SelectSOrg',this.getEntity()})"
)
@ApiOperation
(
value
=
"fetch查询下级单位"
,
tags
=
{
"IBZOrganization"
}
,
notes
=
"fetch查询下级单位"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzorganizations/fetchselectsorg"
)
public
ResponseEntity
<
List
<
IBZOrganizationDTO
>>
fetchSelectSOrg
(
IBZOrganizationSearchContext
context
)
{
Page
<
IBZOrganization
>
domains
=
ibzorganizationService
.
searchSelectSOrg
(
context
)
;
List
<
IBZOrganizationDTO
>
list
=
ibzorganizationMapping
.
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
(
"hasPermission('READ',{#context,'SelectSOrg',this.getEntity()})"
)
@ApiOperation
(
value
=
"search查询下级单位"
,
tags
=
{
"IBZOrganization"
}
,
notes
=
"search查询下级单位"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzorganizations/searchselectsorg"
)
public
ResponseEntity
<
Page
<
IBZOrganizationDTO
>>
searchSelectSOrg
(
IBZOrganizationSearchContext
context
)
{
Page
<
IBZOrganization
>
domains
=
ibzorganizationService
.
searchSelectSOrg
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
ibzorganizationMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
@PreAuthorize
(
"hasPermission('READ',{#context,'SelectPOrg',this.getEntity()})"
)
@ApiOperation
(
value
=
"fetch查询上级单位"
,
tags
=
{
"IBZOrganization"
}
,
notes
=
"fetch查询上级单位"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzorganizations/fetchselectporg"
)
public
ResponseEntity
<
List
<
IBZOrganizationDTO
>>
fetchSelectPOrg
(
IBZOrganizationSearchContext
context
)
{
Page
<
IBZOrganization
>
domains
=
ibzorganizationService
.
searchSelectPOrg
(
context
)
;
List
<
IBZOrganizationDTO
>
list
=
ibzorganizationMapping
.
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
(
"hasPermission('READ',{#context,'SelectPOrg',this.getEntity()})"
)
@ApiOperation
(
value
=
"search查询上级单位"
,
tags
=
{
"IBZOrganization"
}
,
notes
=
"search查询上级单位"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzorganizations/searchselectporg"
)
public
ResponseEntity
<
Page
<
IBZOrganizationDTO
>>
searchSelectPOrg
(
IBZOrganizationSearchContext
context
)
{
Page
<
IBZOrganization
>
domains
=
ibzorganizationService
.
searchSelectPOrg
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
ibzorganizationMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
@PreAuthorize
(
"hasPermission('READ',{#context,'Default',this.getEntity()})"
)
@ApiOperation
(
value
=
"fetchDEFAULT"
,
tags
=
{
"IBZOrganization"
}
,
notes
=
"fetchDEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzorganizations/fetchdefault"
)
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录