|
|
@ -125,7 +125,8 @@ public class AchievementController { |
|
|
|
} |
|
|
|
} |
|
|
|
});*/ |
|
|
|
});*/ |
|
|
|
List<Class> classList = new ArrayList<>(); |
|
|
|
List<Class> classList = new ArrayList<>(); |
|
|
|
Set set = assessmentService.myClassByStudent(Integer.valueOf(accountId), userClient.getSchoolIdByAccountId(accountId)); |
|
|
|
Set set = assessmentService.myClassByStudent(Integer.valueOf(accountId), |
|
|
|
|
|
|
|
userClient.getSchoolIdByAccountId(accountId)); |
|
|
|
Iterator<Object> it = set.iterator(); |
|
|
|
Iterator<Object> it = set.iterator(); |
|
|
|
while (it.hasNext()) { |
|
|
|
while (it.hasNext()) { |
|
|
|
String classId = (String) it.next(); |
|
|
|
String classId = (String) it.next(); |
|
|
@ -141,14 +142,30 @@ public class AchievementController { |
|
|
|
* @date: 2021/9/8 10:28 |
|
|
|
* @date: 2021/9/8 10:28 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@PostMapping("/getPracticeDetail") |
|
|
|
@PostMapping("/getPracticeDetail") |
|
|
|
@ApiOperation(value = "管理端练习成绩详情", response = AchievementResp.class) |
|
|
|
@ApiOperation(value = "管理端练习成绩详情(实操)", response = AchievementResp.class) |
|
|
|
public R getPracticeDetail(@ApiParam(value = "项目id", required = true) @RequestParam("projectId") Integer projectId, @ApiParam(value = "当前页数", required = true) @RequestParam("pageNum") Integer pageNum, @ApiParam(value = "当前页需要显示的数量", required = true) @RequestParam("pageSize") Integer pageSize, @ApiParam(value = "班级id", required = false) @RequestParam("classId") Integer classId, @ApiParam(value = "关键词", required = false) @RequestParam("keyWord") String keyWord, @ApiParam(value = "商品id", required = false) @RequestParam("mallId") Integer mallId, HttpServletRequest request) { |
|
|
|
public R getPracticeDetail(@ApiParam(value = "项目id", required = false) @RequestParam("projectId") Integer projectId, |
|
|
|
|
|
|
|
@ApiParam(value = "试卷id", required = false) @RequestParam("paperId") Integer paperId, |
|
|
|
|
|
|
|
@ApiParam(value = "当前页数", required = true) @RequestParam("pageNum") Integer pageNum, |
|
|
|
|
|
|
|
@ApiParam(value = "当前页需要显示的数量", required = true) @RequestParam("pageSize") Integer pageSize, @ApiParam(value = "班级id", required = false) @RequestParam("classId") Integer classId, @ApiParam(value = "关键词", required = false) @RequestParam("keyWord") String keyWord, @ApiParam(value = "商品id", required = false) @RequestParam("mallId") Integer mallId, HttpServletRequest request) { |
|
|
|
String accountId = TokenUtils.getIdByJwtToken(request); |
|
|
|
String accountId = TokenUtils.getIdByJwtToken(request); |
|
|
|
Integer schoolId = TokenUtils.getSchoolIdByJwtToken(request); |
|
|
|
Integer schoolId = TokenUtils.getSchoolIdByJwtToken(request); |
|
|
|
return experimentalReportService.getPracticeDetail(projectId, pageNum, pageSize, schoolId, classId, keyWord, mallId); |
|
|
|
return experimentalReportService.getPracticeDetail(projectId, pageNum, pageSize, schoolId, classId, keyWord, |
|
|
|
|
|
|
|
mallId, paperId); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* @PostMapping("/getPracticeDetailByTheory") |
|
|
|
|
|
|
|
@ApiOperation(value = "管理端练习成绩详情(理论)", response = AchievementResp.class) |
|
|
|
|
|
|
|
public R getPracticeDetailByTheory(@RequestBody TheoreticalExerciseDetailsReq req){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String accountId = TokenUtils.getAccountId(); |
|
|
|
|
|
|
|
Integer schoolId = TokenUtils.getSchoolId(); |
|
|
|
|
|
|
|
req.setSchoolId(schoolId); |
|
|
|
|
|
|
|
req.setAccountId(Integer.valueOf(accountId)); |
|
|
|
|
|
|
|
return experimentalReportService.getPracticeDetailByTheory(req); |
|
|
|
|
|
|
|
}*/ |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @Description: 管理端考核成绩详情 |
|
|
|
* @Description: 管理端考核成绩详情 |
|
|
|
* @auther: Rong |
|
|
|
* @auther: Rong |
|
|
@ -173,7 +190,8 @@ public class AchievementController { |
|
|
|
updateWrapper.set("is_del", 1); |
|
|
|
updateWrapper.set("is_del", 1); |
|
|
|
updateWrapper.in("report_id", ids); |
|
|
|
updateWrapper.in("report_id", ids); |
|
|
|
|
|
|
|
|
|
|
|
boolean ret = experimentalReportService.update(new com.huoran.common.entity.ExperimentalReport(), updateWrapper); |
|
|
|
boolean ret = experimentalReportService.update(new com.huoran.common.entity.ExperimentalReport(), |
|
|
|
|
|
|
|
updateWrapper); |
|
|
|
return ret ? R.ok() : R.error(); |
|
|
|
return ret ? R.ok() : R.error(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -184,10 +202,15 @@ public class AchievementController { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ApiOperation(value = "教师端:批量导出练习成绩") |
|
|
|
@ApiOperation(value = "教师端:批量导出练习成绩") |
|
|
|
@GetMapping("/exportPracticeInfo") |
|
|
|
@GetMapping("/exportPracticeInfo") |
|
|
|
public void exportPracticeInfo(@ApiParam(value = "要导出的id", required = false) @RequestParam(value = "ids", required = false) String ids, @RequestParam("projectId") @ApiParam(value = "项目id", required = true) @NotNull(message = "项目id不能为空") Integer projectId, @RequestParam("mallId") @ApiParam(value = "商品id", required = true) @NotNull(message = "商品id不能为空") Integer mallId, HttpServletResponse response, HttpServletRequest request) throws Exception { |
|
|
|
public void exportPracticeInfo(@ApiParam(value = "要导出的id", required = false) @RequestParam(value = "ids", |
|
|
|
|
|
|
|
required = false) String ids, |
|
|
|
|
|
|
|
@RequestParam(value = "projectId",required = false) @ApiParam(value = "项目id", required = false) Integer projectId, |
|
|
|
|
|
|
|
@RequestParam("mallId") @ApiParam(value = "商品id", required = true) @NotNull(message = "商品id不能为空") Integer mallId, |
|
|
|
|
|
|
|
@RequestParam(value = " paperId" ,required = false) @ApiParam(value = "试卷id", required = false) Integer paperId, |
|
|
|
|
|
|
|
HttpServletResponse response, HttpServletRequest request) throws Exception { |
|
|
|
String accountId = TokenUtils.getIdByJwtToken(request); |
|
|
|
String accountId = TokenUtils.getIdByJwtToken(request); |
|
|
|
Integer schoolId = TokenUtils.getSchoolIdByJwtToken(request); |
|
|
|
Integer schoolId = TokenUtils.getSchoolIdByJwtToken(request); |
|
|
|
experimentalReportService.exportPracticeInfo(ids, response, schoolId, projectId, mallId); |
|
|
|
experimentalReportService.exportPracticeInfo(ids, response, schoolId, projectId, mallId, paperId); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -197,7 +220,9 @@ public class AchievementController { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ApiOperation(value = "教师端:批量导出考核成绩") |
|
|
|
@ApiOperation(value = "教师端:批量导出考核成绩") |
|
|
|
@GetMapping("/exportAssessmentInfo") |
|
|
|
@GetMapping("/exportAssessmentInfo") |
|
|
|
public void exportAssessmentInfo(@ApiParam(value = "要导出的id", required = false) @RequestParam(value = "ids", required = false) String ids, @RequestParam("assessmentId") @ApiParam(value = "考核id", required = true) @NotNull(message = "考核id不能为空") Integer assessmentId, @RequestParam(value = "classId", required = false) @ApiParam(value = "班级id", required = false) Integer classId, HttpServletResponse response, HttpServletRequest request) throws Exception { |
|
|
|
public void exportAssessmentInfo(@ApiParam(value = "要导出的id", required = false) @RequestParam(value = "ids", |
|
|
|
|
|
|
|
required = false) String ids, |
|
|
|
|
|
|
|
@RequestParam("assessmentId") @ApiParam(value = "考核id", required = true) @NotNull(message = "考核id不能为空") Integer assessmentId, @RequestParam(value = "classId", required = false) @ApiParam(value = "班级id", required = false) Integer classId, HttpServletResponse response, HttpServletRequest request) throws Exception { |
|
|
|
String accountId = TokenUtils.getIdByJwtToken(request); |
|
|
|
String accountId = TokenUtils.getIdByJwtToken(request); |
|
|
|
Integer schoolId = TokenUtils.getSchoolIdByJwtToken(request); |
|
|
|
Integer schoolId = TokenUtils.getSchoolIdByJwtToken(request); |
|
|
|
experimentalReportService.exportAssessmentInfo(ids, response, schoolId, assessmentId, classId); |
|
|
|
experimentalReportService.exportAssessmentInfo(ids, response, schoolId, assessmentId, classId); |
|
|
@ -242,7 +267,8 @@ public class AchievementController { |
|
|
|
@ApiParam(value = "当前页需要显示的数量", required = true) @RequestParam("pageSize") Integer pageSize, |
|
|
|
@ApiParam(value = "当前页需要显示的数量", required = true) @RequestParam("pageSize") Integer pageSize, |
|
|
|
HttpServletRequest request) { |
|
|
|
HttpServletRequest request) { |
|
|
|
String accountId = TokenUtils.getIdByJwtToken(request); |
|
|
|
String accountId = TokenUtils.getIdByJwtToken(request); |
|
|
|
return experimentalReportService.practiceByStudentDetail(curriculumId, projectId, Integer.valueOf(accountId), pageNum, pageSize,paperId); |
|
|
|
return experimentalReportService.practiceByStudentDetail(curriculumId, projectId, Integer.valueOf(accountId), |
|
|
|
|
|
|
|
pageNum, pageSize, paperId); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -252,7 +278,9 @@ public class AchievementController { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ApiOperation(value = "导出学生端练习实验情况") |
|
|
|
@ApiOperation(value = "导出学生端练习实验情况") |
|
|
|
@GetMapping("/exportPracticeByStudentDetail") |
|
|
|
@GetMapping("/exportPracticeByStudentDetail") |
|
|
|
public void exportPracticeByStudentDetail(@ApiParam(value = "要导出的id(非必填)", required = false) @RequestParam(value = "ids", required = false) String ids, @ApiParam(value = "项目id(必填)") @RequestParam(value = "projectId", required = true) Integer projectId, HttpServletResponse response, HttpServletRequest request) throws Exception { |
|
|
|
public void exportPracticeByStudentDetail(@ApiParam(value = "要导出的id(非必填)", required = false) @RequestParam(value |
|
|
|
|
|
|
|
= "ids", required = false) String ids, @ApiParam(value = "项目id(必填)") @RequestParam(value = "projectId", |
|
|
|
|
|
|
|
required = true) Integer projectId, HttpServletResponse response, HttpServletRequest request) throws Exception { |
|
|
|
String accountId = TokenUtils.getIdByJwtToken(request); |
|
|
|
String accountId = TokenUtils.getIdByJwtToken(request); |
|
|
|
experimentalReportService.exportPracticeByStudentDetail(ids, projectId, Integer.valueOf(accountId), response); |
|
|
|
experimentalReportService.exportPracticeByStudentDetail(ids, projectId, Integer.valueOf(accountId), response); |
|
|
|
} |
|
|
|
} |
|
|
@ -304,7 +332,8 @@ public class AchievementController { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ApiOperation(value = "学生-批量导出考核成绩") |
|
|
|
@ApiOperation(value = "学生-批量导出考核成绩") |
|
|
|
@GetMapping("/exportAssessmentByStudent") |
|
|
|
@GetMapping("/exportAssessmentByStudent") |
|
|
|
public void exportAssessmentByStudent(@ApiParam(value = "要导出的id(非必填)") @RequestParam(value = "ids", required = false) String ids, @RequestParam("curriculumId") @ApiParam(value = "课程id", required = true) @NotNull(message = "课程id不能为空") Integer curriculumId, HttpServletResponse response, HttpServletRequest request) throws Exception { |
|
|
|
public void exportAssessmentByStudent(@ApiParam(value = "要导出的id(非必填)") @RequestParam(value = "ids", required = |
|
|
|
|
|
|
|
false) String ids, @RequestParam("curriculumId") @ApiParam(value = "课程id", required = true) @NotNull(message = "课程id不能为空") Integer curriculumId, HttpServletResponse response, HttpServletRequest request) throws Exception { |
|
|
|
String accountId = TokenUtils.getIdByJwtToken(request); |
|
|
|
String accountId = TokenUtils.getIdByJwtToken(request); |
|
|
|
//Integer accountId,Integer curriculumId,String ids
|
|
|
|
//Integer accountId,Integer curriculumId,String ids
|
|
|
|
experimentalReportService.exportAssessmentByStudent(Integer.valueOf(accountId), curriculumId, ids, response); |
|
|
|
experimentalReportService.exportAssessmentByStudent(Integer.valueOf(accountId), curriculumId, ids, response); |
|
|
@ -317,17 +346,14 @@ public class AchievementController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/batchExportReportsAsZip") |
|
|
|
@PostMapping("/batchExportReportsAsZip") |
|
|
|
@ApiOperation(value = "批量导出实验报告为ZIP(导出Zip压缩包)", httpMethod = "POST", produces = "application/zip", notes = "根据id导出多个报告为ZIP文件") |
|
|
|
@ApiOperation(value = "批量导出实验报告为ZIP(导出Zip压缩包)", httpMethod = "POST", produces = "application/zip", notes = "根据id" + |
|
|
|
public void batchExportReportsAsZip(@RequestBody BulkExportReportReq req, HttpServletResponse response, HttpServletRequest request) throws IOException { |
|
|
|
"导出多个报告为ZIP文件") |
|
|
|
experimentalReportService.exportLabReportsAsZip(req,response, request); |
|
|
|
public void batchExportReportsAsZip(@RequestBody BulkExportReportReq req, HttpServletResponse response, |
|
|
|
|
|
|
|
HttpServletRequest request) throws IOException { |
|
|
|
|
|
|
|
experimentalReportService.exportLabReportsAsZip(req, response, request); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "学生-修改成绩报告") |
|
|
|
@ApiOperation(value = "学生-修改成绩报告") |
|
|
|
@PostMapping("/updateReport") |
|
|
|
@PostMapping("/updateReport") |
|
|
|
public R updateReport(@RequestBody com.huoran.common.entity.ExperimentalReport experimentalReport) { |
|
|
|
public R updateReport(@RequestBody com.huoran.common.entity.ExperimentalReport experimentalReport) { |
|
|
@ -341,14 +367,16 @@ public class AchievementController { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@PostMapping("/spliceClass") |
|
|
|
@PostMapping("/spliceClass") |
|
|
|
@ApiOperation(value = "拼接班级", response = Class.class) |
|
|
|
@ApiOperation(value = "拼接班级", response = Class.class) |
|
|
|
public R spliceClass(@RequestParam("assessmentId") @ApiParam(value = "考核id", required = true) @NotNull(message = "考核id不能为空") Integer assessmentId, HttpServletRequest request) { |
|
|
|
public R spliceClass(@RequestParam("assessmentId") @ApiParam(value = "考核id", required = true) @NotNull(message = |
|
|
|
|
|
|
|
"考核id不能为空") Integer assessmentId, HttpServletRequest request) { |
|
|
|
String accountId = TokenUtils.getIdByJwtToken(request); |
|
|
|
String accountId = TokenUtils.getIdByJwtToken(request); |
|
|
|
return assessmentService.spliceClass(assessmentId); |
|
|
|
return assessmentService.spliceClass(assessmentId); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/exportLabReport") |
|
|
|
@PostMapping("/exportLabReport") |
|
|
|
@ApiOperation(value = "导出实验报告", httpMethod = "POST", produces = "application/json", notes = "导出用户doc", response = ExperimentalReportResp.class) |
|
|
|
@ApiOperation(value = "导出实验报告", httpMethod = "POST", produces = "application/json", notes = "导出用户doc", response = |
|
|
|
|
|
|
|
ExperimentalReportResp.class) |
|
|
|
public R exportLabReport(@RequestBody ExperimentalReportResp report, HttpServletResponse response) throws IOException, TemplateException { |
|
|
|
public R exportLabReport(@RequestBody ExperimentalReportResp report, HttpServletResponse response) throws IOException, TemplateException { |
|
|
|
Configuration configuration = new Configuration(new Version("2.3.28")); |
|
|
|
Configuration configuration = new Configuration(new Version("2.3.28")); |
|
|
|
//既能保证本地运行找得到模板文件,又能保证jar包运行能找到得到模板文件
|
|
|
|
//既能保证本地运行找得到模板文件,又能保证jar包运行能找到得到模板文件
|
|
|
@ -425,7 +453,7 @@ public class AchievementController { |
|
|
|
for (String url : userScore.getRunThePictureList()) { |
|
|
|
for (String url : userScore.getRunThePictureList()) { |
|
|
|
if (isValidAndReachable(url, 5000)) { |
|
|
|
if (isValidAndReachable(url, 5000)) { |
|
|
|
imgUrl.add(ImgUtil.imgToBase64(url)); |
|
|
|
imgUrl.add(ImgUtil.imgToBase64(url)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
userScore.setRunThePictureList(imgUrl); |
|
|
|
userScore.setRunThePictureList(imgUrl); |
|
|
@ -474,17 +502,23 @@ public class AchievementController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) throws IOException { |
|
|
|
public static void main(String[] args) throws IOException { |
|
|
|
/* System.out.println("检查网址是否可以成功连接python2:" + isValidAndReachable("https://pytwo.occupationlab.com/pythonPicture/1719387122685171938692694911.png", 5000)); |
|
|
|
/* System.out.println("检查网址是否可以成功连接python2:" + isValidAndReachable("https://pytwo.occupationlab
|
|
|
|
|
|
|
|
.com/pythonPicture/1719387122685171938692694911.png", 5000)); |
|
|
|
//https://python.occupationlab.com/pythonPicture/17194153984361.png
|
|
|
|
//https://python.occupationlab.com/pythonPicture/17194153984361.png
|
|
|
|
System.out.println("检查网址是否可以成功连接python1:" + isValidAndReachable("https://python.occupationlab.com/pythonPicture/17194153984361.png", 5000));*/ |
|
|
|
System.out.println("检查网址是否可以成功连接python1:" + isValidAndReachable("https://python.occupationlab
|
|
|
|
System.out.println("图片1:" + ImgUtil.imgToBase64("https://huoran.oss-cn-shenzhen.aliyuncs.com/20240703/jpg/1808330074106650624.jpg")); |
|
|
|
.com/pythonPicture/17194153984361.png", 5000));*/ |
|
|
|
System.out.println("图片2:" + ImgUtil.imgToBase64("https://huoran.oss-cn-shenzhen.aliyuncs.com/20240703/jpg/1808330074379280384.jpg")); |
|
|
|
System.out.println("图片1:" + ImgUtil.imgToBase64("https://huoran.oss-cn-shenzhen.aliyuncs" + |
|
|
|
System.out.println("图片3:" + ImgUtil.imgToBase64("https://huoran.oss-cn-shenzhen.aliyuncs.com/20240703/jpg/1808330074609967104.jpg")); |
|
|
|
".com/20240703/jpg/1808330074106650624.jpg")); |
|
|
|
|
|
|
|
System.out.println("图片2:" + ImgUtil.imgToBase64("https://huoran.oss-cn-shenzhen.aliyuncs" + |
|
|
|
|
|
|
|
".com/20240703/jpg/1808330074379280384.jpg")); |
|
|
|
|
|
|
|
System.out.println("图片3:" + ImgUtil.imgToBase64("https://huoran.oss-cn-shenzhen.aliyuncs" + |
|
|
|
|
|
|
|
".com/20240703/jpg/1808330074609967104.jpg")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@SneakyThrows |
|
|
|
@SneakyThrows |
|
|
|
@PostMapping("/exportBankExperimentReport") |
|
|
|
@PostMapping("/exportBankExperimentReport") |
|
|
|
@ApiOperation(value = "导出银行实验报告", httpMethod = "POST", produces = "application/json", notes = "导出银行实验报告doc", response = ExperimentaForBanklReportReq.class) |
|
|
|
@ApiOperation(value = "导出银行实验报告", httpMethod = "POST", produces = "application/json", notes = "导出银行实验报告doc", |
|
|
|
|
|
|
|
response = ExperimentaForBanklReportReq.class) |
|
|
|
public R exportBankExperimentReport(@RequestBody ExperimentaForBanklReportReq req, HttpServletResponse response) throws IOException { |
|
|
|
public R exportBankExperimentReport(@RequestBody ExperimentaForBanklReportReq req, HttpServletResponse response) throws IOException { |
|
|
|
Configuration configuration = new Configuration(new Version("2.3.28")); |
|
|
|
Configuration configuration = new Configuration(new Version("2.3.28")); |
|
|
|
//既能保证本地运行找得到模板文件,又能保证jar包运行能找到得到模板文件
|
|
|
|
//既能保证本地运行找得到模板文件,又能保证jar包运行能找到得到模板文件
|
|
|
@ -495,15 +529,16 @@ public class AchievementController { |
|
|
|
//定义下载的类型,标明是word文件(这种是浏览器下载的方式)
|
|
|
|
//定义下载的类型,标明是word文件(这种是浏览器下载的方式)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("导出模板", "UTF-8") + ".doc");
|
|
|
|
//response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("导出模板", "UTF-8") + "
|
|
|
|
|
|
|
|
// .doc");
|
|
|
|
|
|
|
|
|
|
|
|
response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "实验报告.doc"); |
|
|
|
response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "实验报告.doc"); |
|
|
|
Map<String, Object> dataMap = new HashMap<>(); |
|
|
|
Map<String, Object> dataMap = new HashMap<>(); |
|
|
|
List<BankExperimentDataReq> experimentalDataList = new ArrayList<>(); |
|
|
|
List<BankExperimentDataReq> experimentalDataList = new ArrayList<>(); |
|
|
|
for (BankExperimentDataReq dataReq : req.getExperimentalData()) { |
|
|
|
for (BankExperimentDataReq dataReq : req.getExperimentalData()) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (dataReq.getReferenceAnswer()!=null){ |
|
|
|
if (dataReq.getReferenceAnswer() != null) { |
|
|
|
dataReq.setReferenceAnswer(DelTagsUtil.sanitizeReferenceAnswer(dataReq.getReferenceAnswer())); |
|
|
|
dataReq.setReferenceAnswer(DelTagsUtil.sanitizeReferenceAnswer(dataReq.getReferenceAnswer())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -560,17 +595,26 @@ public class AchievementController { |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/practiceActivity") |
|
|
|
@PostMapping("/practiceActivity") |
|
|
|
@ApiOperation(value = "管理端练习活跃度列表", response = PerformanceManagementPracticeActivityVO.class) |
|
|
|
@ApiOperation(value = "管理端练习活跃度列表", response = PerformanceManagementPracticeActivityVO.class) |
|
|
|
public R practiceActivity(@ApiParam(value = "项目id", required = true) @RequestParam("projectId") Integer projectId, @ApiParam(value = "当前页数", required = true) @RequestParam("pageNum") Integer pageNum, @ApiParam(value = "当前页需要显示的数量", required = true) @RequestParam("pageSize") Integer pageSize, @ApiParam(value = "班级id", required = false) @RequestParam("classId") Integer classId, @ApiParam(value = "关键词", required = false) @RequestParam("keyWord") String keyWord, @ApiParam(value = "商品id", required = true) @NotNull(message = "商品id不能为空") Integer mallId, HttpServletRequest request) { |
|
|
|
public R practiceActivity(@ApiParam(value = "项目id", required = false) @RequestParam(value = "projectId", |
|
|
|
|
|
|
|
required = false) Integer projectId, |
|
|
|
|
|
|
|
@ApiParam(value = "试卷id", required = false) @RequestParam(value = "paperId", required = false) Integer paperId |
|
|
|
|
|
|
|
, @ApiParam(value = "当前页数", required = true) @RequestParam("pageNum") Integer pageNum, @ApiParam(value = |
|
|
|
|
|
|
|
"当前页需要显示的数量", required = true) @RequestParam("pageSize") Integer pageSize, @ApiParam(value = "班级id", |
|
|
|
|
|
|
|
required = false) @RequestParam("classId") Integer classId, |
|
|
|
|
|
|
|
@ApiParam(value = "关键词", required = false) @RequestParam("keyWord") String keyWord, |
|
|
|
|
|
|
|
@ApiParam(value = "商品id", required = true) @NotNull(message = "商品id不能为空") Integer mallId, HttpServletRequest request) { |
|
|
|
String accountId = TokenUtils.getIdByJwtToken(request); |
|
|
|
String accountId = TokenUtils.getIdByJwtToken(request); |
|
|
|
Integer schoolId = TokenUtils.getSchoolIdByJwtToken(request); |
|
|
|
Integer schoolId = TokenUtils.getSchoolIdByJwtToken(request); |
|
|
|
return experimentalReportService.practiceActivity(projectId, pageNum, pageSize, schoolId, classId, keyWord, mallId); |
|
|
|
return experimentalReportService.practiceActivity(projectId, pageNum, pageSize, schoolId, classId, keyWord, |
|
|
|
|
|
|
|
mallId, paperId); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "导出练习活跃度全部数据", response = PerformanceManagementPracticeActivityVO.class) |
|
|
|
@ApiOperation(value = "导出练习活跃度全部数据", response = PerformanceManagementPracticeActivityVO.class) |
|
|
|
@GetMapping("/exportAllData") |
|
|
|
@GetMapping("/exportAllData") |
|
|
|
public void exportAllData(@ApiParam(name = "projectId", value = "项目id", required = true) @RequestParam("projectId") Integer projectId, @ApiParam(name = "mallId", value = "产品id", required = true) @RequestParam("mallId") Integer mallId, @ApiParam(name = "classId", value = "班级id", required = false) @RequestParam("classId") Integer classId, @ApiParam(name = "keyWord", value = "关键词", required = false) @RequestParam("keyWord") String keyWord, HttpServletRequest request, HttpServletResponse response) { |
|
|
|
public void exportAllData(@ApiParam(name = "projectId", value = "项目id", required = true) @RequestParam("projectId" |
|
|
|
|
|
|
|
) Integer projectId, @ApiParam(name = "mallId", value = "产品id", required = true) @RequestParam("mallId") Integer mallId, @ApiParam(name = "classId", value = "班级id", required = false) @RequestParam("classId") Integer classId, @ApiParam(name = "keyWord", value = "关键词", required = false) @RequestParam("keyWord") String keyWord, HttpServletRequest request, HttpServletResponse response) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
String accountId = TokenUtils.getIdByJwtToken(request); |
|
|
|
String accountId = TokenUtils.getIdByJwtToken(request); |
|
|
|
Integer schoolId = TokenUtils.getSchoolIdByJwtToken(request); |
|
|
|
Integer schoolId = TokenUtils.getSchoolIdByJwtToken(request); |
|
|
@ -584,7 +628,8 @@ public class AchievementController { |
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "批量练习活跃度导出数据") |
|
|
|
@ApiOperation(value = "批量练习活跃度导出数据") |
|
|
|
@PostMapping(value = "/exportDataInBatches", produces = "application/json;multipart/form-data;charset=utf-8") |
|
|
|
@PostMapping(value = "/exportDataInBatches", produces = "application/json;multipart/form-data;charset=utf-8") |
|
|
|
public void exportSubscribedRecords(@RequestBody List<ActivityDerivationVO> listOfExportSub, HttpServletResponse response, HttpServletRequest request) throws Exception { |
|
|
|
public void exportSubscribedRecords(@RequestBody List<ActivityDerivationVO> listOfExportSub, |
|
|
|
|
|
|
|
HttpServletResponse response, HttpServletRequest request) throws Exception { |
|
|
|
experimentalReportService.exportDataInBatches(listOfExportSub, response); |
|
|
|
experimentalReportService.exportDataInBatches(listOfExportSub, response); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -618,7 +663,8 @@ public class AchievementController { |
|
|
|
QueryWrapper<Architecture> wrapper1 = new QueryWrapper<>(); |
|
|
|
QueryWrapper<Architecture> wrapper1 = new QueryWrapper<>(); |
|
|
|
wrapper1.eq("id", getGrade.getParentId()); |
|
|
|
wrapper1.eq("id", getGrade.getParentId()); |
|
|
|
Architecture getProfessional = architectureMapper.selectOne(wrapper1); |
|
|
|
Architecture getProfessional = architectureMapper.selectOne(wrapper1); |
|
|
|
cla.setClassName(getProfessional.getOrganizationName() + "/" + getGrade.getOrganizationName() + "/" + cla.getClassName()); |
|
|
|
cla.setClassName(getProfessional.getOrganizationName() + "/" + getGrade.getOrganizationName() + |
|
|
|
|
|
|
|
"/" + cla.getClassName()); |
|
|
|
} |
|
|
|
} |
|
|
|
}*/ |
|
|
|
}*/ |
|
|
|
|
|
|
|
|
|
|
@ -654,9 +700,11 @@ public class AchievementController { |
|
|
|
//统计内置项目+学校自己创建在产品下的项目
|
|
|
|
//统计内置项目+学校自己创建在产品下的项目
|
|
|
|
builtInTotalNumberOfExercises = projectManageService.getCurriculumCountByType(proList.getCid(), 0); |
|
|
|
builtInTotalNumberOfExercises = projectManageService.getCurriculumCountByType(proList.getCid(), 0); |
|
|
|
|
|
|
|
|
|
|
|
totalNumberOfSchoolPracticeProjects = projectManageService.projectCreatedUnderProduct(proList.getMallId(), 0, schoolId); |
|
|
|
totalNumberOfSchoolPracticeProjects = projectManageService.projectCreatedUnderProduct(proList.getMallId() |
|
|
|
|
|
|
|
, 0, schoolId); |
|
|
|
builtTntotalNumberOfAssessmentItems = projectManageService.getCurriculumCountByType(proList.getCid(), 1); |
|
|
|
builtTntotalNumberOfAssessmentItems = projectManageService.getCurriculumCountByType(proList.getCid(), 1); |
|
|
|
totalNumberOfSchoolAssessmentItems = projectManageService.projectCreatedUnderProduct(proList.getMallId(), 1, schoolId); |
|
|
|
totalNumberOfSchoolAssessmentItems = projectManageService.projectCreatedUnderProduct(proList.getMallId(), |
|
|
|
|
|
|
|
1, schoolId); |
|
|
|
proList.setNumberOfPracticeItems(builtInTotalNumberOfExercises + totalNumberOfSchoolPracticeProjects); |
|
|
|
proList.setNumberOfPracticeItems(builtInTotalNumberOfExercises + totalNumberOfSchoolPracticeProjects); |
|
|
|
proList.setNumberOfAssessmentItems(builtTntotalNumberOfAssessmentItems + totalNumberOfSchoolAssessmentItems); |
|
|
|
proList.setNumberOfAssessmentItems(builtTntotalNumberOfAssessmentItems + totalNumberOfSchoolAssessmentItems); |
|
|
|
proList.setClassSize(studentService.countClassSizes(schoolId, proList.getClassId())); |
|
|
|
proList.setClassSize(studentService.countClassSizes(schoolId, proList.getClassId())); |
|
|
@ -690,7 +738,8 @@ public class AchievementController { |
|
|
|
newList = stream.collect(Collectors.toList()); |
|
|
|
newList = stream.collect(Collectors.toList()); |
|
|
|
// 处理分页
|
|
|
|
// 处理分页
|
|
|
|
int total = newList.size(); |
|
|
|
int total = newList.size(); |
|
|
|
newList = newList.stream().skip((long) req.getPageSize() * (req.getPageNum() - 1)).limit(req.getPageSize()).collect(Collectors.toList()); |
|
|
|
newList = |
|
|
|
|
|
|
|
newList.stream().skip((long) req.getPageSize() * (req.getPageNum() - 1)).limit(req.getPageSize()).collect(Collectors.toList()); |
|
|
|
return R.ok().put("data", newList).put("total", total); |
|
|
|
return R.ok().put("data", newList).put("total", total); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -752,27 +801,34 @@ public class AchievementController { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "产品维度下:批量导出产品下的练习成绩") |
|
|
|
@ApiOperation(value = "产品维度下:批量导出产品下的练习成绩") |
|
|
|
@PostMapping(value = "/exportProductPracticeResults", produces = "application/json;multipart/form-data;charset=utf-8") |
|
|
|
@PostMapping(value = "/exportProductPracticeResults", produces = "application/json;multipart/form-data;" + |
|
|
|
public void exportProductPracticeResults(@RequestBody List<PracticeProjectsUnderTheProductResp> list, HttpServletResponse response) throws Exception { |
|
|
|
"charset=utf-8") |
|
|
|
|
|
|
|
public void exportProductPracticeResults(@RequestBody List<PracticeProjectsUnderTheProductResp> list, |
|
|
|
|
|
|
|
HttpServletResponse response) throws Exception { |
|
|
|
/*for (PracticeProjectsUnderTheProductResp resp : list) { |
|
|
|
/*for (PracticeProjectsUnderTheProductResp resp : list) { |
|
|
|
resp.setTotalNumberOfPractices(resp.getTotalNumberOfPractices() + "/" + resp.getTotalNumberOfExercises()); |
|
|
|
resp.setTotalNumberOfPractices(resp.getTotalNumberOfPractices() + "/" + resp |
|
|
|
|
|
|
|
.getTotalNumberOfExercises()); |
|
|
|
}*/ |
|
|
|
}*/ |
|
|
|
experimentalReportService.exportProductPracticeResults(list, response); |
|
|
|
experimentalReportService.exportProductPracticeResults(list, response); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "产品维度下:批量导出产品下的考核成绩") |
|
|
|
@ApiOperation(value = "产品维度下:批量导出产品下的考核成绩") |
|
|
|
@PostMapping(value = "/exportProductAssessResults", produces = "application/json;multipart/form-data;charset=utf-8") |
|
|
|
@PostMapping(value = "/exportProductAssessResults", produces = "application/json;multipart/form-data;charset=utf-8") |
|
|
|
public void exportProductAssessResults(@RequestBody List<AssessProjectsUnderTheProductResp> list, HttpServletResponse response) throws Exception { |
|
|
|
public void exportProductAssessResults(@RequestBody List<AssessProjectsUnderTheProductResp> list, |
|
|
|
|
|
|
|
HttpServletResponse response) throws Exception { |
|
|
|
/*for (AssessProjectsUnderTheProductResp resp : list) { |
|
|
|
/*for (AssessProjectsUnderTheProductResp resp : list) { |
|
|
|
resp.setTotalNumberOfParticipants(resp.getTotalNumberOfParticipants() + "/" + resp.getTotalAssessment()); |
|
|
|
resp.setTotalNumberOfParticipants(resp.getTotalNumberOfParticipants() + "/" + resp.getTotalAssessment |
|
|
|
|
|
|
|
()); |
|
|
|
}*/ |
|
|
|
}*/ |
|
|
|
experimentalReportService.exportProductAssessResults(list, response); |
|
|
|
experimentalReportService.exportProductAssessResults(list, response); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "产品维度下:批量导出学生练习成绩详情") |
|
|
|
@ApiOperation(value = "产品维度下:批量导出学生练习成绩详情") |
|
|
|
@PostMapping(value = "/exportDetailsOfStudentPracticeScores", produces = "application/json;multipart/form-data;charset=utf-8") |
|
|
|
@PostMapping(value = "/exportDetailsOfStudentPracticeScores", produces = "application/json;multipart/form-data;" + |
|
|
|
public void exportDetailsOfStudentPracticeScores(@RequestBody PerformanceUnderProductReq req, HttpServletResponse response, HttpServletRequest request) throws Exception { |
|
|
|
"charset=utf-8") |
|
|
|
|
|
|
|
public void exportDetailsOfStudentPracticeScores(@RequestBody PerformanceUnderProductReq req, |
|
|
|
|
|
|
|
HttpServletResponse response, HttpServletRequest request) throws Exception { |
|
|
|
String accountId = TokenUtils.getIdByJwtToken(request); |
|
|
|
String accountId = TokenUtils.getIdByJwtToken(request); |
|
|
|
Integer schoolId = TokenUtils.getSchoolIdByJwtToken(request); |
|
|
|
Integer schoolId = TokenUtils.getSchoolIdByJwtToken(request); |
|
|
|
req.setSchoolId(schoolId); |
|
|
|
req.setSchoolId(schoolId); |
|
|
@ -780,8 +836,10 @@ public class AchievementController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "产品维度下:批量导出学生考核成绩详情") |
|
|
|
@ApiOperation(value = "产品维度下:批量导出学生考核成绩详情") |
|
|
|
@PostMapping(value = "/exportDetailsOfStudentAssessmentResults", produces = "application/json;multipart/form-data;charset=utf-8") |
|
|
|
@PostMapping(value = "/exportDetailsOfStudentAssessmentResults", produces = "application/json;" + |
|
|
|
public void exportDetailsOfStudentAssessmentResults(@RequestBody PerformanceUnderProductReq req, HttpServletResponse response, HttpServletRequest request) throws Exception { |
|
|
|
"multipart/form-data;charset=utf-8") |
|
|
|
|
|
|
|
public void exportDetailsOfStudentAssessmentResults(@RequestBody PerformanceUnderProductReq req, |
|
|
|
|
|
|
|
HttpServletResponse response, HttpServletRequest request) throws Exception { |
|
|
|
String accountId = TokenUtils.getIdByJwtToken(request); |
|
|
|
String accountId = TokenUtils.getIdByJwtToken(request); |
|
|
|
Integer schoolId = TokenUtils.getSchoolIdByJwtToken(request); |
|
|
|
Integer schoolId = TokenUtils.getSchoolIdByJwtToken(request); |
|
|
|
req.setSchoolId(schoolId); |
|
|
|
req.setSchoolId(schoolId); |
|
|
|