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
0ad72915
Commit
0ad72915
authored
Apr 20, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加修改每日考勤列表返回数据
parent
7dda5730
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/web/AttendanceRecordController.java
...xhx/module/attendance/web/AttendanceRecordController.java
+7
-4
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/web/AttendanceRecordController.java
View file @
0ad72915
package
com.mortals.xhx.module.attendance.web
;
package
com.mortals.xhx.module.attendance.web
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.GoWorkResultEnum
;
import
com.mortals.xhx.common.code.OffWorkResultEnum
;
import
com.mortals.xhx.module.attendance.model.*
;
import
com.mortals.xhx.module.attendance.model.*
;
import
com.mortals.xhx.module.attendance.service.AttendanceClassService
;
import
com.mortals.xhx.module.attendance.service.AttendanceClassService
;
import
com.mortals.xhx.module.attendance.service.AttendanceGroupService
;
import
com.mortals.xhx.module.attendance.service.AttendanceGroupService
;
...
@@ -51,7 +52,9 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
...
@@ -51,7 +52,9 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
this
.
addDict
(
model
,
"deptId"
,
deptService
.
find
(
new
DeptQuery
()).
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getId
().
toString
(),
y
->
y
.
getDeptName
())));
this
.
addDict
(
model
,
"deptId"
,
deptService
.
find
(
new
DeptQuery
()).
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getId
().
toString
(),
y
->
y
.
getDeptName
())));
this
.
addDict
(
model
,
"groupId"
,
attendanceGroupService
.
find
(
new
AttendanceGroupQuery
()).
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getId
().
toString
(),
y
->
y
.
getGroupName
())));
this
.
addDict
(
model
,
"groupId"
,
attendanceGroupService
.
find
(
new
AttendanceGroupQuery
()).
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getId
().
toString
(),
y
->
y
.
getGroupName
())));
this
.
addDict
(
model
,
"classId"
,
attendanceClassService
.
find
(
new
AttendanceClassQuery
()).
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getId
().
toString
(),
y
->
y
.
getClassName
())));
this
.
addDict
(
model
,
"classId"
,
attendanceClassService
.
find
(
new
AttendanceClassQuery
()).
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getId
().
toString
(),
y
->
y
.
getClassName
())));
this
.
addDict
(
model
,
"workResult"
,
null
);
this
.
addDict
(
model
,
"goWorkResult"
,
GoWorkResultEnum
.
getEnumMap
());
this
.
addDict
(
model
,
"offWorkResult"
,
OffWorkResultEnum
.
getEnumMap
());
//设置
//设置
super
.
init
(
model
,
context
);
super
.
init
(
model
,
context
);
...
@@ -62,13 +65,13 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
...
@@ -62,13 +65,13 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
protected
int
doListAfter
(
AttendanceRecordEntity
query
,
Map
<
String
,
Object
>
model
,
Context
context
)
throws
AppException
{
protected
int
doListAfter
(
AttendanceRecordEntity
query
,
Map
<
String
,
Object
>
model
,
Context
context
)
throws
AppException
{
List
<
AttendanceRecordEntity
>
list
=
(
List
<
AttendanceRecordEntity
>)
model
.
get
(
KEY_RESULT_DATA
);
List
<
AttendanceRecordEntity
>
list
=
(
List
<
AttendanceRecordEntity
>)
model
.
get
(
KEY_RESULT_DATA
);
List
<
AttendanceRecordDetailEntity
>
collect
=
list
.
s
tream
()
List
<
AttendanceRecordDetailEntity
>
collect
=
list
.
parallelS
tream
()
.
flatMap
(
item
->
item
.
getAttendanceRecordDetailList
().
stream
())
.
flatMap
(
item
->
item
.
getAttendanceRecordDetailList
().
stream
())
.
distinct
()
.
distinct
()
.
sorted
(
Comparator
.
comparingInt
(
AttendanceRecordDetailEntity:
:
getOrderNum
))
.
sorted
(
Comparator
.
comparingInt
(
AttendanceRecordDetailEntity:
:
getOrderNum
))
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
List
<
AttDsyncColumn
>
dsyncColumns
=
new
ArrayList
<>();
List
<
AttDsyncColumn
>
dsyncColumns
=
new
ArrayList
<>();
List
<
Att
Result
DsyncColumn
>
resultDsyncColumns
=
new
ArrayList
<>();
List
<
AttDsyncColumn
>
resultDsyncColumns
=
new
ArrayList
<>();
collect
.
forEach
(
item
->
{
collect
.
forEach
(
item
->
{
AttDsyncColumn
attDsyncColumn
=
new
AttDsyncColumn
();
AttDsyncColumn
attDsyncColumn
=
new
AttDsyncColumn
();
attDsyncColumn
.
setName
(
String
.
format
(
"上班%s打卡时间"
,
item
.
getOrderNum
()));
attDsyncColumn
.
setName
(
String
.
format
(
"上班%s打卡时间"
,
item
.
getOrderNum
()));
...
...
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