Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
scrm
/
rop-merchant
This project
Loading...
Sign in
Toggle navigation
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 f1dfaf95
authored
Aug 19, 2021
by
zhouhb
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]添加序号
1 parent
702ba3ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
8 deletions
src/main/java/cn/com/glsx/merchants/response/StaffExportResponse.java
src/main/java/cn/com/glsx/merchants/service/StaffService.java
src/main/java/cn/com/glsx/merchants/response/StaffExportResponse.java
View file @
f1dfaf9
...
...
@@ -17,44 +17,50 @@ public class StaffExportResponse implements Serializable {
/**
* 员工姓名
*/
@Excel
(
name
=
"员工姓名"
,
orderNum
=
"1"
)
@Excel
(
name
=
"序号"
,
orderNum
=
"1"
)
private
int
num
;
/**
* 员工姓名
*/
@Excel
(
name
=
"员工姓名"
,
orderNum
=
"2"
)
private
String
staffName
;
/**
* 员工编码
*/
@Excel
(
name
=
"员工编码"
,
orderNum
=
"
2
"
)
@Excel
(
name
=
"员工编码"
,
orderNum
=
"
3
"
)
private
String
staffCode
;
/**
* 角色名称
*/
@Excel
(
name
=
"角色名称"
,
orderNum
=
"
3
"
)
@Excel
(
name
=
"角色名称"
,
orderNum
=
"
4
"
)
private
String
roleName
;
/**
* 状态
*/
@Excel
(
name
=
"状态"
,
orderNum
=
"
3
"
)
@Excel
(
name
=
"状态"
,
orderNum
=
"
5
"
)
private
String
statusName
;
/**
* 手机号
*/
@Excel
(
name
=
"登录手机号"
,
orderNum
=
"
4
"
)
@Excel
(
name
=
"登录手机号"
,
orderNum
=
"
6
"
)
private
String
staffPhone
;
/**
* 创建者
*/
@Excel
(
name
=
"创建者"
,
orderNum
=
"
6
"
)
@Excel
(
name
=
"创建者"
,
orderNum
=
"
7
"
)
private
String
createdAccount
;
/**
* 商户
*/
@Excel
(
name
=
"商户名"
,
orderNum
=
"
7
"
)
@Excel
(
name
=
"商户名"
,
orderNum
=
"
8
"
)
private
String
merchantName
;
/**
...
...
@@ -67,7 +73,7 @@ public class StaffExportResponse implements Serializable {
/**
* 创建时间
*/
@Excel
(
name
=
"更新时间"
,
orderNum
=
"
8
"
)
@Excel
(
name
=
"更新时间"
,
orderNum
=
"
9
"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
String
createDate
;
...
...
src/main/java/cn/com/glsx/merchants/service/StaffService.java
View file @
f1dfaf9
...
...
@@ -154,6 +154,12 @@ public class StaffService {
staffResponses
.
forEach
(
index
->
{
index
.
setCreateDate
(
DateUtils
.
format
(
index
.
getUpdatedTime
(),
DateUtils
.
NORMAL_DATE_TIME_PATTERN
));
});
int
num
=
0
;
for
(
StaffExportResponse
index
:
staffResponses
)
{
index
.
setCreateDate
(
DateUtils
.
format
(
index
.
getUpdatedTime
(),
DateUtils
.
NORMAL_DATE_TIME_PATTERN
));
index
.
setNum
(
num
+
1
);
num
++;
}
String
time
=
new
Date
().
getTime
()+
""
;
String
filename
=
"员工列表"
+
time
;
byte
[]
bytes
=
ExcelUtiles
.
exportGoodsExcel
(
staffResponses
,
StaffExportResponse
.
class
);
...
...
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