|
@@ -33,19 +33,20 @@ public class ImportPaperByCourse {
|
|
|
|
|
|
private static String sourceQuesDir = sourceDir + "\\quesDir\\";
|
|
|
|
|
|
- private final static String url = "http://ecs-test.qmth.com.cn:8008/api/ecs_ques/importDdCollegePaper";
|
|
|
+ private final static String url = "https://ecs.qmth.com.cn:8878/api/ecs_ques/importDdCollegePaper";
|
|
|
|
|
|
- private final static String rootOrgId = "0";
|
|
|
+ private final static String rootOrgId = "1627";
|
|
|
|
|
|
- private final static String key = "U_C_0_8";
|
|
|
+ private final static String key = "U_C_1627_604294";
|
|
|
|
|
|
- private final static String token = "04784ee7c8294e7eb507cd6bd4d72525";
|
|
|
+ private final static String token = "ffa71d0d0033437c9404402348934543";
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
logger.debug("**********************导入开始");
|
|
|
Date start = new Date();
|
|
|
int errnum = 0;
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
+
|
|
|
int num = 0;
|
|
|
String fname = null;
|
|
|
File dir = new File(sourceDir);
|
|
@@ -70,7 +71,7 @@ public class ImportPaperByCourse {
|
|
|
}
|
|
|
|
|
|
// try {
|
|
|
-// importCoursePaper(new File("D:\\2020ddimport\\ques\\excelDir\\D00010018.xlsx"));
|
|
|
+// importCoursePaper(new File("D:\\2020ddimport\\ques\\excelDir\\F29020021.xlsx"));
|
|
|
// } catch (Exception e) {
|
|
|
// e.printStackTrace();
|
|
|
// }
|
|
@@ -145,6 +146,7 @@ public class ImportPaperByCourse {
|
|
|
fileList.add(new FormFilePart("dataFile", zfile.getName(), zfile));
|
|
|
Response resp = null;
|
|
|
try {
|
|
|
+ OKHttpUtil.initOkHttpClient();
|
|
|
resp = OKHttpUtil.call(HttpMethod.POST, url, headers, params, fileList);
|
|
|
if (resp.code() != 200) {
|
|
|
throw new Exception(zfile.getName() + ":body:" + resp.body().string());
|