Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
zhangshaowu
/
pipi-helper
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1c7adc53
authored
Oct 16, 2022
by
zhangshaowu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
排班信息
1 parent
b7d1d463
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
4 deletions
src/main/java/com/pipihelper/project/controller/RosteringController.java
src/main/java/com/pipihelper/project/rostering/service/RosteringService.java
src/main/java/com/pipihelper/project/rostering/service/impl/RosteringServiceImpl.java
src/main/resources/application.yml
src/main/java/com/pipihelper/project/controller/RosteringController.java
View file @
1c7adc5
...
...
@@ -42,7 +42,7 @@ public class RosteringController {
return
ResultGenerator
.
genSuccessResult
(
rosteringService
.
findAllStaff
());
}
@
Ge
tMapping
(
value
=
"export"
)
@
Reques
tMapping
(
value
=
"export"
)
public
void
listStaff
(
String
datas
,
String
date
,
HttpServletResponse
response
)
{
List
<
RosteringExportModel
>
rosteringModels
=
JSONObject
.
parseArray
(
datas
,
RosteringExportModel
.
class
);
Workbook
workbook
=
rosteringService
.
export
(
rosteringModels
);
...
...
src/main/java/com/pipihelper/project/rostering/service/RosteringService.java
View file @
1c7adc5
...
...
@@ -20,6 +20,11 @@ public interface RosteringService {
Workbook
export
(
List
<
RosteringExportModel
>
rosteringModels
);
void
createStaff
(
RosteringStaff
rosteringStaff
);
void
deleteStaff
(
Integer
id
);
void
updateStaff
(
RosteringStaff
rosteringStaff
);
List
<
RosteringStaff
>
findAllStaff
();
...
...
src/main/java/com/pipihelper/project/rostering/service/impl/RosteringServiceImpl.java
View file @
1c7adc5
...
...
@@ -83,7 +83,7 @@ public class RosteringServiceImpl implements RosteringService {
List
<
String
>
dates
=
rosteringModels
.
stream
().
map
(
e
->
{
String
dateStr
=
DateUtil
.
format
(
e
.
getDate
(),
"yyyy/MM/dd"
);
return
dateStr
+
e
.
getWeek
();
}).
collect
(
Collectors
.
toList
());
}).
distinct
().
collect
(
Collectors
.
toList
());
for
(
int
i
=
0
;
i
<
dates
.
size
();
i
++)
{
int
orderNum
=
i
+
5
;
String
name
=
dates
.
get
(
i
);
...
...
@@ -110,8 +110,8 @@ public class RosteringServiceImpl implements RosteringService {
String
dateStr
=
DateUtil
.
format
(
e
.
getDate
(),
"yyyy/MM/dd"
);
String
date
=
dateStr
+
e
.
getWeek
();
map
.
put
(
date
,
e
.
getShift
());
datas
.
add
(
map
);
});
datas
.
add
(
map
);
});
return
ExcelExportUtil
.
exportExcel
(
new
ExportParams
(),
colList
,
datas
);
}
...
...
src/main/resources/application.yml
View file @
1c7adc5
spring
:
profiles
:
active
:
dev
active
:
prod
# 日志
logging
:
file
:
...
...
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