待办_1
This commit is contained in:
parent
a1956b40d3
commit
45bc094c89
|
@ -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) {
|
||||
|
|
|
@ -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<Long> 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"));
|
||||
}
|
||||
|
|
|
@ -76,6 +76,7 @@ public class RequestClient {
|
|||
}
|
||||
|
||||
private Map<String, String> getHeaders(){
|
||||
logger.info("###进入拼接请求头方法");
|
||||
Map<String,String> 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("###结束调用已办、撤销保存日志方法");
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue