From 45bc094c89d7f408644e4122f53210a096f253f4 Mon Sep 17 00:00:00 2001 From: fang <123456> Date: Thu, 14 Nov 2024 11:02:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=85=E5=8A=9E=5F1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sys/sys/midservice/handler/CreateToDoHandler.java | 4 +++- .../servicehandler/BacklogServiceHandle.java | 3 +++ .../shkd/sys/sys/midservice/utils/RequestClient.java | 11 +++++++---- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/handler/CreateToDoHandler.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/handler/CreateToDoHandler.java index 60c0870..774092d 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/handler/CreateToDoHandler.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/handler/CreateToDoHandler.java @@ -29,6 +29,7 @@ public class CreateToDoHandler { return _CreateToDoHandler; } public boolean sendCreateToDo(BacklogMessage messageInfo) { + logger.info("###进入待办推送接口数据组装"); try { //body JSONObject jsonObject2 = new JSONObject(); @@ -36,6 +37,7 @@ public class CreateToDoHandler { String jsonMessage = jsonObject2.toJSONString(); //调用接口结果 String result = RequestClient.getInstance().callService(ToDoCenterConstant.URI_send_addNew,jsonMessage); + logger.info("###接口返回结果"+result); //接口调用结果 JSONObject jsonObject = JSONObject.parseObject(result); if(Objects.equals("success",jsonObject.getString("status"))){ @@ -47,7 +49,7 @@ public class CreateToDoHandler { //调用保存操作 RequestClient.getInstance().saveCreateToDo(messageInfo.getTitle(),ToDoCenterConstant.URI_send_addNew,false,result,jsonMessage); //发送失败 - logger.error("##接口调通失败"); + logger.error("###接口调通失败"); return false; } } catch (Exception e) { diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/servicehandler/BacklogServiceHandle.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/servicehandler/BacklogServiceHandle.java index f7843e8..229d414 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/servicehandler/BacklogServiceHandle.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/servicehandler/BacklogServiceHandle.java @@ -37,6 +37,7 @@ public class BacklogServiceHandle extends AbstractServiceHandler { DynamicObjectCollection query = QueryServiceHelper.query("bos_user", "id,name,phone", new QFilter[]{new QFilter("id", "in", userIds)}); DynamicObject dynamicObject = QueryServiceHelper.queryOne("wf_hitaskinst", "billno,startname,id,name", new QFilter[]{new QFilter("id", "=", todoInfo.getTaskId())}); + logger.info("####待办taskid:"+todoInfo.getTaskId()); for (DynamicObject query_one : query) { BacklogMessage backlogMessage = new BacklogMessage(); @@ -87,6 +88,7 @@ public class BacklogServiceHandle extends AbstractServiceHandler { logger.info("###创建已办_dealToDo"); //几个已办 List userIds = info.getUserIds(); + logger.info("####已办taskid:"+info.getTaskId()); DynamicObjectCollection query = QueryServiceHelper.query("bos_user", "id,name,phone", new QFilter[]{new QFilter("id", "in", userIds)}); //业务id Long taskId = ctx.getTaskId(); @@ -103,6 +105,7 @@ public class BacklogServiceHandle extends AbstractServiceHandler { DynamicObjectCollection query = QueryServiceHelper.query("bos_user", "id,name,phone", new QFilter[]{new QFilter("id", "in", userIds)}); //业务id Long taskId = ctx.getTaskId(); + logger.info("####撤销taskid:"+info.getTaskId()); for (DynamicObject queryOne : query) { deleteToDoHandler.get_deleteToDoHandler().sendDeleteToDo(taskId,queryOne.getString("phone")); } diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/utils/RequestClient.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/utils/RequestClient.java index 1e3669c..7e5c835 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/utils/RequestClient.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/utils/RequestClient.java @@ -76,6 +76,7 @@ public class RequestClient { } private Map getHeaders(){ + logger.info("###进入拼接请求头方法"); Map header=new HashMap<>(); String timestamp = Long.toString(System.currentTimeMillis() / 1000); byte[] securityKey = this.clientSecret.substring(10, 26).getBytes(); @@ -103,9 +104,9 @@ public class RequestClient { urlStr.append(":").append(this.port); } urlStr.append(url);; - logger.info("保存时,环境参数,protocal:"+this.protocal+",ip:"+this.ip+",this.port:"+this.port); + logger.info("###保存时,环境参数,protocal:"+this.protocal+",ip:"+this.ip+",this.port:"+this.port); DynamicObject dynamicObject = BusinessDataServiceHelper.newDynamicObject("shkd_backlog"); - logger.info("保存日志表id"+dynamicObject.getPkValue()); + logger.info("###保存日志表id"+dynamicObject.getPkValue()); dynamicObject.set("shkd_url",urlStr); dynamicObject.set("shkd_request",title); dynamicObject.set("shkd_request_tag",jsonMessage); @@ -113,7 +114,7 @@ public class RequestClient { dynamicObject.set("shkd_response",result); dynamicObject.set("shkd_status","0"); SaveServiceHelper.save(new DynamicObject[]{dynamicObject}); - logger.info("保存日志表id"+dynamicObject.getPkValue()); + logger.info("###保存日志表id"+dynamicObject.getPkValue()); logger.info("###结束调用待办保存日志方法"); } /*** @@ -141,7 +142,9 @@ public class RequestClient { dynamicObject.set("shkd_response",isTrue); dynamicObject.set("shkd_response",result); dynamicObject.set("shkd_status",status); - logger.info("###开始调用已办、撤销保存日志方法"); + SaveServiceHelper.save(new DynamicObject[]{dynamicObject}); + logger.info("###保存日志表id"+dynamicObject.getPkValue()); + logger.info("###结束调用已办、撤销保存日志方法"); }