code==20000

master
admin 2 years ago
parent 3bd393227b
commit d7a1453cfd

@ -174,11 +174,14 @@ public class IdcServiceImpl implements IdcService {
logger.info("fetch from ip:"+host);
if(!StringUtils.isEmpty(host)) {
String result = post(host+"/spssync/common/list",null);
if(IDCUtils.isJson(result)) {
JSONObject json = JSON.parseObject(result);
if(json!=null&&json.getInteger("code")==20000&&json.getString("data")!=null) {
List<Map> list = JSON.parseArray(json.getString("data"), Map.class);
if(json!=null&&json.getInteger("code")==20000&&json.get("data")!=null) {
List<Map> list = JSON.parseArray(JSON.toJSONString(json.get("data")), Map.class);
if(list!=null) {
for(Map map:list) {
Map<String,Object> params = new HashMap<String,Object>();
@ -292,9 +295,10 @@ 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")==2000) {
if(json.get("code")!=null&&json.getInteger("code")==20000) {
success = analyMiddle(host,json.getJSONObject("data"),files,false,true);
if(!success)
logger.info("fetchData-->解析失败");
@ -689,6 +693,7 @@ 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 = "";

Loading…
Cancel
Save