导出和汇总

beetlsql3-dev
Mlxa0324 2 years ago
parent 53e5a4ee3d
commit 0e30dfff12

@ -0,0 +1,111 @@
package com.ibeetl.jlw.entity.vo;
import cn.hutool.core.util.StrUtil;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.ibeetl.admin.core.entity.BaseEntity;
import com.ibeetl.jlw.entity.IpAddress;
import com.ibeetl.jlw.web.IpAddressController;
import lombok.Data;
import lombok.EqualsAndHashCode;
import static cn.hutool.core.util.ObjectUtil.defaultIfBlank;
/**
* : <br>
*
*
* @author: mlx
* @description:
* @date: 2022/12/17 3:02
* @version: 1.0
*/
@Data
@ExcelIgnoreUnannotated
@EqualsAndHashCode(callSuper=false)
@HeadFontStyle(fontName = "仿宋", fontHeightInPoints = 12)
public class SigninSettingSummaryVO extends BaseEntity {
/**
*
*/
@ExcelProperty(value = "姓名", index = 0)
private String name;
/**
*
*/
@ExcelProperty(value = "用户名", index = 1)
private String code;
/**
*
*/
// @ExcelProperty(value = "学生学号", index = 2)
// private String studentSn;
/**
*
*/
@ExcelProperty(value = "所属院校", index = 2)
private String universitiesCollegesName;
/**
*
*/
@ExcelProperty(value = "所属省份", index = 3)
private String universitiesCollegesProvince;
/**
*
*/
@ExcelProperty(value = "班级名称", index = 4)
private String className;
/**
*
*/
@ExcelProperty(value = "登入时间", index = 5)
private String loginTime;
/**
*
*/
@ExcelProperty(value = "登出时间", index = 6)
private String logoutTime;
/**
* 线
*/
@ExcelProperty(value = "在线时长", index = 7)
private String onlineDuration;
/**
* 线
*/
@ExcelProperty(value = "是否在线", index = 8)
private Boolean isOnLine;
/**
* IP
*/
@ExcelProperty(value = "登录IP", index = 9)
private String ip;
/**
* IP
*/
@ExcelProperty(value = "IP所属地", index = 10)
private String ipAddress;
/**
*
*/
@ExcelProperty(value = "登录次数", index = 11)
private Integer loginCount;
public void setIp(String ip) {
this.ip = ip;
if(StrUtil.isNotBlank(ip)) {
IpAddress tempIpAddress = IpAddressController.ipAddressMap.get(ip);
if (null != tempIpAddress) {
String ipAddressAppend = tempIpAddress.getProvince() + tempIpAddress.getCity() + tempIpAddress.getDistrict();
setIpAddress(defaultIfBlank(ipAddressAppend, "本地局域网"));
}
}
}
}
Loading…
Cancel
Save