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
409ce77c
Commit
409ce77c
authored
Aug 16, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改导出动态列
parent
2e3965a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/web/AttendanceRecordController.java
...xhx/module/attendance/web/AttendanceRecordController.java
+15
-8
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/web/AttendanceRecordController.java
View file @
409ce77c
...
...
@@ -91,6 +91,13 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
super
.
init
(
model
,
context
);
}
@Override
public
void
doExportBefore
(
Context
context
,
AttendanceRecordEntity
query
,
List
<
String
>
properties
)
throws
AppException
{
if
(!
ObjectUtils
.
isEmpty
(
query
.
getProperties
()))
{
properties
.
addAll
(
query
.
getProperties
());
}
}
@Override
public
void
doExportAfter
(
Context
context
,
List
<
AttendanceRecordEntity
>
list
)
throws
AppException
{
ArrayList
<
AttendanceRecordEntity
>
attendanceRecordEntities
=
new
ArrayList
<>();
...
...
@@ -130,25 +137,25 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
attendanceExportRecordEntity
.
setFilePath
(
filePath
);
if
(
query
.
getIdList
()
!=
null
)
{
List
<
Long
>
idList
=
query
.
getIdList
();
attendanceExportRecordEntity
.
setRecordIdList
(
idList
.
stream
().
map
(
i
->
i
.
toString
()).
collect
(
Collectors
.
joining
(
","
)));
attendanceExportRecordEntity
.
setRecordIdList
(
idList
.
stream
().
map
(
i
->
i
.
toString
()).
collect
(
Collectors
.
joining
(
","
)));
}
if
(
query
.
getAttendanceDateStart
()
!=
null
)
{
String
attendanceDate
=
query
.
getAttendanceDateStart
()
+
"~"
+
query
.
getAttendanceDateEnd
();
attendanceExportRecordEntity
.
setAttendanceDate
(
attendanceDate
);
}
if
(!
ObjectUtils
.
isEmpty
(
query
.
getAttendanceGroupId
()))
{
if
(!
ObjectUtils
.
isEmpty
(
query
.
getAttendanceGroupId
()))
{
AttendanceGroupEntity
attendanceGroupEntity
=
groupService
.
get
(
query
.
getAttendanceGroupId
());
attendanceExportRecordEntity
.
setGroupName
(
attendanceGroupEntity
==
null
?
""
:
attendanceGroupEntity
.
getGroupName
());
attendanceExportRecordEntity
.
setGroupName
(
attendanceGroupEntity
==
null
?
""
:
attendanceGroupEntity
.
getGroupName
());
}
if
(!
ObjectUtils
.
isEmpty
(
query
.
getDeptId
()))
{
if
(!
ObjectUtils
.
isEmpty
(
query
.
getDeptId
()))
{
DeptEntity
deptEntity
=
deptService
.
get
(
query
.
getDeptId
(),
context
);
attendanceExportRecordEntity
.
setDeptName
(
deptEntity
==
null
?
""
:
deptEntity
.
getDeptName
());
attendanceExportRecordEntity
.
setDeptName
(
deptEntity
==
null
?
""
:
deptEntity
.
getDeptName
());
}
if
(!
ObjectUtils
.
isEmpty
(
query
.
getClassId
()))
{
if
(!
ObjectUtils
.
isEmpty
(
query
.
getClassId
()))
{
AttendanceClassEntity
attendanceClassEntity
=
classService
.
get
(
query
.
getClassId
(),
context
);
attendanceExportRecordEntity
.
setClassName
(
attendanceClassEntity
==
null
?
""
:
attendanceClassEntity
.
getClassName
());
attendanceExportRecordEntity
.
setClassName
(
attendanceClassEntity
==
null
?
""
:
attendanceClassEntity
.
getClassName
());
}
attendanceExportRecordEntity
.
setCreateUserId
(
context
.
getUser
().
getId
());
attendanceExportRecordEntity
.
setCreateTime
(
new
Date
());
...
...
@@ -171,7 +178,7 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
query
.
setOrderColList
(
Arrays
.
asList
(
new
OrderCol
(
"attendanceDate"
,
OrderCol
.
DESCENDING
),
new
OrderCol
(
"staffName"
,
OrderCol
.
DESCENDING
)));
}
else
{
query
.
getOrderColList
().
add
(
new
OrderCol
(
"attendanceDate"
,
OrderCol
.
DESCENDING
));
// query.getOrderColList().add(new OrderCol("staffName", OrderCol.DESCENDING));
// query.getOrderColList().add(new OrderCol("staffName", OrderCol.DESCENDING));
}
super
.
doListBefore
(
query
,
model
,
context
);
...
...
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