Compare commits
No commits in common. "febb8f8fa05864d0de56f9ee41d17cd5c9b3e10d" and "cfc62e800d045586ec1b007dcdb41a517b2c82f3" have entirely different histories.
febb8f8fa0
...
cfc62e800d
|
@ -214,7 +214,7 @@ public class ToDoResendTack extends AbstractTask {
|
||||||
form.append("\"pendingAttr\":");
|
form.append("\"pendingAttr\":");
|
||||||
form.append("\"0\"");
|
form.append("\"0\"");
|
||||||
form.append("}");
|
form.append("}");
|
||||||
CreateToDoHandler.get_CreateToDoHandler().sendCreateToDo(form.toString(),title,next.getLong("fid").toString(),username);
|
CreateToDoHandler.get_CreateToDoHandler().sendCreateToDo(form.toString(),title);
|
||||||
break;
|
break;
|
||||||
case "2":
|
case "2":
|
||||||
DealToDoHandler.get_DealToDoHandler().sendDealToDo(next.getLong("id"),username);
|
DealToDoHandler.get_DealToDoHandler().sendDealToDo(next.getLong("id"),username);
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class CreateToDoHandler {
|
||||||
}
|
}
|
||||||
return _CreateToDoHandler;
|
return _CreateToDoHandler;
|
||||||
}
|
}
|
||||||
public boolean sendCreateToDo(String messageInfo,String title,String appRecordId,String userId) {
|
public boolean sendCreateToDo(String messageInfo,String title) {
|
||||||
logger.info("###进入待办推送接口数据组装");
|
logger.info("###进入待办推送接口数据组装");
|
||||||
try {
|
try {
|
||||||
//调用接口结果
|
//调用接口结果
|
||||||
|
@ -37,18 +37,18 @@ public class CreateToDoHandler {
|
||||||
//接口调用结果
|
//接口调用结果
|
||||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||||
if(jsonObject == null){
|
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);
|
||||||
logger.info("###响应报文为空");
|
logger.info("###响应报文为空");
|
||||||
return false;
|
return false;
|
||||||
}else{
|
}else{
|
||||||
if(Objects.equals("success",jsonObject.getString("status"))){
|
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);
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}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);
|
||||||
//发送失败
|
//发送失败
|
||||||
logger.error("###接口调通失败");
|
logger.error("###接口调通失败");
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -105,7 +105,7 @@ public class BacklogServiceHandle extends AbstractServiceHandler {
|
||||||
//业务自定义数据
|
//业务自定义数据
|
||||||
backlogMessage.setJsonData("");*/
|
backlogMessage.setJsonData("");*/
|
||||||
logger.info("###待办拼接请求体:"+form);
|
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());
|
||||||
}
|
}
|
||||||
logger.info("###结束待办_createToDo");
|
logger.info("###结束待办_createToDo");
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,8 @@ package shkd.sys.sys.midservice.utils;
|
||||||
|
|
||||||
import cn.hutool.crypto.SmUtil;
|
import cn.hutool.crypto.SmUtil;
|
||||||
import cn.hutool.http.HttpRequest;
|
import cn.hutool.http.HttpRequest;
|
||||||
import kd.bos.coderule.api.CodeRuleInfo;
|
|
||||||
import kd.bos.dataentity.entity.DynamicObject;
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
import kd.bos.isc.util.flow.core.Execution;
|
|
||||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
import kd.bos.servicehelper.coderule.CodeRuleServiceHelper;
|
|
||||||
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||||
import kd.bos.util.StringUtils;
|
import kd.bos.util.StringUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -93,7 +90,7 @@ public class RequestClient {
|
||||||
* @param result 响应报文
|
* @param result 响应报文
|
||||||
* @param jsonMessage 请求报文
|
* @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){
|
||||||
logger.info("###开始调用待办保存日志方法");
|
logger.info("###开始调用待办保存日志方法");
|
||||||
StringBuffer urlStr = new StringBuffer();
|
StringBuffer urlStr = new StringBuffer();
|
||||||
urlStr.append(this.protocal).append("://").append(this.ip);
|
urlStr.append(this.protocal).append("://").append(this.ip);
|
||||||
|
@ -102,28 +99,18 @@ public class RequestClient {
|
||||||
}
|
}
|
||||||
urlStr.append(url);;
|
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);
|
||||||
try{
|
DynamicObject dynamicObject = BusinessDataServiceHelper.newDynamicObject("shkd_backlog");
|
||||||
DynamicObject dynamicObject = BusinessDataServiceHelper.newDynamicObject("shkd_backlog1");
|
logger.info("###保存日志表id"+dynamicObject.getPkValue());
|
||||||
logger.info("###保存日志表id"+dynamicObject.getPkValue());
|
dynamicObject.set("shkd_url",urlStr);
|
||||||
dynamicObject.set("shkd_url",urlStr);
|
dynamicObject.set("shkd_request",title);
|
||||||
CodeRuleInfo codeRule = CodeRuleServiceHelper.getCodeRule(dynamicObject.getDataEntityType().getName(), dynamicObject, null);
|
dynamicObject.set("shkd_request_tag",jsonMessage);
|
||||||
dynamicObject.set("billno",CodeRuleServiceHelper.getNumber(codeRule,dynamicObject));
|
dynamicObject.set("shkd_response",isTrue);
|
||||||
dynamicObject.set("shkd_traceid",appRecordId);
|
dynamicObject.set("shkd_response_tag",result);
|
||||||
dynamicObject.set("shkd_username",userId);
|
dynamicObject.set("shkd_status","0");
|
||||||
dynamicObject.set("shkd_request",title);
|
dynamicObject.set("billstatus","C");
|
||||||
dynamicObject.set("shkd_request_tag",jsonMessage);
|
SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
|
||||||
dynamicObject.set("shkd_response",isTrue);
|
logger.info("###保存日志表后id"+dynamicObject.getPkValue());
|
||||||
dynamicObject.set("shkd_response_tag",result);
|
logger.info("###结束调用待办保存日志方法");
|
||||||
dynamicObject.set("shkd_status","0");
|
|
||||||
dynamicObject.set("billstatus","C");
|
|
||||||
Object[] save = SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
|
|
||||||
logger.info("###保存日志表后id"+dynamicObject.getPkValue());
|
|
||||||
logger.info("save结果"+save.toString());
|
|
||||||
logger.info("###结束调用待办保存日志方法");
|
|
||||||
}catch (Exception execution){
|
|
||||||
logger.info("###保存日志失败"+execution.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
/***
|
/***
|
||||||
* 保存待办日志
|
* 保存待办日志
|
||||||
|
@ -143,26 +130,19 @@ public class RequestClient {
|
||||||
urlStr.append(":").append(this.port);
|
urlStr.append(":").append(this.port);
|
||||||
}
|
}
|
||||||
urlStr.append(url);
|
urlStr.append(url);
|
||||||
try{
|
DynamicObject dynamicObject = BusinessDataServiceHelper.newDynamicObject("shkd_backlog1");
|
||||||
DynamicObject dynamicObject = BusinessDataServiceHelper.newDynamicObject("shkd_backlog1");
|
dynamicObject.set("shkd_url",urlStr);
|
||||||
dynamicObject.set("shkd_url",urlStr.toString());
|
dynamicObject.set("shkd_traceid",appRecordId);
|
||||||
CodeRuleInfo codeRule = CodeRuleServiceHelper.getCodeRule(dynamicObject.getDataEntityType().getName(), dynamicObject, null);
|
dynamicObject.set("shkd_username",userId);
|
||||||
dynamicObject.set("billno",CodeRuleServiceHelper.getNumber(codeRule,dynamicObject));
|
dynamicObject.set("shkd_request","业务id:"+appRecordId+",接收人username:"+userId);
|
||||||
dynamicObject.set("shkd_traceid",appRecordId);
|
dynamicObject.set("shkd_request_tag",jsonMessage);
|
||||||
dynamicObject.set("shkd_username",userId);
|
dynamicObject.set("shkd_response",isTrue);
|
||||||
dynamicObject.set("shkd_request","业务id:"+appRecordId+",接收人username:"+userId);
|
dynamicObject.set("shkd_response_tag",result);
|
||||||
dynamicObject.set("shkd_request_tag",jsonMessage);
|
dynamicObject.set("shkd_status",status);
|
||||||
dynamicObject.set("shkd_response",isTrue);
|
dynamicObject.set("billstatus","C");
|
||||||
dynamicObject.set("shkd_response_tag",result);
|
SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
|
||||||
dynamicObject.set("shkd_status",status);
|
logger.info("###保存日志表id"+dynamicObject.getPkValue());
|
||||||
dynamicObject.set("billstatus","C");
|
logger.info("###结束调用已办、撤销保存日志方法");
|
||||||
Object[] save = SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
|
|
||||||
logger.info("###保存日志表id"+dynamicObject.getPkValue());
|
|
||||||
logger.info("save结果"+save.toString());
|
|
||||||
logger.info("###结束调用已办、撤销保存日志方法");
|
|
||||||
}catch (Exception execution){
|
|
||||||
logger.info("###保存日志失败"+execution.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue