|
|
|
@ -149,13 +149,20 @@ public class SysTrainingScoreServiceImpl implements ISysTrainingScoreService {
|
|
|
|
|
if (sysTrainingScore.getTotalscore() != null &&
|
|
|
|
|
sysTrainingScore.getTrainingReportScore() != null &&
|
|
|
|
|
sysTrainingScore.getTrainingOperationScore() != null) {
|
|
|
|
|
if (reportWeight==null){
|
|
|
|
|
reportWeight=0.1;
|
|
|
|
|
}if (operatorWeight==null){
|
|
|
|
|
operatorWeight=0.9;
|
|
|
|
|
}
|
|
|
|
|
double reportScore = (sysTrainingScore.getTrainingReportScore().doubleValue() )* reportWeight;
|
|
|
|
|
double operatorScore = (sysTrainingScore.getTrainingOperationScore().doubleValue()) * operatorWeight;
|
|
|
|
|
// 使用数据库中的分数创建ReportDto
|
|
|
|
|
ReportDto reportDto = new ReportDto(
|
|
|
|
|
user.getStuClass(),
|
|
|
|
|
user.getStudentNumber(),
|
|
|
|
|
user.getUserName(),
|
|
|
|
|
sysTrainingScore.getTrainingReportScore().doubleValue(),
|
|
|
|
|
sysTrainingScore.getTrainingOperationScore().doubleValue(),
|
|
|
|
|
reportScore,
|
|
|
|
|
operatorScore,
|
|
|
|
|
sysTrainingScore.getTotalscore(),
|
|
|
|
|
sysTrainingScore.getReportFilename()
|
|
|
|
|
);
|
|
|
|
@ -182,13 +189,20 @@ public class SysTrainingScoreServiceImpl implements ISysTrainingScoreService {
|
|
|
|
|
if (sysTrainingScore.getTotalscore() != null &&
|
|
|
|
|
sysTrainingScore.getTrainingReportScore() != null &&
|
|
|
|
|
sysTrainingScore.getTrainingOperationScore() != null) {
|
|
|
|
|
if (reportWeight==null){
|
|
|
|
|
reportWeight=0.1;
|
|
|
|
|
}if (operatorWeight==null){
|
|
|
|
|
operatorWeight=0.9;
|
|
|
|
|
}
|
|
|
|
|
double reportScore = (sysTrainingScore.getTrainingReportScore().doubleValue() )* reportWeight;
|
|
|
|
|
double operatorScore = (sysTrainingScore.getTrainingOperationScore().doubleValue()) * operatorWeight;
|
|
|
|
|
// 使用数据库中的分数创建ReportDto
|
|
|
|
|
ReportDto reportDto = new ReportDto(
|
|
|
|
|
sysUser.getStuClass(),
|
|
|
|
|
sysUser.getStudentNumber(),
|
|
|
|
|
sysUser.getUserName(),
|
|
|
|
|
sysTrainingScore.getTrainingReportScore().doubleValue(),
|
|
|
|
|
sysTrainingScore.getTrainingOperationScore().doubleValue(),
|
|
|
|
|
reportScore,
|
|
|
|
|
operatorScore,
|
|
|
|
|
sysTrainingScore.getTotalscore(),
|
|
|
|
|
sysTrainingScore.getReportFilename()
|
|
|
|
|
);
|
|
|
|
@ -250,8 +264,8 @@ public class SysTrainingScoreServiceImpl implements ISysTrainingScoreService {
|
|
|
|
|
reportDto.setTrainingOperationScore(resultOperationScore);
|
|
|
|
|
reportDto.setScoreTotal(totalScore);
|
|
|
|
|
sysTrainingScore.setTotalscore(totalScore);
|
|
|
|
|
sysTrainingScore.setTrainingReportScore(resultReportScore.intValue());
|
|
|
|
|
sysTrainingScore.setTrainingOperationScore(resultOperationScore.intValue());
|
|
|
|
|
// sysTrainingScore.setTrainingReportScore(resultReportScore.intValue());
|
|
|
|
|
// sysTrainingScore.setTrainingOperationScore(resultOperationScore.intValue());
|
|
|
|
|
sysTrainingScore.setPreTrainingReportScore(reportScore);
|
|
|
|
|
trainingScoreMapper.updateByPrimaryKeySelective(sysTrainingScore);
|
|
|
|
|
gradeWeightMapper.updateByPrimaryKeySelective(sysGradeWeight);
|
|
|
|
@ -277,7 +291,7 @@ public class SysTrainingScoreServiceImpl implements ISysTrainingScoreService {
|
|
|
|
|
String filePath = fileUtil.upload(file);
|
|
|
|
|
SysTrainingScoreExample sysTrainingScoreExample = new SysTrainingScoreExample();
|
|
|
|
|
sysTrainingScoreExample.createCriteria().andUseridEqualTo(id);
|
|
|
|
|
List<SysTrainingScore> sysTrainingScores = trainingScoreMapper.selectByExample(sysTrainingScoreExample);
|
|
|
|
|
List<SysTrainingScore> sysTrainingScores = trainingScoreMapper.selectByExampleWithBLOBs(sysTrainingScoreExample);
|
|
|
|
|
if (!sysTrainingScores.isEmpty()) {
|
|
|
|
|
SysTrainingScore sysTrainingScore = sysTrainingScores.get(0);
|
|
|
|
|
if (sysTrainingScore != null && sysTrainingScore.getReportContent() != null && !sysTrainingScore.getReportContent().isEmpty()) {
|
|
|
|
|