Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
bf733cc2
Commit
bf733cc2
authored
Jan 10, 2022
by
chenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交-4279 的新街口
parent
d7e68f23
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
+50
-0
OrgUsrController.java
...s/boot/module/common/biz/controller/OrgUsrController.java
+50
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/OrgUsrController.java
View file @
bf733cc2
...
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.constants.CommonConstant
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
...
...
@@ -264,6 +265,55 @@ public class OrgUsrController extends BaseController {
page
=
iOrgUsrService
.
page
(
pageBean
,
orgUsrQueryWrapper
);
return
page
;
}
/**
* 列表分页查询
*
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/new-list"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"新列表分页查询---只查询当前登录人本单位下的对应数据信息"
,
notes
=
"新列表分页查询---只查询当前登录人本单位下的对应数据信息"
)
public
IPage
<
OrgUsr
>
newlistPage
(
String
pageNum
,
String
pageSize
,
OrgUsr
orgUsr
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
companyIdString
=
reginParams
.
getPersonIdentity
().
getCompanyId
();
orgUsr
.
setParentId
(
companyIdString
);
Page
<
OrgUsr
>
pageBean
;
QueryWrapper
<
OrgUsr
>
orgUsrQueryWrapper
=
new
QueryWrapper
<>();
Class
<?
extends
OrgUsr
>
aClass
=
orgUsr
.
getClass
();
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
try
{
field
.
setAccessible
(
true
);
Object
o
=
field
.
get
(
orgUsr
);
if
(
o
!=
null
)
{
Class
<?>
type
=
field
.
getType
();
String
name
=
NameUtils
.
camel2Underline
(
field
.
getName
());
if
(
type
.
equals
(
Integer
.
class
))
{
Integer
fileValue
=
(
Integer
)
field
.
get
(
orgUsr
);
orgUsrQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
Long
.
class
))
{
Long
fileValue
=
(
Long
)
field
.
get
(
orgUsr
);
orgUsrQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
String
.
class
))
{
String
fileValue
=
(
String
)
field
.
get
(
orgUsr
);
orgUsrQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
{
String
fileValue
=
(
String
)
field
.
get
(
orgUsr
);
orgUsrQueryWrapper
.
eq
(
name
,
fileValue
);
}
}
}
catch
(
Exception
e
)
{
}
});
orgUsrQueryWrapper
.
eq
(
"is_delete"
,
0
);
IPage
<
OrgUsr
>
page
;
if
(
StringUtils
.
isBlank
(
pageNum
)
||
StringUtils
.
isBlank
(
pageSize
))
{
pageBean
=
new
Page
<>(
0
,
Long
.
MAX_VALUE
);
}
else
{
pageBean
=
new
Page
<>(
Integer
.
parseInt
(
pageNum
),
Integer
.
parseInt
(
pageSize
));
}
page
=
iOrgUsrService
.
page
(
pageBean
,
orgUsrQueryWrapper
);
return
page
;
}
/**
* 导入部门信息
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment