导出和汇总

beetlsql3-dev
Mlxa0324 2 years ago
parent 0e30dfff12
commit 99374a5276

@ -37,6 +37,10 @@ public class TeacherOpenCourseStudentSigninSetting extends BaseEntity{
private Long teacherOpenCourseId ;
@UpdateIgnore
@InsertIgnore
private String teacherOpenCourseIdText;
//班级ID集合
private String schoolClassIds ;
@ -79,6 +83,10 @@ public class TeacherOpenCourseStudentSigninSetting extends BaseEntity{
private String teacherOpenCourseStudentSigninSettingType ;
@UpdateIgnore
@InsertIgnore
private String teacherOpenCourseStudentSigninSettingTypeText ;
//设置的值数据例子IP: x.x.x.x-x.x.x.x验证码xxxx手动签到无需设置
private String teacherOpenCourseStudentSigninSettingValue ;
@ -379,4 +387,20 @@ public class TeacherOpenCourseStudentSigninSetting extends BaseEntity{
public void setSchoolClassIdsText(String schoolClassIdsText) {
this.schoolClassIdsText = schoolClassIdsText;
}
public String getTeacherOpenCourseStudentSigninSettingTypeText() {
return teacherOpenCourseStudentSigninSettingTypeText;
}
public void setTeacherOpenCourseStudentSigninSettingTypeText(String teacherOpenCourseStudentSigninSettingTypeText) {
this.teacherOpenCourseStudentSigninSettingTypeText = teacherOpenCourseStudentSigninSettingTypeText;
}
public String getTeacherOpenCourseIdText() {
return teacherOpenCourseIdText;
}
public void setTeacherOpenCourseIdText(String teacherOpenCourseIdText) {
this.teacherOpenCourseIdText = teacherOpenCourseIdText;
}
}

@ -1,16 +1,12 @@
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;
import java.util.Date;
/**
* : <br>
@ -25,87 +21,39 @@ import static cn.hutool.core.util.ObjectUtil.defaultIfBlank;
@ExcelIgnoreUnannotated
@EqualsAndHashCode(callSuper=false)
@HeadFontStyle(fontName = "仿宋", fontHeightInPoints = 12)
public class SigninSettingSummaryVO extends BaseEntity {
public class SigninSettingSummaryVO {
/**
*
*/
@ExcelProperty(value = "姓名", index = 0)
private String name;
// 签到场次(时间)
@ExcelProperty("签到日期")
private Date teacherOpenCourseStudentSigninSettingSessionTime;
/**
*
*/
@ExcelProperty(value = "用户名", index = 1)
private String code;
/**
*
*/
// @ExcelProperty(value = "学生学号", index = 2)
// private String studentSn;
//开课ID
@ExcelProperty("开课名称")
private String teacherOpenCourseIdText ;
/**
*
*/
@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;
// 班级ID集合
@ExcelProperty("班级")
private String schoolClassIdsText;
/**
* 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;
//签到方式 (数据字典 student_signin_type)
@ExcelProperty("签到方式")
private String teacherOpenCourseStudentSigninSettingTypeText ;
// 学生总人数
@ExcelProperty("学生总人数")
private Integer signinStudentTotalCount;
// 签到总人数
@ExcelProperty("签到数")
// teacher_open_course_student_signin_log_tag10签到 20缺勤
private Integer signinTotalCount;
// 缺勤数
@ExcelProperty("缺勤数")
private Integer unsigninCount;
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, "本地局域网"));
}
}
}
// 合计到课率 100为单位
@ExcelProperty("到课率")
private Float signinTotalRate;
}

@ -172,6 +172,13 @@ public class TeacherOpenCourseStudentSigninSettingController{
return JsonResult.success(page);
}
/**
*
* @param condition
* @param response
* @return
* @throws IOException
*/
@GetMapping(MODEL + "/exportSummary.json")
@ResponseBody
public String exportSummary(TeacherOpenCourseStudentSigninSettingQuery condition, HttpServletResponse response) throws IOException {
@ -180,7 +187,7 @@ public class TeacherOpenCourseStudentSigninSettingController{
page.setPageNumber(1L);
teacherOpenCourseStudentSigninSettingService.queryByCondition(page);
String filename = StrUtil.format("题目统计分析导出{}.xlsx", DateUtil.now());
String filename = StrUtil.format("开课签到汇总导出{}.xlsx", DateUtil.now());
write(response, filename,"Sheet1", SigninSettingSummaryVO.class, page.getList());
return null;
}

Loading…
Cancel
Save