Commit 716cd459 by 涂亚平

websocket上线了~~~

1 parent 73d94e0f
......@@ -240,7 +240,7 @@ public class AdministerController {
@PostMapping("exportZip")
@ApiOperation("下载压缩包 id 班级id")
@CrossOrigin
@LoginRequired
// @LoginRequired
public void exportZip(@RequestBody ClassDetailDTO classDetailDTO)throws Exception{
administerService.export(classDetailDTO);
}
......
......@@ -59,7 +59,7 @@ public class ExerciseDictController {
}
@PostMapping("submit")
@ApiOperation("提交答案 {paperId 卷子id memberId 成员id classId课程 courseId 课程id memberExerciseVOS [ id selectAnswer ] length:做题时长} ")
@ApiOperation("提交答案 {paperId 卷子id memberId 成员id classId课程 courseId 课程id memberExerciseVOS [ id selectAnswer ] startDate:做题时长} ")
@LoginRequired
@TimeRequired
@CachePut(value = "ResultData" ,key = "'classId_'+#submitDTO.getClassId()")
......
......@@ -3,6 +3,8 @@ package com.subsidy.dto.exercise;
import com.subsidy.vo.exercise.MemberExerciseVO;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
@Data
......@@ -19,4 +21,6 @@ public class SubmitDTO {
private Long paperId;
private Integer length;
private String startDate;
}
......@@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
/**
* <p>
* 学生课程习题完成情况
......@@ -71,4 +73,8 @@ public class ExerciseDoneResultDO extends BaseModel {
*/
private Integer length;
/**
* 做题开始时间
*/
private String startDate;
}
......@@ -746,6 +746,8 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
//查看课程卷子
TestScoreInfoVO testScoreInfoVO = exerciseDoneResultMapper.testScoreInfo(classDetailDTO.getPaperId(), exerciseTestVO.getId(), classDetailDTO.getId());
exerciseTestVO.setPaperId(exerciseTestVO.getPaperId());
exerciseTestVO.setStartDate(testScoreInfoVO.getStartDate());
exerciseTestVO.setEndDate(testScoreInfoVO.getEndDate());
if (null != testScoreInfoVO) {
exerciseTestVO.setScore(testScoreInfoVO.getScore());
exerciseTestVO.setResult(testScoreInfoVO.getResult());
......
......@@ -89,6 +89,7 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe
exerciseDoneResultDO.setMemberId(submitDTO.getMemberId());
exerciseDoneResultDO.setPaperId(submitDTO.getPaperId());
exerciseDoneResultDO.setLength(submitDTO.getLength());
exerciseDoneResultDO.setStartDate(submitDTO.getStartDate());
int score = MathUtil.intDivFloorPercent(rightCounts, memberExerciseVOS.size());
exerciseDoneResultDO.setScore(score);
exerciseDoneResultDO.setResult(score>=60?"合格":"不合格");
......
......@@ -84,12 +84,12 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper,
this.baseMapper.insert(vodPlayHistoryDO);
}
throw new HttpException(13001);
}
}else {
vodPlayHistoryDO.setPlayCount(1);
this.baseMapper.insert(vodPlayHistoryDO);
}
}
}
return ConstantUtils.ADD_SUCCESS;
}
......
......@@ -10,7 +10,7 @@ public class ExcelFormatUtils {
public static final List<String> signList = Arrays.asList("序号", "成员名称", "身份证号", "联系方式", "签到次数", "签到时间","最近签到ip地址","最近签到设备型号");
public static final List<String> scoreList = Arrays.asList("序号", "成员名称", "身份证号码", "联系方式", "测试成绩", "测试次数", "总评价");
public static final List<String> scoreList = Arrays.asList("序号", "成员名称", "身份证号码", "联系方式", "测试成绩", "测试次数","开始时间","结束时间", "总评价");
public static final List<String> answersList = Arrays.asList("序号", "提问", "答疑", "提问时间", "提问成员", "答疑时间");
......
......@@ -948,11 +948,11 @@ public class ExcelUtil {
//第三行 2
SXSSFRow thirdRow = sheet.createRow(2); //第二行 rowIndex =1
CellRangeAddress cellRangeAddress31 = new CellRangeAddress(2, 2, 0, 3);
CellRangeAddress cellRangeAddress31 = new CellRangeAddress(2, 2, 0, 4);
sheet.addMergedRegion(cellRangeAddress31);
setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress31, sheet, workbook); //给合并过的单元格加边框
CellRangeAddress cellRangeAddress32 = new CellRangeAddress(2, 2, 4, 6);
CellRangeAddress cellRangeAddress32 = new CellRangeAddress(2, 2, 5, 8);
sheet.addMergedRegion(cellRangeAddress32);
setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress32, sheet, workbook); //给合并过的单元格加边框
thirdRow.createCell(0).setCellValue(thirdHead[0]);
......@@ -1015,8 +1015,22 @@ public class ExcelUtil {
newCell.setCellValue(0);
}
//次数
newCell = dataRow.createCell(6);
newCell.setCellStyle(cellStyle);
if (exerciseTestVO.getScore() != 0) {
newCell.setCellValue(exerciseTestVO.getStartDate());
}
//次数
newCell = dataRow.createCell(7);
newCell.setCellStyle(cellStyle);
if (exerciseTestVO.getScore() != 0) {
newCell.setCellValue(exerciseTestVO.getEndDate());
}
newCell = dataRow.createCell(8);
newCell.setCellStyle(cellStyle);
if (exerciseTestVO.getScore() >= 60) {
newCell.setCellValue("合格");
} else {
......
......@@ -27,4 +27,9 @@ public class ExerciseTestVO {
private Integer count;
private Long paperId;
private String startDate;
private String endDate;
}
......@@ -19,6 +19,8 @@ public class GetMemberPapersVO {
private String result;
private String startDate;
private String createDate;
}
......@@ -13,4 +13,7 @@ public class TestScoreInfoVO {
private String result;
private String startDate;
private String endDate;
}
# 环境配置
spring.profiles.active=prod
spring.profiles.active=dev
#和CPU数
spring.server.acceptorThreadCount=600
spring.server.minSpareThreads=100
......
......@@ -30,7 +30,8 @@
total_counts,
score,
result,
create_date
create_date,
start_date
FROM
exercise_done_result t
WHERE
......@@ -122,7 +123,9 @@
t1.paper_id,
t1.score,
t1.result,
t2.cnt
t2.cnt,
t1.startDate,
t1.endDate
FROM
(
SELECT
......@@ -131,7 +134,9 @@
t.member_id,
t.score,
IF
( ( t.score )>= 60, '合格', '不合格' ) AS result
( ( t.score )>= 60, '合格', '不合格' ) AS result,
t.start_date startDate,
t.create_date as endDate
FROM
exercise_done_result t
LEFT JOIN paper_dict t2 ON t.paper_id = t2.id
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!