From 8c1076fcaf57162157695224a85bf4bc84f2392f Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 2 Apr 2023 08:22:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../idc/service/impl/IdcServiceImpl.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/api-admin/src/main/java/com/glxp/sale/admin/idc/service/impl/IdcServiceImpl.java b/api-admin/src/main/java/com/glxp/sale/admin/idc/service/impl/IdcServiceImpl.java index 5e7fe08..44e3a8c 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/idc/service/impl/IdcServiceImpl.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/idc/service/impl/IdcServiceImpl.java @@ -253,11 +253,15 @@ public class IdcServiceImpl implements IdcService { if(isLastLevel()) { success = analyToDB(json,files); } else { - syncAddTaskStatus(json,false); + syncAddTaskStatus(json,false,success); } + String host = getNextHost(); - if(success) - post(host+"/spssync/common/success",params); + if(success) { + String ret = post(host+"/spssync/common/success",params); + + } + } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -330,7 +334,7 @@ public class IdcServiceImpl implements IdcService { } } - syncAddTaskStatus(json,true); + syncAddTaskStatus(json,true,true); /*解析入库*/ if(isLastLevel()) { if(!analyToDB(json,files)) @@ -370,7 +374,6 @@ public class IdcServiceImpl implements IdcService { private void saveUploadStatus(Map params) { Map map = new HashMap(); - map.put("status", "0"); map.putAll(params); map.put("id", CustomUtil.getId()); map.put("updateTime", new Date()); @@ -382,7 +385,6 @@ public class IdcServiceImpl implements IdcService { private void saveExportStatus(Map params) { Map map = new HashMap(); - map.put("status", "1"); map.put("receiveStatus", "0"); map.putAll(params); map.put("id", CustomUtil.getId()); @@ -531,7 +533,7 @@ public class IdcServiceImpl implements IdcService { } saveIdcLog(messageType,"",tableName +">success",i *limit,total); } - syncAddTaskStatus(data,isUpload); + syncAddTaskStatus(data,isUpload,success); } } } @@ -542,7 +544,7 @@ public class IdcServiceImpl implements IdcService { } /*增加同步任务状态*/ - private void syncAddTaskStatus(Map json,boolean isUpload) { + private void syncAddTaskStatus(Map json,boolean isUpload,boolean success) { String content = JSON.toJSONString(json); String datePath = DateUtil.formatDate(new Date(),"yyyy-MM-dd"); String fileName = filePath +datePath+"/"+json.get("messageType")+"-"+json.get("messageId")+".udi"; @@ -560,6 +562,7 @@ public class IdcServiceImpl implements IdcService { map.put("scheduleType", isUpload ? "1" : "0"); map.put("taskId", json.get("messageId")); map.put("cacheFilePath", fileName); + map.put("status", success ? "1" : "0"); if(isUpload) { saveUploadStatus(map); } else {