|
|
|
@ -13,6 +13,7 @@ import cn.jlw.util.ToolUtils;
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.ibeetl.admin.core.service.CoreBaseService;
|
|
|
|
|
import com.ibeetl.admin.core.service.CoreDictService;
|
|
|
|
|
import com.ibeetl.admin.core.util.PlatformException;
|
|
|
|
|
import com.ibeetl.admin.core.web.JsonResult;
|
|
|
|
|
import com.ibeetl.admin.core.web.JsonReturnCode;
|
|
|
|
@ -80,6 +81,7 @@ public class TeacherOpenCourseQuestionLogService extends CoreBaseService<Teacher
|
|
|
|
|
private TeacherOpenCourseQuestionSettingService teacherOpenCourseQuestionSettingService;
|
|
|
|
|
@Autowired private TeacherOpenCourseQuestionLogWrongService teacherOpenCourseQuestionLogWrongService;
|
|
|
|
|
@Autowired private QuestionLogSummaryService questionLogSummaryService;
|
|
|
|
|
@Autowired private CoreDictService coreDictService;
|
|
|
|
|
public PageQuery<TeacherOpenCourseQuestionLog>queryByCondition(PageQuery query){
|
|
|
|
|
PageQuery ret = teacherOpenCourseQuestionLogDao.queryByCondition(query);
|
|
|
|
|
queryListAfter(ret.getList());
|
|
|
|
@ -598,8 +600,13 @@ public class TeacherOpenCourseQuestionLogService extends CoreBaseService<Teacher
|
|
|
|
|
myTotalScore = myTotalScore.add(questionLog.getStudentScore());
|
|
|
|
|
idsSet.add(questionLog.getTeacherOpenCourseQuestionLogId().toString());
|
|
|
|
|
}
|
|
|
|
|
// 是否通过及格率 TODO 及格率要查询数据库 这里先写死
|
|
|
|
|
// 及格分值比率
|
|
|
|
|
BigDecimal passRateSetting = new BigDecimal("0.6");
|
|
|
|
|
// 查询数据字典配置项
|
|
|
|
|
String passRateVal = coreDictService.getOrDefault("pass_rate", "0.6");
|
|
|
|
|
if (NumberUtil.isNumber(passRateVal)) {
|
|
|
|
|
passRateSetting = new BigDecimal(passRateVal);
|
|
|
|
|
}
|
|
|
|
|
boolean isPass = NumberUtil.isGreaterOrEqual(myTotalScore, NumberUtil.mul(questionTotalScore, passRateSetting));
|
|
|
|
|
questionLogSummary.setQuestionSettingId(questionSettingId);
|
|
|
|
|
questionLogSummary.setQuestionSettingName(questionSettingName);
|
|
|
|
|