|
@@ -16,19 +16,17 @@ import com.qmth.distributed.print.business.bean.dto.CourseWeightDto;
|
|
|
import com.qmth.distributed.print.business.bean.dto.TCUsualScoreDto;
|
|
|
import com.qmth.distributed.print.business.bean.dto.report.*;
|
|
|
import com.qmth.distributed.print.business.bean.result.ObeCourseWeightResult;
|
|
|
-import com.qmth.distributed.print.business.bean.result.ScoreResult;
|
|
|
+import com.qmth.distributed.print.business.bean.result.ObeScoreResult;
|
|
|
import com.qmth.distributed.print.business.bean.result.report.PaperStructDimensionResult;
|
|
|
import com.qmth.distributed.print.business.bean.result.report.ReportChangeResult;
|
|
|
import com.qmth.distributed.print.business.bean.result.report.ReportResult;
|
|
|
import com.qmth.distributed.print.business.bean.result.report.word.CourseBasicBean;
|
|
|
import com.qmth.distributed.print.business.bean.result.report.word.CourseReportBean;
|
|
|
-import com.qmth.distributed.print.business.entity.TCPaperStruct;
|
|
|
-import com.qmth.distributed.print.business.entity.TCUsualScore;
|
|
|
-import com.qmth.distributed.print.business.entity.TRBasicInfo;
|
|
|
-import com.qmth.distributed.print.business.entity.TRExamStudent;
|
|
|
+import com.qmth.distributed.print.business.entity.*;
|
|
|
import com.qmth.distributed.print.business.service.*;
|
|
|
import com.qmth.teachcloud.common.annotation.OperationLogDetail;
|
|
|
import com.qmth.teachcloud.common.contant.SystemConstant;
|
|
|
+import com.qmth.teachcloud.common.entity.BasicCourse;
|
|
|
import com.qmth.teachcloud.common.entity.BasicSchool;
|
|
|
import com.qmth.teachcloud.common.entity.SysConfig;
|
|
|
import com.qmth.teachcloud.common.entity.SysUser;
|
|
@@ -36,6 +34,7 @@ import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
|
|
|
import com.qmth.teachcloud.common.enums.FieldUniqueEnum;
|
|
|
import com.qmth.teachcloud.common.enums.ImportTemplateEnum;
|
|
|
import com.qmth.teachcloud.common.enums.log.OperationTypeEnum;
|
|
|
+import com.qmth.teachcloud.common.service.BasicCourseService;
|
|
|
import com.qmth.teachcloud.common.service.CommonCacheService;
|
|
|
import com.qmth.teachcloud.common.service.FileUploadService;
|
|
|
import com.qmth.teachcloud.common.util.*;
|
|
@@ -97,48 +96,52 @@ public class TRBasicInfoController {
|
|
|
@Resource
|
|
|
TCUsualScoreService tcUsualScoreService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ ObeCourseOutlineService obeCourseOutlineService;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ BasicCourseService basicCourseService;
|
|
|
+
|
|
|
@ApiOperation(value = "报告管理列表")
|
|
|
@RequestMapping(value = "/report/list", method = RequestMethod.POST)
|
|
|
- @ApiResponses({@ApiResponse(code = 200, message = "分页查询", response = ScoreResult.class)})
|
|
|
- public Result reportList(@ApiParam(value = "学期ID", required = true) @RequestParam Long semesterId,
|
|
|
- @ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
|
|
|
- @ApiParam(value = "课程编码") @RequestParam(required = false) String courseCode,
|
|
|
- @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
|
|
|
- @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
|
|
|
- if (semesterId == null) {
|
|
|
- throw ExceptionResultEnum.SEMESTER_ID_IS_NULL.exception();
|
|
|
- }
|
|
|
- if (examId == null) {
|
|
|
- throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
|
|
|
- }
|
|
|
- return ResultUtil.ok(printCommonService.scoreList(new Page<>(pageNumber, pageSize), examId, courseCode));
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "分页查询", response = ObeScoreResult.class)})
|
|
|
+ public Result reportList(@ApiParam(value = "培养方案ID", required = true) @RequestParam Long cultureProgramId, @ApiParam(value = "学期ID", required = true) @RequestParam Long semesterId,
|
|
|
+ @ApiParam(value = "课程id") @RequestParam(required = false) Long courseId, @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
|
|
|
+ @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
|
|
|
+ return ResultUtil.ok(
|
|
|
+ printCommonService.scoreList(new Page<>(pageNumber, pageSize), cultureProgramId, semesterId, courseId));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "查看报告")
|
|
|
@RequestMapping(value = "/report/view", method = RequestMethod.POST)
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "查看报告", response = ReportResult.class)})
|
|
|
@Transactional
|
|
|
- public Result reportView(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
|
|
|
- @ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
|
|
|
- @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
|
|
|
- @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) {
|
|
|
+ public Result reportView(@ApiParam(value = "培养方案id", required = true) @RequestParam Long cultureProgramId,
|
|
|
+ @ApiParam(value = "课程id", required = true) @RequestParam Long courseId,
|
|
|
+ @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber) {
|
|
|
SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
- TRBasicInfo trBasicInfo = trBasicInfoService.queryBasicInfo(examId, courseCode, paperNumber, teachCourseId);
|
|
|
+ BasicCourse basicCourse = basicCourseService.getById(courseId);
|
|
|
+
|
|
|
+ TRBasicInfo trBasicInfo = trBasicInfoService.queryBasicInfo(cultureProgramId, courseId, paperNumber);
|
|
|
+ ObeCourseOutline obeCourseOutline = obeCourseOutlineService.findByCultureProgramIdAndCourseId(cultureProgramId,
|
|
|
+ courseId);
|
|
|
|
|
|
- ObeCourseWeightResult obeCourseWeightResult = trBasicInfoService.findCourseWeightResultRmi(teachCourseId);
|
|
|
+ ObeCourseWeightResult obeCourseWeightResult = trBasicInfoService.findCourseWeightResultRmi(obeCourseOutline.getId());
|
|
|
log.info("ObeCourseWeightResult:{}", JacksonUtil.parseJson(obeCourseWeightResult));
|
|
|
- TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(examId, courseCode, paperNumber, teachCourseId);
|
|
|
+ TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(cultureProgramId, courseId, paperNumber);
|
|
|
if (Objects.nonNull(tcPaperStruct) && Objects.nonNull(tcPaperStruct.getPaperStructDimension())) {
|
|
|
List<PaperStructDimensionResult> paperStructDimensionResultList = GsonUtil.fromJson(tcPaperStruct.getPaperStructDimension(), new TypeToken<List<PaperStructDimensionResult>>() {
|
|
|
+
|
|
|
}.getType());
|
|
|
for (CourseWeightDto c : obeCourseWeightResult.getSubmitForm()) {
|
|
|
- Double score = paperStructDimensionResultList.stream().filter(s -> Objects.equals(s.getCourseTargetName(), c.getCourseTargetName())).mapToDouble(PaperStructDimensionResult::getScore).sum();
|
|
|
+ Double score = paperStructDimensionResultList.stream().filter(s -> Objects.equals(s.getCourseTargetName(), c.getCourseTargetName()))
|
|
|
+ .mapToDouble(PaperStructDimensionResult::getScore).sum();
|
|
|
Objects.requireNonNull(c.getTotalWeight(), "[" + c.getCourseTargetName() + "]未设置权重");
|
|
|
-//// Objects.requireNonNull(c.getTotalScore(), "[" + c.getCourseTargetName() + "]未设置目标分值");
|
|
|
-// if (new BigDecimal(score).compareTo(c.getTotalWeight()) == 1) {
|
|
|
-// trBasicInfoService.clearReportData(examId, courseCode, paperNumber, teachCourseId, false);
|
|
|
-// throw ExceptionResultEnum.ERROR.exception("[" + c.getCourseTargetName() + "]包含的小题总分与权重设置不一致,请到期末成绩--试卷蓝图设置里调整");
|
|
|
-// }
|
|
|
+ //// Objects.requireNonNull(c.getTotalScore(), "[" + c.getCourseTargetName() + "]未设置目标分值");
|
|
|
+ // if (new BigDecimal(score).compareTo(c.getTotalWeight()) == 1) {
|
|
|
+ // trBasicInfoService.clearReportData(examId, courseCode, paperNumber, teachCourseId, false);
|
|
|
+ // throw ExceptionResultEnum.ERROR.exception("[" + c.getCourseTargetName() + "]包含的小题总分与权重设置不一致,请到期末成绩--试卷蓝图设置里调整");
|
|
|
+ // }
|
|
|
List<CourseWeightDetailDto> courseWeightDetailDtoList = c.getEvaluationList();
|
|
|
for (CourseWeightDetailDto courseWeightDetailDto : courseWeightDetailDtoList) {
|
|
|
if (Objects.equals(courseWeightDetailDto.getEvaluationName(), SystemConstant.FINAL_SCORE_STR)) {
|
|
@@ -149,21 +152,30 @@ public class TRBasicInfoController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- MarkPaper markPaper = printCommonService.getMarkPaper(examId, courseCode, tcPaperStruct.getPaperNumber());
|
|
|
+ MarkPaper markPaper = printCommonService.getMarkPaper(null, basicCourse.getCode(), tcPaperStruct.getPaperNumber());
|
|
|
if (Objects.isNull(trBasicInfo)) {
|
|
|
trBasicInfo = trBasicInfoService.getReportView(trBasicInfo, markPaper, sysUser.getId(),
|
|
|
- obeCourseWeightResult, teachCourseId);
|
|
|
+ obeCourseWeightResult, cultureProgramId);
|
|
|
} else {
|
|
|
- ReportCourseEvaluationResultDto reportCourseEvaluationResultDto = Objects.nonNull(trBasicInfo.getCourseEvaluationResult()) ? JSONObject.parseObject(trBasicInfo.getCourseEvaluationResult(), ReportCourseEvaluationResultDto.class) : null;
|
|
|
- if (Objects.nonNull(reportCourseEvaluationResultDto.getWeightSettingSign()) && reportCourseEvaluationResultDto.getWeightSettingSign().longValue() != obeCourseWeightResult.getWeightSettingSign().longValue()) {
|
|
|
- trBasicInfoService.clearReportData(examId, courseCode, paperNumber, teachCourseId, Objects.nonNull(tcPaperStruct) && Objects.nonNull(tcPaperStruct.getDimensionSign()) && tcPaperStruct.getDimensionSign().longValue() != obeCourseWeightResult.getDimensionSign().longValue() ? true : false);
|
|
|
+ ReportCourseEvaluationResultDto reportCourseEvaluationResultDto = Objects.nonNull(trBasicInfo.getCourseEvaluationResult()) ?
|
|
|
+ JSONObject.parseObject(trBasicInfo.getCourseEvaluationResult(), ReportCourseEvaluationResultDto.class) :
|
|
|
+ null;
|
|
|
+ if (Objects.nonNull(reportCourseEvaluationResultDto.getWeightSettingSign())
|
|
|
+ && reportCourseEvaluationResultDto.getWeightSettingSign().longValue() != obeCourseWeightResult.getWeightSettingSign().longValue()) {
|
|
|
+ trBasicInfoService.clearReportData(cultureProgramId, courseId, paperNumber,
|
|
|
+ Objects.nonNull(tcPaperStruct.getDimensionSign())
|
|
|
+ && tcPaperStruct.getDimensionSign().longValue()
|
|
|
+ != obeCourseWeightResult.getDimensionSign().longValue());
|
|
|
trBasicInfo = trBasicInfoService.getReportView(trBasicInfo, markPaper, sysUser.getId(),
|
|
|
- obeCourseWeightResult, teachCourseId);
|
|
|
+ obeCourseWeightResult, cultureProgramId);
|
|
|
} else {
|
|
|
ReportCourseBasicInfoDto reportCourseBasicInfoDto = new ReportCourseBasicInfoDto(trBasicInfo);
|
|
|
- ReportCourseEvaluationSpreadDto reportCourseEvaluationSpreadDto = Objects.nonNull(trBasicInfo.getCourseEvaluationSpread()) ? JSONObject.parseObject(trBasicInfo.getCourseEvaluationSpread(), ReportCourseEvaluationSpreadDto.class) : null;
|
|
|
+ ReportCourseEvaluationSpreadDto reportCourseEvaluationSpreadDto = Objects.nonNull(trBasicInfo.getCourseEvaluationSpread()) ?
|
|
|
+ JSONObject.parseObject(trBasicInfo.getCourseEvaluationSpread(), ReportCourseEvaluationSpreadDto.class) :
|
|
|
+ null;
|
|
|
ReportCourseEvaluationResultDetailDto reportCourseEvaluationResultDetailDto = null;
|
|
|
- List<TRExamStudent> trExamStudentList = trExamStudentService.list(new QueryWrapper<TRExamStudent>().lambda().eq(TRExamStudent::getrBasicInfoId, trBasicInfo.getId()));
|
|
|
+ List<TRExamStudent> trExamStudentList = trExamStudentService.list(
|
|
|
+ new QueryWrapper<TRExamStudent>().lambda().eq(TRExamStudent::getrBasicInfoId, trBasicInfo.getId()));
|
|
|
if (!CollectionUtils.isEmpty(trExamStudentList)) {
|
|
|
List<ReportExamStudentDto> examStudentList = new ArrayList<>(trExamStudentList.size());
|
|
|
for (TRExamStudent trExamStudent : trExamStudentList) {
|
|
@@ -171,7 +183,9 @@ public class TRBasicInfoController {
|
|
|
}
|
|
|
reportCourseEvaluationResultDetailDto = new ReportCourseEvaluationResultDetailDto(examStudentList);
|
|
|
}
|
|
|
- trBasicInfo.setReportResult(new ReportResult(new ReportCommonDto(examId, courseCode, markPaper.getCourseName(), paperNumber), reportCourseBasicInfoDto, reportCourseEvaluationSpreadDto, reportCourseEvaluationResultDto, reportCourseEvaluationResultDetailDto));
|
|
|
+ trBasicInfo.setReportResult(new ReportResult(new ReportCommonDto(null, basicCourse.getCode(), markPaper.getCourseName(), paperNumber),
|
|
|
+ reportCourseBasicInfoDto, reportCourseEvaluationSpreadDto, reportCourseEvaluationResultDto,
|
|
|
+ reportCourseEvaluationResultDetailDto));
|
|
|
}
|
|
|
}
|
|
|
trBasicInfo.updateInfo(sysUser.getId());
|
|
@@ -192,12 +206,12 @@ public class TRBasicInfoController {
|
|
|
SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
TRBasicInfo trBasicInfoDb = null;
|
|
|
try {
|
|
|
- trBasicInfoDb = trBasicInfoService.queryBasicInfo(trBasicInfo.getExamId(), trBasicInfo.getCourseCode(), trBasicInfo.getPaperNumber(), trBasicInfo.getTeachCourseId());
|
|
|
+ trBasicInfoDb = trBasicInfoService.queryBasicInfo(trBasicInfo.getCultureProgramId(), trBasicInfo.getCourseId(), trBasicInfo.getPaperNumber());
|
|
|
if (Objects.isNull(trBasicInfoDb)) {
|
|
|
trBasicInfoDb = new TRBasicInfo(trBasicInfo, sysUser.getId());
|
|
|
- TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(trBasicInfo.getExamId(), trBasicInfo.getCourseCode(), trBasicInfo.getPaperNumber(), trBasicInfo.getTeachCourseId());
|
|
|
+ TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(trBasicInfo.getCultureProgramId(), trBasicInfo.getCourseId(), trBasicInfo.getPaperNumber());
|
|
|
MarkPaper markPaper = printCommonService.getMarkPaper(trBasicInfo.getExamId(), trBasicInfo.getCourseCode(), Objects.nonNull(tcPaperStruct) ? tcPaperStruct.getPaperNumber() : trBasicInfo.getPaperNumber());
|
|
|
- trBasicInfoDb = trBasicInfoService.getReportView(trBasicInfoDb, markPaper, sysUser.getId(), trBasicInfoService.findCourseWeightResultRmi(trBasicInfo.getTeachCourseId()), trBasicInfo.getTeachCourseId());
|
|
|
+ trBasicInfoDb = trBasicInfoService.getReportView(trBasicInfoDb, markPaper, sysUser.getId(), trBasicInfoService.findCourseWeightResultRmi(trBasicInfo.getTeachCourseId()), trBasicInfo.getCultureProgramId());
|
|
|
} else {
|
|
|
trBasicInfoDb.updateInfo(trBasicInfo, sysUser.getId());
|
|
|
}
|
|
@@ -221,22 +235,22 @@ public class TRBasicInfoController {
|
|
|
@OperationLogDetail(operationType = OperationTypeEnum.EXPORT)
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "下载成功", response = Object.class)})
|
|
|
@Aac(rateLimit = @RateLimit(count = 1, period = 1000L))
|
|
|
- public void reportExport(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
|
|
|
- @ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
|
|
|
- @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
|
|
|
- @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) throws IOException {
|
|
|
+ public void reportExport(@ApiParam(value = "培养方案id", required = true) @RequestParam Long cultureProgramId,
|
|
|
+ @ApiParam(value = "课程id", required = true) @RequestParam Long courseId,
|
|
|
+ @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber) {
|
|
|
File txtFileTemp = null, fileTemp = null;
|
|
|
try {
|
|
|
Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
|
|
|
+ ObeCourseOutline obeCourseOutline = obeCourseOutlineService.findByCultureProgramIdAndCourseId(cultureProgramId, courseId);
|
|
|
BasicSchool basicSchool = commonCacheService.schoolCache(schoolId);
|
|
|
|
|
|
- TRBasicInfo trBasicInfo = trBasicInfoService.queryBasicInfo(examId, courseCode, paperNumber, teachCourseId);
|
|
|
+ TRBasicInfo trBasicInfo = trBasicInfoService.queryBasicInfo(cultureProgramId, courseId, paperNumber);
|
|
|
Objects.requireNonNull(trBasicInfo, "没有报告信息");
|
|
|
Objects.requireNonNull(trBasicInfo.getCourseEvaluationResult(), "没有课程目标信息");
|
|
|
Objects.requireNonNull(trBasicInfo.getCourseEvaluationResultDetail(), "没有课程考生信息");
|
|
|
|
|
|
- ObeCourseWeightResult obeCourseWeightResult = trBasicInfoService.findCourseWeightResultRmi(teachCourseId);
|
|
|
- TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(examId, courseCode, paperNumber, teachCourseId);
|
|
|
+ ObeCourseWeightResult obeCourseWeightResult = trBasicInfoService.findCourseWeightResultRmi(obeCourseOutline.getId());
|
|
|
+ TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(cultureProgramId, courseId, paperNumber);
|
|
|
if (Objects.nonNull(tcPaperStruct) && Objects.nonNull(tcPaperStruct.getPaperStructDimension())) {
|
|
|
List<PaperStructDimensionResult> paperStructDimensionResultList = GsonUtil.fromJson(tcPaperStruct.getPaperStructDimension(), new TypeToken<List<PaperStructDimensionResult>>() {
|
|
|
}.getType());
|
|
@@ -260,9 +274,12 @@ public class TRBasicInfoController {
|
|
|
|
|
|
ReportCourseEvaluationResultDto reportCourseEvaluationResultDto = JSONObject.parseObject(trBasicInfo.getCourseEvaluationResult(), ReportCourseEvaluationResultDto.class);
|
|
|
if (Objects.nonNull(reportCourseEvaluationResultDto.getWeightSettingSign()) && reportCourseEvaluationResultDto.getWeightSettingSign().longValue() != obeCourseWeightResult.getWeightSettingSign().longValue()) {
|
|
|
- trBasicInfoService.clearReportData(examId, courseCode, paperNumber, teachCourseId, Objects.nonNull(tcPaperStruct) && Objects.nonNull(tcPaperStruct.getDimensionSign()) && tcPaperStruct.getDimensionSign().longValue() != obeCourseWeightResult.getDimensionSign().longValue() ? true : false);
|
|
|
- this.reportView(examId, courseCode, paperNumber, teachCourseId);
|
|
|
- this.reportExport(examId, courseCode, paperNumber, teachCourseId);
|
|
|
+ trBasicInfoService.clearReportData(cultureProgramId, courseId, paperNumber,
|
|
|
+ Objects.nonNull(tcPaperStruct) && Objects.nonNull(tcPaperStruct.getDimensionSign())
|
|
|
+ && tcPaperStruct.getDimensionSign().longValue()
|
|
|
+ != obeCourseWeightResult.getDimensionSign().longValue());
|
|
|
+ this.reportView(cultureProgramId, courseId, paperNumber);
|
|
|
+ this.reportExport(cultureProgramId, courseId, paperNumber);
|
|
|
} else {
|
|
|
//评价样本的基本信息
|
|
|
String period = Objects.nonNull(trBasicInfo.getPeriod()) ? trBasicInfo.getPeriod() : null;
|
|
@@ -337,20 +354,21 @@ public class TRBasicInfoController {
|
|
|
@ApiOperation(value = "报告发生改变")
|
|
|
@RequestMapping(value = "/report/change", method = RequestMethod.POST)
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "下载成功", response = Object.class)})
|
|
|
- public Result reportDataChange(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
|
|
|
- @ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
|
|
|
+ public Result reportDataChange(@ApiParam(value = "培养方案id", required = true) @RequestParam Long cultureProgramId,
|
|
|
+ @ApiParam(value = "课程id", required = true) @RequestParam Long courseId,
|
|
|
@ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
|
|
|
- @ApiParam(value = "true:报告,false:成绩管理", required = true) @RequestParam boolean report,
|
|
|
- @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) throws IOException {
|
|
|
+ @ApiParam(value = "true:报告,false:成绩管理", required = true) @RequestParam boolean report) {
|
|
|
+ ObeCourseOutline obeCourseOutline = obeCourseOutlineService.findByCultureProgramIdAndCourseId(cultureProgramId, courseId);
|
|
|
+
|
|
|
ReportChangeResult reportChangeResult = new ReportChangeResult();
|
|
|
- List<TCUsualScore> tcUsualScoreList = tcUsualScoreService.queryUsualScore(examId, courseCode, paperNumber, teachCourseId);
|
|
|
+ List<TCUsualScore> tcUsualScoreList = tcUsualScoreService.queryUsualScore(cultureProgramId, courseId, paperNumber);
|
|
|
if (CollectionUtils.isNotEmpty(tcUsualScoreList)) {
|
|
|
Set<String> usualScoreCourseSet = new LinkedHashSet<>();
|
|
|
TCUsualScore tcUsualScore = tcUsualScoreList.get(0);
|
|
|
List<TCUsualScoreDto> tcUsualScoreDtoList = JSONArray.parseArray(tcUsualScore.getScore(), TCUsualScoreDto.class);
|
|
|
List<String> usualScoreList = tcUsualScoreDtoList.stream().map(s -> s.getName()).collect(Collectors.toList());
|
|
|
|
|
|
- List<CourseWeightDto> courseWeightDtoList = trBasicInfoService.findCourseWeightDtoRmi(teachCourseId);
|
|
|
+ List<CourseWeightDto> courseWeightDtoList = trBasicInfoService.findCourseWeightDtoRmi(obeCourseOutline.getId());
|
|
|
List<String> courseTargetList = new ArrayList<>(courseWeightDtoList.size());
|
|
|
if (CollectionUtils.isNotEmpty(courseWeightDtoList)) {
|
|
|
courseWeightDtoList.stream().peek(e -> {
|
|
@@ -373,11 +391,12 @@ public class TRBasicInfoController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- TRBasicInfo trBasicInfo = trBasicInfoService.queryBasicInfo(examId, courseCode, paperNumber, teachCourseId);
|
|
|
+ TRBasicInfo trBasicInfo = trBasicInfoService.queryBasicInfo(cultureProgramId, courseId, paperNumber);
|
|
|
if (Objects.nonNull(trBasicInfo) && Objects.nonNull(trBasicInfo.getCourseEvaluationResultDetail())) {
|
|
|
JSONObject jsonObject = JSONObject.parseObject(trBasicInfo.getCourseEvaluationResultDetail());
|
|
|
List<CourseTargetWordDto> courseTargetWordDtoList = JSONArray.parseArray(jsonObject.get("targetWordMap").toString(), CourseTargetWordDto.class);
|
|
|
- List<String> courseTargetDbList = courseTargetWordDtoList.stream().map(s -> s.getTargetName()).collect(Collectors.toList());
|
|
|
+ List<String> courseTargetDbList = courseTargetWordDtoList.stream().map(
|
|
|
+ CourseTargetWordDto::getTargetName).collect(Collectors.toList());
|
|
|
if (CollectionUtils.isNotEmpty(courseTargetList) && CollectionUtils.isNotEmpty(courseTargetDbList)) {
|
|
|
Collections.sort(courseTargetList);
|
|
|
Collections.sort(courseTargetDbList);
|
|
@@ -388,7 +407,7 @@ public class TRBasicInfoController {
|
|
|
}
|
|
|
|
|
|
if (!report) {
|
|
|
- TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(examId, courseCode, paperNumber, teachCourseId);
|
|
|
+ TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(cultureProgramId, courseId, paperNumber);
|
|
|
if (Objects.nonNull(tcPaperStruct) && Objects.nonNull(tcPaperStruct.getPaperStructDimension())) {
|
|
|
List<PaperStructDimensionResult> paperStructDimensionResultList = GsonUtil.fromJson(tcPaperStruct.getPaperStructDimension(), new TypeToken<List<PaperStructDimensionResult>>() {
|
|
|
}.getType());
|
|
@@ -409,7 +428,7 @@ public class TRBasicInfoController {
|
|
|
}
|
|
|
}
|
|
|
if (reportChangeResult.isTargetScoreChange()) {
|
|
|
- trBasicInfoService.clearReportData(examId, courseCode, paperNumber, teachCourseId, false);
|
|
|
+ trBasicInfoService.clearReportData(cultureProgramId, courseId, paperNumber, false);
|
|
|
reportChangeResult.setTargetScoreChangeStr(stringJoiner.toString());
|
|
|
}
|
|
|
}
|