|
|
|
@ -295,8 +295,7 @@ public class IdcServiceImpl implements IdcService {
|
|
|
|
|
Response response = client.newCall(request).execute();
|
|
|
|
|
result = response.body().string();
|
|
|
|
|
JSONObject json = JSONObject.parseObject(result);
|
|
|
|
|
logger.info("taskId-->"+isLastLevel()+params.get("taskId"));
|
|
|
|
|
logger.info("result-->"+JSON.toJSONString(json));
|
|
|
|
|
|
|
|
|
|
if(isLastLevel()) {
|
|
|
|
|
if(json.get("code")!=null&&json.getInteger("code")==20000) {
|
|
|
|
|
success = analyMiddle(host,json.getJSONObject("data"),files,false,true);
|
|
|
|
@ -591,7 +590,7 @@ public class IdcServiceImpl implements IdcService {
|
|
|
|
|
for(int z=0;z<childNum+1;z++) {
|
|
|
|
|
String[] chidTnames = childs[z].split("/");
|
|
|
|
|
if(!StringUtils.isEmpty(chidTnames[4])&&!StringUtils.isEmpty(chidTnames[5])) {
|
|
|
|
|
String keyValue = list.get(i).get(chidTnames[4]).toString();
|
|
|
|
|
String keyValue = list.get(m).get(chidTnames[4]).toString();
|
|
|
|
|
Map<String,Object> childMap = new HashMap<>();
|
|
|
|
|
childMap.put(chidTnames[5], keyValue);
|
|
|
|
|
List<Map<String,Object>> childList = getList(chidTnames[2],childMap);
|
|
|
|
@ -693,7 +692,6 @@ public class IdcServiceImpl implements IdcService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private boolean analyMiddle(String host,JSONObject jsonObject,MultipartFile[] files,boolean isUpload,boolean isToDB) {
|
|
|
|
|
logger.info("middle-->"+JSON.toJSONString(jsonObject));
|
|
|
|
|
if(jsonObject.get("data")!=null) {
|
|
|
|
|
String tableName = "";
|
|
|
|
|
String uniqueColumn = "";
|
|
|
|
@ -867,6 +865,7 @@ public class IdcServiceImpl implements IdcService {
|
|
|
|
|
for (Object o : (List<?>) obj) {
|
|
|
|
|
chList.add((Map<String,Object>)o);
|
|
|
|
|
}
|
|
|
|
|
//logger.info("childList-->"+list.get(i).get("tableName"+m)+"-->"+JSON.toJSONString(chList));
|
|
|
|
|
analyToDB(host,list.get(i).get("tableName"+m).toString(),"","",chList,isUpload);
|
|
|
|
|
} else {
|
|
|
|
|
break;
|
|
|
|
@ -875,6 +874,8 @@ public class IdcServiceImpl implements IdcService {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if(n>0) {
|
|
|
|
|
if(tableName.equals("basic_products"))
|
|
|
|
|
logger.info("sql-->"+sql);
|
|
|
|
|
result = (dbDao.save(sql)>0);
|
|
|
|
|
if(!result)
|
|
|
|
|
logger.error(tableName+"-->fetchSave Fail");
|
|
|
|
@ -1034,6 +1035,8 @@ public class IdcServiceImpl implements IdcService {
|
|
|
|
|
|
|
|
|
|
String where = DBAUtils.convertWhere(column,params,"");
|
|
|
|
|
sql+=!StringUtils.isEmpty(where) ? " where "+where : "";
|
|
|
|
|
if(tableName.equals("basic_products"))
|
|
|
|
|
logger.info("where-->"+where);
|
|
|
|
|
Map<String,Object> map = new HashMap<String,Object>();
|
|
|
|
|
map.putAll(params);
|
|
|
|
|
map.put("sql", sql);
|
|
|
|
|