diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/backlogTack/ToDoResendTack.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/backlogTack/ToDoResendTack.java index 69939e1..dd53bc9 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/backlogTack/ToDoResendTack.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/backlogTack/ToDoResendTack.java @@ -214,13 +214,13 @@ public class ToDoResendTack extends AbstractTask { form.append("\"pendingAttr\":"); form.append("\"0\""); form.append("}"); - CreateToDoHandler.get_CreateToDoHandler().sendCreateToDo(form.toString(),title,next.getLong("fid").toString(),username); + CreateToDoHandler.get_CreateToDoHandler().sendCreateToDo(form.toString(),title,next.getLong("fid").toString(),username,next.getString("fbillno")); break; case "2": - DealToDoHandler.get_DealToDoHandler().sendDealToDo(next.getLong("fid"),username); + DealToDoHandler.get_DealToDoHandler().sendDealToDo(next.getLong("fid"),username,next.getString("fbillno")); break; case "5": - deleteToDoHandler.get_deleteToDoHandler().sendDeleteToDo(next.getLong("fid"),username); + deleteToDoHandler.get_deleteToDoHandler().sendDeleteToDo(next.getLong("fid"),username,next.getString("fbillno")); break; default: break; 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 5d001dd..73c8deb 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 @@ -28,7 +28,8 @@ public class CreateToDoHandler { } return _CreateToDoHandler; } - public boolean sendCreateToDo(String messageInfo,String title,String appRecordId,String userId) { + public boolean + sendCreateToDo(String messageInfo,String title,String appRecordId,String userId,String number) { logger.info("###进入待办推送接口数据组装"); try { //调用接口结果 @@ -37,18 +38,18 @@ public class CreateToDoHandler { //接口调用结果 JSONObject jsonObject = JSONObject.parseObject(result); if(jsonObject == null){ - RequestClient.getInstance().saveCreateToDo(title,ToDoCenterConstant.URI_send_addNew,false,result,messageInfo,appRecordId,userId); + RequestClient.getInstance().saveCreateToDo(title,ToDoCenterConstant.URI_send_addNew,false,result,messageInfo,appRecordId,userId,number); logger.info("###响应报文为空"); return false; }else{ if(Objects.equals("success",jsonObject.getString("status"))){ //发送成功 //调用保存操作 - RequestClient.getInstance().saveCreateToDo(title,ToDoCenterConstant.URI_send_addNew,true,result,messageInfo,appRecordId,userId); + RequestClient.getInstance().saveCreateToDo(title,ToDoCenterConstant.URI_send_addNew,true,result,messageInfo,appRecordId,userId,number); return true; }else{ //调用保存操作 - RequestClient.getInstance().saveCreateToDo(title,ToDoCenterConstant.URI_send_addNew,false,result,messageInfo,appRecordId,userId); + RequestClient.getInstance().saveCreateToDo(title,ToDoCenterConstant.URI_send_addNew,false,result,messageInfo,appRecordId,userId,number); //发送失败 logger.error("###接口调通失败"); return false; diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/handler/DealToDoHandler.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/handler/DealToDoHandler.java index 8185446..4d2ad41 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/handler/DealToDoHandler.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/handler/DealToDoHandler.java @@ -28,7 +28,7 @@ public class DealToDoHandler { return _DealToDoHandler; } - public boolean sendDealToDo(Long appRecordId, String userId) { + public boolean sendDealToDo(Long appRecordId, String userId,String number) { try { String part = "{ \"appRecordId\": \""+appRecordId+"\", \"userId\": \""+userId+"\" }"; //调用接口结果 @@ -38,17 +38,17 @@ public class DealToDoHandler { JSONObject jsonObject = JSONObject.parseObject(result); if (jsonObject == null) { //发送失败 - RequestClient.getInstance().saveDeLToDo(appRecordId, userId, ToDoCenterConstant.URI_SEND_finish, false, result, part, "2"); + RequestClient.getInstance().saveDeLToDo(appRecordId, userId, ToDoCenterConstant.URI_SEND_finish, false, result, part, "2",number); logger.info("###响应报文为空"); return false; } else { if(Objects.equals("success",jsonObject.getString("status"))){ //发送成功 - RequestClient.getInstance().saveDeLToDo(appRecordId, userId, ToDoCenterConstant.URI_SEND_finish, true, result, part, "2"); + RequestClient.getInstance().saveDeLToDo(appRecordId, userId, ToDoCenterConstant.URI_SEND_finish, true, result, part, "2",number); return true; } else { //发送失败 - RequestClient.getInstance().saveDeLToDo(appRecordId, userId, ToDoCenterConstant.URI_SEND_finish, false, result, part, "2"); + RequestClient.getInstance().saveDeLToDo(appRecordId, userId, ToDoCenterConstant.URI_SEND_finish, false, result, part, "2",number); return false; } } diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/handler/deleteToDoHandler.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/handler/deleteToDoHandler.java index 697f29b..b119b14 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/handler/deleteToDoHandler.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/handler/deleteToDoHandler.java @@ -28,7 +28,7 @@ public class deleteToDoHandler { return _deleteToDoHandler; } - public boolean sendDeleteToDo(Long appRecordId,String userId) { + public boolean sendDeleteToDo(Long appRecordId,String userId,String number) { try { //body String part = "{ \"appRecordId\": \""+appRecordId+"\", \"userId\": \""+userId+"\" }"; @@ -38,16 +38,16 @@ public class deleteToDoHandler { //接口调用结果 JSONObject jsonObject = JSONObject.parseObject(result); if(jsonObject== null){ - RequestClient.getInstance().saveDeLToDo(appRecordId,userId,ToDoCenterConstant.URI_send_deleteP,false,result,part,"5"); + RequestClient.getInstance().saveDeLToDo(appRecordId,userId,ToDoCenterConstant.URI_send_deleteP,false,result,part,"5",number); logger.info("###响应报文为空"); return false; }else{ if(Objects.equals("success",jsonObject.getString("status"))){ //发送成功 - RequestClient.getInstance().saveDeLToDo(appRecordId,userId,ToDoCenterConstant.URI_send_deleteP,true,result,part,"5"); + RequestClient.getInstance().saveDeLToDo(appRecordId,userId,ToDoCenterConstant.URI_send_deleteP,true,result,part,"5",number); return true; }else{ - RequestClient.getInstance().saveDeLToDo(appRecordId,userId,ToDoCenterConstant.URI_send_deleteP,false,result,part,"5"); + RequestClient.getInstance().saveDeLToDo(appRecordId,userId,ToDoCenterConstant.URI_send_deleteP,false,result,part,"5",number); return false; } } 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 fa1d9a5..00590b3 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 @@ -105,7 +105,8 @@ public class BacklogServiceHandle extends AbstractServiceHandler { //业务自定义数据 backlogMessage.setJsonData("");*/ logger.info("###待办拼接请求体:"+form); - CreateToDoHandler.get_CreateToDoHandler().sendCreateToDo(form.toString(),todoInfo.getTitle(),todoInfo.getTaskId().toString(),query_one.getString("username")); + CreateToDoHandler.get_CreateToDoHandler().sendCreateToDo(form.toString(),todoInfo.getTitle(), + todoInfo.getTaskId().toString(),query_one.getString("username"),dynamicObject.getString("billno")); } logger.info("###结束待办_createToDo"); @@ -118,10 +119,16 @@ public class BacklogServiceHandle extends AbstractServiceHandler { List userIds = info.getUserIds(); logger.info("####已办taskid:"+info.getTaskId()); DynamicObjectCollection query = QueryServiceHelper.query("bos_user", "id,name,phone,username", new QFilter[]{new QFilter("id", "in", userIds)}); - //业务id + DynamicObject dynamicObject = QueryServiceHelper.queryOne("wf_hitaskinst", "billno", + new QFilter[]{new QFilter("id", "=", info.getTaskId())}); + //业务id Long taskId = ctx.getTaskId(); for (DynamicObject queryOne : query) { - DealToDoHandler.get_DealToDoHandler().sendDealToDo(taskId,queryOne.getString("username")); + if(dynamicObject != null){ + DealToDoHandler.get_DealToDoHandler().sendDealToDo(taskId,queryOne.getString("username"),dynamicObject.getString("billno")); + }else{ + DealToDoHandler.get_DealToDoHandler().sendDealToDo(taskId,queryOne.getString("username"),""); + } } logger.info("###结束已办_dealToDo"); @@ -132,11 +139,18 @@ public class BacklogServiceHandle extends AbstractServiceHandler { logger.info("###创建撤销_deleteToDo"); List userIds = info.getUserIds(); DynamicObjectCollection query = QueryServiceHelper.query("bos_user", "id,name,phone,username", new QFilter[]{new QFilter("id", "in", userIds)}); + DynamicObject dynamicObject = QueryServiceHelper.queryOne("wf_hitaskinst", "billno", + new QFilter[]{new QFilter("id", "=", info.getTaskId())}); //业务id Long taskId = ctx.getTaskId(); logger.info("####撤销taskid:"+info.getTaskId()); for (DynamicObject queryOne : query) { - deleteToDoHandler.get_deleteToDoHandler().sendDeleteToDo(taskId,queryOne.getString("username")); + if(dynamicObject != null){ + deleteToDoHandler.get_deleteToDoHandler().sendDeleteToDo(taskId,queryOne.getString("username"),dynamicObject.getString("billno")); + }else{ + deleteToDoHandler.get_deleteToDoHandler().sendDeleteToDo(taskId,queryOne.getString("username"),""); + + } } logger.info("###结束撤销_deleteToDo"); } 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 3f5d645..943ba49 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 @@ -93,7 +93,7 @@ public class RequestClient { * @param result 响应报文 * @param jsonMessage 请求报文 */ - public void saveCreateToDo(String title,String url, boolean isTrue,String result,String jsonMessage,String appRecordId,String userId){ + public void saveCreateToDo(String title,String url, boolean isTrue,String result,String jsonMessage,String appRecordId,String userId,String number){ logger.info("###开始调用待办保存日志方法"); StringBuffer urlStr = new StringBuffer(); urlStr.append(this.protocal).append("://").append(this.ip); @@ -116,6 +116,9 @@ public class RequestClient { dynamicObject.set("shkd_response_tag",result); dynamicObject.set("shkd_status","0"); dynamicObject.set("billstatus","C"); + if(StringUtils.isNotEmpty(number)){ + dynamicObject.set("shkd_number",number); + } Object[] save = SaveServiceHelper.save(new DynamicObject[]{dynamicObject}); logger.info("###保存日志表后id"+dynamicObject.getPkValue()); logger.info("save结果"+save.toString()); @@ -135,7 +138,7 @@ public class RequestClient { * @param jsonMessage 请求报文 * @param status 类型 2:已办 5:撤销 */ - public void saveDeLToDo(Long appRecordId,String userId,String url,boolean isTrue,String result,String jsonMessage,String status){ + public void saveDeLToDo(Long appRecordId,String userId,String url,boolean isTrue,String result,String jsonMessage,String status,String number){ logger.info("###开始调用已办、撤销保存日志方法"); StringBuffer urlStr = new StringBuffer(); urlStr.append(this.protocal).append("://").append(this.ip); @@ -156,6 +159,9 @@ public class RequestClient { dynamicObject.set("shkd_response_tag",result); dynamicObject.set("shkd_status",status); dynamicObject.set("billstatus","C"); + if(StringUtils.isNotEmpty(number)){ + dynamicObject.set("shkd_number",number); + } Object[] save = SaveServiceHelper.save(new DynamicObject[]{dynamicObject}); logger.info("###保存日志表id"+dynamicObject.getPkValue()); logger.info("save结果"+save.toString());