|
@@ -42,7 +42,10 @@ public class YouZy {
|
|
|
// System.out.println(majorList.size());
|
|
|
|
|
|
for (String majorCode : majorList) {
|
|
|
-// if(majorCode.compareTo("130503")<=-1){
|
|
|
+// if(majorCode.compareTo("430701")<=-1){
|
|
|
+// continue;
|
|
|
+// }
|
|
|
+// if(!"081003".equalsIgnoreCase(majorCode)){
|
|
|
// continue;
|
|
|
// }
|
|
|
|
|
@@ -124,11 +127,40 @@ public class YouZy {
|
|
|
if (resultJsonobject.getBoolean("isSuccess")) {
|
|
|
JSONObject resultJsonObject = resultJsonobject.getJSONObject("result");
|
|
|
String bigName = resultJsonObject.getString("bigName");
|
|
|
- jobDirection = resultJsonObject.getJSONObject("major").getString("jobDirection");
|
|
|
+ String middleName = resultJsonObject.getString("middleName");
|
|
|
+ JSONObject majorJSONObject= resultJsonObject.getJSONObject("major");
|
|
|
+ //专业概况 sy_major_overview
|
|
|
+ majorJSONObject.put("bigName",bigName);
|
|
|
+ majorJSONObject.put("middleName",middleName);
|
|
|
+ majorJSONObject.remove("certExample");
|
|
|
+ majorJSONObject.remove("id");
|
|
|
+ majorJSONObject.remove("parentId");
|
|
|
+ //处理jobText无值的情况
|
|
|
+ String jobText = majorJSONObject.getString("jobText");
|
|
|
+ if(StringUtils.isEmpty(jobText)){
|
|
|
+ //json默认值插入数据库时不能为"",默认为null
|
|
|
+ majorJSONObject.put("jobText", null);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ //插入表sy_major_overview
|
|
|
+ Entity subjectTable4 = Entity.create("sy_major_overview");
|
|
|
+ subjectTable4.putAll(majorJSONObject);
|
|
|
+ try {
|
|
|
+ DbUtil.use().insertOrUpdate(subjectTable4, "code");
|
|
|
+ log.info("专业概况(sy_major_overview): finished code {}",code);
|
|
|
+ } catch (SQLException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
|
|
|
- majorName = resultJsonObject.getJSONObject("major").getString("name");
|
|
|
+ jobDirection = majorJSONObject.getString("jobDirection");
|
|
|
+ majorName = majorJSONObject.getString("name");
|
|
|
major = bigName+"-"+majorName;
|
|
|
}
|
|
|
+
|
|
|
+ }
|
|
|
+ if(true){
|
|
|
+ return;
|
|
|
}
|
|
|
if (StringUtils.isEmpty(jobDirection)) {
|
|
|
log.error("jobDirection is empty,code is {},major is {},resultJsonobject is {}",code,major
|