|
@@ -218,20 +218,22 @@ public class CourseController {
|
|
|
public Result surveyAspointsSave(
|
|
|
@ApiParam(value = "考试id", required = true) @RequestParam String examId,
|
|
|
@ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
|
|
|
- @ApiParam(value = "赋分系数", required = true) @RequestParam BigDecimal coefficient) {
|
|
|
-
|
|
|
- Map<String, Object> map = tbTaskService.saveTask(TaskTypeEnum.DATA_CALCULATE);
|
|
|
- map.put("examId", examId);
|
|
|
- map.put("courseCode", courseCode);
|
|
|
- map.put("coefficient", coefficient);
|
|
|
- TBExamCourseService tbExamCourseService = SpringContextHolder.getBean(TBExamCourseService.class);
|
|
|
- TBExamCourse tbExamCourse = tbExamCourseService.getOne(new QueryWrapper<TBExamCourse>().lambda()
|
|
|
- .eq(TBExamCourse::getExamId,examId)
|
|
|
- .eq(TBExamCourse::getCourseCode,courseCode));
|
|
|
-
|
|
|
- analyzeForReportService.realityForCalculate(SystemConstant.convertIdToLong(examId), courseCode);
|
|
|
- map.put("tbExamCourse", tbExamCourse);
|
|
|
- asyncDataCalculateTempleteService.calculateTask(map);
|
|
|
+ @ApiParam(value = "赋分系数", required = true) @RequestParam String coefficient) {
|
|
|
+
|
|
|
+ if (!coefficient.equals(SystemConstant.DEFAULT_SIGN)){
|
|
|
+ Map<String, Object> map = tbTaskService.saveTask(TaskTypeEnum.DATA_CALCULATE);
|
|
|
+ map.put("examId", examId);
|
|
|
+ map.put("courseCode", courseCode);
|
|
|
+ map.put("coefficient", coefficient);
|
|
|
+ TBExamCourseService tbExamCourseService = SpringContextHolder.getBean(TBExamCourseService.class);
|
|
|
+ TBExamCourse tbExamCourse = tbExamCourseService.getOne(new QueryWrapper<TBExamCourse>().lambda()
|
|
|
+ .eq(TBExamCourse::getExamId,examId)
|
|
|
+ .eq(TBExamCourse::getCourseCode,courseCode));
|
|
|
+
|
|
|
+ analyzeForReportService.realityForCalculate(SystemConstant.convertIdToLong(examId), courseCode);
|
|
|
+ map.put("tbExamCourse", tbExamCourse);
|
|
|
+ asyncDataCalculateTempleteService.calculateTask(map);
|
|
|
+ }
|
|
|
return ResultUtil.ok();
|
|
|
}
|
|
|
|