kgdxpr 2 years ago
commit d823dbf940

@ -127,7 +127,7 @@ public class ExamModel {
String sql = "select question_id,answer from t_exam_record where person_id=? and order_id=?";
Record r = Db.findFirst(sql, person_id, order_id);
int question_id = r.getInt("question_id");
String answer = r.getStr("answer");
String reply = r.getStr("reply");
sql = "select t1.question_id,t1.type_id,t1.content,t1.A,t1.B,t1.C,t1.D,t1.E,t1.F,t1.G,t1.score,t2.type_name from t_exam_question as t1 inner join t_exam_question_type as t2 on t1.type_id=t2.type_id where t1.question_id=?";
Record record = Db.findFirst(sql, question_id);
@ -139,8 +139,9 @@ public class ExamModel {
jo.put("key", String.valueOf(x));
jo.put("value", record.getStr(String.valueOf(x)));
boolean flag = true;
if (StrKit.isBlank(answer)) flag = false;
if (answer.indexOf(x) < 0) flag = false;
if (StrKit.isBlank(reply)) flag = false;
else if (reply.indexOf(x) < 0) flag = false;
jo.put("checked", flag);
array.add(jo);
}

Loading…
Cancel
Save