|
|
@ -141,30 +141,58 @@ public class ClassScoreController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// @AnonymousAccess
|
|
|
|
|
|
|
|
// @PostMapping("/updateExperienceScore")
|
|
|
|
|
|
|
|
// @ApiOperation("成绩详情/实训心得/修改心得或报告分数")
|
|
|
|
|
|
|
|
// public void updateScoreByFlowId(@RequestParam String reportId,
|
|
|
|
|
|
|
|
// @RequestParam Integer score,
|
|
|
|
|
|
|
|
// @ApiParam("0为心得,1为报告") @RequestParam Integer type) {
|
|
|
|
|
|
|
|
// TrainingReport trainingReport = trainingReportMapper.selectByPrimaryKey(reportId);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// if (type == 0) {
|
|
|
|
|
|
|
|
// trainingReport.setExperienceScore(BigDecimal.valueOf(score));
|
|
|
|
|
|
|
|
// performanceScoreService.updateScore("experienceScore", score, trainingReport.getFlowId());
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// if (type == 1) {
|
|
|
|
|
|
|
|
// trainingReport.setReportScore(BigDecimal.valueOf(score));
|
|
|
|
|
|
|
|
// performanceScoreService.updateScore("investmentReportScore", score, trainingReport.getFlowId());
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// trainingReportMapper.updateByPrimaryKey(trainingReport);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@AnonymousAccess
|
|
|
|
@AnonymousAccess
|
|
|
|
@PostMapping("/updateExperienceScore")
|
|
|
|
@PostMapping("/updateExperienceScore")
|
|
|
|
@ApiOperation("成绩详情/实训心得/修改心得或报告分数")
|
|
|
|
@ApiOperation("成绩详情/实训心得/修改心得或报告分数")
|
|
|
|
public void updateScoreByFlowId(@RequestParam String reportId,
|
|
|
|
public void updateExperienceScore(@RequestParam String flowId,
|
|
|
|
@RequestParam Integer score,
|
|
|
|
@ApiParam("传Map的json字符串,例:{\"心得\": 分数,\"报告\": 分数}") @RequestParam String json) {
|
|
|
|
@ApiParam("0为心得,1为报告") @RequestParam Integer type) {
|
|
|
|
Map<String, Integer> map;
|
|
|
|
TrainingReport trainingReport = trainingReportMapper.selectByPrimaryKey(reportId);
|
|
|
|
try {
|
|
|
|
|
|
|
|
ObjectMapper objectMapper = new ObjectMapper();
|
|
|
|
if (type == 0) {
|
|
|
|
map = objectMapper.readValue(json, new TypeReference<Map<String, Integer>>() {
|
|
|
|
trainingReport.setExperienceScore(BigDecimal.valueOf(score));
|
|
|
|
});
|
|
|
|
performanceScoreService.updateScore("experienceScore", score, trainingReport.getFlowId());
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
throw new ClassCastException("类型转换错误");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (type == 1) {
|
|
|
|
for (Map.Entry<String, Integer> entry : map.entrySet()) {
|
|
|
|
trainingReport.setReportScore(BigDecimal.valueOf(score));
|
|
|
|
String key = entry.getKey();
|
|
|
|
performanceScoreService.updateScore("investmentReportScore", score, trainingReport.getFlowId());
|
|
|
|
Integer score = entry.getValue();
|
|
|
|
|
|
|
|
if (key.equals("心得")) {
|
|
|
|
|
|
|
|
performanceScoreService.updateScore("experienceScore", score, flowId);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (key.equals("报告")) {
|
|
|
|
|
|
|
|
performanceScoreService.updateScore("investmentReportScore", score, flowId);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
trainingReportMapper.updateByPrimaryKey(trainingReport);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@AnonymousAccess
|
|
|
|
@AnonymousAccess
|
|
|
|
@GetMapping("/getClassNameBySchoolId")
|
|
|
|
@GetMapping("/getClassNameBySchoolId")
|
|
|
|
@ApiOperation("成绩管理&互动答疑/班级下拉框")
|
|
|
|
@ApiOperation("成绩管理&互动答疑/班级下拉框")
|
|
|
|
public ResultEntity<List<Map<String,String>>> getClassNameBySchoolId(@RequestParam String schoolId) {
|
|
|
|
public ResultEntity<List<Map<String, String>>> getClassNameBySchoolId(@RequestParam String schoolId) {
|
|
|
|
List<Map<String,String>> nameAndId = userMapper.selectClassNameBySchoolId(schoolId);
|
|
|
|
List<Map<String, String>> nameAndId = userMapper.selectClassNameBySchoolId(schoolId);
|
|
|
|
return new ResultEntity<>(nameAndId);
|
|
|
|
return new ResultEntity<>(nameAndId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|