Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
attendance-performance-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
attendance-performance-platform
Commits
491d88ab
Commit
491d88ab
authored
1 year ago
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改导出业务
parent
81a13ff3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
14 deletions
+24
-14
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dept/model/DeptTreeSelect.java
...ava/com/mortals/xhx/module/dept/model/DeptTreeSelect.java
+24
-14
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dept/model/DeptTreeSelect.java
View file @
491d88ab
...
...
@@ -2,6 +2,7 @@ package com.mortals.xhx.module.dept.model;
import
java.util.List
;
import
java.util.ArrayList
;
import
com.mortals.xhx.module.dept.model.vo.DeptVo
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
...
...
@@ -11,29 +12,32 @@ import org.springframework.util.ObjectUtils;
import
java.io.Serializable
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* 部门信息前端映射树结构实体类
*
* @author zxfei
* @date 2023-03-06
*/
* 部门信息前端映射树结构实体类
*
* @author zxfei
* @date 2023-03-06
*/
@Data
public
class
DeptTreeSelect
implements
Serializable
{
public
class
DeptTreeSelect
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 节点ID
*/
* 节点ID
*/
private
Long
id
;
/**
* 节点名称
*/
* 节点名称
*/
private
String
label
;
private
Integer
personNum
;
/**
* 子节点
*/
* 子节点
*/
@JsonInclude
(
JsonInclude
.
Include
.
NON_EMPTY
)
private
List
<
DeptTreeSelect
>
children
;
...
...
@@ -41,15 +45,21 @@ public class DeptTreeSelect implements Serializable {
* 子节点
*/
@JsonInclude
(
JsonInclude
.
Include
.
NON_EMPTY
)
private
List
<
Map
<
String
,
Object
>>
personList
;
private
List
<
Map
<
String
,
Object
>>
personList
;
public
DeptTreeSelect
(
DeptEntity
entity
)
{
this
.
id
=
entity
.
getId
();
this
.
label
=
entity
.
getDeptName
();
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getChildren
())){
this
.
personNum
=
entity
.
getPersonNum
();
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getChildren
()))
{
this
.
children
=
entity
.
getChildren
().
stream
().
map
(
DeptTreeSelect:
:
new
).
collect
(
Collectors
.
toList
());
int
sum
=
entity
.
getChildren
().
stream
().
mapToInt
(
i
->
i
.
getPersonNum
()).
sum
();
this
.
personNum
=
this
.
personNum
+
sum
;
}
this
.
personList
=
entity
.
getPersonList
();
}
}
This diff is collapsed.
Click to expand it.
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