loading-img
考生成绩查询

1、爱科举开放接口使用JWT规范(Json web token);

2、获取AppID和AppKey,商业版用户登录管理端,进入【系统管理】-【开发平台】获取AppID和AppKey;

3、以Java开发为例,安装maven依赖:

<!-- https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt -->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.9.1</version>
</dependency>

4、生成jwt数据:

String app_key = "SV0opAea621484K3fcLRGfM05W2";
Map map = new HashMap();
map.put("action", "queryAch");
Date now = new Date(System.currentTimeMillis());
String jwt = "";
try {
   jwt ="ikeju_"+ Jwts.builder().setClaims(map).setExpiration(new Date(now.getTime() + 1000 * 10 * 60))
.signWith(SignatureAlgorithm.HS512, app_key.getBytes("UTF-8")).compact();
} catch (UnsupportedEncodingException e) {
   e.printStackTrace();
}

代码说明:

(1)必须使用ikeju作为前缀;

(2)一定要使用getBytes("UTF-8");

(3)map.put("action", "queryAch") 为固定格式,action为queryAch表示执行的是查询考生成绩;

5、封装数据,使用post类型发送请求到接口https://admin.ikeju.net/api/{AppID}

参数编号参数名称是否必填参数示例参数说明
1examId123考试id,可以通过“考试列表查询”获取
2

pageNumber

1查询页面,默认为1

6、返回数据

{
    "rows":[
        {
            "ueBeginDate":1603272094000,
            "ueDepart":null,
            "ueDuration":5570.03,
            "ueId":37,
            "uePass":0,
            "ueScore":4,
            "ueStatus":1,
            "ueSubmitDate":1603606295000,
            "ue_examName":"知识竞赛第一期",
            "ue_trueName":"张三",
            "ue_userName":"zhangsan"
        },
        {
            "ueBeginDate":1603267614000,
            "ueDepart":null,
            "ueDuration":0.52,
            "ueId":36,
            "uePass":0,
            "ueScore":0,
            "ueStatus":1,
            "ueSubmitDate":1603267644000,
            "ue_examName":"知识竞赛第一期",
            "ue_trueName":"张三",
            "ue_userName":"zhangsan"
        },
        {
            "ueBeginDate":1603267456000,
            "ueDepart":null,
            "ueDuration":0.52,
            "ueId":35,
            "uePass":0,
            "ueScore":0,
            "ueStatus":1,
            "ueSubmitDate":1603267486000,
            "ue_examName":"知识竞赛第一期",
            "ue_trueName":"张三",
            "ue_userName":"zhangsan"
        },
        {
            "ueBeginDate":1603267178000,
            "ueDepart":null,
            "ueDuration":0.52,
            "ueId":34,
            "uePass":0,
            "ueScore":0,
            "ueStatus":1,
            "ueSubmitDate":1603267208000,
            "ue_examName":"知识竞赛第一期",
            "ue_trueName":"张三",
            "ue_userName":"zhangsan"
        },
        {
            "ueBeginDate":1603266129000,
            "ueDepart":null,
            "ueDuration":0.51,
            "ueId":33,
            "uePass":0,
            "ueScore":0,
            "ueStatus":1,
            "ueSubmitDate":1603266159000,
            "ue_examName":"知识竞赛第一期",
            "ue_trueName":"张三",
            "ue_userName":"zhangsan"
        },
        {
            "ueBeginDate":1603266042000,
            "ueDepart":null,
            "ueDuration":1.05,
            "ueId":32,
            "uePass":0,
            "ueScore":0,
            "ueStatus":1,
            "ueSubmitDate":1603266104000,
            "ue_examName":"知识竞赛第一期",
            "ue_trueName":"张三",
            "ue_userName":"zhangsan"
        },
        {
            "ueBeginDate":1603265657000,
            "ueDepart":null,
            "ueDuration":0.52,
            "ueId":31,
            "uePass":0,
            "ueScore":0,
            "ueStatus":1,
            "ueSubmitDate":1603265688000,
            "ue_examName":"知识竞赛第一期",
            "ue_trueName":"张三",
            "ue_userName":"zhangsan"
        },
        {
            "ueBeginDate":1603264278000,
            "ueDepart":null,
            "ueDuration":2.2,
            "ueId":30,
            "uePass":0,
            "ueScore":0,
            "ueStatus":1,
            "ueSubmitDate":1603264409000,
            "ue_examName":"知识竞赛第一期",
            "ue_trueName":"张三",
            "ue_userName":"zhangsan"
        },
        {
            "ueBeginDate":1603246300000,
            "ueDepart":null,
            "ueDuration":296.77,
            "ueId":29,
            "uePass":0,
            "ueScore":0,
            "ueStatus":1,
            "ueSubmitDate":1603264106000,
            "ue_examName":"知识竞赛第一期",
            "ue_trueName":"张三",
            "ue_userName":"zhangsan"
        },
        {
            "ueBeginDate":1603246210000,
            "ueDepart":null,
            "ueDuration":1.03,
            "ueId":28,
            "uePass":0,
            "ueScore":0,
            "ueStatus":1,
            "ueSubmitDate":1603246272000,
            "ue_examName":"知识竞赛第一期",
            "ue_trueName":"张三",
            "ue_userName":"zhangsan"
        }
    ],
    "total":13
}

rows:返回当前页码查询结果

total:结果总数

字段说明:

参数编号参数名称参数说明    
1

ueId

考生试卷id
2

ue_examName

考试名称
3ue_trueName考生真实姓名
4ue_userName考生账号
5

ueDepart

考生部门
6

ueBeginDate

开始时间
7

ueSubmitDate

交卷时间
8

ueDuration

考试时长
9

ueScore

考试得分
10

uePass

是否及格,0为不通过,1为通过
11

ueStatus

0为未交卷,1为已经交卷,2为系统交卷,3为试卷含有操作题(需要等待操作题打分后交卷)