deason 3 лет назад
Родитель
Сommit
6e42072ec1
2 измененных файлов с 25 добавлено и 25 удалено
  1. 10 10
      exportformarking/config.py
  2. 15 15
      exportformarking/exportExamRecord.py

+ 10 - 10
exportformarking/config.py

@@ -1,10 +1,10 @@
-oedomain="http://192.168.1.70:8013/"
-examId=3194
-questiondomain="http://192.168.1.82:8008/"
-basedomain="http://192.168.1.78:8000/"
-outputpath="D:/output/"
-rootOrgId=17796
-examworkdomain="http://192.168.1.83:8001/"
-domain="https://qmtest.exam-cloud.cn"
-key="U_C_17919_614677"
-token="1ef45907e8554b4585feb2f7db1a71cb"
+oedomain = "http://192.168.1.70:8013/"
+examId = 3819
+questiondomain = "http://192.168.1.70:8008/"
+basedomain = "http://192.168.1.78:8000/"
+outputpath = "D:/output/"
+rootOrgId = 17796
+examworkdomain = "http://192.168.1.83:8001/"
+domain = "https://qmtest.exam-cloud.cn"
+key = "U_C_17919_614151"
+token = "dcc2331dd1cc4011b6a1c0476ff27603"

+ 15 - 15
exportformarking/exportExamRecord.py

@@ -28,21 +28,21 @@ def main():
         examRecordForMarkingBeanList = result['examRecordForMarkingBeanList']
         for examRecordForMarkingBean in examRecordForMarkingBeanList:
                handleRecordData(examRecordForMarkingBean["courseId"],1)
-        # with open(savepath, 'w', encoding='utf-8', newline='') as f:
-        #     writer = csv.writer(f)
-        #     writer.writerow(['科目代码','科目名称','大题名称','main_number','sub_number','分值'])
-        #     for row in questionlist:
-        #         writer.writerow(row)
-        # with open(mediaimport_savepath, 'w', encoding='utf-8', newline='') as f:
-        #     writer = csv.writer(f)
-        #     writer.writerow(['准考证号', '卷型'])
-        #     for row in mediaimportlist:
-        #         writer.writerow(row)
-        # with open(student_savepath, 'w', encoding='utf-8', newline='') as f:
-        #     writer = csv.writer(f)
-        #     writer.writerow(["课程代码", "课程名称", "准考证号", "学号", "姓名"])
-        #     for row in examstudentlist:
-        #         writer.writerow(row)
+        with open(savepath, 'w', encoding='gbk', newline='') as f:
+            writer = csv.writer(f)
+            writer.writerow(['科目代码','科目名称','大题名称','main_number','sub_number','分值'])
+            for row in questionlist:
+                writer.writerow(row)
+        with open(mediaimport_savepath, 'w', encoding='gbk', newline='') as f:
+            writer = csv.writer(f)
+            writer.writerow(['准考证号', '卷型'])
+            for row in mediaimportlist:
+                writer.writerow(row)
+        with open(student_savepath, 'w', encoding='gbk', newline='') as f:
+            writer = csv.writer(f)
+            writer.writerow(["课程代码", "课程名称", "准考证号", "学号", "姓名"])
+            for row in examstudentlist:
+                writer.writerow(row)
 
 
 def handleRecordData(courseId,next):