Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
涂亚平
/
subsidy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2058feef
authored
Oct 12, 2022
by
涂亚平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人脸识别上线版本
1 parent
d2b413ec
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
27 deletions
src/main/java/com/subsidy/service/impl/DepartmentDictServiceImpl.java
src/main/resources/application-prod.properties
src/main/resources/application.properties
src/main/resources/mapper/ClassMemberMappingMapper.xml
src/main/java/com/subsidy/service/impl/DepartmentDictServiceImpl.java
View file @
2058fee
...
...
@@ -127,13 +127,13 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper,
StringBuilder
fullName
=
new
StringBuilder
();
//fullName 遍历生成全名称
do
{
depNames
.
add
(
"/"
+
departmentDictDO
.
getDepartmentName
());
depNames
.
add
(
"/"
+
departmentDictDO
.
getDepartmentName
());
departmentDictDO
=
this
.
baseMapper
.
selectById
(
departmentDictDO
.
getParentId
());
}
while
(
null
!=
departmentDictDO
.
getParentId
());
}
while
(
null
!=
departmentDictDO
.
getParentId
());
depNames
.
add
(
departmentDictDO
.
getDepartmentName
());
for
(
int
i
=
depNames
.
size
()
-
1
;
i
>=
0
;
i
--)
{
for
(
int
i
=
depNames
.
size
()
-
1
;
i
>=
0
;
i
--)
{
fullName
.
append
(
depNames
.
get
(
i
));
}
departmentDictDO1
.
setFullName
(
fullName
.
toString
());
...
...
@@ -189,49 +189,54 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper,
Page
pager
=
new
Page
(
getDepartmentMembersDTO
.
getPageNum
(),
getDepartmentMembersDTO
.
getPageSize
());
if
(
null
!=
getDepartmentMembersDTO
.
getDepartmentId
()){
if
(
null
!=
getDepartmentMembersDTO
.
getDepartmentId
())
{
//查询某个部门
IPage
iPage
=
memberMapper
.
getMembers
(
pager
,
getDepartmentMembersDTO
.
getDepartmentId
(),
getDepartmentMembersDTO
.
getUserName
(),
null
,
getDepartmentMembersDTO
.
getStartDate
(),
getDepartmentMembersDTO
.
getEndDate
());
IPage
iPage
=
memberMapper
.
getMembers
(
pager
,
getDepartmentMembersDTO
.
getDepartmentId
(),
getDepartmentMembersDTO
.
getUserName
(),
null
,
getDepartmentMembersDTO
.
getStartDate
(),
getDepartmentMembersDTO
.
getEndDate
());
return
iPage
;
}
else
{
}
else
{
//查询整个公司
IPage
iPage
=
memberMapper
.
manageMember
(
pager
,
getDepartmentMembersDTO
.
getCompanyId
(),
getDepartmentMembersDTO
.
getUserName
(),
getDepartmentMembersDTO
.
getStartDate
(),
getDepartmentMembersDTO
.
getEndDate
());
IPage
iPage
=
memberMapper
.
manageMember
(
pager
,
getDepartmentMembersDTO
.
getCompanyId
(),
getDepartmentMembersDTO
.
getUserName
(),
getDepartmentMembersDTO
.
getStartDate
(),
getDepartmentMembersDTO
.
getEndDate
());
return
iPage
;
}
}
public
List
<
GetMembersVO
>
getMembers
(
GetDepartmentMembersDTO
getDepartmentMembersDTO
){
public
List
<
GetMembersVO
>
getMembers
(
GetDepartmentMembersDTO
getDepartmentMembersDTO
)
{
List
<
GetMembersVO
>
getMembersVOS
=
new
ArrayList
<>();
GetMembersVO
getMembersVO
=
new
GetMembersVO
();
//
GetMembersVO getMembersVO = new GetMembersVO();
//找到父节点
DepartmentDictDO
departmentDictDO
=
this
.
baseMapper
.
selectOne
(
new
QueryWrapper
<
DepartmentDictDO
>()
.
lambda
()
.
eq
(
DepartmentDictDO:
:
getCompanyId
,
getDepartmentMembersDTO
.
getCompanyId
())
.
eq
(
DepartmentDictDO:
:
getCompanyId
,
getDepartmentMembersDTO
.
getCompanyId
())
.
isNull
(
DepartmentDictDO:
:
getParentId
));
BeanUtils
.
copyProperties
(
departmentDictDO
,
getMembersVO
);
//
BeanUtils.copyProperties(departmentDictDO,getMembersVO);
List
<
DepartmentDictDO
>
departmentDictDOS
=
new
ArrayList
<>();
departmentDictDOS
.
add
(
departmentDictDO
);
//
List<DepartmentDictDO> departmentDictDOS = new ArrayList<>();
//
departmentDictDOS.add(departmentDictDO);
for
(
DepartmentDictDO
dpt
:
departmentDictDOS
){
//
for (DepartmentDictDO dpt : departmentDictDOS){
GetMembersVO
gmv
=
new
GetMembersVO
();
BeanUtils
.
copyProperties
(
dpt
,
gmv
);
if
(
null
!=
departmentDictDO
.
getParentId
()){
DepartmentDictDO
departmentDictDO1
=
this
.
baseMapper
.
selectById
(
departmentDictDO
.
getParentId
());
gmv
.
setParentDepartmentName
(
departmentDictDO1
.
getDepartmentName
());
}
BeanUtils
.
copyProperties
(
departmentDictDO
,
gmv
);
//
if (null!=departmentDictDO.getParentId()){
//
DepartmentDictDO departmentDictDO1 =this.baseMapper.selectById(departmentDictDO.getParentId());
//
gmv.setParentDepartmentName(departmentDictDO1.getDepartmentName());
//
}
gmv
.
setChildren
(
getChildNodes
(
gmv
));
//父节点人员
List
<
MemberDO
>
memberDOS
=
memberMapper
.
getMemberWithoutPage
(
departmentDictDO
.
getId
(),
getDepartmentMembersDTO
.
getUserName
(),
null
,
null
,
null
);
if
(
memberDOS
.
size
()
>
0
)
{
gmv
.
setMemberDOS
(
memberDOS
);
}
// if (dpt.getParentId()!=null){
// //部门人员
// List<MemberDO> memberDOS1 = memberMapper.getMemberWithoutPage(dpt.getId(),getMembersVO.getUserName(),null,null,null);
// gmv.setMemberDOS(memberDOS1);
// getMembersVOS.add(gmv);
// }else {
//
//公司人员
//公司人员
// List<MemberDO> memberDOS = memberMapper.selectList(new QueryWrapper<MemberDO>()
// .lambda()
// .eq(MemberDO::getCompanyId,getDepartmentMembersDTO.getCompanyId()));
...
...
@@ -239,7 +244,7 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper,
// getMembersVOS.add(gmv);
// }
getMembersVOS
.
add
(
gmv
);
}
//
}
return
getMembersVOS
;
}
...
...
@@ -252,6 +257,7 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper,
*/
public
List
<
GetMembersVO
>
getChildNodes
(
GetMembersVO
getMembersVO
)
{
List
<
GetMembersVO
>
getAllDepartmentVOS
=
new
ArrayList
<>();
//查询该节点的子节点
...
...
@@ -263,7 +269,7 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper,
for
(
DepartmentDictDO
dd
:
departmentDictDOS
)
{
GetMembersVO
gmv
=
new
GetMembersVO
();
BeanUtils
.
copyProperties
(
dd
,
gmv
);
if
(
null
!=
dd
.
getParentId
())
{
if
(
null
!=
dd
.
getParentId
())
{
DepartmentDictDO
departmentDictDO
=
this
.
baseMapper
.
selectById
(
dd
.
getParentId
());
gmv
.
setParentDepartmentName
(
departmentDictDO
.
getDepartmentName
());
}
...
...
@@ -271,8 +277,8 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper,
//部门人员
List
<
MemberDO
>
memberDOS
=
memberMapper
.
getMemberWithoutPage
(
dd
.
getId
(),
getMembersVO
.
getUserName
(),
null
,
null
,
null
);
if
(
memberDOS
.
size
()
>
0
)
{
List
<
MemberDO
>
memberDOS
=
memberMapper
.
getMemberWithoutPage
(
dd
.
getId
(),
getMembersVO
.
getUserName
(),
null
,
null
,
null
);
if
(
memberDOS
.
size
()
>
0
)
{
gmv
.
setMemberDOS
(
memberDOS
);
}
getAllDepartmentVOS
.
add
(
gmv
);
...
...
src/main/resources/application-prod.properties
View file @
2058fee
...
...
@@ -2,7 +2,7 @@
spring.server.port
=
23459
# 数据源配置
spring.datasource.url
=
jdbc:mysql://rm-uf69w46mo6agw0ahao.mysql.rds.aliyuncs.com:3306/subsidy
_new
?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
spring.datasource.url
=
jdbc:mysql://rm-uf69w46mo6agw0ahao.mysql.rds.aliyuncs.com:3306/subsidy?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
spring.datasource.type
=
com.alibaba.druid.pool.DruidDataSource
spring.datasource.driver-class-
name
=
com.mysql.cj.jdbc.Driver
spring.datasource.username
=
ykadmin_new
...
...
src/main/resources/application.properties
View file @
2058fee
# 环境配置
spring.profiles.active
=
dev
spring.profiles.active
=
prod
#和CPU数
spring.server.acceptorThreadCount
=
600
spring.server.minSpareThreads
=
100
...
...
src/main/resources/mapper/ClassMemberMappingMapper.xml
View file @
2058fee
...
...
@@ -59,7 +59,7 @@
<if
test=
"userName !=null and userName !=''"
>
and t2.user_name like concat('%',#{userName} ,'%')
</if>
order by t2.
id
order by t2.
account_name
</select>
<select
id=
"getMemberClassCount"
parameterType=
"long"
resultType=
"long"
>
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment