|
@@ -183,6 +183,41 @@ public class TRBasicInfoController {
|
|
|
return ResultUtil.ok(trBasicInfo.getReportResult());
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "报告重新计算")
|
|
|
+ @RequestMapping(value = "/report/again/calculate", method = RequestMethod.POST)
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "查看报告", response = ReportResult.class)})
|
|
|
+ @Transactional
|
|
|
+ public Result reportAgainCalculate(@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();
|
|
|
+ ObeCourseOutline obeCourseOutline = obeCourseOutlineService.findByCultureProgramIdAndCourseId(cultureProgramId,
|
|
|
+ courseId);
|
|
|
+
|
|
|
+ ObeCourseWeightResult obeCourseWeightResult = trBasicInfoService.findCourseWeightResultRmi(obeCourseOutline.getId());
|
|
|
+ log.info("ObeCourseWeightResult:{}", JacksonUtil.parseJson(obeCourseWeightResult));
|
|
|
+ TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(cultureProgramId, courseId, paperNumber);
|
|
|
+ if (Objects.isNull(tcPaperStruct) || Objects.isNull(tcPaperStruct.getPaperStructDimension())) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("未找到试卷蓝图信息");
|
|
|
+ }
|
|
|
+ MarkPaper markPaper = printCommonService.getMarkPaper(null, tcPaperStruct.getPaperNumber(), courseId);
|
|
|
+
|
|
|
+ TRBasicInfo trBasicInfo = trBasicInfoService.queryBasicInfo(cultureProgramId, courseId, paperNumber);
|
|
|
+ trBasicInfoService.clearReportData(cultureProgramId, courseId, paperNumber,
|
|
|
+ Objects.nonNull(tcPaperStruct.getDimensionSign())
|
|
|
+ && tcPaperStruct.getDimensionSign().longValue()
|
|
|
+ != obeCourseWeightResult.getDimensionSign().longValue());
|
|
|
+
|
|
|
+ TRBasicInfo trBasicInfoAgainCalculate = trBasicInfoService.getReportView(null, markPaper, sysUser.getId(),
|
|
|
+ obeCourseWeightResult, cultureProgramId, courseId);
|
|
|
+ if (Objects.nonNull(trBasicInfo)) {
|
|
|
+ trBasicInfoAgainCalculate.setCalculate(trBasicInfo);
|
|
|
+ }
|
|
|
+ //课程目标达成评价明细结果-课程目标达成评价值图
|
|
|
+ trBasicInfoService.save(trBasicInfoAgainCalculate);
|
|
|
+ return ResultUtil.ok(trBasicInfoAgainCalculate.getReportResult());
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value = "保存报告")
|
|
|
@RequestMapping(value = "/report/save", method = RequestMethod.POST)
|
|
|
@OperationLogDetail(operationType = OperationTypeEnum.UPDATE)
|
|
@@ -378,8 +413,8 @@ public class TRBasicInfoController {
|
|
|
if (!report) {
|
|
|
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());
|
|
|
+// List<PaperStructDimensionResult> paperStructDimensionResultList = GsonUtil.fromJson(tcPaperStruct.getPaperStructDimension(), new TypeToken<List<PaperStructDimensionResult>>() {
|
|
|
+// }.getType());
|
|
|
StringJoiner stringJoiner = new StringJoiner("");
|
|
|
for (CourseWeightDto c : courseWeightDtoList) {
|
|
|
if (Objects.isNull(c.getTotalWeight())) {
|