|
@@ -31,15 +31,15 @@ public class ImportPropByCourse {
|
|
|
//此值不要修改。因为第一次导入230517批次的时候未保存批次信息,所以230517批次的不能共用。第二次导入230821批次的保存了批次值,可以后续公用。
|
|
|
private final static String batch = "230821";
|
|
|
|
|
|
-// private static String host = "http://localhost:8008";
|
|
|
+// private static String host = "http://192.168.10.145:8008";
|
|
|
// private static String rootOrgId = "149";
|
|
|
// private static String key = "$SS:C_149_170";
|
|
|
-// private static String token = "2ed6be6477e44b92b09224858a652729";
|
|
|
+// private static String token = "83540688f3ff4aebbaf1f98e1e77f17c";
|
|
|
|
|
|
private static String host = "http://192.168.1.249:8008";
|
|
|
private static String rootOrgId = "17351";
|
|
|
private static String key = "$SS:C_17351_646523";
|
|
|
- private static String token = "4278363c2b26485182c6a6b76e73ad50";
|
|
|
+ private static String token = "95c77664d77f4ba6b58b940ab5e633c8";
|
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
@@ -92,7 +92,12 @@ public class ImportPropByCourse {
|
|
|
Course c = new Course();
|
|
|
XSSFRow row = sheet.getRow(i);
|
|
|
String ecCode = row.getCell(0).getStringCellValue().trim();
|
|
|
- String yunCode = row.getCell(1).getStringCellValue().trim();
|
|
|
+ String yunCode;
|
|
|
+ try {
|
|
|
+ yunCode = row.getCell(1).getStringCellValue().trim();
|
|
|
+ } catch (Exception e) {
|
|
|
+ yunCode = (row.getCell(1).getNumericCellValue()+"").trim();
|
|
|
+ }
|
|
|
String name = row.getCell(2).getStringCellValue().trim();
|
|
|
c.setCode(ecCode);
|
|
|
c.setName(name);
|