|
@@ -44,7 +44,7 @@ def login():
|
|
|
|
|
|
|
|
|
@calctime
|
|
|
-def querydetail(curpage):
|
|
|
+def doExport():
|
|
|
print('')
|
|
|
|
|
|
if len(config.examId) == 0:
|
|
@@ -53,8 +53,20 @@ def querydetail(curpage):
|
|
|
|
|
|
login()
|
|
|
|
|
|
+ if len(config.courseIds) > 0:
|
|
|
+ courseIds = config.courseIds.split(',')
|
|
|
+ for courseId in courseIds:
|
|
|
+ querydetail(1, courseId)
|
|
|
+ else:
|
|
|
+ querydetail(1, None)
|
|
|
+
|
|
|
+
|
|
|
+@calctime
|
|
|
+def querydetail(curpage, courseId):
|
|
|
+ print('')
|
|
|
+
|
|
|
url = "https://" + config.domain + "/api/ecs_oe_admin/exam/record/detail/list"
|
|
|
- params = {"rootOrgId": config.rootOrgId, "examRecordDataId": None, "hasStranger": None, "courseId": config.courseId,
|
|
|
+ params = {"rootOrgId": config.rootOrgId, "examRecordDataId": None, "hasStranger": None, "courseId": courseId,
|
|
|
"courseLevel": None,
|
|
|
"examId": config.examId, "faceSuccessPercentLower": None, "faceSuccessPercentUpper": None,
|
|
|
"identityNumber": None,
|
|
@@ -68,14 +80,14 @@ def querydetail(curpage):
|
|
|
contents = result.json()["content"]
|
|
|
totalPages = result.json()["totalPages"]
|
|
|
totalElements = result.json()["totalElements"]
|
|
|
- print(
|
|
|
- "---> totalElements=" + str(totalElements) + " totalPages=" + str(totalPages) + " curPage=" + str(curpage))
|
|
|
+ print("---> totalElements=" + str(totalElements) + " totalPages=" + str(totalPages)
|
|
|
+ + " curPage=" + str(curpage) + " courseId=" + str(courseId))
|
|
|
|
|
|
for content in contents:
|
|
|
solveexamRecord(content)
|
|
|
|
|
|
if curpage < totalPages:
|
|
|
- querydetail(curpage + 1)
|
|
|
+ querydetail(curpage + 1, courseId)
|
|
|
else:
|
|
|
raise Exception("获取数据失败,请检查配置参数或网络是否正常!")
|
|
|
|