@ -120,6 +120,19 @@ public class ExamController extends Controller {
renderJson(list);
}
/**
* 功能:查看自己答卷的整体情况,哪个题目答了,哪个题目没有答
*/
@Before({GET.class})
public void getPersonUnFinishCount() {
String person_id = getCookie("person_id");
int count = em.getPersonUnFinishCount(person_id);
Kv kv = Kv.create();
kv.set("success", true);
kv.set("count", count);
renderJson(kv);
* 功能:获取指定题目的信息(交卷后可见)
*
@ -180,6 +180,14 @@ public class ExamModel {
return Db.find(sql, person_id);
public int getPersonUnFinishCount(String person_id) {
String sql = "select count(1) as count from t_exam_record where person_id=? and reply is null";
return Db.findFirst(sql, person_id).getInt("count");
* 功能:获取指定题目的信息(交卷后可见)+答案