Commit f1dfaf95 by zhouhb

[+]添加序号

1 parent 702ba3ed
......@@ -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;
......
......@@ -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);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!