|
@@ -2,6 +2,7 @@ package com.persagy.dmp.rwd.dic;
|
|
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
|
|
+import com.persagy.common.criteria.JacksonCriteria;
|
|
|
import com.persagy.common.date.DateUtils;
|
|
|
import com.persagy.common.json.JacksonMapper;
|
|
|
import com.persagy.dmp.rwd.enums.ObjType;
|
|
@@ -59,10 +60,10 @@ public class ImportKnowledgeForEdit {
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+ initCityLocation(classes,"cityLocation","省市区编号");
|
|
|
+ writeFuncSqlToFile(classes, "cityLocation");
|
|
|
+ classes.clear();
|
|
|
|
|
|
|
|
|
|
|
@@ -183,10 +184,10 @@ public class ImportKnowledgeForEdit {
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
- initObjectRelation(classes,"objectRelation","新版");
|
|
|
- writeFuncSqlToFile(classes, "objectRelation");
|
|
|
- classes.clear();
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
private void initObjectRelation(List<RwdeditRefTypeInfosModel> models,String refKey,String sheetName) throws IOException {
|
|
@@ -2679,9 +2680,16 @@ public class ImportKnowledgeForEdit {
|
|
|
writer.append("\n");
|
|
|
writer.flush();
|
|
|
writer.close();
|
|
|
+ System.out.println("[");
|
|
|
+ JacksonCriteria jacksonCriteria = JacksonCriteria.newInstance();
|
|
|
for (RwdeditRefTypeInfosModel type : classes) {
|
|
|
- System.out.println(JacksonMapper.toSimpleJson(type));
|
|
|
+ ObjectNode criteria = jacksonCriteria.getCriteria();
|
|
|
+ criteria.put("code",type.getCode());
|
|
|
+ criteria.put("name",type.getName().trim());
|
|
|
+ criteria.put("parentCode",type.getParentCode());
|
|
|
+ System.out.println(JacksonMapper.toSimpleJson(criteria)+",");
|
|
|
}
|
|
|
+ System.out.println("]");
|
|
|
}
|
|
|
|
|
|
private String toSql(RwdeditRefTypeInfosModel model) {
|